Skip to content

Commit

Permalink
Add setter for long press repeat time
Browse files Browse the repository at this point in the history
  • Loading branch information
clydebarrow committed Nov 6, 2024
1 parent 6b982a3 commit d1a624c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/indev/lv_indev.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ void lv_indev_set_long_press_time(lv_indev_t * indev, uint16_t long_press_time)
indev->long_press_time = long_press_time;
}

void lv_indev_set_long_press_repeat_time(lv_indev_t * indev, uint16_t long_press_repeat_time)
{
if(indev == NULL) return;

indev->long_press_repeat_time = long_press_repeat_time;
}

void lv_indev_set_scroll_limit(lv_indev_t * indev, uint8_t scroll_limit)
{
if(indev == NULL) return;
Expand Down
7 changes: 7 additions & 0 deletions src/indev/lv_indev.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ void lv_indev_set_display(lv_indev_t * indev, struct _lv_display_t * disp);
*/
void lv_indev_set_long_press_time(lv_indev_t * indev, uint16_t long_press_time);

/**
* Set long press repeat time to indev
* @param indev pointer to input device
* @param long_press_repeat_time long press repeat time in ms
*/
void lv_indev_set_long_press_repeat_time(lv_indev_t * indev, uint16_t long_press_repeat_time);

/**
* Set scroll limit to the input device
* @param indev pointer to an input device
Expand Down

0 comments on commit d1a624c

Please sign in to comment.