forked from xuos/xiuos
register_driver lcd device on riscv64 on nuttx
This commit is contained in:
@@ -6282,7 +6282,7 @@ uint8_t Read_Key_Strobe_Data_2(void)
|
||||
return temp;
|
||||
}
|
||||
|
||||
void Show_String(char *str)
|
||||
void Show_String(uint8_t *str)
|
||||
{
|
||||
Text_Mode(); //text mode
|
||||
LCD_CmdWrite(0x04);
|
||||
|
||||
@@ -1388,7 +1388,7 @@ void LT768_Print_Internal_Font_String
|
||||
, uint16_t y // font start y
|
||||
, uint32_t FontColor // font color
|
||||
, uint32_t BackGroundColor // font background color(when font background is transparent, it is invalid)
|
||||
, char *c // data start address
|
||||
, uint8_t *c // data start address
|
||||
)
|
||||
{
|
||||
Text_Mode();
|
||||
|
||||
@@ -21,6 +21,34 @@
|
||||
#ifndef __LT768_H_
|
||||
#define __LT768_H_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t x_pos;
|
||||
uint16_t y_pos;
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
uint8_t font_size;
|
||||
uint8_t *addr;
|
||||
uint16_t font_color;
|
||||
uint16_t back_color;
|
||||
}LcdStringParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t x_startpos;
|
||||
uint16_t x_endpos;
|
||||
uint16_t y_startpos;
|
||||
uint16_t y_endpos;
|
||||
void* pixel_color;
|
||||
}LcdPixelParam;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char type; // 0:write string;1:write dot
|
||||
LcdPixelParam pixel_info;
|
||||
LcdStringParam string_info;
|
||||
}LcdWriteParam;
|
||||
|
||||
#define cSetb0 0x01
|
||||
#define cSetb1 0x02
|
||||
#define cSetb2 0x04
|
||||
@@ -691,7 +719,7 @@ uint8_t Read_Key_Strobe_Data_0(void);
|
||||
uint8_t Read_Key_Strobe_Data_1(void);
|
||||
uint8_t Read_Key_Strobe_Data_2(void);
|
||||
|
||||
void Show_String(char *str);
|
||||
void Show_String(uint8_t *str);
|
||||
void Show_picture(uint32_t numbers, const uint16_t *data);
|
||||
|
||||
void PWM0_ON(void); //PWM0
|
||||
|
||||
@@ -99,16 +99,29 @@
|
||||
#define color16M_purple color16M_red|color16M_blue
|
||||
|
||||
/* LCD color */
|
||||
#define White 0xFFFF
|
||||
#define Black 0x0000
|
||||
#define Grey 0xF7DE
|
||||
#define Blue 0x001F
|
||||
#define Blue2 0x051F
|
||||
#define Red 0xF800
|
||||
#define Magenta 0xF81F
|
||||
#define Green 0x07E0
|
||||
#define Cyan 0x7FFF
|
||||
#define Yellow 0xFFE0
|
||||
#define WHITE 0xFFFF
|
||||
#define BLACK 0x0000
|
||||
#define BLUE 0x001F
|
||||
#define BRED 0xF81F
|
||||
#define GRED 0xFFE0
|
||||
#define GBLUE 0x07FF
|
||||
#define RED 0xF800
|
||||
#define MAGENTA 0xF81F
|
||||
#define GREEN 0x07E0
|
||||
#define CYAN 0x7FFF
|
||||
#define YELLOW 0xFFE0
|
||||
#define BROWN 0xBC40
|
||||
#define BRRED 0xFC07
|
||||
#define GRAY 0x8430
|
||||
|
||||
#define DARKBLUE 0x01CF
|
||||
#define LIGHTBLUE 0x7D7C
|
||||
#define GRAYBLUE 0x5458
|
||||
#define LIGHTGREEN 0x841F
|
||||
#define LGRAY 0xC618
|
||||
#define LGRAYBLUE 0xA651
|
||||
#define LBBLUE 0x2B12
|
||||
|
||||
|
||||
#define Line0 0
|
||||
#define Line1 24
|
||||
@@ -474,7 +487,7 @@ void LT768_Print_Internal_Font_String(uint16_t x,
|
||||
uint16_t y,
|
||||
uint32_t FontColor,
|
||||
uint32_t BackGroundColor,
|
||||
char *c);
|
||||
uint8_t *c);
|
||||
|
||||
/* nor flash use outside font */
|
||||
/* 16*16 24*24 32*32 */
|
||||
|
||||
Reference in New Issue
Block a user