[qmeu] chore

This commit is contained in:
Meco Man 2021-12-29 02:33:40 -05:00 committed by Bernard Xiong
parent 446bde64c8
commit eef0a2d810
3 changed files with 8 additions and 3 deletions

View File

@ -14,7 +14,7 @@
int main(void)
{
printf("hello rt-thread\n");
printf("Hello RT-Thread!\n");
return 0;
}

View File

@ -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");

View File

@ -90,6 +90,9 @@ static rt_err_t drv_lcd_control(struct rt_device *device, int cmd, void *args)
info->framebuffer = lcd->lcd_info.framebuffer;
}
break;
default:
return -RT_EINVAL;
}
return RT_EOK;