From f66fdd87326a3220fce92c2e4cb18a4e0129f4e4 Mon Sep 17 00:00:00 2001 From: a-chol Date: Wed, 23 Jun 2021 22:09:05 +0200 Subject: [PATCH] Update documentation with new API --- docs/feature_digitizer.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/feature_digitizer.md b/docs/feature_digitizer.md index 4a09c9a3c989..9b6aeddbaa9e 100644 --- a/docs/feature_digitizer.md +++ b/docs/feature_digitizer.md @@ -22,13 +22,14 @@ For the `y` coordinate, `0` is at the top and `1` at the bottom. Here is an example setting the cursor in the middle of the screen: ```c +digitizer_t digitizer; digitizer.x = 0.5; digitizer.y = 0.5; digitizer.tipswitch = 0; digitizer.inrange = 1; -digitizer.status |= DZ_UPDATED; +digitizer_set_report(digitizer); ``` -The `tipswitch` member triggers what equates to a click when set to `1`. The `inrange` member is required for the change in coordinates to be taken. It can then be set to `0` in a new report to signal the end of the digitizer interaction. +The `tipswitch` member triggers what equates to a click when set to `1`. The `inrange` member is required for the change in coordinates to be taken. It can then be set to `0` in a new report to signal the end of the digitizer interaction, but it is not strictly required. Once all members are set to the desired value, the `status` member needs its bitmask `DZ_UPDATED` to be set so the report is sent during the next main loop iteration.