oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
BSP Compatibility Shim

Backward-compatible Board Support Package API. More...

Typedefs

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).
 

Enumerations

enum  ove_gpio_irq_mode_t { OVE_GPIO_IRQ_RISING = 0x01 , OVE_GPIO_IRQ_FALLING = 0x02 , OVE_GPIO_IRQ_BOTH = 0x03 }
 GPIO interrupt trigger edge selection (re-exported for BSP-only callers). More...
 

Functions

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).
 

Detailed Description

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.

Typedef Documentation

◆ 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]portGPIO port index that generated the interrupt.
[in]pinGPIO pin index that generated the interrupt.
[in]user_dataOpaque pointer supplied at registration time.

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ 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]ledZero-based LED index.
[in]onNon-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]ledZero-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]portGPIO port index.
[in]pinGPIO pin index within the port.
[in]valueNon-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]portGPIO port index.
[in]pinGPIO pin index within the port.
Returns
1 if high, 0 if low, negative error code on failure.

◆ ove_bsp_gpio_irq_register()

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 
)
inlinestatic

Register a GPIO interrupt callback (BSP compatibility wrapper).

Delegates to ove_gpio_irq_register().

Parameters
[in]portGPIO port index.
[in]pinGPIO pin index within the port.
[in]modeEdge(s) that trigger the interrupt.
[in]callbackFunction called when the interrupt fires.
[in]user_dataOpaque 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]portGPIO port index.
[in]pinGPIO 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]portGPIO port index.
[in]pinGPIO pin index within the port.
Returns
OVE_OK on success, negative error code on failure.