MCPcopy Create free account
hub / github.com/PaulStoffregen/Encoder / read

Function read

Encoder.h:111–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110#ifdef ENCODER_USE_INTERRUPTS
111 inline int32_t read() {
112 if (interrupts_in_use < 2) {
113 noInterrupts();
114 update(&encoder);
115 } else {
116 noInterrupts();
117 }
118 int32_t ret = encoder.position;
119 interrupts();
120 return ret;
121 }
122 inline int32_t readAndReset() {
123 if (interrupts_in_use < 2) {
124 noInterrupts();

Callers

nothing calls this directly

Calls 1

updateFunction · 0.85

Tested by

no test coverage detected