SDL3 Form SIM_Display
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include "lv_port_disp.h"
|
||||
#include "lv_port_indev.h"
|
||||
#include "lvgl.h"
|
||||
#include "lv_demo_widgets.h"
|
||||
#include <windows.h>
|
||||
#include "t_lvgl.h"
|
||||
|
||||
|
@@ -114,12 +114,10 @@ OLED_T oled = {
|
||||
void Test_OLED(void *pVoid) {
|
||||
SIM_OLED_INIT(128, 64, CYAN, 0x0, 5, 0);
|
||||
|
||||
SIM_OLED_START();
|
||||
|
||||
OLED_Init(&oled);
|
||||
OLED_CLS(&oled);
|
||||
|
||||
OLED_ShowCHString(&oled, 1, 24, "姓名学号:2233");
|
||||
OLED_ShowCHString(&oled, 1, 24, "星海科技机械师");
|
||||
|
||||
OLED_DrawRect(&oled, 0, 0, 127, 63);
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
TFT_T demo_tft;
|
||||
uint16_t xs = 0, ys = 0, xe = 0, ye = 0;
|
||||
bool fill;
|
||||
|
||||
static SIM_Display_t tft_display;
|
||||
//屏幕指令
|
||||
#define WGRAM_CMD 0x5C
|
||||
#define SETXCMD 0x2A
|
||||
@@ -79,7 +79,7 @@ uint8_t tft_senddata(uint8_t *data, size_t len) {
|
||||
if (len == 2) {
|
||||
color_u.u8[1] = *data;
|
||||
color_u.u8[0] = *data++;
|
||||
SIM_Color_DrawPiexl(RGB565_to_RGB888(color_u.u16, true), xs, ys);
|
||||
SIM_Color_DrawPiexl(&tft_display, (SIM_Color_t) RGB565_to_RGB888(color_u.u16, true), xs, ys);
|
||||
// LOGT("Piexl","color:%x,x:%d,y:%d,len:%d",color_u.u16,xs,ys,len);
|
||||
// SIM_Color_ImgFromBuffer(color,xs, ys, uint16_t width, 1)
|
||||
} else {
|
||||
@@ -88,10 +88,10 @@ uint8_t tft_senddata(uint8_t *data, size_t len) {
|
||||
data++;
|
||||
color_u.u8[0] = *data;
|
||||
data++;
|
||||
color[i] = RGB565_to_RGB888(color_u.u16, true);
|
||||
color[i] = RGB565_to_RGB888(color_u.u16, true) | 0xFF000000;
|
||||
}
|
||||
// SIM_Color_ImgFromBuffer(color, xs, ys, len / 2 - 1, 1);
|
||||
SIM_Color_DrawHLineBuffer(color, xs, ys, len / 2);
|
||||
SIM_Color_ImgFromBuffer(&tft_display, color, xs, ys, len / 2 - 1, 1);
|
||||
// SIM_Color_DrawHLineBuffer(color, xs, ys, len / 2);
|
||||
// LOGT("Img","x:%d,y:%d,len:%d",xs,ys,len);
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ void Test_tft(void *) {
|
||||
demo_tft.dir = HORIZONTAL;//必填
|
||||
|
||||
//模拟初始化
|
||||
SIM_Display_INIT(demo_tft.width, demo_tft.height, 0xFFFF, 0x0000, 2, 0);
|
||||
SIM_Display_START();
|
||||
SIM_Display_Init("TFT", demo_tft.width, demo_tft.height, 0xFFFF, 0x0000, 2, &tft_display);
|
||||
|
||||
|
||||
TFT_Init(&demo_tft);//初始化
|
||||
TFT_Color_t t;
|
||||
|
Reference in New Issue
Block a user