[qmeu] chore
This commit is contained in:
parent
446bde64c8
commit
eef0a2d810
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
printf("hello rt-thread\n");
|
printf("Hello RT-Thread!\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,13 +75,15 @@ static rt_err_t drv_clcd_control(struct rt_device *device, int cmd, void *args)
|
||||||
|
|
||||||
RT_ASSERT(info != RT_NULL);
|
RT_ASSERT(info != RT_NULL);
|
||||||
info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565;
|
info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565;
|
||||||
// info->pixel_format = RTGRAPHIC_PIXEL_FORMAT_ARGB888;
|
|
||||||
info->bits_per_pixel= 16;
|
info->bits_per_pixel= 16;
|
||||||
info->width = lcd->width;
|
info->width = lcd->width;
|
||||||
info->height = lcd->height;
|
info->height = lcd->height;
|
||||||
info->framebuffer = lcd->fb;
|
info->framebuffer = lcd->fb;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return -RT_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
|
@ -109,7 +111,7 @@ int drv_clcd_hw_init(void)
|
||||||
|
|
||||||
_lcd.width = CLCD_WIDTH;
|
_lcd.width = CLCD_WIDTH;
|
||||||
_lcd.height = CLCD_HEIGHT;
|
_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)
|
if (_lcd.fb == NULL)
|
||||||
{
|
{
|
||||||
rt_kprintf("initialize frame buffer failed!\n");
|
rt_kprintf("initialize frame buffer failed!\n");
|
||||||
|
|
|
@ -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;
|
info->framebuffer = lcd->lcd_info.framebuffer;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return -RT_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
|
|
Loading…
Reference in New Issue