Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BSP_DISCO_F429ZI by
STMPE811_Private_Functions
[STMPE811_Private_Types_Definitions]
Functions | |
void | stmpe811_Init (uint16_t DeviceAddr) |
Initialize the stmpe811 and configure the needed hardware resources. | |
void | stmpe811_Reset (uint16_t DeviceAddr) |
Reset the stmpe811 by Software. | |
uint16_t | stmpe811_ReadID (uint16_t DeviceAddr) |
Read the stmpe811 IO Expander device ID. | |
void | stmpe811_EnableGlobalIT (uint16_t DeviceAddr) |
Enable the Global interrupt. | |
void | stmpe811_DisableGlobalIT (uint16_t DeviceAddr) |
Disable the Global interrupt. | |
void | stmpe811_EnableITSource (uint16_t DeviceAddr, uint8_t Source) |
Enable the interrupt mode for the selected IT source. | |
void | stmpe811_DisableITSource (uint16_t DeviceAddr, uint8_t Source) |
Disable the interrupt mode for the selected IT source. | |
void | stmpe811_SetITPolarity (uint16_t DeviceAddr, uint8_t Polarity) |
Set the global interrupt Polarity. | |
void | stmpe811_SetITType (uint16_t DeviceAddr, uint8_t Type) |
Set the global interrupt Type. | |
uint8_t | stmpe811_GlobalITStatus (uint16_t DeviceAddr, uint8_t Source) |
Check the selected Global interrupt source pending bit. | |
uint8_t | stmpe811_ReadGITStatus (uint16_t DeviceAddr, uint8_t Source) |
Return the Global interrupts status. | |
void | stmpe811_ClearGlobalIT (uint16_t DeviceAddr, uint8_t Source) |
Clear the selected Global interrupt pending bit(s) | |
void | stmpe811_IO_Start (uint16_t DeviceAddr, uint32_t IO_Pin) |
Start the IO functionality use and disable the AF for selected IO pin(s). | |
uint8_t | stmpe811_IO_Config (uint16_t DeviceAddr, uint32_t IO_Pin, IO_ModeTypedef IO_Mode) |
Configures the IO pin(s) according to IO mode structure value. | |
void | stmpe811_IO_InitPin (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Direction) |
Initialize the selected IO pin direction. | |
void | stmpe811_IO_DisableAF (uint16_t DeviceAddr, uint32_t IO_Pin) |
Disable the AF for the selected IO pin(s). | |
void | stmpe811_IO_EnableAF (uint16_t DeviceAddr, uint32_t IO_Pin) |
Enable the AF for the selected IO pin(s). | |
void | stmpe811_IO_SetEdgeMode (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Edge) |
Configure the Edge for which a transition is detectable for the selected pin. | |
void | stmpe811_IO_WritePin (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t PinState) |
Write a new IO pin state. | |
uint32_t | stmpe811_IO_ReadPin (uint16_t DeviceAddr, uint32_t IO_Pin) |
Return the state of the selected IO pin(s). | |
void | stmpe811_IO_EnableIT (uint16_t DeviceAddr) |
Enable the global IO interrupt source. | |
void | stmpe811_IO_DisableIT (uint16_t DeviceAddr) |
Disable the global IO interrupt source. | |
void | stmpe811_IO_EnablePinIT (uint16_t DeviceAddr, uint32_t IO_Pin) |
Enable interrupt mode for the selected IO pin(s). | |
void | stmpe811_IO_DisablePinIT (uint16_t DeviceAddr, uint32_t IO_Pin) |
Disable interrupt mode for the selected IO pin(s). | |
uint32_t | stmpe811_IO_ITStatus (uint16_t DeviceAddr, uint32_t IO_Pin) |
Check the status of the selected IO interrupt pending bit. | |
void | stmpe811_IO_ClearIT (uint16_t DeviceAddr, uint32_t IO_Pin) |
Clear the selected IO interrupt pending bit(s). | |
void | stmpe811_TS_Start (uint16_t DeviceAddr) |
Configures the touch Screen Controller (Single point detection) | |
uint8_t | stmpe811_TS_DetectTouch (uint16_t DeviceAddr) |
Return if there is touch detected or not. | |
void | stmpe811_TS_GetXY (uint16_t DeviceAddr, uint16_t *X, uint16_t *Y) |
Get the touch screen X and Y positions values. | |
void | stmpe811_TS_EnableIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. | |
void | stmpe811_TS_DisableIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. | |
uint8_t | stmpe811_TS_ITStatus (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. | |
void | stmpe811_TS_ClearIT (uint16_t DeviceAddr) |
Configure the selected source to generate a global interrupt or not. | |
static uint8_t | stmpe811_GetInstance (uint16_t DeviceAddr) |
Check if the device instance of the selected address is already registered and return its index. |
Function Documentation
void stmpe811_ClearGlobalIT | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Clear the selected Global interrupt pending bit(s)
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: the Global interrupt source to be cleared, could be any combination of the following values: - STMPE811_GIT_IO: IO interrupt
- STMPE811_GIT_ADC : ADC interrupt
- STMPE811_GIT_FE : Touch Screen Controller FIFO Error interrupt
- STMPE811_GIT_FF : Touch Screen Controller FIFO Full interrupt
- STMPE811_GIT_FOV : Touch Screen Controller FIFO Overrun interrupt
- STMPE811_GIT_FTH : Touch Screen Controller FIFO Threshold interrupt
- STMPE811_GIT_TOUCH : Touch Screen Controller Touch Detected interrupt
- Return values:
-
None
Definition at line 391 of file stmpe811.c.
void stmpe811_DisableGlobalIT | ( | uint16_t | DeviceAddr ) |
Disable the Global interrupt.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 218 of file stmpe811.c.
void stmpe811_DisableITSource | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Disable the interrupt mode for the selected IT source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: The interrupt source to be configured, could be: - STMPE811_GIT_IO: IO interrupt
- STMPE811_GIT_ADC : ADC interrupt
- STMPE811_GIT_FE : Touch Screen Controller FIFO Error interrupt
- STMPE811_GIT_FF : Touch Screen Controller FIFO Full interrupt
- STMPE811_GIT_FOV : Touch Screen Controller FIFO Overrun interrupt
- STMPE811_GIT_FTH : Touch Screen Controller FIFO Threshold interrupt
- STMPE811_GIT_TOUCH : Touch Screen Controller Touch Detected interrupt
- Return values:
-
None
Definition at line 273 of file stmpe811.c.
void stmpe811_EnableGlobalIT | ( | uint16_t | DeviceAddr ) |
Enable the Global interrupt.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 199 of file stmpe811.c.
void stmpe811_EnableITSource | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Enable the interrupt mode for the selected IT source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: The interrupt source to be configured, could be: - STMPE811_GIT_IO: IO interrupt
- STMPE811_GIT_ADC : ADC interrupt
- STMPE811_GIT_FE : Touch Screen Controller FIFO Error interrupt
- STMPE811_GIT_FF : Touch Screen Controller FIFO Full interrupt
- STMPE811_GIT_FOV : Touch Screen Controller FIFO Overrun interrupt
- STMPE811_GIT_FTH : Touch Screen Controller FIFO Threshold interrupt
- STMPE811_GIT_TOUCH : Touch Screen Controller Touch Detected interrupt
- Return values:
-
None
Definition at line 246 of file stmpe811.c.
static uint8_t stmpe811_GetInstance | ( | uint16_t | DeviceAddr ) | [static] |
Check if the device instance of the selected address is already registered and return its index.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
Index of the device instance if registered, 0xFF if not.
Definition at line 945 of file stmpe811.c.
uint8_t stmpe811_GlobalITStatus | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Check the selected Global interrupt source pending bit.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: the Global interrupt source to be checked, could be: - STMPE811_GIT_IO: IO interrupt
- STMPE811_GIT_ADC : ADC interrupt
- STMPE811_GIT_FE : Touch Screen Controller FIFO Error interrupt
- STMPE811_GIT_FF : Touch Screen Controller FIFO Full interrupt
- STMPE811_GIT_FOV : Touch Screen Controller FIFO Overrun interrupt
- STMPE811_GIT_FTH : Touch Screen Controller FIFO Threshold interrupt
- STMPE811_GIT_TOUCH : Touch Screen Controller Touch Detected interrupt
- Return values:
-
The checked Global interrupt source status.
Definition at line 352 of file stmpe811.c.
void stmpe811_Init | ( | uint16_t | DeviceAddr ) |
Initialize the stmpe811 and configure the needed hardware resources.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 131 of file stmpe811.c.
void stmpe811_IO_ClearIT | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Clear the selected IO interrupt pending bit(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: the IO interrupt to be cleared, could be: - STMPE811_PIN_x: Where x can be from 0 to 7.
- Return values:
-
None
Definition at line 739 of file stmpe811.c.
uint8_t stmpe811_IO_Config | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
IO_ModeTypedef | IO_Mode | ||
) |
Configures the IO pin(s) according to IO mode structure value.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The output pin to be set or reset. This parameter can be one of the following values: - STMPE811_PIN_x: where x can be from 0 to 7.
IO_Mode,: The IO pin mode to configure, could be one of the following values: - IO_MODE_INPUT
- IO_MODE_OUTPUT
- IO_MODE_IT_RISING_EDGE
- IO_MODE_IT_FALLING_EDGE
- IO_MODE_IT_LOW_LEVEL
- IO_MODE_IT_HIGH_LEVEL
- Return values:
-
0 if no error, IO_Mode if error
Definition at line 437 of file stmpe811.c.
void stmpe811_IO_DisableAF | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Disable the AF for the selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO pin to be configured. This parameter could be any combination of the following values: - STMPE811_PIN_x: Where x can be from 0 to 7.
- Return values:
-
None
Definition at line 529 of file stmpe811.c.
void stmpe811_IO_DisableIT | ( | uint16_t | DeviceAddr ) |
Disable the global IO interrupt source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 666 of file stmpe811.c.
void stmpe811_IO_DisablePinIT | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Disable interrupt mode for the selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO interrupt to be disabled. This parameter could be any combination of the following values: - STMPE811_PIN_x: where x can be from 0 to 7.
- Return values:
-
None
Definition at line 705 of file stmpe811.c.
void stmpe811_IO_EnableAF | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Enable the AF for the selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO pin to be configured. This parameter could be any combination of the following values: - STMPE811_PIN_x: Where x can be from 0 to 7.
- Return values:
-
None
Definition at line 552 of file stmpe811.c.
void stmpe811_IO_EnableIT | ( | uint16_t | DeviceAddr ) |
Enable the global IO interrupt source.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 650 of file stmpe811.c.
void stmpe811_IO_EnablePinIT | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Enable interrupt mode for the selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO interrupt to be enabled. This parameter could be any combination of the following values: - STMPE811_PIN_x: where x can be from 0 to 7.
- Return values:
-
None
Definition at line 683 of file stmpe811.c.
void stmpe811_IO_InitPin | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
uint8_t | Direction | ||
) |
Initialize the selected IO pin direction.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO pin to be configured. This parameter could be any combination of the following values: - STMPE811_PIN_x: Where x can be from 0 to 7.
Direction,: could be STMPE811_DIRECTION_IN or STMPE811_DIRECTION_OUT.
- Return values:
-
None
Definition at line 500 of file stmpe811.c.
uint32_t stmpe811_IO_ITStatus | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Check the status of the selected IO interrupt pending bit.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO interrupt to be checked could be: - STMPE811_PIN_x Where x can be from 0 to 7.
- Return values:
-
Status of the checked IO pin(s).
Definition at line 726 of file stmpe811.c.
uint32_t stmpe811_IO_ReadPin | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Return the state of the selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The output pin to be set or reset. This parameter can be one of the following values: - STMPE811_PIN_x: where x can be from 0 to 7.
- Return values:
-
IO pin(s) state.
Definition at line 640 of file stmpe811.c.
void stmpe811_IO_SetEdgeMode | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
uint8_t | Edge | ||
) |
Configure the Edge for which a transition is detectable for the selected pin.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO pin to be configured. This parameter could be any combination of the following values: - STMPE811_PIN_x: Where x can be from 0 to 7.
Edge,: The edge which will be detected. This parameter can be one or a combination of following values: STMPE811_EDGE_FALLING and STMPE811_EDGE_RISING .
- Return values:
-
None
Definition at line 577 of file stmpe811.c.
void stmpe811_IO_Start | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin | ||
) |
Start the IO functionality use and disable the AF for selected IO pin(s).
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The IO pin(s) to put in AF. This parameter can be one of the following values: - STMPE811_PIN_x: where x can be from 0 to 7.
- Return values:
-
None
Definition at line 405 of file stmpe811.c.
void stmpe811_IO_WritePin | ( | uint16_t | DeviceAddr, |
uint32_t | IO_Pin, | ||
uint8_t | PinState | ||
) |
Write a new IO pin state.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. IO_Pin,: The output pin to be set or reset. This parameter can be one of the following values: - STMPE811_PIN_x: where x can be from 0 to 7.
PinState,: The new IO pin state.
- Return values:
-
None
Definition at line 617 of file stmpe811.c.
uint8_t stmpe811_ReadGITStatus | ( | uint16_t | DeviceAddr, |
uint8_t | Source | ||
) |
Return the Global interrupts status.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Source,: the Global interrupt source to be checked, could be: - STMPE811_GIT_IO: IO interrupt
- STMPE811_GIT_ADC : ADC interrupt
- STMPE811_GIT_FE : Touch Screen Controller FIFO Error interrupt
- STMPE811_GIT_FF : Touch Screen Controller FIFO Full interrupt
- STMPE811_GIT_FOV : Touch Screen Controller FIFO Overrun interrupt
- STMPE811_GIT_FTH : Touch Screen Controller FIFO Threshold interrupt
- STMPE811_GIT_TOUCH : Touch Screen Controller Touch Detected interrupt
- Return values:
-
The checked Global interrupt source status.
Definition at line 371 of file stmpe811.c.
uint16_t stmpe811_ReadID | ( | uint16_t | DeviceAddr ) |
Read the stmpe811 IO Expander device ID.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
The Device ID (two bytes).
Definition at line 184 of file stmpe811.c.
void stmpe811_Reset | ( | uint16_t | DeviceAddr ) |
Reset the stmpe811 by Software.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 164 of file stmpe811.c.
void stmpe811_SetITPolarity | ( | uint16_t | DeviceAddr, |
uint8_t | Polarity | ||
) |
Set the global interrupt Polarity.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Polarity,: the IT mode polarity, could be one of the following values: - STMPE811_POLARITY_LOW: Interrupt line is active Low/Falling edge
- STMPE811_POLARITY_HIGH: Interrupt line is active High/Rising edge
- Return values:
-
None
Definition at line 295 of file stmpe811.c.
void stmpe811_SetITType | ( | uint16_t | DeviceAddr, |
uint8_t | Type | ||
) |
Set the global interrupt Type.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. Type,: Interrupt line activity type, could be one of the following values: - STMPE811_TYPE_LEVEL: Interrupt line is active in level model
- STMPE811_TYPE_EDGE: Interrupt line is active in edge model
- Return values:
-
None
Definition at line 321 of file stmpe811.c.
void stmpe811_TS_ClearIT | ( | uint16_t | DeviceAddr ) |
Configure the selected source to generate a global interrupt or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 933 of file stmpe811.c.
uint8_t stmpe811_TS_DetectTouch | ( | uint16_t | DeviceAddr ) |
Return if there is touch detected or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
Touch detected state.
Definition at line 837 of file stmpe811.c.
void stmpe811_TS_DisableIT | ( | uint16_t | DeviceAddr ) |
Configure the selected source to generate a global interrupt or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 908 of file stmpe811.c.
void stmpe811_TS_EnableIT | ( | uint16_t | DeviceAddr ) |
Configure the selected source to generate a global interrupt or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None
Definition at line 892 of file stmpe811.c.
void stmpe811_TS_GetXY | ( | uint16_t | DeviceAddr, |
uint16_t * | X, | ||
uint16_t * | Y | ||
) |
Get the touch screen X and Y positions values.
- Parameters:
-
DeviceAddr,: Device address on communication Bus. X,: Pointer to X position value Y,: Pointer to Y position value
- Return values:
-
None.
Definition at line 869 of file stmpe811.c.
uint8_t stmpe811_TS_ITStatus | ( | uint16_t | DeviceAddr ) |
Configure the selected source to generate a global interrupt or not.
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
TS interrupts status
Definition at line 922 of file stmpe811.c.
void stmpe811_TS_Start | ( | uint16_t | DeviceAddr ) |
Configures the touch Screen Controller (Single point detection)
- Parameters:
-
DeviceAddr,: Device address on communication Bus.
- Return values:
-
None.
Definition at line 762 of file stmpe811.c.
Generated on Tue Jul 12 2022 19:08:45 by
