-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/drivers/touch_dev: introduce TOUCH_DEV_POLLING
To be able to test the touch device in polling mode, variable `TOUCH_DEV_POLLING` is introduced. It is set to 0 by default and can be overriden by 1 to use the polling mode. The polling period can be controlled by the `TOUCH_DEV_POLLING_PERIOD` variable.
- Loading branch information
Showing
4 changed files
with
67 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# About | ||
|
||
This is a manual test application for touch device drivers using the generic | ||
touch device API. Which touch device driver is used is determined by the board | ||
definition. | ||
|
||
# Usage | ||
|
||
This test application initializes the touch device and then waits | ||
for touch events by using interrupts by default. When touch events occur, | ||
the application generates output like the following: | ||
``` | ||
Event: pressed! | ||
X: 157, Y:152 | ||
X: 158, Y:152 | ||
X: 158, Y:152 | ||
X: 158, Y:152 | ||
X: 158, Y:152 | ||
X: 158, Y:152 | ||
X: 158, Y:152 | ||
X: 158, Y:152 | ||
X: 158, Y:152 | ||
X: 158, Y:152 | ||
Event: released! | ||
``` | ||
|
||
To use the touch device in polling mode, the environment variable | ||
`TOUCH_DEV_POLLING_MODE` must be set to 1. The polling period in milliseconds | ||
is defined by the environment variable `TOUCH_DEV_POLLING_PERIOD`. It is | ||
50 ms by default. It can be changed by setting the environment variable | ||
`TOUCH_DEV_POLLING_PERIOD` in the make command, for example: | ||
``` | ||
TOUCH_DEV_POLLING_MODE=1 TOUCH_DEV_POLLING_PERIOD=100 BOARD=... make -C tests/drivers/touch_dev flash term | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# this file enables modules defined in Kconfig. Do not use this file for | ||
# application configuration. This is only needed during migration. | ||
CONFIG_MODULE_TOUCH_DEV=y | ||
CONFIG_MODULE_ZTIMER=y | ||
CONFIG_MODULE_ZTIMER_MSEC=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters