/** * TODO file description */ #include #include "main.h" #include "app_knob.h" #include "tim.h" static struct { uint16_t wheel; bool push; } s_knob = {}; void app_knob_init() { /* Enable the rotary encoder */ HAL_TIM_Encoder_Start(&htim4, TIM_CHANNEL_ALL); } uint16_t app_knob_get_raw() { return htim4.Instance->CNT; }