UP BMP脚本

This commit is contained in:
JiXieShi
2024-06-25 22:09:23 +08:00
parent 6fb2733bfb
commit e22ddd0bcd
8 changed files with 327 additions and 35 deletions

View File

@@ -18,7 +18,7 @@ extern "C" {
#define PIX_COLOR_SIZE 1
// 启用单行刷新
#define LINE_FAST_SHOW
//#define LINE_FAST_SHOW
typedef struct Font Font_f_t;
typedef void (*Font_Show_t)(Font_f_t *font, uint8_t *data, size_t len);

View File

@@ -61,10 +61,10 @@ Chinese_t Hzk[] = {
},
};
Chinese_t *find_chinese_data(uint8_t unicode_high, uint8_t unicode_low) {
uint16_t find_chinese_data(uint8_t unicode_high, uint8_t unicode_low) {
for (int i = 0; i < sizeof(Hzk) / sizeof(Chinese_t); ++i) {
if (Hzk[i].unicode[0] == unicode_high && Hzk[i].unicode[1] == unicode_low) {
return &Hzk[i];
return i;
}
}
return NULL;