|
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.
|
Abstract IO Interface. More...
#include <meshx_io_interface.hpp>
Public Member Functions | |
| virtual | ~MeshXIoInterface ()=default |
| virtual int | execute (IoFunction function, const std::vector< uint32_t > &args)=0 |
| Execute IO function. | |
| virtual uint8_t | getLogicalPin () const =0 |
| Get logical pin number. | |
| virtual const char * | getName () const =0 |
| Get pin name. | |
| virtual bool | isFunctionSupported (IoFunction function) const =0 |
| Check if function is supported. | |
| virtual int | setLevel (uint8_t level) |
| Set pin level (convenience method). | |
| virtual int | getLevel (uint8_t *level) |
| Get pin level (convenience method). | |
| virtual int | toggle () |
| Toggle pin level (convenience method). | |
| virtual int | setPwmDutyCycle (uint8_t duty_cycle) |
| Set PWM duty cycle (convenience method). | |
| virtual int | setPwmFrequency (uint32_t frequency) |
| Set PWM frequency (convenience method). | |
| virtual int | registerInterrupt (void(*callback)(uint8_t, void *), void *user_data, uint8_t trigger_type) |
| Register interrupt (convenience method). | |
| virtual int | unregisterInterrupt () |
| Unregister interrupt (convenience method). | |
| virtual int | enableInterrupt (bool enable) |
| Enable/disable interrupt (convenience method). | |
Abstract IO Interface.
This interface provides a unified API for all IO operations using a function-based approach for extensibility.
|
virtualdefault |
|
inlinevirtual |
Enable/disable interrupt (convenience method).
| enable | true to enable, false to disable |
Reimplemented in meshx::MeshXGpioImpl.
|
pure virtual |
Execute IO function.
This is the core function-based API for all IO operations.
| function | IO function to execute |
| args | Function arguments vector |
Implemented in meshx::MeshXGpioImpl, and meshx::MeshXPwmImpl.
|
inlinevirtual |
Get pin level (convenience method).
| [out] | level | Pointer to store pin level |
Reimplemented in meshx::MeshXGpioImpl, and meshx::MeshXPwmImpl.
|
pure virtual |
Get logical pin number.
Implemented in meshx::MeshXGpioImpl, and meshx::MeshXPwmImpl.
|
pure virtual |
Get pin name.
Implemented in meshx::MeshXGpioImpl, and meshx::MeshXPwmImpl.
|
pure virtual |
Check if function is supported.
| function | IO function to check |
Implemented in meshx::MeshXGpioImpl, and meshx::MeshXPwmImpl.
|
inlinevirtual |
Register interrupt (convenience method).
| callback | Function pointer to callback |
| user_data | User data passed to callback |
| trigger_type | Interrupt trigger type |
Reimplemented in meshx::MeshXGpioImpl.
|
inlinevirtual |
Set pin level (convenience method).
| level | Pin level (0 = low, 1 = high) |
Reimplemented in meshx::MeshXGpioImpl, and meshx::MeshXPwmImpl.
|
inlinevirtual |
Set PWM duty cycle (convenience method).
| duty_cycle | Duty cycle (0-100%) |
Reimplemented in meshx::MeshXGpioImpl.
|
inlinevirtual |
Set PWM frequency (convenience method).
| frequency | Frequency in Hz |
Reimplemented in meshx::MeshXGpioImpl.
|
inlinevirtual |
Toggle pin level (convenience method).
Reimplemented in meshx::MeshXGpioImpl, and meshx::MeshXPwmImpl.
|
inlinevirtual |
Unregister interrupt (convenience method).
Reimplemented in meshx::MeshXGpioImpl.