Skip to content

Commit 77dc585

Browse files
committed
[stm32][f469]update lvgl demo
1 parent 1135619 commit 77dc585

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

bsp/stm32/stm32f469-st-disco/board/ports/lvgl/lv_demo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <rtthread.h>
1111
#include <lvgl.h>
1212
#include <lv_port_indev.h>
13-
#define DBG_TAG "LVGL"
13+
#define DBG_TAG "LVGL.demo"
1414
#define DBG_LVL DBG_INFO
1515
#include <rtdbg.h>
1616

bsp/stm32/stm32f469-st-disco/board/ports/lvgl/lv_port_disp.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
#include <lcd_port.h>
1212

1313
//#define DRV_DEBUG
14-
#define LOG_TAG "lvgl.disp"
14+
#define LOG_TAG "LVGL.port.disp"
1515
#include <drv_log.h>
1616

1717
/*A static or global variable to store the buffers*/
1818
static lv_disp_draw_buf_t disp_buf;
1919

20-
rt_device_t lcd_device = 0;
20+
static rt_device_t lcd_device = RT_NULL;
2121
static struct rt_device_graphic_info info;
2222

2323
static lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
@@ -41,7 +41,7 @@ static void DMA_TransferComplete(DMA_HandleTypeDef *han)
4141

4242
if(y_fill_act > y2_fill)
4343
{
44-
lv_disp_flush_ready(&disp_drv);
44+
lv_disp_flush_ready(&disp_drv);
4545
}
4646
else
4747
{
@@ -51,16 +51,16 @@ static void DMA_TransferComplete(DMA_HandleTypeDef *han)
5151
(uint32_t)&((uint32_t *)info.framebuffer)[y_fill_act * info.width + x1_flush],
5252
(x2_flush - x1_flush + 1)) != HAL_OK)
5353
{
54-
LOG_E("lvgl dma start error");
55-
while(1);
54+
LOG_E("HAL_DMA_Start_IT error");
55+
RT_ASSERT(0);
5656
}
5757
}
5858
}
5959

6060
static void DMA_TransferError(DMA_HandleTypeDef *han)
6161
{
62-
LOG_E("dma transfer error");
63-
while(1);
62+
LOG_E("DMA_TransferError");
63+
RT_ASSERT(0);
6464
}
6565

6666
void DMA_STREAM_IRQHANDLER(void)
@@ -95,7 +95,8 @@ static void lvgl_dma_config(void)
9595

9696
if (HAL_DMA_Init(&DmaHandle) != HAL_OK)
9797
{
98-
while(1);
98+
LOG_E("HAL_DMA_Init error");
99+
RT_ASSERT(0);
99100
}
100101

101102
HAL_DMA_RegisterCallback(&DmaHandle, HAL_DMA_XFER_CPLT_CB_ID, DMA_TransferComplete);
@@ -130,8 +131,8 @@ static void lcd_fb_flush(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_colo
130131
(uint32_t)&((uint32_t *)info.framebuffer)[y_fill_act * info.width + x1_flush],
131132
(x2_flush - x1_flush + 1)) != HAL_OK)
132133
{
133-
LOG_E("dma start it error");
134-
while(1);
134+
LOG_E("HAL_DMA_Start_IT error");
135+
RT_ASSERT(0);
135136
}
136137
}
137138

bsp/stm32/stm32f469-st-disco/board/ports/lvgl/lv_port_indev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void lv_port_indev_init(void)
3737
{
3838
static lv_indev_drv_t indev_drv;
3939

40-
lv_indev_drv_init(&indev_drv); /*Basic initialization*/
40+
lv_indev_drv_init(&indev_drv); /*Basic initialization*/
4141
indev_drv.type = LV_INDEV_TYPE_POINTER;
4242
indev_drv.read_cb = input_read;
4343

bsp/stm32/stm32l475-atk-pandora/board/ports/lvgl/lv_demo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <lvgl.h>
1212
#include <lv_port_indev.h>
1313
#include <lv_demo_calendar.h>
14-
#define DBG_TAG "LVGL"
14+
#define DBG_TAG "LVGL.demo"
1515
#define DBG_LVL DBG_INFO
1616
#include <rtdbg.h>
1717

0 commit comments

Comments
 (0)