|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
Thin C++ wrappers around the oveRTOS GPIO API. More...
Functions | |
| int | configure (unsigned int port, unsigned int pin, ove_gpio_mode_t mode) |
| Configures a GPIO pin with the specified mode. | |
| int | set (unsigned int port, unsigned int pin, int value) |
| Drives a GPIO output pin to the specified logic level. | |
| int | get (unsigned int port, unsigned int pin) |
| Reads the current logic level of a GPIO pin. | |
| int | irq_register (unsigned int port, unsigned int pin, ove_gpio_irq_mode_t mode, ove_gpio_irq_cb callback, void *user_data) |
| Registers an interrupt callback for a GPIO pin. | |
| int | irq_enable (unsigned int port, unsigned int pin) |
| Enables the interrupt for a GPIO pin (must be registered first). | |
| int | irq_disable (unsigned int port, unsigned int pin) |
| 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.
|
inline |
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 (input, output, alternate function, etc.). |
OVE_OK on success, or a negative error code.
|
inline |
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). |
OVE_OK on success, or a negative error code.
|
inline |
Reads the current logic level of a GPIO pin.
| [in] | port | GPIO port index. |
| [in] | pin | Pin number within the port. |
|
inline |
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. |
OVE_OK on success, or a negative error code.
|
inline |
Enables the interrupt for a GPIO pin (must be registered first).
| [in] | port | GPIO port index. |
| [in] | pin | Pin number within the port. |
OVE_OK on success, or a negative error code.
|
inline |
Disables the interrupt for a GPIO pin.
| [in] | port | GPIO port index. |
| [in] | pin | Pin number within the port. |
OVE_OK on success, or a negative error code.