1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Go to file
bors[bot] 8017249bab
Merge #19885
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>
2023-08-31 06:21:40 +00:00
.cargo rust: Update dependencies, use riot-wrappers from git 2023-01-24 20:12:58 +01:00
.github gh-actions: remove reporting release tests to Matrix 2023-08-12 11:21:46 +02:00
.vscode .vscode/settings.json: import initial RIOT-OS style 2022-11-21 21:31:12 +01:00
boards Merge #19887 #19898 2023-08-30 17:35:08 +00:00
bootloaders bootloaders/riotboot: fix path to cortexm ldscript test 2023-05-13 19:08:40 +02:00
core Merge #19606 #19753 #19757 2023-07-05 21:36:31 +00:00
cpu Merge #19887 #19898 2023-08-30 17:35:08 +00:00
dist drivers/ft5x06: introduce coordinate conversions 2023-08-26 17:49:29 +02:00
doc Merge #19733 #19747 #19769 #19782 2023-07-04 18:43:26 +00:00
drivers Merge #19885 2023-08-31 06:21:40 +00:00
examples Merge #19387 #19874 #19875 2023-08-21 13:49:27 +00:00
fuzzing fuzzing: Add uri_parser fuzzer setup 2022-12-19 13:03:45 +01:00
kconfigs Merge #19539 #19815 #19860 #19886 2023-08-23 16:55:09 +00:00
makefiles Merge #19885 2023-08-31 06:21:40 +00:00
pkg pkg/lvgl: bump to v8.3.9 2023-08-24 10:37:29 +02:00
sys Merge #19870 #19900 #19902 2023-08-24 14:28:41 +00:00
tests tests/net/gcoap_fileserver: disable test on CI 2023-08-30 18:48:11 +02:00
.bandit codacy: disable complaining about python assert 2019-03-01 13:43:37 +01:00
.gitattributes rust: Treat Cargo.lock files as opaque 2021-12-14 13:27:42 +01:00
.gitignore .gitignore: ignore all files within .vscode/ except user's settings 2022-11-21 21:30:28 +01:00
.mailmap mailmap: deduplicate @benpicco 2020-04-28 11:58:44 +02:00
.murdock .murdock: re-enable LLVM targets 2023-07-18 12:24:10 +02:00
.murdock.yml CI: use regex for branches in .murdock.yml 2022-12-07 12:53:40 +01:00
bors.toml bors.yaml: re-activate labels check + add block_labels 2023-02-23 15:49:46 +01:00
CITATION.cff CITATION.cff: Initial import 2021-10-22 10:21:57 +02:00
CODE_OF_CONDUCT.md github: add Code of Conduct 2017-12-08 09:10:01 +01:00
CODEOWNERS CODEOWNERS: fix path to test applications 2023-05-13 18:38:31 +02:00
CODING_CONVENTIONS_C++.md CODING_CONVENTIONS_C++.md: Change space after negation 2021-10-28 10:49:51 +02:00
CODING_CONVENTIONS.md Coding_Convention: clarify: none return is allowed 2021-03-08 14:46:34 +01:00
CONTRIBUTING.md CONTRIBUTING: Remove Freenode reference 2021-06-18 11:11:27 +02:00
doc.txt doc: Link concrete measures from DEVELHELP documentation 2022-01-27 13:49:25 +01:00
Kconfig Kconfig: load application configuration first 2022-04-27 10:31:23 +02:00
LICENSE LICENSE: Fix github badge 2022-08-23 09:46:56 +02:00
LOSTANDFOUND.md LOSTANDFOUND.md: Update with cpu/mips* 2022-09-27 13:43:03 +02:00
MAINTAINING.md MAINTAINING.md: add some notes on Bors 2023-02-27 17:28:16 +01:00
Makefile make: Remove mailing list advertisement 2021-05-12 11:41:25 +02:00
Makefile.base buildsystem/pkg: expand paths early 2022-01-30 19:58:52 +01:00
Makefile.dep cpu/riscv: Add PMP driver 2023-06-28 11:55:34 +02:00
Makefile.features Makefile.features: output board on error 2023-02-27 22:56:34 +01:00
Makefile.include make: COMPILE_COMMANDS_PATH adapt for external apps 2023-08-09 13:20:05 +02:00
README.md README.md: Remove HiL Badge 2023-04-05 11:28:52 +02:00
release-notes.txt release-notes.txt: add 2023.07 release notes 2023-08-09 12:21:52 +02:00
SECURITY.md SECURITY: Describe that declassification is an option 2023-01-15 16:22:32 +01:00
SUBSYSTEMS.md SUBSYSTEMS.md: add @maribu 2023-06-13 15:03:01 +02:00
uncrustify-riot.cfg uncrustify-riot.cfg: update to coding convention 2021-03-04 17:23:46 +01:00
Vagrantfile tools/packer: adapt for Ubuntu 18.04 2020-02-19 19:23:07 +01:00

Nightly CI status master GitHub release License API docs Wiki Stack Overflow questions Twitter Matrix

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

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:

https://www.riot-os.org