STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Functions | Variables
STMPE811_Exported_Functions

Functions

void stmpe811_Init (uint16_t DeviceAddr)
 STMPE811 Control functions. More...
 
void stmpe811_Reset (uint16_t DeviceAddr)
 Reset the stmpe811 by Software. More...
 
uint16_t stmpe811_ReadID (uint16_t DeviceAddr)
 Read the stmpe811 IO Expander device ID. More...
 
void stmpe811_EnableGlobalIT (uint16_t DeviceAddr)
 Enable the Global interrupt. More...
 
void stmpe811_DisableGlobalIT (uint16_t DeviceAddr)
 Disable the Global interrupt. More...
 
void stmpe811_EnableITSource (uint16_t DeviceAddr, uint8_t Source)
 Enable the interrupt mode for the selected IT source. More...
 
void stmpe811_DisableITSource (uint16_t DeviceAddr, uint8_t Source)
 Disable the interrupt mode for the selected IT source. More...
 
void stmpe811_SetITPolarity (uint16_t DeviceAddr, uint8_t Polarity)
 Set the global interrupt Polarity. More...
 
void stmpe811_SetITType (uint16_t DeviceAddr, uint8_t Type)
 Set the global interrupt Type. More...
 
uint8_t stmpe811_GlobalITStatus (uint16_t DeviceAddr, uint8_t Source)
 Check the selected Global interrupt source pending bit. More...
 
uint8_t stmpe811_ReadGITStatus (uint16_t DeviceAddr, uint8_t Source)
 Return the Global interrupts status. More...
 
void stmpe811_ClearGlobalIT (uint16_t DeviceAddr, uint8_t Source)
 Clear the selected Global interrupt pending bit(s) More...
 
void stmpe811_IO_Start (uint16_t DeviceAddr, uint32_t IO_Pin)
 STMPE811 IO functionalities functions. More...
 
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. More...
 
void stmpe811_IO_InitPin (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t Direction)
 Initialize the selected IO pin direction. More...
 
void stmpe811_IO_EnableAF (uint16_t DeviceAddr, uint32_t IO_Pin)
 Enable the AF for the selected IO pin(s). More...
 
void stmpe811_IO_DisableAF (uint16_t DeviceAddr, uint32_t IO_Pin)
 Disable the AF for the selected IO pin(s). More...
 
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. More...
 
void stmpe811_IO_WritePin (uint16_t DeviceAddr, uint32_t IO_Pin, uint8_t PinState)
 Write a new IO pin state. More...
 
uint32_t stmpe811_IO_ReadPin (uint16_t DeviceAddr, uint32_t IO_Pin)
 Return the state of the selected IO pin(s). More...
 
void stmpe811_IO_EnableIT (uint16_t DeviceAddr)
 Enable the global IO interrupt source. More...
 
void stmpe811_IO_DisableIT (uint16_t DeviceAddr)
 Disable the global IO interrupt source. More...
 
void stmpe811_IO_EnablePinIT (uint16_t DeviceAddr, uint32_t IO_Pin)
 Enable interrupt mode for the selected IO pin(s). More...
 
void stmpe811_IO_DisablePinIT (uint16_t DeviceAddr, uint32_t IO_Pin)
 Disable interrupt mode for the selected IO pin(s). More...
 
uint32_t stmpe811_IO_ITStatus (uint16_t DeviceAddr, uint32_t IO_Pin)
 Check the status of the selected IO interrupt pending bit. More...
 
void stmpe811_IO_ClearIT (uint16_t DeviceAddr, uint32_t IO_Pin)
 Clear the selected IO interrupt pending bit(s). More...
 
void stmpe811_TS_Start (uint16_t DeviceAddr)
 STMPE811 Touch screen functionalities functions. More...
 
uint8_t stmpe811_TS_DetectTouch (uint16_t DeviceAddr)
 Return if there is touch detected or not. More...
 
void stmpe811_TS_GetXY (uint16_t DeviceAddr, uint16_t *X, uint16_t *Y)
 Get the touch screen X and Y positions values. More...
 
void stmpe811_TS_EnableIT (uint16_t DeviceAddr)
 Configure the selected source to generate a global interrupt or not. More...
 
void stmpe811_TS_DisableIT (uint16_t DeviceAddr)
 Configure the selected source to generate a global interrupt or not. More...
 
uint8_t stmpe811_TS_ITStatus (uint16_t DeviceAddr)
 Configure the selected source to generate a global interrupt or not. More...
 
