summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJay <[email protected]>2024-12-23 22:15:01 +0900
committerJay <[email protected]>2024-12-23 22:15:01 +0900
commitb029c940356de3645fc224e429d9ec59acf62606 (patch)
treed4d97c7335bdd2fc555c720be5f620a7bde41b2b /examples
parent7e59b595f43c906e4bf207861762bf93e772d4f8 (diff)
Modified example app.
Diffstat (limited to 'examples')
-rw-r--r--examples/device/hid_composite/src/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/device/hid_composite/src/main.c b/examples/device/hid_composite/src/main.c
index 958d8f4af..bc12d2a93 100644
--- a/examples/device/hid_composite/src/main.c
+++ b/examples/device/hid_composite/src/main.c
@@ -241,6 +241,14 @@ void hid_task(void)
// Poll every 10ms
const uint32_t interval_ms = 10;
static uint32_t start_ms = 0;
+ static uint32_t touch_ms = 0;
+ static bool touch_state = false;
+
+ if (board_millis() - touch_ms < 100) {
+ touch_ms = board_millis();
+ send_stylus_touch(0, 0, touch_state = !touch_state);
+ return;
+ }
if ( board_millis() - start_ms < interval_ms) return; // not enough time
start_ms += interval_ms;