Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wiced_hal_gpio.h File Reference

List of parameters and defined functions needed to access the General Purpose Input/Ouput (GPIO) driver. More...

Macros

#define WICED_GPIO_ACTIVE_HIGH   1
 
#define WICED_GPIO_ACTIVE_LOW   0
 
#define wiced_hal_gpio_slimboot_reenforce_outputpin_value   gpio_slimboot_reinforce_all_outputpin_value
 

Typedefs

typedef enum GPIO_STATUS_e wiced_bt_gpio_select_status_t
 Possible return values from wiced_hal_gpio_select_function(...), Callers only need to check for the GPIO_FAILURE case since any other status means success.
 

Enumerations

enum  tGPIO_PIN_OUTPUT_CONFIG { GPIO_PIN_OUTPUT_LOW, GPIO_PIN_OUTPUT_HIGH }
 Pin output config.
 
enum  {
  GPIO_EDGE_TRIGGER_MASK = 0x0001, GPIO_EDGE_TRIGGER = 0x0001, GPIO_LEVEL_TRIGGER = 0x0000, GPIO_TRIGGER_POLARITY_MASK = 0x0002,
  GPIO_TRIGGER_NEG = 0x0002, GPIO_DUAL_EDGE_TRIGGER_MASK = 0x0004, GPIO_EDGE_TRIGGER_BOTH = 0x0004, GPIO_EDGE_TRIGGER_SINGLE = 0x0000,
  GPIO_INTERRUPT_ENABLE_MASK = 0x0008, GPIO_INTERRUPT_ENABLE = 0x0008, GPIO_INTERRUPT_DISABLE = 0x0000, GPIO_EN_INT_MASK = GPIO_EDGE_TRIGGER_MASK | GPIO_TRIGGER_POLARITY_MASK | GPIO_DUAL_EDGE_TRIGGER_MASK | GPIO_INTERRUPT_ENABLE_MASK,
  GPIO_EN_INT_LEVEL_HIGH = GPIO_INTERRUPT_ENABLE | GPIO_LEVEL_TRIGGER, GPIO_EN_INT_LEVEL_LOW = GPIO_INTERRUPT_ENABLE | GPIO_LEVEL_TRIGGER | GPIO_TRIGGER_NEG, GPIO_EN_INT_RISING_EDGE = GPIO_INTERRUPT_ENABLE | GPIO_EDGE_TRIGGER, GPIO_EN_INT_FALLING_EDGE = GPIO_INTERRUPT_ENABLE | GPIO_EDGE_TRIGGER | GPIO_TRIGGER_NEG,
  GPIO_EN_INT_BOTH_EDGE = GPIO_INTERRUPT_ENABLE | GPIO_EDGE_TRIGGER | GPIO_EDGE_TRIGGER_BOTH, GPIO_INPUT_ENABLE = 0x0000, GPIO_OUTPUT_DISABLE = 0x0000, GPIO_OUTPUT_ENABLE = 0x4000,
  GPIO_KS_OUTPUT_ENABLE = 0x0001, GPIO_OUTPUT_FN_SEL_MASK = 0x0000, GPIO_OUTPUT_FN_SEL_SHIFT = 0, GPIO_GLOBAL_INPUT_ENABLE = 0x0000,
  GPIO_GLOBAL_INPUT_DISABLE = 0x0040, GPIO_PULL_UP_DOWN_NONE = 0x0000, GPIO_PULL_UP = 0x0400, GPIO_PULL_DOWN = 0x0200,
  GPIO_INPUT_DISABLE = 0x0600, GPIO_DRIVE_SEL_MASK = 0x0800, GPIO_DRIVE_SEL_LOWEST = 0x0000, GPIO_DRIVE_SEL_MIDDLE_0 = 0x0000,
  GPIO_DRIVE_SEL_MIDDLE_1 = 0x0800, GPIO_DRIVE_SEL_HIGHEST = 0x0800, GPIO_HYSTERESIS_MASK = 0x2000, GPIO_HYSTERESIS_ON = 0x2000,
  GPIO_HYSTERESIS_OFF = 0x0000
}
 The following enum defines the constant values for the GPIO driver and associated GPIOs, each of which has a set of configuration signals. More...
 
enum  wiced_bt_gpio_numbers_t {
  WICED_P00 = 0, WICED_P01, WICED_P02, WICED_P03,
  WICED_P04, WICED_P05, WICED_P06, WICED_P07,
  WICED_P08, WICED_P09, WICED_P10, WICED_P11,
  WICED_P12, WICED_P13, WICED_P14, WICED_P15,
  WICED_P16, WICED_P17, WICED_P18, WICED_P19,
  WICED_P20, WICED_P21, WICED_P22, WICED_P23,
  WICED_P24, WICED_P25, WICED_P26, WICED_P27,
  WICED_P28, WICED_P29, WICED_P30, WICED_P31,
  WICED_P32, WICED_P33, WICED_P34, WICED_P35,
  WICED_P36, WICED_P37, WICED_P38, WICED_P39,
  WICED_GPIO_00, WICED_GPIO_01, WICED_GPIO_02, WICED_GPIO_03,
  WICED_GPIO_04, WICED_GPIO_05, WICED_GPIO_06, WICED_GPIO_07,
  MAX_NUM_OF_GPIO
}
 GPIO Numbers : last 8 are ARM GPIOs and rest are LHL GPIOs. More...
 
