Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Peripheral Drivers

Peripheral Drivers functions. More...

Modules

 ACLK
 
 ADC
 
 ButtonDriver
 
 GpioDriver
 
 I2C
 
 IrTx
 
 Keyscan
 
 Ldo
 
 Mia
 
 PWM
 
 PeripheralUart
 
 Quadrature
 
 RTC
 
 Scrolldriver
 
 SpiffyDriver
 

Functions

void gpiobtn_init (UINT16 gpioMask[], UINT16 gpioConfig)
 This file defines the gpio based button interface. More...
 
void gpiobtn_wakeupDisable (void)
 Disables wakeup from all buttons. Clears all pending events.
 
void gpiobtn_wakeupEnable (void)
 Enables wakeup from all buttons. More...
 
UINT16 gpiobtn_getCurrentState (UINT8 port)
 Return the current button state as a bit mapped value. More...
 
void gpiobtn_flush (void)
 Flush any queued button activity in FW or HW and returns the current state of the buttons. More...
 
void gpiobtn_registerForInterrupt (void(*userfn)(void *), void *userdata)
 Register for notification of changes.
 
void gpiobtn_setDebounce (UINT32 debDelayInUs)
 set the debounce delay.
 
void gpiobtn_configureButtonGpio (UINT16 gpioButtonConfig)
 Configure each Button GPIO This configuration is used only for enabling wakeup. More...
 
void gpiobtn_buttonPressDetected (void *userdata, UINT8 portPin)
 Interrupt Call back function.
 
void gpiobtn_processButtonDetected (UINT8 portPin)
 Interrupt Process function.
 

Detailed Description

Peripheral Drivers functions.

Function Documentation

void gpiobtn_configureButtonGpio ( UINT16  gpioButtonConfig)

Configure each Button GPIO This configuration is used only for enabling wakeup.

void gpiobtn_flush ( void  )

Flush any queued button activity in FW or HW and returns the current state of the buttons.

UINT16 gpiobtn_getCurrentState ( UINT8  port)

Return the current button state as a bit mapped value.

0 for a button indicates that the button is not pressed, 1 indicates the button is pressed.

Parameters
portThe port ID to read.
Returns
a 16 bit map representing the current state of the buttons.
void gpiobtn_init ( UINT16  gpioMask[],
UINT16  gpioConfig 
)

This file defines the gpio based button interface.

Buttons are implemented as keys on this platform. The hardware reports the state of the buttons as keys. This information is translated by the button interface into a byte representing various buttons.

void gpiobtn_wakeupEnable ( void  )

Enables wakeup from all buttons.

Also clears any pending events. Use config passed in constructor to configure GPIOs for wakeupEnable.