Fix bug
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef HW_LIB_OLED_FONT_CHUC_H
|
||||
#define HW_LIB_OLED_FONT_CHUC_H
|
||||
#ifndef HW_LIB_FONT_CHUC_H
|
||||
#define HW_LIB_FONT_CHUC_H
|
||||
|
||||
typedef struct {
|
||||
uint8_t unicode[2];
|
||||
uint8_t data[32];
|
||||
} Chinese_t;
|
||||
|
||||
uint8_t Hzk_size = 16;
|
||||
static uint8_t Hzk_size = 16;
|
||||
|
||||
Chinese_t Hzk[] = {
|
||||
static Chinese_t Hzk[] = {
|
||||
{
|
||||
// Original: <20><>
|
||||
{0x66, 0x1F},
|
||||
@@ -69,7 +69,7 @@ Chinese_t Hzk[] = {
|
||||
},
|
||||
};
|
||||
|
||||
Chinese_t *find_chinese_data(uint8_t unicode_high, uint8_t unicode_low) {
|
||||
static Chinese_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];
|
||||
@@ -78,4 +78,4 @@ Chinese_t *find_chinese_data(uint8_t unicode_high, uint8_t unicode_low) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif //HW_LIB_OLED_FONT_CHUC_H
|
||||
#endif //HW_LIB_FONT_CHUC_H
|
||||
|
Reference in New Issue
Block a user