显示方向修正,但字体显示异常(倾斜错位)
This commit is contained in:
parent
9f3c41c4e5
commit
68a77530c6
|
@ -72,7 +72,7 @@ void transfer_data(uint8_t data1)
|
||||||
CS_SET(); // CS0 = 1;
|
CS_SET(); // CS0 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 杩炲啓2锟???瀛楄妭锛堝嵆16浣嶏級鏁版嵁鍒癓CD妯″潡
|
//连写2个字节(即16位)数据到LCD模块
|
||||||
void transfer_data_16(uint16_t data_16bit)
|
void transfer_data_16(uint16_t data_16bit)
|
||||||
{
|
{
|
||||||
transfer_data(data_16bit >> 8);
|
transfer_data(data_16bit >> 8);
|
||||||
|
@ -118,13 +118,13 @@ void lcd_initial()
|
||||||
delay(200);
|
delay(200);
|
||||||
|
|
||||||
//------------------------------display and color format setting--------------------------------//
|
//------------------------------display and color format setting--------------------------------//
|
||||||
transfer_command(0x36); // 琛屾壂鎻忛『搴忓強RGB锛屽垪锟???鎻忛『搴忥紝锟???锟???/绔栨斁
|
transfer_command(0x36); //行扫描顺序及RGB,列扫描顺序,横放/竖放
|
||||||
transfer_data(0x00);
|
transfer_data(0x00);
|
||||||
transfer_data(0x48);
|
transfer_data(0x48);
|
||||||
|
|
||||||
transfer_command(0xB6); // 鏄剧ず鍔熻兘璁剧疆锛氬垪/锟??? 鏄剧ず椤哄簭
|
transfer_command(0xB6); //显示功能设置:列/行 显示顺序
|
||||||
transfer_data(0x0A);
|
transfer_data(0x0A);
|
||||||
transfer_data(0x82); // 鏀瑰彉SOURCE绾跨殑鏂瑰悜锟???0xa2锛氬乏鍒板彸锟???0x82锛氬彸鍒板乏
|
transfer_data(0x82); //改变SOURCE线的方向:0xa2:左到右,0x82:右到左
|
||||||
|
|
||||||
transfer_command(0x3a); // 256K 16bit/pixel
|
transfer_command(0x3a); // 256K 16bit/pixel
|
||||||
transfer_data(0x05);
|
transfer_data(0x05);
|
||||||
|
@ -186,26 +186,26 @@ void lcd_initial()
|
||||||
transfer_data(0x1b);
|
transfer_data(0x1b);
|
||||||
transfer_data(0x1e);
|
transfer_data(0x1e);
|
||||||
|
|
||||||
transfer_command(0x11); // 閫€鍑虹潯锟???
|
transfer_command(0x11); //退出睡眠
|
||||||
delay(200);
|
delay(200);
|
||||||
transfer_command(0x29); // 鎵撳紑鏄剧ず
|
transfer_command(0x29); //打开显示
|
||||||
}
|
}
|
||||||
|
|
||||||
// 瀹氫箟绐楀彛鍧愭爣锛氬紑濮嬪潗鏍囷紙XS,YS)浠ュ強绐楀彛澶у皬锛坸_total,y_total)
|
//定义窗口坐标:开始坐标(XS,YS)以及窗口大小(x_total,y_total)
|
||||||
void lcd_address(int XS, int YS, int x_total, int y_total)
|
void lcd_address(int XS, int YS, int x_total, int y_total)
|
||||||
{
|
{
|
||||||
int XE, YE;
|
int XE, YE;
|
||||||
XE = XS + x_total - 1;
|
XE = XS + x_total - 1;
|
||||||
YE = YS + y_total - 1;
|
YE = YS + y_total - 1;
|
||||||
transfer_command(0x2a); // 璁剧疆X寮€濮嬪強缁撴潫鐨勫湴鍧€
|
transfer_command(0x2a); // 设置X开始及结束的地址
|
||||||
transfer_data_16(XS); // X寮€濮嬪湴鍧€(16浣嶏級
|
transfer_data_16(XS); // X开始地址(16位)
|
||||||
transfer_data_16(XE); // X缁撴潫鍦板潃(16浣嶏級
|
transfer_data_16(XE); // X结束地址(16位)
|
||||||
|
|
||||||
transfer_command(0x2b); // 璁剧疆Y寮€濮嬪強缁撴潫鐨勫湴鍧€
|
transfer_command(0x2b); // 设置Y开始及结束的地址
|
||||||
transfer_data_16(YS); // Y寮€濮嬪湴鍧€(16浣嶏級
|
transfer_data_16(YS); // Y开始地址(16位)
|
||||||
transfer_data_16(YE); // Y缁撴潫鍦板潃(16浣嶏級
|
transfer_data_16(YE); // Y结束地址(16位)
|
||||||
|
|
||||||
transfer_command(0x2c); // 鍐欐暟锟???寮€锟???
|
transfer_command(0x2c); // 写数据开始
|
||||||
}
|
}
|
||||||
|
|
||||||
void mono_transfer_data_16(int mono_data, int font_color, int back_color)
|
void mono_transfer_data_16(int mono_data, int font_color, int back_color)
|
||||||
|
@ -215,17 +215,17 @@ void mono_transfer_data_16(int mono_data, int font_color, int back_color)
|
||||||
{
|
{
|
||||||
if (mono_data & 0x80)
|
if (mono_data & 0x80)
|
||||||
{
|
{
|
||||||
transfer_data_16(font_color); // 褰撴暟锟???锟???1鏃讹紝鏄剧ず瀛椾綋棰滆壊
|
transfer_data_16(font_color); //当数据是1时,显示字体颜色
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transfer_data_16(back_color); // 褰撴暟锟???锟???0鏃讹紝鏄剧ず搴曡壊
|
transfer_data_16(back_color); //当数据是0时,显示底色
|
||||||
}
|
}
|
||||||
mono_data <<= 1;
|
mono_data <<= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 鍏ㄥ睆鏄剧ず涓€绉嶏拷?锟借壊
|
//全屏显示一种颜色
|
||||||
void display_color(int color_data)
|
void display_color(int color_data)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -243,10 +243,10 @@ void display_color(int color_data)
|
||||||
void display_color_new(int32_t xa, int32_t ya, int32_t xb, int32_t yb ,int color_data)
|
void display_color_new(int32_t xa, int32_t ya, int32_t xb, int32_t yb ,int color_data)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
lcd_address(ya, xa, yb, xb);
|
lcd_address(xa, ya, xb, yb);
|
||||||
for (i = ya; i < yb; i++)
|
for (i = xa; i < xb; i++)
|
||||||
{
|
{
|
||||||
for (j = xa; j < xb; j++)
|
for (j = ya; j < yb; j++)
|
||||||
{
|
{
|
||||||
transfer_data_16(color_data);
|
transfer_data_16(color_data);
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,7 @@ void display_color_new(int32_t xa, int32_t ya, int32_t xb, int32_t yb ,int color
|
||||||
void display_black(void)
|
void display_black(void)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
transfer_command(0x2c); // 鍐欐暟锟???寮€锟???
|
transfer_command(0x2c); // 写数据开始
|
||||||
for (i = 0; i < 240; i++)
|
for (i = 0; i < 240; i++)
|
||||||
{
|
{
|
||||||
transfer_data_16(0xffff);
|
transfer_data_16(0xffff);
|
||||||
|
@ -282,7 +282,7 @@ void display_black(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 鏄剧ず8x16鐐归樀鐨勫瓧绗︿覆
|
//显示8x16点阵的字符串
|
||||||
void disp_string_8x16(int x, int y, const char *text, int font_color, int back_color)
|
void disp_string_8x16(int x, int y, const char *text, int font_color, int back_color)
|
||||||
{
|
{
|
||||||
int i = 0, j, k;
|
int i = 0, j, k;
|
||||||
|
@ -309,11 +309,11 @@ void display_string_16x16(int x, int y, const char *text, int font_color, int ba
|
||||||
uchar i, j, k;
|
uchar i, j, k;
|
||||||
uint address;
|
uint address;
|
||||||
j = 0;
|
j = 0;
|
||||||
while (text[j] != '\0') //'\0' 瀛楋拷?锟戒覆缁撴潫鏍囧織
|
while (text[j] != '\0') //'\0' 字符串结束标志
|
||||||
{
|
{
|
||||||
i = 0;
|
i = 0;
|
||||||
address = 1;
|
address = 1;
|
||||||
while (Chinese_horizontal_text_16x16[i] > 0x7e) // >0x7f鍗筹拷?锟芥槑涓嶆槸ASCII鐮佸瓧锟???
|
while (Chinese_horizontal_text_16x16[i] > 0x7e) // >0x7f即说明不是ASCII码字符
|
||||||
{
|
{
|
||||||
if (Chinese_horizontal_text_16x16[i] == text[j])
|
if (Chinese_horizontal_text_16x16[i] == text[j])
|
||||||
{
|
{
|
||||||
|
@ -331,7 +331,7 @@ void display_string_16x16(int x, int y, const char *text, int font_color, int ba
|
||||||
x += 16;
|
x += 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (address != 1) // 鏄剧ず姹夊瓧
|
if (address != 1) // 显示汉字
|
||||||
{
|
{
|
||||||
lcd_address(x, y, 16, 16);
|
lcd_address(x, y, 16, 16);
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
|
@ -344,7 +344,7 @@ void display_string_16x16(int x, int y, const char *text, int font_color, int ba
|
||||||
}
|
}
|
||||||
j += 2;
|
j += 2;
|
||||||
}
|
}
|
||||||
else // 鏄剧ず绌虹櫧瀛楋拷??
|
else //显示空白字符
|
||||||
{
|
{
|
||||||
lcd_address(x, y, 16, 16);
|
lcd_address(x, y, 16, 16);
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
|
@ -360,7 +360,7 @@ void display_string_16x16(int x, int y, const char *text, int font_color, int ba
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 鏄剧ず32x32鐐归樀鐨勫崟鑹茬殑鍥惧儚
|
//显示32x32点阵的单色的图像
|
||||||
void disp_32x32(int x, int y, const char *dp, int font_color, int back_color)
|
void disp_32x32(int x, int y, const char *dp, int font_color, int back_color)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -375,7 +375,7 @@ void disp_32x32(int x, int y, const char *dp, int font_color, int back_color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 鏄剧ず涓€骞呭僵锟???
|
//显示一幅彩图
|
||||||
void display_image(int x, int y, const uchar *dp)
|
void display_image(int x, int y, const uchar *dp)
|
||||||
{
|
{
|
||||||
uchar i, j;
|
uchar i, j;
|
||||||
|
@ -384,9 +384,9 @@ void display_image(int x, int y, const uchar *dp)
|
||||||
{
|
{
|
||||||
for (j = 0; j < 160; j++)
|
for (j = 0; j < 160; j++)
|
||||||
{
|
{
|
||||||
transfer_data(*dp); // 浼犱竴锟???鍍忕礌鐨勫浘鐗囨暟锟???鐨勯珮锟???
|
transfer_data(*dp); //传一个像素的图片数据的高位
|
||||||
dp++;
|
dp++;
|
||||||
transfer_data(*dp); // 浼犱竴锟???鍍忕礌鐨勫浘鐗囨暟锟???鐨勪綆锟???
|
transfer_data(*dp); //传一个像素的图片数据的低位
|
||||||
dp++;
|
dp++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,4 +47,7 @@ void lcd_menu(void);
|
||||||
|
|
||||||
void display_color_new(int32_t xa, int32_t ya, int32_t xb, int32_t yb ,int color_data);
|
void display_color_new(int32_t xa, int32_t ya, int32_t xb, int32_t yb ,int color_data);
|
||||||
|
|
||||||
|
void lcd_address(int XS, int YS, int x_total, int y_total);
|
||||||
|
void transfer_data_16(uint16_t data_16bit);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <chinese_code.h>
|
#include <chinese_code.h>
|
||||||
|
|
||||||
// 液晶屏IC所需要的信号线的接口定义
|
// 液晶屏IC所需要的信号线的接口定义
|
||||||
/*
|
/*
|
||||||
sbit DC0 = P3 ^ 4;
|
sbit DC0 = P3 ^ 4;
|
||||||
sbit WR0 = P3 ^ 0;
|
sbit WR0 = P3 ^ 0;
|
||||||
|
@ -12,7 +12,7 @@ sbit CS0 = P3 ^ 5;
|
||||||
sbit reset = P3 ^ 3;
|
sbit reset = P3 ^ 3;
|
||||||
sbit IM1 = P3 ^ 6;
|
sbit IM1 = P3 ^ 6;
|
||||||
sbit IM2 = P3 ^ 7;
|
sbit IM2 = P3 ^ 7;
|
||||||
sbit key = P2 ^ 0; // P2.0口与GND之间接一个按键
|
sbit key = P2 ^ 0; // P2.0口与GND之间接一个按键
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ void transfer_data(int data1)
|
||||||
CS0 = 1;
|
CS0 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 连写2个字节(即16位)数据到LCD模块
|
// 连写2个字节(即16位)数据到LCD模块
|
||||||
void transfer_data_16(uint data_16bit)
|
void transfer_data_16(uint data_16bit)
|
||||||
{
|
{
|
||||||
transfer_data(data_16bit >> 8);
|
transfer_data(data_16bit >> 8);
|
||||||
|
@ -119,13 +119,13 @@ void lcd_initial()
|
||||||
//************* Start Initial Sequence **********//
|
//************* Start Initial Sequence **********//
|
||||||
|
|
||||||
//------------------------------display and color format setting--------------------------------//
|
//------------------------------display and color format setting--------------------------------//
|
||||||
transfer_command(0x36); // 行扫描顺序及RGB,列扫描顺序,横放/竖放
|
transfer_command(0x36); // 行扫描顺序及RGB,列扫描顺序,横放/竖放
|
||||||
transfer_data(0x00);
|
transfer_data(0x00);
|
||||||
transfer_data(0x48);
|
transfer_data(0x48);
|
||||||
|
|
||||||
transfer_command(0xB6); // 显示功能设置:列/行 显示顺序
|
transfer_command(0xB6); // 显示功能设置:列/行 显示顺序
|
||||||
transfer_data(0x0A);
|
transfer_data(0x0A);
|
||||||
transfer_data(0x82); // 改变SOURCE线的方向:0xa2:左到右,0x82:右到左
|
transfer_data(0x82); // 改变SOURCE线的方向:0xa2:左到右,0x82:右到左
|
||||||
|
|
||||||
transfer_command(0x3a); // 256K 16bit/pixel
|
transfer_command(0x3a); // 256K 16bit/pixel
|
||||||
transfer_data(0x05);
|
transfer_data(0x05);
|
||||||
|
@ -187,26 +187,26 @@ void lcd_initial()
|
||||||
transfer_data(0x1b);
|
transfer_data(0x1b);
|
||||||
transfer_data(0x1e);
|
transfer_data(0x1e);
|
||||||
|
|
||||||
transfer_command(0x11); // 退出睡眠
|
transfer_command(0x11); // 退出睡眠
|
||||||
delay(200);
|
delay(200);
|
||||||
transfer_command(0x29); // 打开显示
|
transfer_command(0x29); // 打开显示
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定义窗口坐标:开始坐标(XS,YS)以及窗口大小(x_total,y_total)
|
// 定义窗口坐标:开始坐标(XS,YS)以及窗口大小(x_total,y_total)
|
||||||
void lcd_address(int XS, int YS, int x_total, int y_total)
|
void lcd_address(int XS, int YS, int x_total, int y_total)
|
||||||
{
|
{
|
||||||
int XE, YE;
|
int XE, YE;
|
||||||
XE = XS + x_total - 1;
|
XE = XS + x_total - 1;
|
||||||
YE = YS + y_total - 1;
|
YE = YS + y_total - 1;
|
||||||
transfer_command(0x2a); // 设置X开始及结束的地址
|
transfer_command(0x2a); // 设置X开始及结束的地址
|
||||||
transfer_data_16(XS); // X开始地址(16位)
|
transfer_data_16(XS); // X开始地址(16位)
|
||||||
transfer_data_16(XE); // X结束地址(16位)
|
transfer_data_16(XE); // X结束地址(16位)
|
||||||
|
|
||||||
transfer_command(0x2b); // 设置Y开始及结束的地址
|
transfer_command(0x2b); // 设置Y开始及结束的地址
|
||||||
transfer_data_16(YS); // Y开始地址(16位)
|
transfer_data_16(YS); // Y开始地址(16位)
|
||||||
transfer_data_16(YE); // Y结束地址(16位)
|
transfer_data_16(YE); // Y结束地址(16位)
|
||||||
|
|
||||||
transfer_command(0x2c); // 写数据开始
|
transfer_command(0x2c); // 写数据开始
|
||||||
}
|
}
|
||||||
|
|
||||||
void mono_transfer_data_16(int mono_data, int font_color, int back_color)
|
void mono_transfer_data_16(int mono_data, int font_color, int back_color)
|
||||||
|
@ -216,17 +216,17 @@ void mono_transfer_data_16(int mono_data, int font_color, int back_color)
|
||||||
{
|
{
|
||||||
if (mono_data & 0x80)
|
if (mono_data & 0x80)
|
||||||
{
|
{
|
||||||
transfer_data_16(font_color); // 当数据是1时,显示字体颜色
|
transfer_data_16(font_color); // 当数据是1时,显示字体颜色
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transfer_data_16(back_color); // 当数据是0时,显示底色
|
transfer_data_16(back_color); // 当数据是0时,显示底色
|
||||||
}
|
}
|
||||||
mono_data <<= 1;
|
mono_data <<= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 全屏显示一种颜色
|
// 全屏显示一种颜色
|
||||||
void display_color(int color_data)
|
void display_color(int color_data)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -243,7 +243,7 @@ void display_color(int color_data)
|
||||||
void display_black(void)
|
void display_black(void)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
transfer_command(0x2c); // 写数据开始
|
transfer_command(0x2c); // 写数据开始
|
||||||
for (i = 0; i < 240; i++)
|
for (i = 0; i < 240; i++)
|
||||||
{
|
{
|
||||||
transfer_data_16(0xffff);
|
transfer_data_16(0xffff);
|
||||||
|
@ -269,7 +269,7 @@ void display_black(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示8x16点阵的字符串
|
// 显示8x16点阵的字符串
|
||||||
void disp_string_8x16(int x, int y, char *text, int font_color, int back_color)
|
void disp_string_8x16(int x, int y, char *text, int font_color, int back_color)
|
||||||
{
|
{
|
||||||
int i = 0, j, k;
|
int i = 0, j, k;
|
||||||
|
@ -281,7 +281,7 @@ void disp_string_8x16(int x, int y, char *text, int font_color, int back_color)
|
||||||
lcd_address(x, y, 8, 16);
|
lcd_address(x, y, 8, 16);
|
||||||
for (k = 0; k < 16; k++)
|
for (k = 0; k < 16; k++)
|
||||||
{
|
{
|
||||||
mono_transfer_data_16(ascii_table_8x16[j * 16 + k], font_color, back_color); //?a??"ascii_table_8x16[]"?a??êy×é?ú"ASCII_TABLE_5X8_8X16_horizontal.h"à?
|
mono_transfer_data_16(ascii_table_8x16[j * 16 + k], font_color, back_color); //?a??"ascii_table_8x16[]"?a??êy×é?ú"ASCII_TABLE_5X8_8X16_horizontal.h"à?
|
||||||
}
|
}
|
||||||
x += 8;
|
x += 8;
|
||||||
i++;
|
i++;
|
||||||
|
@ -296,11 +296,11 @@ void display_string_16x16(int x, int y, uchar *text, int font_color, int back_co
|
||||||
uchar i, j, k;
|
uchar i, j, k;
|
||||||
uint address;
|
uint address;
|
||||||
j = 0;
|
j = 0;
|
||||||
while (text[j] != '\0') //'\0' 字符串结束标志
|
while (text[j] != '\0') //'\0' 字符串结束标志
|
||||||
{
|
{
|
||||||
i = 0;
|
i = 0;
|
||||||
address = 1;
|
address = 1;
|
||||||
while (Chinese_horizontal_text_16x16[i] > 0x7e) // >0x7f即说明不是ASCII码字符
|
while (Chinese_horizontal_text_16x16[i] > 0x7e) // >0x7f即说明不是ASCII码字符
|
||||||
{
|
{
|
||||||
if (Chinese_horizontal_text_16x16[i] == text[j])
|
if (Chinese_horizontal_text_16x16[i] == text[j])
|
||||||
{
|
{
|
||||||
|
@ -318,7 +318,7 @@ void display_string_16x16(int x, int y, uchar *text, int font_color, int back_co
|
||||||
x += 16;
|
x += 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (address != 1) // 显示汉字
|
if (address != 1) // 显示汉字
|
||||||
{
|
{
|
||||||
lcd_address(x, y, 16, 16);
|
lcd_address(x, y, 16, 16);
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
|
@ -331,7 +331,7 @@ void display_string_16x16(int x, int y, uchar *text, int font_color, int back_co
|
||||||
}
|
}
|
||||||
j += 2;
|
j += 2;
|
||||||
}
|
}
|
||||||
else // 显示空白字符
|
else // 显示空白字符
|
||||||
{
|
{
|
||||||
lcd_address(x, y, 16, 16);
|
lcd_address(x, y, 16, 16);
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
|
@ -347,7 +347,7 @@ void display_string_16x16(int x, int y, uchar *text, int font_color, int back_co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示32x32点阵的单色的图像
|
// 显示32x32点阵的单色的图像
|
||||||
void disp_32x32(int x, int y, char *dp, int font_color, int back_color)
|
void disp_32x32(int x, int y, char *dp, int font_color, int back_color)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -362,7 +362,7 @@ void disp_32x32(int x, int y, char *dp, int font_color, int back_color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示一幅彩图
|
// 显示一幅彩图
|
||||||
void display_image(int x, int y, uchar *dp)
|
void display_image(int x, int y, uchar *dp)
|
||||||
{
|
{
|
||||||
uchar i, j, k = 0;
|
uchar i, j, k = 0;
|
||||||
|
@ -371,9 +371,9 @@ void display_image(int x, int y, uchar *dp)
|
||||||
{
|
{
|
||||||
for (j = 0; j < 160; j++)
|
for (j = 0; j < 160; j++)
|
||||||
{
|
{
|
||||||
transfer_data(*dp); // 传一个像素的图片数据的高位
|
transfer_data(*dp); // 传一个像素的图片数据的高位
|
||||||
dp++;
|
dp++;
|
||||||
transfer_data(*dp); // 传一个像素的图片数据的低位
|
transfer_data(*dp); // 传一个像素的图片数据的低位
|
||||||
dp++;
|
dp++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -382,12 +382,12 @@ void display_image(int x, int y, uchar *dp)
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
P1M1 = 0x00;
|
P1M1 = 0x00;
|
||||||
P1M0 = 0x00; // P1配置为准双向
|
P1M0 = 0x00; // P1配置为准双向
|
||||||
P2M1 = 0x00;
|
P2M1 = 0x00;
|
||||||
P2M0 = 0x00; // P2配置为准双向
|
P2M0 = 0x00; // P2配置为准双向
|
||||||
P3M1 = 0x00;
|
P3M1 = 0x00;
|
||||||
P3M0 = 0x00; // P3配置为准双向
|
P3M0 = 0x00; // P3配置为准双向
|
||||||
IM1 = 0; // IM1=0、IM2=0并行接口;IM1=1、IM2=1串行接口
|
IM1 = 0; // IM1=0、IM2=0并行接口;IM1=1、IM2=1串行接口
|
||||||
IM2 = 0;
|
IM2 = 0;
|
||||||
lcd_initial();
|
lcd_initial();
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -399,19 +399,19 @@ void main(void)
|
||||||
disp_32x32(40 + 32 * 3, 8, dian_32x32, white, blue);
|
disp_32x32(40 + 32 * 3, 8, dian_32x32, white, blue);
|
||||||
disp_32x32(40 + 32 * 4, 8, zi_32x32, white, blue);
|
disp_32x32(40 + 32 * 4, 8, zi_32x32, white, blue);
|
||||||
|
|
||||||
display_string_16x16(24, 56, "深圳市晶联讯电子有限公司", white, blue);
|
display_string_16x16(24, 56, "深圳市晶联讯电子有限公司", white, blue);
|
||||||
display_string_16x16(48, 88, "型号", white, blue);
|
display_string_16x16(48, 88, "型号", white, blue);
|
||||||
disp_string_8x16(80, 88, ":JLX240-00303-BN", white, blue);
|
disp_string_8x16(80, 88, ":JLX240-00303-BN", white, blue);
|
||||||
display_string_16x16(48, 120, "视窗", white, blue);
|
display_string_16x16(48, 120, "视窗", white, blue);
|
||||||
disp_string_8x16(80, 120, ":36.7x48.9mm", white, blue);
|
disp_string_8x16(80, 120, ":36.7x48.9mm", white, blue);
|
||||||
display_string_16x16(48, 152, "驱动", white, blue);
|
display_string_16x16(48, 152, "驱动", white, blue);
|
||||||
disp_string_8x16(80, 152, "IC:ST7789V", white, blue);
|
disp_string_8x16(80, 152, "IC:ST7789V", white, blue);
|
||||||
|
|
||||||
display_string_16x16(0, 184, "经营宗旨:制造高品质产品及服务", white, blue);
|
display_string_16x16(0, 184, "经营宗旨:制造高品质产品及服务", white, blue);
|
||||||
display_string_16x16(0, 216, "质量方针:客户至上,质量保证", white, blue);
|
display_string_16x16(0, 216, "质量方针:客户至上,质量保证", white, blue);
|
||||||
display_string_16x16(79, 236, "持续改进,服务到位", white, blue);
|
display_string_16x16(79, 236, "持续改进,服务到位", white, blue);
|
||||||
display_string_16x16(0, 270, "经营目标:做最好的液晶模块厂家", white, blue);
|
display_string_16x16(0, 270, "经营目标:做最好的液晶模块厂家", white, blue);
|
||||||
display_string_16x16(79, 292, "做客户信得过的企业", white, blue);
|
display_string_16x16(79, 292, "做客户信得过的企业", white, blue);
|
||||||
Switch();
|
Switch();
|
||||||
|
|
||||||
display_image(0, 0, pic1);
|
display_image(0, 0, pic1);
|
||||||
|
|
|
@ -189,15 +189,15 @@ void StartDefaultTask(void const * argument)
|
||||||
void start_task_lcd(void const * argument)
|
void start_task_lcd(void const * argument)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN start_task_lcd */
|
/* USER CODE BEGIN start_task_lcd */
|
||||||
lcd_initial();
|
// lcd_initial();
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
lcd_menu();
|
// lcd_menu();
|
||||||
|
|
||||||
lv_timer_handler(); //LVGL刷新任务
|
lv_timer_handler(); //LVGL刷新任务
|
||||||
|
|
||||||
osDelay(10);
|
osDelay(5);
|
||||||
}
|
}
|
||||||
/* USER CODE END start_task_lcd */
|
/* USER CODE END start_task_lcd */
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
*********************/
|
*********************/
|
||||||
#ifndef MY_DISP_HOR_RES
|
#ifndef MY_DISP_HOR_RES
|
||||||
#warning Please define or replace the macro MY_DISP_HOR_RES with the actual screen width, default value 320 is used for now.
|
#warning Please define or replace the macro MY_DISP_HOR_RES with the actual screen width, default value 320 is used for now.
|
||||||
#define MY_DISP_HOR_RES 320
|
#define MY_DISP_HOR_RES 240
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MY_DISP_VER_RES
|
#ifndef MY_DISP_VER_RES
|
||||||
#warning Please define or replace the macro MY_DISP_HOR_RES with the actual screen height, default value 240 is used for now.
|
#warning Please define or replace the macro MY_DISP_HOR_RES with the actual screen height, default value 240 is used for now.
|
||||||
#define MY_DISP_VER_RES 240
|
#define MY_DISP_VER_RES 320
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
|
@ -164,21 +164,34 @@ static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_colo
|
||||||
{
|
{
|
||||||
if(disp_flush_enabled) {
|
if(disp_flush_enabled) {
|
||||||
/*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
|
/*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
|
||||||
#if 0
|
#if 1
|
||||||
int32_t x;
|
int32_t x;
|
||||||
int32_t y;
|
int32_t y;
|
||||||
for(y = area->y1; y <= area->y2; y++) {
|
lcd_address(area->x1, area->y1, area->x2, area->y2);
|
||||||
|
for(y = area->y1; y <= area->y2; y++)
|
||||||
|
{
|
||||||
for(x = area->x1; x <= area->x2; x++) {
|
for(x = area->x1; x <= area->x2; x++) {
|
||||||
/*Put a pixel to the display. For example:*/
|
/*Put a pixel to the display. For example:*/
|
||||||
/*put_px(x, y, *color_p)*/
|
/*put_px(x, y, *color_p)*/
|
||||||
|
|
||||||
|
transfer_data_16(color_p->full);
|
||||||
|
|
||||||
color_p++;
|
color_p++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// lcd_address(xa, ya, xb, yb);
|
||||||
|
// for (i = xa; i < xb; i++)
|
||||||
|
// {
|
||||||
|
// for (j = ya; j < yb; j++)
|
||||||
|
// {
|
||||||
|
// transfer_data_16(color_data);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
display_color_new(area->x1, area->y1, area->x2, area->y2, color_p->full);
|
display_color_new(area->x1, area->y1, area->x2, area->y2, color_p->full);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
/*IMPORTANT!!!
|
/*IMPORTANT!!!
|
||||||
*Inform the graphics library that you are ready with the flushing*/
|
*Inform the graphics library that you are ready with the flushing*/
|
||||||
|
|
|
@ -22,7 +22,14 @@ typedef struct
|
||||||
bool screen_del;
|
bool screen_del;
|
||||||
lv_obj_t *screen_spangroup_1;
|
lv_obj_t *screen_spangroup_1;
|
||||||
lv_span_t *screen_spangroup_1_span;
|
lv_span_t *screen_spangroup_1_span;
|
||||||
lv_obj_t *screen_led_1;
|
lv_obj_t *screen_spangroup_2;
|
||||||
|
lv_span_t *screen_spangroup_2_span;
|
||||||
|
lv_obj_t *screen_spangroup_3;
|
||||||
|
lv_span_t *screen_spangroup_3_span;
|
||||||
|
lv_obj_t *screen_spangroup_4;
|
||||||
|
lv_span_t *screen_spangroup_4_span;
|
||||||
|
lv_obj_t *screen_spangroup_5;
|
||||||
|
lv_span_t *screen_spangroup_5_span;
|
||||||
}lv_ui;
|
}lv_ui;
|
||||||
|
|
||||||
typedef void (*ui_setup_scr_t)(lv_ui * ui);
|
typedef void (*ui_setup_scr_t)(lv_ui * ui);
|
||||||
|
@ -47,7 +54,7 @@ extern lv_ui guider_ui;
|
||||||
|
|
||||||
void setup_scr_screen(lv_ui *ui);
|
void setup_scr_screen(lv_ui *ui);
|
||||||
|
|
||||||
LV_FONT_DECLARE(lv_font_montserratMedium_12)
|
LV_FONT_DECLARE(lv_font_montserratMedium_18)
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -20,11 +20,13 @@ void setup_scr_screen(lv_ui *ui)
|
||||||
{
|
{
|
||||||
//Write codes screen
|
//Write codes screen
|
||||||
ui->screen = lv_obj_create(NULL);
|
ui->screen = lv_obj_create(NULL);
|
||||||
lv_obj_set_size(ui->screen, 320, 240);
|
lv_obj_set_size(ui->screen, 240, 320);
|
||||||
lv_obj_set_scrollbar_mode(ui->screen, LV_SCROLLBAR_MODE_OFF);
|
lv_obj_set_scrollbar_mode(ui->screen, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
|
||||||
//Write style for screen, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
//Write style for screen, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
lv_obj_set_style_bg_opa(ui->screen, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_opa(ui->screen, 239, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_color(ui->screen, lv_color_hex(0xff5e00), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_grad_dir(ui->screen, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
//Write codes screen_spangroup_1
|
//Write codes screen_spangroup_1
|
||||||
ui->screen_spangroup_1 = lv_spangroup_create(ui->screen);
|
ui->screen_spangroup_1 = lv_spangroup_create(ui->screen);
|
||||||
|
@ -33,12 +35,12 @@ void setup_scr_screen(lv_ui *ui)
|
||||||
lv_spangroup_set_mode(ui->screen_spangroup_1, LV_SPAN_MODE_BREAK);
|
lv_spangroup_set_mode(ui->screen_spangroup_1, LV_SPAN_MODE_BREAK);
|
||||||
//create span
|
//create span
|
||||||
ui->screen_spangroup_1_span = lv_spangroup_new_span(ui->screen_spangroup_1);
|
ui->screen_spangroup_1_span = lv_spangroup_new_span(ui->screen_spangroup_1);
|
||||||
lv_span_set_text(ui->screen_spangroup_1_span, "hello");
|
lv_span_set_text(ui->screen_spangroup_1_span, "left top");
|
||||||
lv_style_set_text_color(&ui->screen_spangroup_1_span->style, lv_color_hex(0x000000));
|
lv_style_set_text_color(&ui->screen_spangroup_1_span->style, lv_color_hex(0x000000));
|
||||||
lv_style_set_text_decor(&ui->screen_spangroup_1_span->style, LV_TEXT_DECOR_NONE);
|
lv_style_set_text_decor(&ui->screen_spangroup_1_span->style, LV_TEXT_DECOR_NONE);
|
||||||
lv_style_set_text_font(&ui->screen_spangroup_1_span->style, &lv_font_montserratMedium_12);
|
lv_style_set_text_font(&ui->screen_spangroup_1_span->style, &lv_font_montserratMedium_18);
|
||||||
lv_obj_set_pos(ui->screen_spangroup_1, 35, 60);
|
lv_obj_set_pos(ui->screen_spangroup_1, 28, 38);
|
||||||
lv_obj_set_size(ui->screen_spangroup_1, 175, 143);
|
lv_obj_set_size(ui->screen_spangroup_1, 81, 34);
|
||||||
|
|
||||||
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_1_main_main_default
|
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_1_main_main_default
|
||||||
static lv_style_t style_screen_spangroup_1_main_main_default;
|
static lv_style_t style_screen_spangroup_1_main_main_default;
|
||||||
|
@ -55,12 +57,121 @@ void setup_scr_screen(lv_ui *ui)
|
||||||
lv_obj_add_style(ui->screen_spangroup_1, &style_screen_spangroup_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_add_style(ui->screen_spangroup_1, &style_screen_spangroup_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_spangroup_refr_mode(ui->screen_spangroup_1);
|
lv_spangroup_refr_mode(ui->screen_spangroup_1);
|
||||||
|
|
||||||
//Write codes screen_led_1
|
//Write codes screen_spangroup_2
|
||||||
ui->screen_led_1 = lv_led_create(ui->screen);
|
ui->screen_spangroup_2 = lv_spangroup_create(ui->screen);
|
||||||
lv_led_set_brightness(ui->screen_led_1, 255);
|
lv_spangroup_set_align(ui->screen_spangroup_2, LV_TEXT_ALIGN_LEFT);
|
||||||
lv_led_set_color(ui->screen_led_1, lv_color_hex(0x00ff01));
|
lv_spangroup_set_overflow(ui->screen_spangroup_2, LV_SPAN_OVERFLOW_CLIP);
|
||||||
lv_obj_set_pos(ui->screen_led_1, 256, 20);
|
lv_spangroup_set_mode(ui->screen_spangroup_2, LV_SPAN_MODE_BREAK);
|
||||||
lv_obj_set_size(ui->screen_led_1, 40, 40);
|
//create span
|
||||||
|
ui->screen_spangroup_2_span = lv_spangroup_new_span(ui->screen_spangroup_2);
|
||||||
|
lv_span_set_text(ui->screen_spangroup_2_span, "right top");
|
||||||
|
lv_style_set_text_color(&ui->screen_spangroup_2_span->style, lv_color_hex(0x000000));
|
||||||
|
lv_style_set_text_decor(&ui->screen_spangroup_2_span->style, LV_TEXT_DECOR_NONE);
|
||||||
|
lv_style_set_text_font(&ui->screen_spangroup_2_span->style, &lv_font_montserratMedium_18);
|
||||||
|
lv_obj_set_pos(ui->screen_spangroup_2, 140, 38);
|
||||||
|
lv_obj_set_size(ui->screen_spangroup_2, 81, 34);
|
||||||
|
|
||||||
|
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_2_main_main_default
|
||||||
|
static lv_style_t style_screen_spangroup_2_main_main_default;
|
||||||
|
ui_init_style(&style_screen_spangroup_2_main_main_default);
|
||||||
|
|
||||||
|
lv_style_set_border_width(&style_screen_spangroup_2_main_main_default, 0);
|
||||||
|
lv_style_set_radius(&style_screen_spangroup_2_main_main_default, 0);
|
||||||
|
lv_style_set_bg_opa(&style_screen_spangroup_2_main_main_default, 0);
|
||||||
|
lv_style_set_pad_top(&style_screen_spangroup_2_main_main_default, 0);
|
||||||
|
lv_style_set_pad_right(&style_screen_spangroup_2_main_main_default, 0);
|
||||||
|
lv_style_set_pad_bottom(&style_screen_spangroup_2_main_main_default, 0);
|
||||||
|
lv_style_set_pad_left(&style_screen_spangroup_2_main_main_default, 0);
|
||||||
|
lv_style_set_shadow_width(&style_screen_spangroup_2_main_main_default, 0);
|
||||||
|
lv_obj_add_style(ui->screen_spangroup_2, &style_screen_spangroup_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_spangroup_refr_mode(ui->screen_spangroup_2);
|
||||||
|
|
||||||
|
//Write codes screen_spangroup_3
|
||||||
|
ui->screen_spangroup_3 = lv_spangroup_create(ui->screen);
|
||||||
|
lv_spangroup_set_align(ui->screen_spangroup_3, LV_TEXT_ALIGN_LEFT);
|
||||||
|
lv_spangroup_set_overflow(ui->screen_spangroup_3, LV_SPAN_OVERFLOW_CLIP);
|
||||||
|
lv_spangroup_set_mode(ui->screen_spangroup_3, LV_SPAN_MODE_BREAK);
|
||||||
|
//create span
|
||||||
|
ui->screen_spangroup_3_span = lv_spangroup_new_span(ui->screen_spangroup_3);
|
||||||
|
lv_span_set_text(ui->screen_spangroup_3_span, "middle");
|
||||||
|
lv_style_set_text_color(&ui->screen_spangroup_3_span->style, lv_color_hex(0x000000));
|
||||||
|
lv_style_set_text_decor(&ui->screen_spangroup_3_span->style, LV_TEXT_DECOR_NONE);
|
||||||
|
lv_style_set_text_font(&ui->screen_spangroup_3_span->style, &lv_font_montserratMedium_18);
|
||||||
|
lv_obj_set_pos(ui->screen_spangroup_3, 83, 145);
|
||||||
|
lv_obj_set_size(ui->screen_spangroup_3, 81, 34);
|
||||||
|
|
||||||
|
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_3_main_main_default
|
||||||
|
static lv_style_t style_screen_spangroup_3_main_main_default;
|
||||||
|
ui_init_style(&style_screen_spangroup_3_main_main_default);
|
||||||
|
|
||||||
|
lv_style_set_border_width(&style_screen_spangroup_3_main_main_default, 0);
|
||||||
|
lv_style_set_radius(&style_screen_spangroup_3_main_main_default, 0);
|
||||||
|
lv_style_set_bg_opa(&style_screen_spangroup_3_main_main_default, 0);
|
||||||
|
lv_style_set_pad_top(&style_screen_spangroup_3_main_main_default, 0);
|
||||||
|
lv_style_set_pad_right(&style_screen_spangroup_3_main_main_default, 0);
|
||||||
|
lv_style_set_pad_bottom(&style_screen_spangroup_3_main_main_default, 0);
|
||||||
|
lv_style_set_pad_left(&style_screen_spangroup_3_main_main_default, 0);
|
||||||
|
lv_style_set_shadow_width(&style_screen_spangroup_3_main_main_default, 0);
|
||||||
|
lv_obj_add_style(ui->screen_spangroup_3, &style_screen_spangroup_3_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_spangroup_refr_mode(ui->screen_spangroup_3);
|
||||||
|
|
||||||
|
//Write codes screen_spangroup_4
|
||||||
|
ui->screen_spangroup_4 = lv_spangroup_create(ui->screen);
|
||||||
|
lv_spangroup_set_align(ui->screen_spangroup_4, LV_TEXT_ALIGN_LEFT);
|
||||||
|
lv_spangroup_set_overflow(ui->screen_spangroup_4, LV_SPAN_OVERFLOW_CLIP);
|
||||||
|
lv_spangroup_set_mode(ui->screen_spangroup_4, LV_SPAN_MODE_BREAK);
|
||||||
|
//create span
|
||||||
|
ui->screen_spangroup_4_span = lv_spangroup_new_span(ui->screen_spangroup_4);
|
||||||
|
lv_span_set_text(ui->screen_spangroup_4_span, "left bot");
|
||||||
|
lv_style_set_text_color(&ui->screen_spangroup_4_span->style, lv_color_hex(0x000000));
|
||||||
|
lv_style_set_text_decor(&ui->screen_spangroup_4_span->style, LV_TEXT_DECOR_NONE);
|
||||||
|
lv_style_set_text_font(&ui->screen_spangroup_4_span->style, &lv_font_montserratMedium_18);
|
||||||
|
lv_obj_set_pos(ui->screen_spangroup_4, 25, 247);
|
||||||
|
lv_obj_set_size(ui->screen_spangroup_4, 81, 34);
|
||||||
|
|
||||||
|
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_4_main_main_default
|
||||||
|
static lv_style_t style_screen_spangroup_4_main_main_default;
|
||||||
|
ui_init_style(&style_screen_spangroup_4_main_main_default);
|
||||||
|
|
||||||
|
lv_style_set_border_width(&style_screen_spangroup_4_main_main_default, 0);
|
||||||
|
lv_style_set_radius(&style_screen_spangroup_4_main_main_default, 0);
|
||||||
|
lv_style_set_bg_opa(&style_screen_spangroup_4_main_main_default, 0);
|
||||||
|
lv_style_set_pad_top(&style_screen_spangroup_4_main_main_default, 0);
|
||||||
|
lv_style_set_pad_right(&style_screen_spangroup_4_main_main_default, 0);
|
||||||
|
lv_style_set_pad_bottom(&style_screen_spangroup_4_main_main_default, 0);
|
||||||
|
lv_style_set_pad_left(&style_screen_spangroup_4_main_main_default, 0);
|
||||||
|
lv_style_set_shadow_width(&style_screen_spangroup_4_main_main_default, 0);
|
||||||
|
lv_obj_add_style(ui->screen_spangroup_4, &style_screen_spangroup_4_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_spangroup_refr_mode(ui->screen_spangroup_4);
|
||||||
|
|
||||||
|
//Write codes screen_spangroup_5
|
||||||
|
ui->screen_spangroup_5 = lv_spangroup_create(ui->screen);
|
||||||
|
lv_spangroup_set_align(ui->screen_spangroup_5, LV_TEXT_ALIGN_LEFT);
|
||||||
|
lv_spangroup_set_overflow(ui->screen_spangroup_5, LV_SPAN_OVERFLOW_CLIP);
|
||||||
|
lv_spangroup_set_mode(ui->screen_spangroup_5, LV_SPAN_MODE_BREAK);
|
||||||
|
//create span
|
||||||
|
ui->screen_spangroup_5_span = lv_spangroup_new_span(ui->screen_spangroup_5);
|
||||||
|
lv_span_set_text(ui->screen_spangroup_5_span, "right bot");
|
||||||
|
lv_style_set_text_color(&ui->screen_spangroup_5_span->style, lv_color_hex(0x000000));
|
||||||
|
lv_style_set_text_decor(&ui->screen_spangroup_5_span->style, LV_TEXT_DECOR_NONE);
|
||||||
|
lv_style_set_text_font(&ui->screen_spangroup_5_span->style, &lv_font_montserratMedium_18);
|
||||||
|
lv_obj_set_pos(ui->screen_spangroup_5, 145, 247);
|
||||||
|
lv_obj_set_size(ui->screen_spangroup_5, 81, 34);
|
||||||
|
|
||||||
|
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_5_main_main_default
|
||||||
|
static lv_style_t style_screen_spangroup_5_main_main_default;
|
||||||
|
ui_init_style(&style_screen_spangroup_5_main_main_default);
|
||||||
|
|
||||||
|
lv_style_set_border_width(&style_screen_spangroup_5_main_main_default, 0);
|
||||||
|
lv_style_set_radius(&style_screen_spangroup_5_main_main_default, 0);
|
||||||
|
lv_style_set_bg_opa(&style_screen_spangroup_5_main_main_default, 0);
|
||||||
|
lv_style_set_pad_top(&style_screen_spangroup_5_main_main_default, 0);
|
||||||
|
lv_style_set_pad_right(&style_screen_spangroup_5_main_main_default, 0);
|
||||||
|
lv_style_set_pad_bottom(&style_screen_spangroup_5_main_main_default, 0);
|
||||||
|
lv_style_set_pad_left(&style_screen_spangroup_5_main_main_default, 0);
|
||||||
|
lv_style_set_shadow_width(&style_screen_spangroup_5_main_main_default, 0);
|
||||||
|
lv_obj_add_style(ui->screen_spangroup_5, &style_screen_spangroup_5_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_spangroup_refr_mode(ui->screen_spangroup_5);
|
||||||
|
|
||||||
//The custom code of screen.
|
//The custom code of screen.
|
||||||
|
|
||||||
|
|
26783
MDK-ARM/JLinkLog.txt
26783
MDK-ARM/JLinkLog.txt
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -117,6 +117,11 @@
|
||||||
<pMon>Segger\JL2CM3.dll</pMon>
|
<pMon>Segger\JL2CM3.dll</pMon>
|
||||||
</DebugOpt>
|
</DebugOpt>
|
||||||
<TargetDriverDllRegistry>
|
<TargetDriverDllRegistry>
|
||||||
|
<SetRegEntry>
|
||||||
|
<Number>0</Number>
|
||||||
|
<Key>DLGUARM</Key>
|
||||||
|
<Name></Name>
|
||||||
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>ARMRTXEVENTFLAGS</Key>
|
<Key>ARMRTXEVENTFLAGS</Key>
|
||||||
|
@ -135,7 +140,7 @@
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>JL2CM3</Key>
|
<Key>JL2CM3</Key>
|
||||||
<Name>-U69404082 -O14 -S5 -ZTIFSpeedSel1000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407VGTx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
|
<Name>-U69404082 -O78 -S6 -ZTIFSpeedSel500 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407VGTx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
|
@ -210,7 +215,7 @@
|
||||||
<DebugFlag>
|
<DebugFlag>
|
||||||
<trace>0</trace>
|
<trace>0</trace>
|
||||||
<periodic>1</periodic>
|
<periodic>1</periodic>
|
||||||
<aLwin>0</aLwin>
|
<aLwin>1</aLwin>
|
||||||
<aCover>0</aCover>
|
<aCover>0</aCover>
|
||||||
<aSer1>0</aSer1>
|
<aSer1>0</aSer1>
|
||||||
<aSer2>0</aSer2>
|
<aSer2>0</aSer2>
|
||||||
|
@ -278,7 +283,7 @@
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Application/User/Core</GroupName>
|
<GroupName>Application/User/Core</GroupName>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
@ -442,7 +447,7 @@
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>Application/User/App/LCD</GroupName>
|
<GroupName>Application/User/App/LCD</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
@ -1078,7 +1083,7 @@
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>LVGL_myGUI</GroupName>
|
<GroupName>LVGL_myGUI</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<cbSel>0</cbSel>
|
<cbSel>0</cbSel>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
|
@ -1221,8 +1226,8 @@
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>..\LVGL\myGUI\generated\guider_fonts\lv_font_montserratMedium_12.c</PathWithFileName>
|
<PathWithFileName>..\LVGL\myGUI\generated\guider_fonts\lv_font_montserratMedium_18.c</PathWithFileName>
|
||||||
<FilenameWithoutPath>lv_font_montserratMedium_12.c</FilenameWithoutPath>
|
<FilenameWithoutPath>lv_font_montserratMedium_18.c</FilenameWithoutPath>
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
|
|
@ -341,7 +341,7 @@
|
||||||
<MiscControls></MiscControls>
|
<MiscControls></MiscControls>
|
||||||
<Define>USE_HAL_DRIVER,STM32F407xx</Define>
|
<Define>USE_HAL_DRIVER,STM32F407xx</Define>
|
||||||
<Undefine></Undefine>
|
<Undefine></Undefine>
|
||||||
<IncludePath>../Core/Inc;../Drivers/STM32F4xx_HAL_Driver/Inc;../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy;../Middlewares/Third_Party/FreeRTOS/Source/include;../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS;../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F;../Drivers/CMSIS/Device/ST/STM32F4xx/Include;../Drivers/CMSIS/Include;../App/LCD;../App/MODBUS;../Utils/inc;../App/BLE;../App/MUX_SIGNAL;../App/DAC8552;../App/HART;../App/RN7302;../App/ADS1220;../App/TM1650;../App/DAC7811;../App/SIG24130;../LVGL;../LVGL/src;../LVGL/examples/porting;..\LVGL\myGUI\generated;..\LVGL\myGUI\custom;..\LVGL\myGUI\generated\guider_fonts</IncludePath>
|
<IncludePath>../Core/Inc;../Drivers/STM32F4xx_HAL_Driver/Inc;../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy;../Middlewares/Third_Party/FreeRTOS/Source/include;../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS;../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F;../Drivers/CMSIS/Device/ST/STM32F4xx/Include;../Drivers/CMSIS/Include;../App/LCD;../App/MODBUS;../Utils/inc;../App/BLE;../App/MUX_SIGNAL;../App/DAC8552;../App/HART;../App/RN7302;../App/ADS1220;../App/TM1650;../App/DAC7811;../App/SIG24130;../LVGL;../LVGL/src;../LVGL/examples/porting;..\LVGL\myGUI\generated;..\LVGL\myGUI\custom;..\LVGL\myGUI\generated\guider_customer_fonts</IncludePath>
|
||||||
</VariousControls>
|
</VariousControls>
|
||||||
</Cads>
|
</Cads>
|
||||||
<Aads>
|
<Aads>
|
||||||
|
@ -1515,9 +1515,9 @@
|
||||||
<FilePath>..\LVGL\myGUI\generated\guider_customer_fonts\guider_customer_fonts.h</FilePath>
|
<FilePath>..\LVGL\myGUI\generated\guider_customer_fonts\guider_customer_fonts.h</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>lv_font_montserratMedium_12.c</FileName>
|
<FileName>lv_font_montserratMedium_18.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\LVGL\myGUI\generated\guider_fonts\lv_font_montserratMedium_12.c</FilePath>
|
<FilePath>..\LVGL\myGUI\generated\guider_fonts\lv_font_montserratMedium_18.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[EXTDLL]
|
||||||
|
Count=0
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue