20 #define STEP(x, y) rotenc_decode(&myenc, (x << 1) + y)
23 verify(0 == rotenc_count(&myenc));
28 verify(0 == rotenc_count(&myenc));
33 verify(0 == rotenc_count(&myenc));
36 verify(0 == rotenc_count(&myenc));
39 verify(0 == rotenc_count(&myenc));
42 verify(1 == rotenc_count(&myenc));
47 verify(1 == rotenc_count(&myenc));
50 verify(1 == rotenc_count(&myenc));
53 verify(1 == rotenc_count(&myenc));
56 verify(1 == rotenc_count(&myenc));
62 verify(1 == rotenc_count(&myenc));
67 verify(1 == rotenc_count(&myenc));
70 verify(1 == rotenc_count(&myenc));
73 verify(1 == rotenc_count(&myenc));
76 verify(0 == rotenc_count(&myenc));
84 verify(255 == rotenc_count(&myenc));
88 for (
int i=0; i<1024; i++) {
94 verify(255 == rotenc_count(&myenc));
102 verify(0 == rotenc_count(&myenc));
uint16_t rotenc_count14(rotenc_t *r)
Read a 14-bit count of the current knob position.
#define ROTENC_VAR_INIT
Static initializer for a rotary encoder.
Rotary encoder click counts and state tracking.