Backward-compatible Board Support Package API.
More...
|
| typedef void(* | ove_gpio_irq_cb) (unsigned int port, unsigned int pin, void *user_data) |
| | GPIO interrupt callback type (re-exported for BSP-only callers).
|
| |
|
| static int | ove_bsp_board_init (void) |
| | Initialise the board hardware (BSP compatibility wrapper).
|
| |
| static void | ove_bsp_led_set (unsigned int led, int on) |
| | Turn a board LED on or off (BSP compatibility wrapper).
|
| |
| static void | ove_bsp_led_toggle (unsigned int led) |
| | Toggle the current state of a board LED (BSP compatibility wrapper).
|
| |
| static int | ove_bsp_gpio_set (unsigned int port, unsigned int pin, int value) |
| | Set the output level of a GPIO pin (BSP compatibility wrapper).
|
| |
| static int | ove_bsp_gpio_get (unsigned int port, unsigned int pin) |
| | Read the current level of a GPIO pin (BSP compatibility wrapper).
|
| |
| static int | ove_bsp_gpio_irq_register (unsigned int port, unsigned int pin, ove_gpio_irq_mode_t mode, ove_gpio_irq_cb callback, void *user_data) |
| | Register a GPIO interrupt callback (BSP compatibility wrapper).
|
| |
| static int | ove_bsp_gpio_irq_enable (unsigned int port, unsigned int pin) |
| | Enable a registered GPIO interrupt (BSP compatibility wrapper).
|
| |
| static int | ove_bsp_gpio_irq_disable (unsigned int port, unsigned int pin) |
| | Disable a GPIO interrupt without unregistering it (BSP compatibility wrapper).
|
| |
Backward-compatible Board Support Package API.
This header maps the legacy ove_bsp_*() functions to the newer split modules: Board Initialization, GPIO, and LED. New code should call the individual module APIs directly; this shim exists purely for source-level backward compatibility.
- Note
- Requires
CONFIG_OVE_BSP. When the option is disabled every function is replaced by a no-op stub.
◆ ove_gpio_irq_cb
| typedef void(* ove_gpio_irq_cb) (unsigned int port, unsigned int pin, void *user_data) |
GPIO interrupt callback type (re-exported for BSP-only callers).
- Parameters
-
| [in] | port | GPIO port index that generated the interrupt. |
| [in] | pin | GPIO pin index that generated the interrupt. |
| [in] | user_data | Opaque pointer supplied at registration time. |
◆ ove_gpio_irq_mode_t
GPIO interrupt trigger edge selection (re-exported for BSP-only callers).
- Note
- Prefer including
ove/gpio.h directly for new code.
| Enumerator |
|---|
| OVE_GPIO_IRQ_RISING | Trigger on rising edge only.
|
| OVE_GPIO_IRQ_FALLING | Trigger on falling edge only.
|
| OVE_GPIO_IRQ_BOTH | Trigger on both edges.
|
◆ ove_bsp_board_init()
| static int ove_bsp_board_init |
( |
void |
| ) |
|
|
inlinestatic |
Initialise the board hardware (BSP compatibility wrapper).
Delegates to ove_board_init().
- Returns
- OVE_OK on success, negative error code on failure.
◆ ove_bsp_led_set()
| static void ove_bsp_led_set |
( |
unsigned int |
led, |
|
|
int |
on |
|
) |
| |
|
inlinestatic |
Turn a board LED on or off (BSP compatibility wrapper).
Delegates to ove_led_set().
- Parameters
-
| [in] | led | Zero-based LED index. |
| [in] | on | Non-zero to turn the LED on, zero to turn it off. |
◆ ove_bsp_led_toggle()
| static void ove_bsp_led_toggle |
( |
unsigned int |
led | ) |
|
|
inlinestatic |
Toggle the current state of a board LED (BSP compatibility wrapper).
Delegates to ove_led_toggle().
- Parameters
-
| [in] | led | Zero-based LED index. |
◆ ove_bsp_gpio_set()
| static int ove_bsp_gpio_set |
( |
unsigned int |
port, |
|
|
unsigned int |
pin, |
|
|
int |
value |
|
) |
| |
|
inlinestatic |
Set the output level of a GPIO pin (BSP compatibility wrapper).
Delegates to ove_gpio_set().
- Parameters
-
| [in] | port | GPIO port index. |
| [in] | pin | GPIO pin index within the port. |
| [in] | value | Non-zero to drive high, zero to drive low. |
- Returns
- OVE_OK on success, negative error code on failure.
◆ ove_bsp_gpio_get()
| static int ove_bsp_gpio_get |
( |
unsigned int |
port, |
|
|
unsigned int |
pin |
|
) |
| |
|
inlinestatic |
Read the current level of a GPIO pin (BSP compatibility wrapper).
Delegates to ove_gpio_get().
- Parameters
-
| [in] | port | GPIO port index. |
| [in] | pin | GPIO pin index within the port. |
- Returns
- 1 if high, 0 if low, negative error code on failure.
◆ ove_bsp_gpio_irq_register()
Register a GPIO interrupt callback (BSP compatibility wrapper).
Delegates to ove_gpio_irq_register().
- Parameters
-
| [in] | port | GPIO port index. |
| [in] | pin | GPIO pin index within the port. |
| [in] | mode | Edge(s) that trigger the interrupt. |
| [in] | callback | Function called when the interrupt fires. |
| [in] | user_data | Opaque pointer forwarded to callback. |
- Returns
- OVE_OK on success, negative error code on failure.
◆ ove_bsp_gpio_irq_enable()
| static int ove_bsp_gpio_irq_enable |
( |
unsigned int |
port, |
|
|
unsigned int |
pin |
|
) |
| |
|
inlinestatic |
Enable a registered GPIO interrupt (BSP compatibility wrapper).
Delegates to ove_gpio_irq_enable().
- Parameters
-
| [in] | port | GPIO port index. |
| [in] | pin | GPIO pin index within the port. |
- Returns
- OVE_OK on success, negative error code on failure.
◆ ove_bsp_gpio_irq_disable()
| static int ove_bsp_gpio_irq_disable |
( |
unsigned int |
port, |
|
|
unsigned int |
pin |
|
) |
| |
|
inlinestatic |
Disable a GPIO interrupt without unregistering it (BSP compatibility wrapper).
Delegates to ove_gpio_irq_disable().
- Parameters
-
| [in] | port | GPIO port index. |
| [in] | pin | GPIO pin index within the port. |
- Returns
- OVE_OK on success, negative error code on failure.