如何将 ucgui移植到 linux上

2025-04-05 06:37:28
推荐回答(1个)
回答1:

关键修改代码记录:
修改点1:
注:为了使ucgui 适配 32 bit per pixsel
typedef union {
U32 aColorIndex8[2];
U32 aColorIndex16[2];
} LCD_COLORINDEX_UNION;

关键修改点2:
注:此处修改主要是为适配linuxframbuffer
struct fb_var_screeninfo g_vinfo;
int g_fbfd, g_fbsize;
unsigned char *g_fbbuf;
void init_dummy_driver(void)
{
/* Open video memory */
if ((g_fbfd = open("/dev/fb0", O_RDWR)) < 0) {
exit(1);