Library Functions.
More...
|
| #define | TM_STMPE811_TouchInRectangle(sd, xPos, yPos, w, h) (((sd)->x >= (xPos)) && ((sd)->x < (xPos + w)) && ((sd)->y >= (yPos)) && ((sd)->y < (yPos + h))) |
| | Checks if touch data is inside specific rectangle coordinates. More...
|
| |
Library Functions.
| #define TM_STMPE811_TouchInRectangle |
( |
|
sd, |
|
|
|
xPos, |
|
|
|
yPos, |
|
|
|
w, |
|
|
|
h |
|
) |
| (((sd)->x >= (xPos)) && ((sd)->x < (xPos + w)) && ((sd)->y >= (yPos)) && ((sd)->y < (yPos + h))) |
Checks if touch data is inside specific rectangle coordinates.
- Parameters
-
| sd | Pointer to TM_STMPE811_t to get data from |
| xPos | Top-left X position of rectangle |
| yPos | Top-left Y position of rectangle |
| w | Rectangle width |
| h | Rectangle height: |
- Return values
-
| Touch | inside rectangle status:
- 0: Touch is outside rectangle
- > 0: Touch is inside rectangle
|
- Note
- Defined as macro for faster execution
Initializes STMPE811 Touch driver.
- Parameters
-
- Return values
-
Reads touch coordinates.
- Parameters
-
- Return values
-
| Touch | status:
- TM_STMPE811_State_Pressed: Touch detected as pressed, coordinates valid
- TM_STMPE811_State_Released: Touch detected as not pressed, coordinates not valid
|