![]() |
Core2 for AWS IoT EduKit BSP 1.5.1
|
Functions for the FT6336U capacitive touch panel controller. More...
Go to the source code of this file.
Functions | |
| void | FT6336U_Init () |
| Initializes the FT6336U over I2C. More... | |
| void | FT6336U_GetTouch (uint16_t *x, uint16_t *y, bool *press_down) |
| Retrieves the most recent touch data from the FT6336U. More... | |
| bool | FT6336U_WasPressed () |
| Retrieves the pressed state of the touch screen. More... | |
| uint16_t | FT6336U_GetPressPosX () |
| Retrieves the X-coordinate of the screen press. More... | |
| uint16_t | FT6336U_GetPressPosY () |
| Retrieves the Y-coordinate of the screen press. More... | |
Functions for the FT6336U capacitive touch panel controller.
| void FT6336U_Init | ( | ) |
Initializes the FT6336U over I2C.
FT6336Task and installs an ISR on the interrupt pin FT6336U_INTR_PIN.The most recent button press state is stored within the library and can be queried using the functions provided by this library.
The FreeRTOS task remains suspended and only resumes when the screen is pressed (which is informed by the FT6336U using the interrupt on the FT6336U_INTR_PIN). If multiple press events are stashed by the hardware, the FreeRTOS task keeps retrieving them one by one at an interval of 20 ticks. Once all the events are retrieved, the task suspends itself.
| void FT6336U_GetTouch | ( | uint16_t * | x, |
| uint16_t * | y, | ||
| bool * | press_down | ||
| ) |
Retrieves the most recent touch data from the FT6336U.
Example:
Print the touch coordinates and if the screen is currently being pressed.
| [in] | x | The X-coordinate of the touch input. |
| [in] | y | The Y-coordinate of the touch input. |
| [in] | press_down | The pressed state of the touch screen. |
| bool FT6336U_WasPressed | ( | ) |
Retrieves the pressed state of the touch screen.
| uint16_t FT6336U_GetPressPosX | ( | ) |
Retrieves the X-coordinate of the screen press.
| uint16_t FT6336U_GetPressPosY | ( | ) |
Retrieves the Y-coordinate of the screen press.