diff options
| author | Meco Man <[email protected]> | 2021-12-29 02:33:40 -0500 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2022-01-16 18:54:24 +0800 |
| commit | eef0a2d810447c50ac06b6c63de2169ade05d0d4 (patch) | |
| tree | 6e0491ffb1b5917e0c7c2a9847f5289fa3d9f07f /bsp/qemu-vexpress-a9 | |
| parent | 446bde64c8af06abb2fdb53f21780000754673ad (diff) | |
[qmeu] chore
Diffstat (limited to 'bsp/qemu-vexpress-a9')
| -rw-r--r-- | bsp/qemu-vexpress-a9/applications/main.c | 2 | ||||
| -rw-r--r-- | bsp/qemu-vexpress-a9/drivers/drv_clcd.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/bsp/qemu-vexpress-a9/applications/main.c b/bsp/qemu-vexpress-a9/applications/main.c index e8ef51657e..b9364eee2f 100644 --- a/bsp/qemu-vexpress-a9/applications/main.c +++ b/bsp/qemu-vexpress-a9/applications/main.c @@ -14,7 +14,7 @@ int main(void) { - printf("hello rt-thread\n"); + printf("Hello RT-Thread!\n"); return 0; } diff --git a/bsp/qemu-vexpress-a9/drivers/drv_clcd.c b/bsp/qemu-vexpress-a9/drivers/drv_clcd.c index 2d012dca84..3fe2bd58d3 100644 --- a/bsp/qemu-vexpress-a9/drivers/drv_clcd.c +++ b/bsp/qemu-vexpress-a9/drivers/drv_clcd.c @@ -75,13 +75,15 @@ static rt_err_t drv_clcd_control(struct rt_device *device, int cmd, void *args) RT_ASSERT(info != RT_NULL); info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565; - // info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_ARGB888; info->bits_per_pixel= 16; info->width = lcd->width; info->height = lcd->height; info->framebuffer = lcd->fb; } break; + + default: + return -RT_EINVAL; } return RT_EOK; @@ -109,7 +111,7 @@ int drv_clcd_hw_init(void) _lcd.width = CLCD_WIDTH; _lcd.height = CLCD_HEIGHT; - _lcd.fb = rt_malloc(_lcd.width * _lcd.height * 2); + _lcd.fb = rt_malloc(_lcd.width * _lcd.height * 2 /*RGB565 2 Bytes*/); if (_lcd.fb == NULL) { rt_kprintf("initialize frame buffer failed!\n"); |
