Solaris Software
Loading...
Searching...
No Matches
gpio.h File Reference

SPP GPIO HAL API — dispatches through the registered HAL port. More...

Include dependency graph for gpio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SPP_GpioIsrCtx_t
 Context passed to the GPIO ISR handler. More...

Functions

SPP_RetVal_t SPP_HAL_GPIO_configInterrupt (spp_uint32_t pin, spp_uint32_t intrType, spp_uint32_t pull)
 Configure a GPIO pin as an interrupt input.
SPP_RetVal_t SPP_HAL_GPIO_registerIsr (spp_uint32_t pin, void *p_isrCtx)
 Register an ISR handler for a GPIO pin.

Detailed Description

SPP GPIO HAL API — dispatches through the registered HAL port.

Naming conventions used in this file:

  • Public functions: SPP_HAL_gpio*()
  • Pointer parameters: p_*

Definition in file gpio.h.

Function Documentation

◆ SPP_HAL_GPIO_configInterrupt()

SPP_RetVal_t SPP_HAL_GPIO_configInterrupt ( spp_uint32_t pin,
spp_uint32_t intrType,
spp_uint32_t pull )

Configure a GPIO pin as an interrupt input.

Parameters
[in]pinGPIO pin number.
[in]intrTypePlatform-specific interrupt trigger type value.
[in]pullPull resistor: 0 = none, 1 = pull-up, 2 = pull-down.
Returns
K_SPP_OK on success.

Definition at line 19 of file gpio.c.

References SPP_HalPort_t::gpio, SPP_HALGpio_t::gpioConfigInterrupt, K_SPP_ERROR, K_SPP_ERROR_NULL_POINTER, K_SPP_OK, SPP_HAL_getPort(), and SPP_HAL_GPIO_configInterrupt().

Referenced by SPP_HAL_GPIO_configInterrupt(), SPP_SERVICES_BMP390_init(), SPP_SERVICES_ICM20948_initGpio(), and SX1262_InitInterrupts().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SPP_HAL_GPIO_registerIsr()

SPP_RetVal_t SPP_HAL_GPIO_registerIsr ( spp_uint32_t pin,
void * p_isrCtx )

Register an ISR handler for a GPIO pin.

The ISR sets *p_isrCtx->p_flag to SPP_TRUE whenever the configured interrupt fires.

Parameters
[in]pinGPIO pin number.
[in]p_isrCtxPointer to a SPP_GpioIsrCtx_t for this pin.
Returns
K_SPP_OK on success.

Definition at line 39 of file gpio.c.

References SPP_HalPort_t::gpio, SPP_HALGpio_t::gpioRegisterIsr, K_SPP_ERROR, K_SPP_ERROR_NULL_POINTER, K_SPP_OK, SPP_HAL_getPort(), and SPP_HAL_GPIO_registerIsr().

Referenced by SPP_HAL_GPIO_registerIsr(), SPP_SERVICES_BMP390_init(), SPP_SERVICES_ICM20948_initGpio(), and SX1262_InitInterrupts().

Here is the call graph for this function:
Here is the caller graph for this function: