STM32412G-Discovery BSP User Manual: STM32412G Discovery TS Exported Functions

STM32412G-Discovery BSP Drivers

STM32412G-Discovery BSP User Manual
STM32412G Discovery TS Exported Functions

Functions

uint8_t BSP_TS_Init (uint16_t ts_SizeX, uint16_t ts_SizeY)
 Initializes and configures the touch screen functionalities and configures all necessary hardware resources (GPIOs, I2C, clocks..).
uint8_t BSP_TS_InitEx (uint16_t ts_SizeX, uint16_t ts_SizeY, uint8_t orientation)
 Initializes and configures the touch screen functionalities and configures all necessary hardware resources (GPIOs, I2C, clocks..) with a given orientation.
uint8_t BSP_TS_GetState (TS_StateTypeDef *TS_State)
 Returns status and positions of the touch screen.
uint8_t BSP_TS_ITConfig (void)
 Configures and enables the touch screen interrupts.
void BSP_TS_INT_MspInit (void)
 Initializes the TS_INT pin MSP.

Function Documentation

uint8_t BSP_TS_GetState ( TS_StateTypeDef TS_State)

Returns status and positions of the touch screen.

Parameters:
TS_State,:Pointer to touch screen current state structure
Return values:
TS_OKif all initializations are OK. Other value if error.

Definition at line 213 of file stm32412g_discovery_ts.c.

References I2C_Address, TOUCH_EVENT_CONTACT, TOUCH_EVENT_LIFT_UP, TOUCH_EVENT_NO_EVT, TOUCH_EVENT_PRESS_DOWN, TS_StateTypeDef::touchDetected, TS_StateTypeDef::touchX, TS_StateTypeDef::touchY, TS_ERROR, TS_MAX_NB_TOUCH, TS_OK, TS_SWAP_X, TS_SWAP_XY, TS_SWAP_Y, tsDriver, and tsOrientation.

uint8_t BSP_TS_Init ( uint16_t  ts_SizeX,
uint16_t  ts_SizeY 
)

Initializes and configures the touch screen functionalities and configures all necessary hardware resources (GPIOs, I2C, clocks..).

Parameters:
ts_SizeX: Maximum X size of the TS area on LCD
ts_SizeY: Maximum Y size of the TS area on LCD
Return values:
TS_OKif all initializations are OK. Other value if error.

Definition at line 118 of file stm32412g_discovery_ts.c.

References BSP_TS_InitEx(), and TS_ORIENTATION_LANDSCAPE.

uint8_t BSP_TS_InitEx ( uint16_t  ts_SizeX,
uint16_t  ts_SizeY,
uint8_t  orientation 
)

Initializes and configures the touch screen functionalities and configures all necessary hardware resources (GPIOs, I2C, clocks..) with a given orientation.

Parameters:
ts_SizeX: Maximum X size of the TS area on LCD
ts_SizeY: Maximum Y size of the TS area on LCD
orientation: TS_ORIENTATION_LANDSCAPE or TS_ORIENTATION_PORTRAIT
Return values:
TS_OKif all initializations are OK. Other value if error.

Definition at line 132 of file stm32412g_discovery_ts.c.

References I2C_Address, TS_DEVICE_NOT_FOUND, TS_I2C_ADDRESS, TS_OK, TS_ORIENTATION_LANDSCAPE_ROT180, TS_ORIENTATION_PORTRAIT, TS_SWAP_X, TS_SWAP_XY, TS_SWAP_Y, tsDriver, and tsOrientation.

Referenced by BSP_TS_Init().

void BSP_TS_INT_MspInit ( void  )

Initializes the TS_INT pin MSP.

Definition at line 396 of file stm32412g_discovery_ts.c.

References TS_INT_GPIO_CLK_ENABLE, TS_INT_GPIO_PORT, and TS_INT_PIN.

Referenced by BSP_TS_ITConfig().

uint8_t BSP_TS_ITConfig ( void  )

Configures and enables the touch screen interrupts.

Return values:
TS_OKif all initializations are OK. Other value if error.

Definition at line 188 of file stm32412g_discovery_ts.c.

References BSP_TS_INT_MspInit(), I2C_Address, TS_INT_EXTI_IRQn, TS_OK, and tsDriver.

Generated on Tue Jan 24 2017 11:28:06 for STM32412G-Discovery BSP User Manual by   doxygen 1.7.6.1