Functions for the virtual buttons using the FT633U touch controller.
More...
#include "stdio.h"
Go to the source code of this file.
Functions for the virtual buttons using the FT633U touch controller.
◆ PressEvent
List of possible virtual button press events.
| Enumerator |
|---|
| PRESS | Virtual button was pressed.
|
| RELEASE | Virtual button was released.
|
| LONGPRESS | Virtual button was long pressed.
|
◆ Button_Init()
Initializes the virtual buttons using the FT6336U touch controller.
- Note
- The Core2ForAWS_Init() calls this function when the hardware feature is enabled.
◆ Button_Attach()
| Button_t * Button_Attach |
( |
uint16_t |
x, |
|
|
uint16_t |
y, |
|
|
uint16_t |
w, |
|
|
uint16_t |
h |
|
) |
| |
Create a virtual button based on locations and size of the button area. The Core2 for AWS IoT EduKit has 3 buttons on the face of the device that these virtual buttons are mapped to.
- Parameters
-
| [in] | x | Virtual button touch starting point in the X-coordinate plane. |
| [in] | y | Virtual button touch starting point in the Y-coordinate plane. |
| [in] | w | Virtual button touched width from the starting point in the X-coordinate plane. |
| [in] | h | Virtual button touched height from the starting point in the Y-coordinate plane. |
- Returns
- An instance of the virtual button struct.
◆ Button_WasPressed()
| uint8_t Button_WasPressed |
( |
Button_t * |
button | ) |
|
See if the specified button was pressed.
- Parameters
-
| [out] | button | The button to check if it was pressed. Updates the value of the state definition. |
- Returns
- A boolean if the button specified was pressed. 0x00 for not pressed, 0xff for pressed.
◆ Button_WasReleased()
| uint8_t Button_WasReleased |
( |
Button_t * |
button | ) |
|
See if the specified button press was released.
- Parameters
-
| [out] | button | The button to check if it was released. Updates the value of the state definition. |
- Returns
- A boolean if the button specified was released. 0x00 for not released, 0xff for released.
◆ Button_IsPress()
| uint8_t Button_IsPress |
( |
Button_t * |
button | ) |
|
See if the specified button is currently being pressed.
- Parameters
-
| [out] | button | The button to check if it is currently being pressed. Updates the value of the state definition. |
- Returns
- A boolean if the button specified is currently being pressed. 0x00 for currently not being pressed, 0xff for is currently being pressed.
◆ Button_IsRelease()
| uint8_t Button_IsRelease |
( |
Button_t * |
button | ) |
|
See if the specified button press is currently released.
- Parameters
-
| [out] | button | The button to check if it is currently released. |
- Returns
- A boolean if the button specified is currently released. 0x00 for currently not released, 0xff for is currently released.
◆ Button_WasLongPress()
| uint8_t Button_WasLongPress |
( |
Button_t * |
button, |
|
|
uint32_t |
long_press_time |
|
) |
| |
See if the specified button press was a long press.
- Parameters
-
| [out] | button | The button to check if it was a long press button event. Updates the value of the state definition. |
| [in] | long_press_time | The time duration to consider a button press a long press. |
- Returns
- A boolean if the button specified was long pressed. 0x00 for not a long button press, 0xff for was a long button press.