1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/makefiles
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
..
arch Merge #19791 2023-07-06 17:46:14 +00:00
boards makefiles/boards/stm32: fix DFU_USB_ID handling 2023-03-10 10:02:15 +01:00
boot makefiles/boot/riotboot-dfu-util: add tinyusb_dfu support 2023-01-15 18:09:55 +01:00
libc build system: Fix linker feature test with newlib 4.3.0 2023-02-02 20:47:37 +01:00
pkg makefiles/pkg/nimble.adv.mk: add utility to assign adv instance 2022-04-27 08:22:58 +02:00
tests makefiles/tests/tests.inc.mk: fix test/available target 2023-01-03 12:53:35 +01:00
toolchain makefiles/toolchain/llvm.inc.mk: disable annoying C++ warning 2023-07-18 12:24:07 +02:00
tools makefiles/usb_board_reset.mk: declare term-delay target with test target 2023-08-11 17:53:10 +02:00
utils makefiles/utils/strings.mk: Fix version_is_greater_or_equal 2023-01-12 12:03:28 +01:00
app_dirs.inc.mk makefiles/app_dirs.inc.mk: add tests/net subdirectory 2023-05-12 16:36:38 +02:00
application.inc.mk core: split out library code 2022-03-09 21:43:05 +01:00
auto_init.inc.mk makefiles: add common makefile for auto_init modules 2020-06-08 10:27:35 +02:00
bindist.inc.mk makefiles/bindist: copy object files and use .bin to compare 2020-09-04 15:01:15 +02:00
blob.inc.mk blobs: include documentation in doxygen 2023-01-26 09:27:47 +01:00
boards.inc.mk make: add info-emulated-boards helper target 2021-10-12 10:39:57 +02:00
buildtests.inc.mk many typo fixes 2019-11-23 22:39:07 +01:00
cargo-settings.inc.mk Rust: Add crates-to-module adapter 2022-07-09 21:15:29 +02:00
cargo-targets.inc.mk make: pass make jobserver to cargo 2023-01-26 21:43:39 +01:00
cflags.inc.mk buildsystem: only expose CPU_RAM_BASE & SIZE when known 2023-06-24 23:35:14 +02:00
clang_tidy.inc.mk makefiles/clang-tidy: initial support 2021-05-28 11:57:20 +02:00
color.inc.mk makefiles/color: Add color functions. 2021-05-04 10:57:47 +02:00
default-radio-settings.inc.mk drivers/cc110x : Add CONFIG_ 2020-04-17 23:27:01 +05:30
defaultmodules_deps.inc.mk sys/preprocessor: add preprocessor module 2022-10-17 10:38:14 +02:00
defaultmodules_no_recursive_deps.inc.mk buildsystem: split default modules include early and late 2022-06-02 12:56:59 +02:00
defaultmodules_regular.inc.mk libc: add to default modules 2022-09-26 19:06:46 +02:00
dependencies_debug.inc.mk makefiles/dependencies_debug.inc.mk: add TOOLCHAIN 2021-01-27 11:11:43 +01:00
dependency_resolution.inc.mk sys/stdio_udp: add stdio over UDP 2023-01-13 11:08:22 +01:00
deprecated_boards.inc.mk cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
deprecated_cpus.inc.mk cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
deprecated_modules.inc.mk makefiles/pseudomodules: remove deprecated event_thread_lowest module 2023-05-19 16:15:10 +02:00
docker.inc.mk tools/mspdebug: fix make debug and make debugserver 2023-05-24 17:00:38 +02:00
driver_with_disp_dev.mk make: introduce makefile to optimize driver with disp/touch_dev build 2022-01-06 12:07:07 +01:00
driver_with_saul.mk make: introduce makefile to optimize driver with saul build 2022-01-06 12:07:06 +01:00
driver_with_touch_dev.mk makefiles: fix typo in driver_with_touch_dev.mk 2023-08-30 18:53:44 +02:00
eclipse.inc.mk eclipse.inc.mk: Split eclipse support into it's own file. 2018-12-05 15:22:42 +01:00
features_check.inc.mk build_system: don't optionally use conflicting features 2021-02-22 12:06:27 +01:00
features_modules.inc.mk Merge #19499 #19500 2023-04-24 23:26:07 +00:00
git_version.inc.mk makefiles/git_version.inc.mk: deferred GIT_VERSION definition 2019-07-22 12:00:45 +02:00
info-global.inc.mk Make: default to docker with generate-Makefile.ci 2023-02-04 16:53:49 +01:00
info-nproc.inc.mk make: replace curly braces with parenthesis 2018-03-22 20:43:15 +01:00
info.inc.mk buildsystem: add target debug-client 2023-06-10 00:04:56 +02:00
kconfig.mk boards: Use BOARD.config pattern for kconfig 2022-02-14 13:10:09 +01:00
mcuboot.mk Merge pull request #11130 from cladmi/pr/make/flashfile/jlink 2019-03-14 12:01:02 +01:00
modules.inc.mk makefile: add a check for real modules 2020-09-04 15:01:16 +02:00
murdock.inc.mk makefiles/murdock.inc.mk: change policy to run tests by default 2019-08-21 12:49:26 +02:00
periph.mk Makefile: remove usage of SUBMODULES_NOFORCE 2020-04-15 12:11:44 +02:00
pio.inc.mk makefiles: add makefile to generate header file from PIO program 2023-05-23 08:49:37 +02:00
pseudomodules.inc.mk Merge #19387 #19874 #19875 2023-08-21 13:49:27 +00:00
scan-build.inc.mk makefiles: avoid building archives when compiling 2020-09-04 15:01:10 +02:00
stdio.inc.mk sys/stdio: mark stdio_tinyusb_cdc_acm as buffered 2023-02-07 22:47:35 +01:00
suit.base.inc.mk makefiles/suit: allow multiple SUIT_SECs 2022-08-16 22:30:27 +02:00
suit.inc.mk makefiles/suit: allow to overwrite SUIT_VENDOR_DOMAIN 2022-06-01 13:18:00 +02:00
tests.inc.mk make: run static_tests.sh directly with static-tests target 2020-12-17 15:16:36 +01:00
ubsan.inc.mk make: add initial ubsan support 2022-02-16 12:20:45 +01:00
usb-codes.inc.mk makefile: Fix usage error with busybox grep 2020-10-06 17:16:26 +00:00
vars.inc.mk makefiles/vars.inc.mk: export LLVM specific flags and include dirs 2023-07-18 12:24:07 +02:00