summaryrefslogtreecommitdiff
path: root/bsp/raspberry-pico
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2022-05-09 13:31:31 -0400
committerguo <[email protected]>2022-05-10 10:12:45 +0800
commitc14dbe8a2eda81ef0da10bb6c2a725b328cd431a (patch)
treea0fa0cd00ecced8c532ae692937f585abc9a06e1 /bsp/raspberry-pico
parent0d2b96d7cc8c1cf52a6a86a4004777baada6794f (diff)
[lvgl] beautify code
Diffstat (limited to 'bsp/raspberry-pico')
-rw-r--r--bsp/raspberry-pico/applications/lvgl/lv_port_indev.c5
-rw-r--r--bsp/raspberry-pico/applications/lvgl/lv_port_indev.h4
2 files changed, 2 insertions, 7 deletions
diff --git a/bsp/raspberry-pico/applications/lvgl/lv_port_indev.c b/bsp/raspberry-pico/applications/lvgl/lv_port_indev.c
index 0beae12763..cb791e5ca6 100644
--- a/bsp/raspberry-pico/applications/lvgl/lv_port_indev.c
+++ b/bsp/raspberry-pico/applications/lvgl/lv_port_indev.c
@@ -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;
diff --git a/bsp/raspberry-pico/applications/lvgl/lv_port_indev.h b/bsp/raspberry-pico/applications/lvgl/lv_port_indev.h
index d15f0e5cfa..3fa1766800 100644
--- a/bsp/raspberry-pico/applications/lvgl/lv_port_indev.h
+++ b/bsp/raspberry-pico/applications/lvgl/lv_port_indev.h
@@ -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);