8017249bab
19885: drivers/stmpe811: changes for interrupt-driven touch handling and gesture recognition r=aabadie a=gschorcht ### Contribution description This PR contains changes needed for the purely interrupt-driven handling of the touch position as `touch_dev` device, which is a prerequisite for the realization of gesture recognition. (PR #19884). The interrupt-driven approach of `touch_dev` devices (PR #19882) and the gesture recognition (PR #19884) need continuous reporting of the touch position as long as there is at least one touch. Since the driver so far only uses the _Touch Detect_ interrupt, only the position at the beginning of a touch is available. All further positions must be polled. Therefore, the changes in this PR additionally enable the _FIFO Threshold_ interrupt when the `touch_dev` module is enabled. However, since the _Touch Detect_ interrupt does not work reliably when the _FIFO Threshold_ interrupt is enabled and the FIFO Threshold is 1, the FIFO Threshold is set to 2 by default when the `touch_dev` module is enabled. Furthermore, the FIFO queue has to be reset after reading one touch position. Otherwise new touch positions are processed with a delay if the rate of calling the function to read the FIFO is slower than the rate at which the FIFO is filled. The reason for this is that with each call of this function only the oldest touch position is read value by value from the FIFO. Gestures can't be implemented with such a behavior. ### Testing procedure 1. `tests/drivers/stmpe811` should work as before (only a single position is shown): ``` BOARD=stm32f429i-disco make -j8 -C tests/drivers/stmpe811 flash ``` ``` main(): This is RIOT! (Version: 2023.10-devel-120-g848d1- drivers/stmpe811_touch_dev_gestures) STMPE811 test application +------------Initializing------------+ Initialization successful Pressed! X: 135, Y:131 Released! ``` 2. `tests/drivers/stmpe811` should work on top of PR #19882 with continuous outputs of touch positions: ``` BOARD=stm32f429i-disco make -j8 -C tests/drivers/touch_dev flash ``` ``` main(): This is RIOT! (Version: 2023.10-devel-121-g38d3db-drivers/stmpe811_touch_dev_gestures) Event: pressed! X: 131, Y:145 X: 133, Y:141 X: 135, Y:138 X: 138, Y:133 X: 141, Y:128 X: 146, Y:122 X: 151, Y:117 Event: released! ``` 3. `tests/driver/touch_dev_gestures` of PR #19884 should work on top of this PR: ``` BOARD=stm32f429i-disco make -j8 -C tests/drivers/touch_dev_gestures flash ``` ``` main(): This is RIOT! (Version: 2023.10-devel-128-g05f690-drivers/touch_dev_gestures_work) Swipe right Swipe left Swipe down Swipe up Single Tap X: 246, Y:148 Single Tap X: 256, Y:139 Double Tap X: 247, Y:136 Pressed X: 246, Y:131 Moving X: 248, Y:132 Moving X: 250, Y:133 Moving X: 258, Y:135 Moving X: 270, Y:136 Moving X: 285, Y:132 Moving X: 300, Y:126 Moving X: 309, Y:122 Moving X: 310, Y:119 Released X: 310, Y:119 ``` ### Issues/PRs references Co-authored-by: Gunar Schorcht <gunar@schorcht.net> |
||
---|---|---|
.cargo | ||
.github | ||
.vscode | ||
boards | ||
bootloaders | ||
core | ||
cpu | ||
dist | ||
doc | ||
drivers | ||
examples | ||
fuzzing | ||
kconfigs | ||
makefiles | ||
pkg | ||
sys | ||
tests | ||
.bandit | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.murdock | ||
.murdock.yml | ||
bors.toml | ||
CITATION.cff | ||
CODE_OF_CONDUCT.md | ||
CODEOWNERS | ||
CODING_CONVENTIONS_C++.md | ||
CODING_CONVENTIONS.md | ||
CONTRIBUTING.md | ||
doc.txt | ||
Kconfig | ||
LICENSE | ||
LOSTANDFOUND.md | ||
MAINTAINING.md | ||
Makefile | ||
Makefile.base | ||
Makefile.dep | ||
Makefile.features | ||
Makefile.include | ||
README.md | ||
release-notes.txt | ||
SECURITY.md | ||
SUBSYSTEMS.md | ||
uncrustify-riot.cfg | ||
Vagrantfile |
The friendly Operating System for IoT!
RIOT is a real-time multi-threading operating system that supports a range of devices that are typically found in the Internet of Things (IoT): 8-bit, 16-bit and 32-bit microcontrollers.
RIOT is based on the following design principles: energy-efficiency, real-time capabilities, small memory footprint, modularity, and uniform API access, independent of the underlying hardware (this API offers partial POSIX compliance).
RIOT is developed by an international open source community which is independent of specific vendors (e.g. similarly to the Linux community). RIOT is licensed with LGPLv2.1, a copyleft license which fosters indirect business models around the free open-source software platform provided by RIOT, e.g. it is possible to link closed-source code with the LGPL code.
FEATURES
RIOT provides features including, but not limited to:
- a preemptive, tickless scheduler with priorities
- flexible memory management
- high resolution, long-term timers
- MTD abstraction layer
- File System integration
- support 200+ boards based on AVR, MSP430, ESP8266, ESP32, RISC-V, ARM7 and ARM Cortex-M
- the native port allows to run RIOT as-is on Linux and BSD. Multiple instances of RIOT running on a single machine can also be interconnected via a simple virtual Ethernet bridge or via a simulated IEEE 802.15.4 network (ZEP)
- IPv6
- 6LoWPAN (RFC4944, RFC6282, and RFC6775)
- UDP
- RPL (storing mode, P2P mode)
- CoAP
- OTA updates via SUIT
- MQTT
- USB (device mode)
- Display / Touchscreen support
- CCN-Lite
- LoRaWAN
- UWB
- Bluetooth (BLE) via NimBLE
GETTING RIOT
The most convenient way to get RIOT is to clone it via Git
$ git clone https://github.com/RIOT-OS/RIOT
this will ensure that you get all the newest features and bug fixes with the caveat of an ever changing work environment.
If you prefer things more stable, you can download the source code of one of our quarter annual releases via Github as ZIP file or tarball. You can also checkout a release in a cloned Git repository using
$ git pull --tags
$ git checkout <YYYY.MM>
For more details on our release cycle, check our documentation.
GETTING STARTED
- You want to start the RIOT? Just follow our quickstart guide or try this tutorial. For specific toolchain installation, follow instructions in the getting started page.
- The RIOT API itself can be built from the code using doxygen. The latest version of the documentation is uploaded daily to doc.riot-os.org.
FORUM
Do you have a question, want to discuss a new feature, or just want to present your latest project using RIOT? Come over to our forum and post to your hearts content.
CONTRIBUTE
To contribute something to RIOT, please refer to our contributing document.
MAILING LISTS
- RIOT commits: commits@riot-os.org
- Github notifications: notifications@riot-os.org
LICENSE
- Most of the code developed by the RIOT community is licensed under the GNU Lesser General Public License (LGPL) version 2.1 as published by the Free Software Foundation.
- Some external sources, especially files developed by SICS are published under a separate license.
All code files contain licensing information.
For more information, see the RIOT website: