Appiko
|
Configuration and management of S2-LP GPIO. More...
Go to the source code of this file.
Data Structures | |
struct | SGpioInit |
S2LP GPIO Init structure definition. More... | |
struct | ClockOutputInit |
S2LP Clock Output initialization structure definition. More... | |
struct | S2LPIrqs |
IRQ bitfield structure for S2LP. This structure is used to read or write the single IRQ bit. During the initialization the user has to fill this structure setting to one the single field related to the IRQ he wants to enable, and to zero the single field related to all the IRQs he wants to disable. The same structure can be used to retrieve all the IRQ events from the IRQ registers IRQ_STATUS[3:0], and read if one or more specific IRQ raised. More... | |
Functions | |
void | S2LPGpioInit (SGpioInit *pxGpioInitStruct) |
Initialize the S2LP GPIOx according to the specified parameters in the pxGpioInitStruct. More... | |
void | S2LPGpioSetLevel (S2LPGpioPin xGpioX, OutputLevel xLevel) |
Force S2LP GPIO_x configured as digital output, to VDD or GND. More... | |
OutputLevel | S2LPGpioGetLevel (S2LPGpioPin xGpioX) |
Return output value (VDD or GND) of S2LP GPIO_x, when it is configured as digital output. More... | |
void | S2LPGpioIrqDeInit (S2LPIrqs *pxIrqInit) |
Deinit the S2LPIrqs structure setting all the bitfield to 0. Moreover, it sets the IRQ mask registers to 0x00000000, disabling all IRQs. More... | |
void | S2LPGpioIrqInit (S2LPIrqs *pxIrqInit) |
Enable the IRQs according to the user defined pxIrqInit structure. More... | |
void | S2LPGpioIrqConfig (IrqList xIrq, SFunctionalState xNewState) |
Enable or disables a specific IRQ. More... | |
void | S2LPGpioIrqGetMask (S2LPIrqs *pxIrqMask) |
Fill a pointer to a structure of S2LPIrqs type reading the IRQ_MASK registers. More... | |
void | S2LPGpioIrqGetStatus (S2LPIrqs *pxIrqStatus) |
Fill a pointer to a structure of S2LPIrqs type reading the IRQ_STATUS registers. More... | |
void | S2LPGpioIrqClearStatus (void) |
Clear the IRQ status registers. More... | |
SBool | S2LPGpioIrqCheckFlag (IrqList xFlag) |
Verifie if a specific IRQ has been generated. The call resets all the IRQ status, so it can't be used in case of multiple raising interrupts. More... | |
This module can be used to configure the S2-LP GPIO pins to perform specific functions. The structure gpioIRQ can be used to specify these features for one of the four S2-LP Gpio pin. The following example shows how to configure a pin (GPIO 3) to be used as an IRQ source for a microcontroller using the S2LPGpioInit() function.
Example:
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
THIS SOURCE CODE IS PROTECTED BY A LICENSE. FOR MORE INFORMATION PLEASE CAREFULLY READ THE LICENSE AGREEMENT FILE LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
Definition in file S2LP_Gpio.h.