29 #ifndef CONFIG_INC_ENCODER_GEAR_RED_RATIO
30 # define CONFIG_INC_ENCODER_GEAR_RED_RATIO 204
36 #ifndef CONFIG_INC_ENCODER_PPR
37 # define CONFIG_INC_ENCODER_PPR 13
43 #if IS_USED(MODULE_INC_ENCODER_HARDWARE)
44 # ifndef CONFIG_INC_ENCODER_HARDWARE_PERIOD_MS
45 # define CONFIG_INC_ENCODER_HARDWARE_PERIOD_MS 200
53 #if IS_USED(MODULE_INC_ENCODER_SOFTWARE)
57 # ifndef INC_ENCODER_INTERRUPT
58 # define INC_ENCODER_INTERRUPT GPIO_PIN(1, 10)
65 # ifndef INC_ENCODER_DIRECTION
66 # define INC_ENCODER_DIRECTION GPIO_PIN(1, 11)
70 #if IS_USED(MODULE_INC_ENCODER_HARDWARE)
74 #ifndef INC_ENCODER_QDEC_DEV
75 # define INC_ENCODER_QDEC_DEV QDEC_DEV(0)
82 #if IS_USED(MODULE_INC_ENCODER_SOFTWARE)
83 # ifndef INC_ENCODER_PARAMS
84 # define INC_ENCODER_PARAMS { .interrupt = INC_ENCODER_INTERRUPT, \
85 .direction = INC_ENCODER_DIRECTION }
87 #elif IS_USED(MODULE_INC_ENCODER_HARDWARE)
89 # ifndef INC_ENCODER_PARAMS
90 # define INC_ENCODER_PARAMS { .qdec_dev = INC_ENCODER_QDEC_DEV }
98 #ifndef INC_ENCODER_SAUL_INFO
99 # define INC_ENCODER_SAUL_INFO { { .name = "Incremental Rotary Encoder RPM Sensor" }, \
100 { .name = "Incremental Rotary Encoder Pulse Count Sensor" } }
#define INC_ENCODER_SAUL_INFO
Default parameters.
static const saul_reg_info_t inc_encoder_saul_info[][2]
Additional meta information to keep in the SAUL registry.
static const inc_encoder_params_t inc_encoder_params[]
Incremental rotary encoder configuration.
SAUL registry interface definition.
Device initialization parameters.
Additional data to collect for each entry.