2019-04-28 17:54:50 +02:00
|
|
|
## About
|
|
|
|
|
|
|
|
This is the test application for the STMPE811 touchscreen controller.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2023-08-12 12:45:35 +02:00
|
|
|
The application works out of the box on a STM32F429I-DISC1 board using the
|
|
|
|
interrupt mode by default:
|
2019-04-28 17:54:50 +02:00
|
|
|
|
|
|
|
```
|
2023-05-06 15:38:21 +02:00
|
|
|
make -C tests/drivers/stmpe811 flash term
|
2019-04-28 17:54:50 +02:00
|
|
|
```
|
|
|
|
|
2023-08-12 12:45:35 +02:00
|
|
|
To use the polling mode, the environment variable `STMPE811_POLLING_MODE` must
|
|
|
|
be set to 1. The polling period in milliseconds is defined by the environment
|
|
|
|
variable `STMPE811_POLLING_PERIOD`. It is 50 ms by default. It can be changed
|
|
|
|
by setting the environment variable `STMPE811_POLLING_PERIOD` in the make
|
|
|
|
command, for example:
|
|
|
|
```
|
|
|
|
STMPE811_POLLING_MODE=1 STMPE811_POLLING_PERIOD=100 BOARD=... make -C tests/drivers/touch_dev flash term
|
|
|
|
```
|
|
|
|
|
2019-04-28 17:54:50 +02:00
|
|
|
## Expected output
|
|
|
|
|
|
|
|
The application initializes the STMPE811 and displays "Pressed!" when a touch
|
2020-07-21 21:25:35 +02:00
|
|
|
event is detected. The position of the touch event is also displayed.
|
2019-04-28 17:54:50 +02:00
|
|
|
"Released" is displayed when the screen is released.
|
|
|
|
|
|
|
|
```
|
2020-07-21 21:25:35 +02:00
|
|
|
2020-07-21 21:24:49,286 # Pressed!
|
|
|
|
2020-07-21 21:24:49,293 # X: 132, Y:138
|
|
|
|
2020-07-21 21:24:49,826 # Released!
|
|
|
|
2020-07-21 21:24:51,218 # Pressed!
|
|
|
|
2020-07-21 21:24:51,219 # X: 42, Y:16
|
|
|
|
2020-07-21 21:24:51,614 # Released!
|
|
|
|
2020-07-21 21:24:53,385 # Pressed!
|
|
|
|
2020-07-21 21:24:53,385 # X: 197, Y:64
|
|
|
|
2020-07-21 21:24:53,588 # Released!
|
2019-04-28 17:54:50 +02:00
|
|
|
```
|