src/vyom/lv_port_indev.c
/* Will be called by the library to read the encoder */
Will be called by the library to read the encoder
Will be called by the library to read the encoder
static bool encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
{
    (void)indev_drv;    
    data->enc_diff = encoder_diff;
    encoder_diff = 0;
    if(hal_gpio_read(PUSH_BUTTON_IN) == 1) {
        data->state = LV_INDEV_STATE_REL;
    } else if(hal_gpio_read(PUSH_BUTTON_IN) == 0) {
        data->state = LV_INDEV_STATE_PR;
    }
    return false;
}
static bool encoder_read ( lv_indev_drv_t * indev_drv , lv_indev_data_t * data ) { ( void ) indev_drv ; data -> enc_diff = encoder_diff ; encoder_diff = 0 ; if ( hal_gpio_read ( PUSH_BUTTON_IN ) == 1 ) { data -> state = LV_INDEV_STATE_REL ; } else if ( hal_gpio_read ( PUSH_BUTTON_IN ) == 0 ) { data -> state = LV_INDEV_STATE_PR ; } return false ; }
Will be called by the library to read the encoder
Will be called by the library to read the encoder
/* Unused */ /*Return `false` because we are not buffering and no more data to read*/