enum  wiced_bt_gpio_function_t {
  WICED_GPIO = 0, WICED_I2C_1_SCL, WICED_I2C_1_SDA, RESERVED_1,
  RESERVED_2, WICED_SPI_1_CLK, WICED_SPI_1_CS, WICED_SPI_1_MOSI,
  WICED_SPI_1_MISO, RESERVED_3, RESERVED_4, RESERVED_5,
  RESERVED_6, WICED_SPI_2_CLK, WICED_SPI_2_CS, WICED_SPI_2_MOSI,
  WICED_SPI_2_MISO, RESERVED_7, RESERVED_8, RESERVED_9,
  RESERVED_10, RESERVED_11, RESERVED_12, RESERVED_13,
  RESERVED_14, RESERVED_15, WICED_SWDCK, WICED_SWDIO,
  WICED_UART_1_TXD, WICED_UART_1_RXD, WICED_UART_1_CTS, WICED_UART_1_RTS,
  WICED_UART_2_TXD, WICED_UART_2_RXD, WICED_UART_2_CTS, WICED_UART_2_RTS,
  RESERVED_16, RESERVED_17, RESERVED_18, RESERVED_19,
  WICED_PCM_IN_I2S_DI, WICED_PCM_OUT_I2S_DO, WICED_PCM_SYNC_I2S_WS, WICED_PCM_CLK_I2S_CLK,
  RESERVED_20, RESERVED_21, RESERVED_22, RESERVED_23,
  RESERVED_24, RESERVED_25, RESERVED_26, RESERVED_27,
  WICED_GCI_SECI_IN, WICED_GCI_SECI_OUT, WICED_ACLK_0, WICED_ACLK_1,
  WICED_KSO0, WICED_KSO1, WICED_KSO2, WICED_KSO3,
  WICED_KSO4, WICED_KSO5, WICED_KSO6, WICED_KSO7,
  WICED_KSO8, WICED_KSO9, WICED_KSO10, WICED_KSO11,
  WICED_KSO12, WICED_KSO13, WICED_KSO14, WICED_KSO15,
  WICED_KSO16, WICED_KSO17, WICED_KSO18, WICED_KSO19,
  WICED_TX_PD, WICED_TX_PD_TILDA, WICED_PA_RAMP, WICED_PWM0,
  WICED_PWM1, WICED_PWM2, WICED_PWM3, WICED_PWM4,
  WICED_PWM5, WICED_UNAVAILABLE = 0xFF
}
 possible functions to be brought out through LHL GPIO's More...
 
enum  GPIO_STATUS_e { GPIO_FAILURE, GPIO_SUCCESS, GPIO_REMAPPED, GPIO_MOVED }
 Possible return values from wiced_hal_gpio_select_function(...), Callers only need to check for the GPIO_FAILURE case since any other status means success. More...
 

Functions

void wiced_hal_gpio_init (void)
 Initializes the GPIO driver and its private values. More...
 
UINT8 wiced_hal_gpio_pin_to_port_pin (UINT8 pin)
 Convert a given schematic pin number (i.e. More...
 
void wiced_hal_gpio_configure_pin (UINT32 pin, UINT32 config, UINT32 outputVal)
 Configures a GPIO pin. More...
 
UINT16 wiced_hal_gpio_get_pin_config (UINT32 pin)
 Retrieve the current configuration of the specified pin. More...
 
void wiced_hal_gpio_set_pin_output (UINT32 pin, UINT32 val)
 Sets the output value of a pin. More...
 
UINT32 wiced_hal_gpio_get_pin_output (UINT32 pin)
 Get the programmed output value of a pin. More...
 
UINT32 wiced_hal_gpio_get_pin_input_status (UINT32 pin)
 Read the current value at a pin. More...
 
UINT32 wiced_hal_gpio_get_pin_interrupt_status (UINT32 pin)
 Get the interrupt status of a pin. More...
 
void wiced_hal_gpio_register_pin_for_interrupt (UINT16 pin, void(*userfn)(void *, BYTE), void *userdata)
 Register a function for notification of changes to a pin (via interrupt). More...
 
UINT32 wiced_hal_gpio_clear_pin_interrupt_status (UINT32 pin)
 Clear the interrupt status of a pin manually. More...
 
void wiced_hal_gpio_disable_all_inputs (void)
 Configures all gpios to be INPUT DISABLED. More...
 
BOOL32 wiced_hal_gpio_slimboot_reenforce_cfg (BYTE pin, UINT16 config)
 save the LHL GPIO configuration in AON memeory to reenforce in slimboot This is a must if we want to wake up in SDS by external LHL GPIO interrupts More...
 
void gpio_slimboot_reinforce_all_outputpin_value (void)
 For the GPIO configurations in AON memory that needs to be reenforced in slimboot, before entering uBCS mode, please call this function to save all the output pins value again in AON memory. More...
 
wiced_bt_gpio_select_status_t wiced_hal_gpio_select_function (wiced_bt_gpio_numbers_t pin, wiced_bt_gpio_function_t function)
 Configure a GPIO pin to have the chosen functionality. More...
 

Detailed Description

List of parameters and defined functions needed to access the General Purpose Input/Ouput (GPIO) driver.