Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Mozi
rt-thread
提交
c14dbe8a
R
rt-thread
项目概览
Mozi
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c14dbe8a
编写于
5月 09, 2022
作者:
mysterywolf
提交者:
guo
5月 10, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[lvgl] beautify code
上级
0d2b96d7
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
15 addition
and
33 deletion
+15
-33
bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.c
...imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.c
+8
-8
bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.h
...imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.h
+0
-4
bsp/raspberry-pico/applications/lvgl/lv_port_indev.c
bsp/raspberry-pico/applications/lvgl/lv_port_indev.c
+2
-3
bsp/raspberry-pico/applications/lvgl/lv_port_indev.h
bsp/raspberry-pico/applications/lvgl/lv_port_indev.h
+0
-4
bsp/stm32/stm32f469-st-disco/applications/lvgl/lv_port_indev.c
...tm32/stm32f469-st-disco/applications/lvgl/lv_port_indev.c
+3
-3
bsp/stm32/stm32f469-st-disco/applications/lvgl/lv_port_indev.h
...tm32/stm32f469-st-disco/applications/lvgl/lv_port_indev.h
+0
-4
bsp/stm32/stm32l475-atk-pandora/applications/lvgl/lv_port_indev.c
...2/stm32l475-atk-pandora/applications/lvgl/lv_port_indev.c
+2
-3
bsp/stm32/stm32l475-atk-pandora/applications/lvgl/lv_port_indev.h
...2/stm32l475-atk-pandora/applications/lvgl/lv_port_indev.h
+0
-4
未找到文件。
bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.c
浏览文件 @
c14dbe8a
...
...
@@ -8,13 +8,14 @@
* 2021-10-18 Meco Man The first version
*/
#include <lvgl.h>
#include <stdbool.h>
#include <rtdevice.h>
static
lv_indev_state_t
last_state
=
LV_INDEV_STATE_REL
;
static
rt_int16_t
last_x
=
0
;
static
rt_int16_t
last_y
=
0
;
lv_indev_t
*
touch_indev
;
static
void
input_read
(
lv_indev_drv_t
*
indev_drv
,
lv_indev_data_t
*
data
)
{
data
->
point
.
x
=
last_x
;
...
...
@@ -29,16 +30,15 @@ void lv_port_indev_input(rt_int16_t x, rt_int16_t y, lv_indev_state_t state)
last_y
=
LV_HOR_RES_MAX
-
y
;
}
lv_indev_t
*
button_indev
;
void
lv_port_indev_init
(
void
)
{
static
lv_indev_drv_t
indev_drv
;
lv_indev_drv_init
(
&
indev_drv
);
/*Basic initialization*/
indev_drv
.
type
=
LV_INDEV_TYPE_POINTER
;
indev_drv
.
read_cb
=
input_read
;
/* Has not supported touch sensor! */
// lv_indev_drv_init(&indev_drv); /*Basic initialization*/
// indev_drv.type = LV_INDEV_TYPE_POINTER;
// indev_drv.read_cb = input_read;
/*Register the driver in LVGL and save the created input device object*/
button
_indev
=
lv_indev_drv_register
(
&
indev_drv
);
/
/ /
*Register the driver in LVGL and save the created input device object*/
// touch
_indev = lv_indev_drv_register(&indev_drv);
}
bsp/imxrt/imxrt1060-nxp-evk/applications/lvgl/lv_port_indev.h
浏览文件 @
c14dbe8a
...
...
@@ -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
);
...
...
bsp/raspberry-pico/applications/lvgl/lv_port_indev.c
浏览文件 @
c14dbe8a
...
...
@@ -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
;
...
...
bsp/raspberry-pico/applications/lvgl/lv_port_indev.h
浏览文件 @
c14dbe8a
...
...
@@ -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
);
...
...
bsp/stm32/stm32f469-st-disco/applications/lvgl/lv_port_indev.c
浏览文件 @
c14dbe8a
...
...
@@ -17,6 +17,8 @@ static lv_indev_state_t last_state = LV_INDEV_STATE_REL;
static
rt_int16_t
last_x
=
0
;
static
rt_int16_t
last_y
=
0
;
lv_indev_t
*
touch_indev
;
static
void
input_read
(
lv_indev_drv_t
*
indev_drv
,
lv_indev_data_t
*
data
)
{
data
->
point
.
x
=
last_x
;
...
...
@@ -31,8 +33,6 @@ void lv_port_indev_input(rt_int16_t x, rt_int16_t y, lv_indev_state_t state)
last_y
=
LCD_HEIGHT
-
y
;
}
lv_indev_t
*
button_indev
;
void
lv_port_indev_init
(
void
)
{
static
lv_indev_drv_t
indev_drv
;
...
...
@@ -42,5 +42,5 @@ void lv_port_indev_init(void)
indev_drv
.
read_cb
=
input_read
;
/*Register the driver in LVGL and save the created input device object*/
button
_indev
=
lv_indev_drv_register
(
&
indev_drv
);
touch
_indev
=
lv_indev_drv_register
(
&
indev_drv
);
}
bsp/stm32/stm32f469-st-disco/applications/lvgl/lv_port_indev.h
浏览文件 @
c14dbe8a
...
...
@@ -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
);
...
...
bsp/stm32/stm32l475-atk-pandora/applications/lvgl/lv_port_indev.c
浏览文件 @
c14dbe8a
...
...
@@ -17,6 +17,8 @@
#define BUTTON2_PIN GET_PIN(D, 8)
#define BUTTON_WKUP_PIN GET_PIN(C, 13)
lv_indev_t
*
button_indev
;
/*Test if `id` button is pressed or not*/
static
bool
button_is_pressed
(
uint8_t
id
)
{
...
...
@@ -78,9 +80,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
;
...
...
bsp/stm32/stm32l475-atk-pandora/applications/lvgl/lv_port_indev.h
浏览文件 @
c14dbe8a
...
...
@@ -14,10 +14,6 @@
extern
"C"
{
#endif
#include <lv_hal_indev.h>
extern
lv_indev_t
*
button_indev
;
void
lv_port_indev_init
(
void
);
#ifdef __cplusplus
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录