Skip to content

Commit f66fdd8

Browse files
author
a-chol
committed
Update documentation with new API
1 parent f7baaef commit f66fdd8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/feature_digitizer.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ For the `y` coordinate, `0` is at the top and `1` at the bottom.
2222
Here is an example setting the cursor in the middle of the screen:
2323

2424
```c
25+
digitizer_t digitizer;
2526
digitizer.x = 0.5;
2627
digitizer.y = 0.5;
2728
digitizer.tipswitch = 0;
2829
digitizer.inrange = 1;
29-
digitizer.status |= DZ_UPDATED;
30+
digitizer_set_report(digitizer);
3031
```
3132
32-
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.
33+
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.
3334
3435
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.

0 commit comments

Comments
 (0)