mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
[lvgl] beautify code
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user