forked from xuos/xiuos
add lvgl
This commit is contained in:
@@ -138,6 +138,13 @@ static int PrivPinIoctl(int fd, int cmd, void *args)
|
||||
return ioctl(fd, cmd, pin_cfg);
|
||||
}
|
||||
|
||||
static int PrivLcdIoctl(int fd, int cmd, void *args)
|
||||
{
|
||||
struct DeviceLcdInfo *lcd_cfg = (struct DeviceLcdInfo *)args;
|
||||
|
||||
return ioctl(fd, cmd, lcd_cfg);
|
||||
}
|
||||
|
||||
int PrivIoctl(int fd, int cmd, void *args)
|
||||
{
|
||||
int ret;
|
||||
@@ -154,6 +161,9 @@ int PrivIoctl(int fd, int cmd, void *args)
|
||||
case I2C_TYPE:
|
||||
ret = ioctl(fd, cmd, ioctl_cfg->args);
|
||||
break;
|
||||
case LCD_TYPE:
|
||||
ret = PrivLcdIoctl(fd, cmd, ioctl_cfg->args);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ enum IoctlDriverType
|
||||
SPI_TYPE,
|
||||
I2C_TYPE,
|
||||
PIN_TYPE,
|
||||
LCD_TYPE,
|
||||
DEFAULT_TYPE,
|
||||
};
|
||||
|
||||
@@ -147,6 +148,32 @@ struct PrivIoctlCfg
|
||||
void *args;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 x_pos;
|
||||
uint16 y_pos;
|
||||
uint16 width;
|
||||
uint16 height;
|
||||
uint8 font_size;
|
||||
uint8 *addr;
|
||||
uint16 font_color;
|
||||
uint16 back_color;
|
||||
}LcdStringParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16 x_pos;
|
||||
uint16 y_pos;
|
||||
uint16 pixel_color;
|
||||
}LcdPixelParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char type; // 0:write string;1:write dot
|
||||
LcdStringParam string_info;
|
||||
LcdPixelParam pixel_info;
|
||||
}LcdWriteParam;
|
||||
|
||||
/**********************mutex**************************/
|
||||
|
||||
int PrivMutexCreate(pthread_mutex_t *p_mutex, const pthread_mutexattr_t *attr);
|
||||
|
||||
Reference in New Issue
Block a user