![]() |
Core2 for AWS IoT EduKit BSP 1.5.1
|
#include "freertos/FreeRTOS.h"#include "freertos/task.h"#include "freertos/semphr.h"#include "freertos/queue.h"#include "ft6336u.h"#include "button.h"Functions | |
| void | Button_Init () |
| Initializes the virtual buttons using the FT6336U touch controller. More... | |
| 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. More... | |
| uint8_t | Button_WasPressed (Button_t *button) |
| See if the specified button was pressed. More... | |
| uint8_t | Button_WasReleased (Button_t *button) |
| See if the specified button press was released. More... | |
| uint8_t | Button_WasLongPress (Button_t *button, uint32_t long_press_time) |
| See if the specified button press was a long press. More... | |
| uint8_t | Button_IsPress (Button_t *button) |
| See if the specified button is currently being pressed. More... | |
| uint8_t | Button_IsRelease (Button_t *button) |
| See if the specified button press is currently released. More... | |
| void | Button_Update (Button_t *button, uint8_t press, uint16_t x, uint16_t y) |
Variables | |
| Button_t * | button_ahead = NULL |
| void Button_Init | ( | ) |
Initializes the virtual buttons using the FT6336U touch controller.
| 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.
| [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. |
| uint8_t Button_WasPressed | ( | Button_t * | button | ) |
See if the specified button was pressed.
| [out] | button | The button to check if it was pressed. Updates the value of the state definition. |
| uint8_t Button_WasReleased | ( | Button_t * | button | ) |
See if the specified button press was released.
| [out] | button | The button to check if it was released. Updates the value of the state definition. |
| uint8_t Button_WasLongPress | ( | Button_t * | button, |
| uint32_t | long_press_time | ||
| ) |
See if the specified button press was a long press.
| [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. |
| uint8_t Button_IsPress | ( | Button_t * | button | ) |
See if the specified button is currently being pressed.
| [out] | button | The button to check if it is currently being pressed. Updates the value of the state definition. |
| uint8_t Button_IsRelease | ( | Button_t * | button | ) |
See if the specified button press is currently released.
| [out] | button | The button to check if it is currently released. |
| void Button_Update | ( | Button_t * | button, |
| uint8_t | press, | ||
| uint16_t | x, | ||
| uint16_t | y | ||
| ) |
| Button_t* button_ahead = NULL |