|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
Thin C++ wrappers around the oveRTOS GPIO API. More...
Functions | |
| Result< void > | configure (unsigned int port, unsigned int pin, ove_gpio_mode_t mode) noexcept |
| Configures a GPIO pin with the specified mode. | |
| Result< void > | set (unsigned int port, unsigned int pin, int value) noexcept |
| Drives a GPIO output pin to the specified logic level. | |
| Result< int > | get (unsigned int port, unsigned int pin) noexcept |
| Reads the current logic level of a GPIO pin. | |
| Result< void > | irq_register (unsigned int port, unsigned int pin, ove_gpio_irq_mode_t mode, ove_gpio_irq_cb callback, void *user_data) noexcept |
| Registers an interrupt callback for a GPIO pin. | |
| Result< void > | irq_enable (unsigned int port, unsigned int pin) noexcept |
| Enables the interrupt for a GPIO pin (must be registered first). | |
| Result< void > | irq_disable (unsigned int port, unsigned int pin) noexcept |
| Disables the interrupt for a GPIO pin. | |
Thin C++ wrappers around the oveRTOS GPIO API.
Available when CONFIG_OVE_GPIO is enabled. Pins are addressed by a (port, pin) tuple following the same convention as the underlying C API.
|
inlinenoexcept |
Configures a GPIO pin with the specified mode.
| [in] | port | GPIO port index. |
| [in] | pin | Pin number within the port. |
| [in] | mode | Desired pin mode. |
Result<void> on success; unexpected Error on failure.
|
inlinenoexcept |
Drives a GPIO output pin to the specified logic level.
| [in] | port | GPIO port index. |
| [in] | pin | Pin number within the port. |
| [in] | value | Logic level to drive (0 = low, non-zero = high). |
Result<void> on success; unexpected Error on failure.
|
inlinenoexcept |
Reads the current logic level of a GPIO pin.
| [in] | port | GPIO port index. |
| [in] | pin | Pin number within the port. |
unexpected Error.
|
inlinenoexcept |
Registers an interrupt callback for a GPIO pin.
| [in] | port | GPIO port index. |
| [in] | pin | Pin number within the port. |
| [in] | mode | Trigger mode (rising, falling, both edges, etc.). |
| [in] | callback | Function to call when the interrupt fires. |
| [in] | user_data | Opaque pointer forwarded to the callback. |
Result<void> on success; unexpected Error on failure.
|
inlinenoexcept |
Enables the interrupt for a GPIO pin (must be registered first).
| [in] | port | GPIO port index. |
| [in] | pin | Pin number within the port. |
Result<void> on success; unexpected Error on failure.