|
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 Bridge for C/C++ Boundary. More...
Go to the source code of this file.
Data Structures | |
| struct | meshx_io_config_t |
| IO configuration structure (C compatible). More... | |
Typedefs | |
| typedef void * | meshx_io_handle_t |
| Opaque handle to IO instance. | |
Enumerations | |
| enum | meshx_io_func_t { MESHX_IO_FUNC_SET_LEVEL = 0 , MESHX_IO_FUNC_GET_LEVEL , MESHX_IO_FUNC_TOGGLE , MESHX_IO_FUNC_SET_PWM_DUTY , MESHX_IO_FUNC_SET_PWM_FREQUENCY , MESHX_IO_FUNC_REGISTER_INTERRUPT , MESHX_IO_FUNC_UNREGISTER_INTERRUPT , MESHX_IO_FUNC_ENABLE_INTERRUPT , MESHX_IO_FUNC_CUSTOM , MESHX_IO_FUNC_MAX } |
| IO function types (C compatible). More... | |
Functions | |
| meshx_io_handle_t | meshx_io_create (const meshx_io_config_t *config) |
| Create IO instance from configuration. | |
| void | meshx_io_destroy (meshx_io_handle_t handle) |
| Destroy IO instance. | |
| meshx_err_t | meshx_io_execute (meshx_io_handle_t handle, meshx_io_func_t function, const uint32_t *args, uint8_t arg_count) |
| Execute IO function. | |
| uint8_t | meshx_io_get_logical_pin (meshx_io_handle_t handle) |
| Get logical pin number. | |
| const char * | meshx_io_get_name (meshx_io_handle_t handle) |
| Get pin name. | |
| bool | meshx_io_is_function_supported (meshx_io_handle_t handle, meshx_io_func_t function) |
| Check if function is supported. | |
| meshx_err_t | meshx_io_set_level (meshx_io_handle_t handle, uint8_t level) |
| Set pin level (convenience function). | |
| meshx_err_t | meshx_io_get_level (meshx_io_handle_t handle, uint8_t *level) |
| Get pin level (convenience function). | |
| meshx_err_t | meshx_io_toggle (meshx_io_handle_t handle) |
| Toggle pin level (convenience function). | |
| meshx_err_t | meshx_io_init (void) |
| Initialize IO subsystem. | |
| meshx_err_t | meshx_io_deinit (void) |
| Deinitialize IO subsystem. | |
MeshX IO Bridge for C/C++ Boundary.
This file provides C interface for the C++ IO abstraction layer. It follows MeshX's C/C++ boundary patterns.
| typedef void* meshx_io_handle_t |
Opaque handle to IO instance.
| enum meshx_io_func_t |
IO function types (C compatible).
| meshx_io_handle_t meshx_io_create | ( | const meshx_io_config_t * | config | ) |
Create IO instance from configuration.
| config | IO configuration |
| meshx_err_t meshx_io_deinit | ( | void | ) |
Deinitialize IO subsystem.
| void meshx_io_destroy | ( | meshx_io_handle_t | handle | ) |
Destroy IO instance.
| handle | IO instance handle |
| meshx_err_t meshx_io_execute | ( | meshx_io_handle_t | handle, |
| meshx_io_func_t | function, | ||
| const uint32_t * | args, | ||
| uint8_t | arg_count ) |
Execute IO function.
| handle | IO instance handle |
| function | IO function to execute |
| args | Function arguments array |
| arg_count | Number of arguments |
| meshx_err_t meshx_io_get_level | ( | meshx_io_handle_t | handle, |
| uint8_t * | level ) |
Get pin level (convenience function).
| handle | IO instance handle | |
| [out] | level | Pointer to store pin level |
| uint8_t meshx_io_get_logical_pin | ( | meshx_io_handle_t | handle | ) |
Get logical pin number.
| handle | IO instance handle |
| const char * meshx_io_get_name | ( | meshx_io_handle_t | handle | ) |
Get pin name.
| handle | IO instance handle |
| meshx_err_t meshx_io_init | ( | void | ) |
Initialize IO subsystem.
This function initializes the IO factory and registers all IO types.
| bool meshx_io_is_function_supported | ( | meshx_io_handle_t | handle, |
| meshx_io_func_t | function ) |
Check if function is supported.
| handle | IO instance handle |
| function | IO function to check |
| meshx_err_t meshx_io_set_level | ( | meshx_io_handle_t | handle, |
| uint8_t | level ) |
Set pin level (convenience function).
| handle | IO instance handle |
| level | Pin level (0 = low, 1 = high) |
| meshx_err_t meshx_io_toggle | ( | meshx_io_handle_t | handle | ) |
Toggle pin level (convenience function).
| handle | IO instance handle |