Solaris Software
Loading...
Searching...
No Matches
gpio.c File Reference
#include "spp/core/returnTypes.h"
#include "spp/hal/hal.h"
#include "spp/hal/gpio/gpio.h"
Include dependency graph for gpio.c:

Go to the source code of this file.

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.

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: