|
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 IO Platform Interface. More...
Go to the source code of this file.
Functions | |
| meshx_err_t | meshx_io_platform_init (void) |
| Initialize platform IO subsystem. | |
| meshx_err_t | meshx_io_platform_deinit (void) |
| Deinitialize platform IO subsystem. | |
| void * | meshx_io_platform_create_gpio (uint8_t logical_pin, const char *name, uint8_t mode, uint8_t pull, uint8_t drive, uint8_t initial_level, bool signal_inversion) |
| Create platform-specific GPIO instance. | |
| void * | meshx_io_platform_create_pwm (uint8_t logical_pin, const char *name, uint32_t frequency, uint8_t duty_cycle, uint8_t resolution, uint8_t channel) |
| Create platform-specific PWM instance. | |
| void | meshx_io_platform_destroy (void *handle) |
| Destroy platform-specific IO instance. | |
| meshx_err_t | meshx_io_platform_execute (void *handle, uint8_t function, const uint32_t *args, uint8_t arg_count) |
| Execute platform-specific IO function. | |
| meshx_err_t | meshx_io_platform_set_hosted_mode (uint8_t mode) |
| Set hosted mode. | |
| uint8_t | meshx_io_platform_get_hosted_mode (void) |
| Get current hosted mode. | |
| meshx_err_t | meshx_io_platform_send_hosted_event (uint8_t event_type, uint8_t logical_pin, uint8_t value) |
| Send hosted mode event. | |
MeshX IO Platform Interface.
This file defines the platform-specific interface for IO implementations.
| void * meshx_io_platform_create_gpio | ( | uint8_t | logical_pin, |
| const char * | name, | ||
| uint8_t | mode, | ||
| uint8_t | pull, | ||
| uint8_t | drive, | ||
| uint8_t | initial_level, | ||
| bool | signal_inversion ) |
Create platform-specific GPIO instance.
| logical_pin | Logical pin number |
| name | Pin name |
| mode | GPIO mode |
| pull | Pull resistor setting |
| drive | Drive strength |
| initial_level | Initial output level |
| signal_inversion | Signal inversion flag |
| void * meshx_io_platform_create_pwm | ( | uint8_t | logical_pin, |
| const char * | name, | ||
| uint32_t | frequency, | ||
| uint8_t | duty_cycle, | ||
| uint8_t | resolution, | ||
| uint8_t | channel ) |
Create platform-specific PWM instance.
| logical_pin | Logical pin number |
| name | Pin name |
| frequency | PWM frequency |
| duty_cycle | Initial duty cycle |
| resolution | PWM resolution |
| channel | Hardware channel |
| meshx_err_t meshx_io_platform_deinit | ( | void | ) |
Deinitialize platform IO subsystem.
| void meshx_io_platform_destroy | ( | void * | handle | ) |
Destroy platform-specific IO instance.
| handle | Platform-specific IO instance handle |
| meshx_err_t meshx_io_platform_execute | ( | void * | handle, |
| uint8_t | function, | ||
| const uint32_t * | args, | ||
| uint8_t | arg_count ) |
Execute platform-specific IO function.
| handle | Platform-specific IO instance handle |
| function | IO function to execute |
| args | Function arguments |
| arg_count | Number of arguments |
| uint8_t meshx_io_platform_get_hosted_mode | ( | void | ) |
Get current hosted mode.
| meshx_err_t meshx_io_platform_init | ( | void | ) |
Initialize platform IO subsystem.
| meshx_err_t meshx_io_platform_send_hosted_event | ( | uint8_t | event_type, |
| uint8_t | logical_pin, | ||
| uint8_t | value ) |
Send hosted mode event.
| event_type | Event type |
| logical_pin | Logical pin number |
| value | Event value |
| meshx_err_t meshx_io_platform_set_hosted_mode | ( | uint8_t | mode | ) |
Set hosted mode.
| mode | Hosted mode (0 = non-hosted, 1 = hosted) |