[lvgl] beautify code

This commit is contained in:
Meco Man
2022-05-10 10:12:45 +08:00
committed by guo
parent 0d2b96d7cc
commit c14dbe8a2e
8 changed files with 15 additions and 33 deletions
@@ -22,6 +22,8 @@
#define BUTTON2_PIN 16
#define BUTTON_WKUP_PIN 20
lv_indev_t * button_indev;
/*Test if `id` button is pressed or not*/
static bool button_is_pressed(uint8_t id)
{
@@ -83,9 +85,6 @@ void button_read(lv_indev_drv_t * drv, lv_indev_data_t*data)
data->btn_id = last_btn; /*Save the last button*/
}
lv_indev_t * button_indev;
void lv_port_indev_init(void)
{
static lv_indev_drv_t indev_drv;
@@ -14,10 +14,6 @@
extern "C" {
#endif
#include <lv_hal_indev.h>
extern lv_indev_t * button_indev;
void lv_port_indev_init(void);
void lv_port_indev_input(rt_int16_t x, rt_int16_t y, lv_indev_state_t state);