UP 支持直接字符配置
This commit is contained in:
@@ -111,14 +111,14 @@ def format_chinese_array_as_text(chinese_array, size):
|
||||
text_output += '\n '.join(bytes_lines)
|
||||
text_output += ",\n }\n },\n"
|
||||
text_output += "};\n\n"
|
||||
# text_output += "Chinese_t* find_chinese_data(uint8_t unicode_high, uint8_t unicode_low) {\n"
|
||||
# text_output += " for (int i = 0; i < sizeof(Hzk) / sizeof(Chinese_t); ++i) {\n"
|
||||
# text_output += " if (Hzk[i].unicode[0] == unicode_high && Hzk[i].unicode[1] == unicode_low) {\n"
|
||||
# text_output += " return &Hzk[i];\n"
|
||||
# text_output += " }\n"
|
||||
# text_output += " }\n"
|
||||
# text_output += " return NULL;\n"
|
||||
# text_output += "}\n"
|
||||
text_output += "Chinese_t* find_chinese_data(uint8_t unicode_high, uint8_t unicode_low) {\n"
|
||||
text_output += " for (int i = 0; i < sizeof(Hzk) / sizeof(Chinese_t); ++i) {\n"
|
||||
text_output += " if (Hzk[i].unicode[0] == unicode_high && Hzk[i].unicode[1] == unicode_low) {\n"
|
||||
text_output += " return &Hzk[i];\n"
|
||||
text_output += " }\n"
|
||||
text_output += " }\n"
|
||||
text_output += " return NULL;\n"
|
||||
text_output += "}\n"
|
||||
text_output += "\n#endif //HW_LIB_OLED_FONT_CHUC_H"
|
||||
return text_output
|
||||
|
||||
|
Reference in New Issue
Block a user