Description
What MCU/Processor/Board and compiler are you using?
STM32F205RGT6
What LVGL version are you using?
8.3
What do you want to achieve?
Working with the LVGL encoder. When turning the knob to the right in data->enc_diff = 1; and on the left data->enc_diff = -1; in normal position data->enc_diff = 0; When I rotate the encoder and press the button, I observe the event in the debugger. But nothing works. Works well with touch screen. Please help. Sorry, English is not my native language, I can’t explain it better. Thank you.
What have you tried so far?
Code to reproduce
Encoder_Init();
lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_ENCODER;
indev_drv.read_cb = encoder_read;
void encoder_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
data->enc_diff = StateRead();
if(!enc_pressed()) data->state = LV_INDEV_STATE_PRESSED;
else data->state = LV_INDEV_STATE_RELEASED;
}
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.