We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e59b59 commit b029c94Copy full SHA for b029c94
examples/device/hid_composite/src/main.c
@@ -241,6 +241,14 @@ void hid_task(void)
241
// Poll every 10ms
242
const uint32_t interval_ms = 10;
243
static uint32_t start_ms = 0;
244
+ static uint32_t touch_ms = 0;
245
+ static bool touch_state = false;
246
+
247
+ if (board_millis() - touch_ms < 100) {
248
+ touch_ms = board_millis();
249
+ send_stylus_touch(0, 0, touch_state = !touch_state);
250
+ return;
251
+ }
252
253
if ( board_millis() - start_ms < interval_ms) return; // not enough time
254
start_ms += interval_ms;
0 commit comments