|
MeshX 0.4
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
|
MeshX GPIO Platform Interface. More...
Go to the source code of this file.
Functions | |
| meshx_err_t | meshx_gpio_platform_init (void) |
| Platform-specific GPIO initialization. | |
| meshx_err_t | meshx_gpio_platform_deinit (void) |
| Platform-specific GPIO deinitialization. | |
| meshx_err_t | meshx_gpio_platform_set_level (uint8_t physical_pin, uint8_t level) |
| Platform-specific pin level set. | |
| meshx_err_t | meshx_gpio_platform_get_level (uint8_t physical_pin, uint8_t *level) |
| Platform-specific pin level get. | |
| meshx_err_t | meshx_gpio_platform_configure_pin (uint8_t physical_pin, meshx_gpio_mode_t mode, meshx_gpio_pull_t pull, meshx_gpio_drive_t drive) |
| Platform-specific pin mode configuration. | |
| meshx_err_t | meshx_gpio_platform_register_intr (uint8_t physical_pin, meshx_gpio_intr_type_t intr_type, void(*isr_handler)(void *), void *arg) |
| Platform-specific interrupt registration. | |
| meshx_err_t | meshx_gpio_platform_unregister_intr (uint8_t physical_pin) |
| Platform-specific interrupt unregistration. | |
| meshx_err_t | meshx_gpio_platform_intr_enable (uint8_t physical_pin, bool enable) |
| Platform-specific interrupt enable/disable. | |
| meshx_err_t | meshx_pwm_platform_init (void) |
| Platform-specific PWM initialization. | |
| meshx_err_t | meshx_pwm_platform_deinit (void) |
| Platform-specific PWM deinitialization. | |
| meshx_err_t | meshx_pwm_platform_start (uint8_t physical_pin, uint32_t frequency, uint8_t duty_cycle, uint8_t resolution) |
| Platform-specific PWM start. | |
| meshx_err_t | meshx_pwm_platform_stop (uint8_t physical_pin) |
| Platform-specific PWM stop. | |
| meshx_err_t | meshx_pwm_platform_set_duty_cycle (uint8_t physical_pin, uint8_t duty_cycle) |
| Platform-specific PWM duty cycle set. | |
| meshx_err_t | meshx_pwm_platform_set_frequency (uint8_t physical_pin, uint32_t frequency) |
| Platform-specific PWM frequency set. | |
| meshx_err_t | meshx_io_platform_execute_function (uint8_t physical_pin, meshx_io_function_t function, const uint32_t *args, uint8_t arg_count) |
| Platform-specific IO function execution. | |
| meshx_err_t | meshx_io_platform_register_custom_function (uint16_t function_id, meshx_err_t(*handler)(uint8_t physical_pin, const uint32_t *args, uint8_t arg_count, void *user_data), void *user_data) |
| Platform-specific custom function registration. | |
MeshX GPIO Platform Interface.
This file defines the platform-specific interface for GPIO implementations. BSP implementations must provide these functions for GPIO operations.
| meshx_err_t meshx_gpio_platform_configure_pin | ( | uint8_t | physical_pin, |
| meshx_gpio_mode_t | mode, | ||
| meshx_gpio_pull_t | pull, | ||
| meshx_gpio_drive_t | drive ) |
Platform-specific pin mode configuration.
| physical_pin | Physical pin number (platform-specific) |
| mode | Pin mode (meshx_gpio_mode_t) |
| pull | Pull resistor setting (meshx_gpio_pull_t) |
| drive | Drive strength (meshx_gpio_drive_t) |
| meshx_err_t meshx_gpio_platform_deinit | ( | void | ) |
Platform-specific GPIO deinitialization.
This function deinitializes the platform-specific GPIO hardware.
| meshx_err_t meshx_gpio_platform_get_level | ( | uint8_t | physical_pin, |
| uint8_t * | level ) |
Platform-specific pin level get.
| physical_pin | Physical pin number (platform-specific) | |
| [out] | level | Pointer to store pin level |
| meshx_err_t meshx_gpio_platform_init | ( | void | ) |
Platform-specific GPIO initialization.
This function initializes the platform-specific GPIO hardware.
| meshx_err_t meshx_gpio_platform_intr_enable | ( | uint8_t | physical_pin, |
| bool | enable ) |
Platform-specific interrupt enable/disable.
| physical_pin | Physical pin number (platform-specific) |
| enable | true to enable, false to disable |
| meshx_err_t meshx_gpio_platform_register_intr | ( | uint8_t | physical_pin, |
| meshx_gpio_intr_type_t | intr_type, | ||
| void(* | isr_handler )(void *), | ||
| void * | arg ) |
Platform-specific interrupt registration.
| physical_pin | Physical pin number (platform-specific) |
| intr_type | Interrupt trigger type |
| isr_handler | Interrupt service routine handler |
| arg | Argument passed to ISR handler |
| meshx_err_t meshx_gpio_platform_set_level | ( | uint8_t | physical_pin, |
| uint8_t | level ) |
Platform-specific pin level set.
| physical_pin | Physical pin number (platform-specific) |
| level | Pin level (0 = low, 1 = high) |
| meshx_err_t meshx_gpio_platform_unregister_intr | ( | uint8_t | physical_pin | ) |
Platform-specific interrupt unregistration.
| physical_pin | Physical pin number (platform-specific) |
| meshx_err_t meshx_io_platform_execute_function | ( | uint8_t | physical_pin, |
| meshx_io_function_t | function, | ||
| const uint32_t * | args, | ||
| uint8_t | arg_count ) |
Platform-specific IO function execution.
This is the function-based API for extensible IO operations. BSP implementations must support the standard IO functions and can optionally support custom functions.
| physical_pin | Physical pin number (platform-specific) |
| function | IO function to execute (meshx_io_function_t) |
| args | Function arguments vector |
| arg_count | Number of arguments in the vector |
| meshx_err_t meshx_io_platform_register_custom_function | ( | uint16_t | function_id, |
| meshx_err_t(* | handler )(uint8_t physical_pin, const uint32_t *args, uint8_t arg_count, void *user_data), | ||
| void * | user_data ) |
Platform-specific custom function registration.
BSP implementations can use this to register custom IO functions that are not part of the standard IO function set.
| function_id | Custom function ID |
| handler | Function handler |
| user_data | User data for the handler |
| meshx_err_t meshx_pwm_platform_deinit | ( | void | ) |
Platform-specific PWM deinitialization.
| meshx_err_t meshx_pwm_platform_init | ( | void | ) |
Platform-specific PWM initialization.
| meshx_err_t meshx_pwm_platform_set_duty_cycle | ( | uint8_t | physical_pin, |
| uint8_t | duty_cycle ) |
Platform-specific PWM duty cycle set.
| physical_pin | Physical pin number (platform-specific) |
| duty_cycle | Duty cycle (0-100%) |
| meshx_err_t meshx_pwm_platform_set_frequency | ( | uint8_t | physical_pin, |
| uint32_t | frequency ) |
Platform-specific PWM frequency set.
| physical_pin | Physical pin number (platform-specific) |
| frequency | Frequency in Hz |
| meshx_err_t meshx_pwm_platform_start | ( | uint8_t | physical_pin, |
| uint32_t | frequency, | ||
| uint8_t | duty_cycle, | ||
| uint8_t | resolution ) |
Platform-specific PWM start.
| physical_pin | Physical pin number (platform-specific) |
| frequency | PWM frequency in Hz |
| duty_cycle | Duty cycle (0-100%) |
| resolution | PWM resolution in bits |
| meshx_err_t meshx_pwm_platform_stop | ( | uint8_t | physical_pin | ) |
Platform-specific PWM stop.
| physical_pin | Physical pin number (platform-specific) |