void stmpe811_TS_ClearIT (uint16_t DeviceAddr)
 Configure the selected source to generate a global interrupt or not. More...
 
void IOE_Init (void)
 
void IOE_ITConfig (void)
 
void IOE_Delay (uint32_t delay)
 
void IOE_Write (uint8_t addr, uint8_t reg, uint8_t value)
 
uint8_t IOE_Read (uint8_t addr, uint8_t reg)
 
uint16_t IOE_ReadMultiple (uint8_t addr, uint8_t reg, uint8_t *buffer, uint16_t length)
 

Variables

TS_DrvTypeDef stmpe811_ts_drv
 
IO_DrvTypeDef stmpe811_io_drv
 

Detailed Description

Function Documentation

void IOE_Delay ( uint32_t  delay)
void IOE_Init ( void  )
void IOE_ITConfig ( void  )
uint8_t IOE_Read ( uint8_t  addr,
uint8_t  reg 
)
uint16_t IOE_ReadMultiple ( uint8_t  addr,
uint8_t  reg,
uint8_t *  buffer,
uint16_t  length 
)
void IOE_Write ( uint8_t  addr,
uint8_t  reg,
uint8_t  value 
)
void stmpe811_ClearGlobalIT ( uint16_t  DeviceAddr,
uint8_t  Source 
)

Clear the selected Global interrupt pending bit(s)

Parameters
DeviceAddrDevice address on communication Bus.
Sourcethe 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
DeviceAddrDevice 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
DeviceAddrDevice address on communication Bus.
SourceThe 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
DeviceAddrDevice 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
DeviceAddrDevice address on communication Bus.
SourceThe 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.

uint8_t stmpe811_GlobalITStatus ( uint16_t  DeviceAddr,
uint8_t  Source 
)

Check the selected Global interrupt source pending bit.

Parameters
DeviceAddrDevice address on communication Bus.
Sourcethe 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
Thechecked Global interrupt source status.

Definition at line 352 of file stmpe811.c.

void stmpe811_Init ( uint16_t  DeviceAddr)

STMPE811 Control functions.

STMPE811 Control functions.

Parameters
DeviceAddrDevice 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
DeviceAddrDevice address on communication Bus.
IO_Pinthe 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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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_ModeThe 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
0if 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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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
DeviceAddrDevice 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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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
DeviceAddrDevice 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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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.
Directioncould 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
DeviceAddrDevice address on communication Bus.
IO_PinThe IO interrupt to be checked could be:
  • STMPE811_PIN_x Where x can be from 0 to 7.
Return values
Statusof 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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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
IOpin(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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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.
EdgeThe 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 
)

STMPE811 IO functionalities functions.

STMPE811 IO functionalities functions.

Parameters
DeviceAddrDevice address on communication Bus.
IO_PinThe 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
DeviceAddrDevice address on communication Bus.
IO_PinThe 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.
PinStateThe 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
DeviceAddrDevice address on communication Bus.
Sourcethe 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
Thechecked 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
DeviceAddrDevice address on communication Bus.
Return values
TheDevice ID (two bytes).

Definition at line 184 of file stmpe811.c.

void stmpe811_Reset ( uint16_t  DeviceAddr)

Reset the stmpe811 by Software.

Parameters
DeviceAddrDevice 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
DeviceAddrDevice address on communication Bus.
Polaritythe 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
DeviceAddrDevice address on communication Bus.
TypeInterrupt 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
DeviceAddrDevice 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
DeviceAddrDevice address on communication Bus.
Return values
Touchdetected 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
DeviceAddrDevice 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
DeviceAddrDevice 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
DeviceAddrDevice address on communication Bus.
XPointer to X position value
YPointer 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
DeviceAddrDevice address on communication Bus.
Return values
TSinterrupts status

Definition at line 922 of file stmpe811.c.

void stmpe811_TS_Start ( uint16_t  DeviceAddr)

STMPE811 Touch screen functionalities functions.

STMPE811 Touch screen functionalities functions.

Parameters
DeviceAddrDevice address on communication Bus.
Return values
None.

Definition at line 762 of file stmpe811.c.

Variable Documentation

IO_DrvTypeDef stmpe811_io_drv

Definition at line 93 of file stmpe811.c.

TS_DrvTypeDef stmpe811_ts_drv

Definition at line 78 of file stmpe811.c.