Skip to content

Commit

Permalink
docs(porting) fix indev example to remove v7 bool return (#2381)
Browse files Browse the repository at this point in the history
update indev doc example to remove v7 `return false` and fix return type
  • Loading branch information
summivox committed Jul 18, 2021
1 parent c386110 commit 5a3876e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/porting/indev.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ indev_drv.read_cb = encoder_with_keys_read;

...

bool encoder_with_keys_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
void encoder_with_keys_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
data->key = last_key(); /*Get the last pressed or released key*/
/* use LV_KEY_ENTER for encoder press */
if(key_pressed()) data->state = LV_INDEV_STATE_PRESSED;
Expand All @@ -132,8 +132,6 @@ bool encoder_with_keys_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
/* Optionally you can also use enc_diff, if you have encoder*/
data->enc_diff = enc_get_new_moves();
}

return false; /*No buffering now so no more data read*/
}
```
Expand Down

0 comments on commit 5a3876e

Please sign in to comment.