Struct SYN_Encoder¶
Quadrature encoder instance — pins, position, delta.
#include <syn_encoder.h>
Public Attributes¶
| Type | Name |
|---|---|
| int32_t | delta |
| int8_t | last_dir |
| uint8_t | last_state |
| SYN_GPIO_Pin | pin_a |
| SYN_GPIO_Pin | pin_b |
| int32_t | position |
| SYN_Signal * | stats |
| uint8_t | steps_per_detent |
| int8_t | sub_count |
Public Attributes Documentation¶
variable delta¶
Steps since last get_delta()
variable last_dir¶
Last non-zero direction
variable last_state¶
Previous A/B state (2-bit)
variable pin_a¶
Channel A GPIO pin
variable pin_b¶
Channel B GPIO pin
variable position¶
Accumulated position (signed)
variable stats¶
If set, delta pushed on get_delta
variable steps_per_detent¶
Typically 1, 2, or 4
variable sub_count¶
Sub-step accumulator
The documentation for this class was generated from the following file src/syntropic/input/syn_encoder.h