UP 路径优化
This commit is contained in:
1 parent
d7d34508d6
commit
590ac774dd
34 files changed
+13
-183
No files matched your search
+11
-13
@@ -1,15 +1,15 @@
|
|||||||
# 定义要创建的库列表及其对应的目录
|
# 定义要创建的库列表及其对应的目录
|
||||||
set(LIBRARIES
|
set(LIBRARIES
|
||||||
HW_LIB_List src/list inc/list
|
HW_LIB_List list list/inc
|
||||||
HW_LIB_Task src/task inc/task
|
HW_LIB_Task task task/inc
|
||||||
HW_LIB_Printf src/printf inc/printf
|
HW_LIB_Printf printf printf/inc
|
||||||
HW_LIB_Utils src/utils inc/utils
|
HW_LIB_Utils utils utils/inc
|
||||||
HW_LIB_Font src/font inc/font
|
HW_LIB_Font font font/inc
|
||||||
HW_LIB_Iic src/iic inc/iic
|
HW_LIB_Iic iic iic/inc
|
||||||
HW_LIB_Spi src/spi inc/spi
|
HW_LIB_Spi spi spi/inc
|
||||||
HW_LIB_Key src/key inc/key
|
HW_LIB_Key key key/inc
|
||||||
HW_LIB_Oled src/oled inc/oled
|
HW_LIB_Oled oled oled/inc
|
||||||
HW_LIB_Tft src/tft inc/tft
|
HW_LIB_Tft tft tft/inc
|
||||||
)
|
)
|
||||||
|
|
||||||
# 循环浏览库列表以创建它们
|
# 循环浏览库列表以创建它们
|
||||||
@@ -24,9 +24,7 @@ foreach (INDEX RANGE 0 ${LIBRARIES_LENGTH} 3)
|
|||||||
list(GET LIBRARIES ${INCLUDE_DIR_INDEX} INCLUDE_DIR)
|
list(GET LIBRARIES ${INCLUDE_DIR_INDEX} INCLUDE_DIR)
|
||||||
|
|
||||||
file(GLOB_RECURSE LIB_SOURCES "${SOURCE_DIR}/*.c" "${SOURCE_DIR}/*.cpp")
|
file(GLOB_RECURSE LIB_SOURCES "${SOURCE_DIR}/*.c" "${SOURCE_DIR}/*.cpp")
|
||||||
add_library(${TARGET_NAME} STATIC ${LIB_SOURCES}
|
add_library(${TARGET_NAME} STATIC ${LIB_SOURCES})
|
||||||
src/tft/tft.cpp
|
|
||||||
inc/tft/tft.h)
|
|
||||||
target_include_directories(${TARGET_NAME} PUBLIC "${INCLUDE_DIR}")
|
target_include_directories(${TARGET_NAME} PUBLIC "${INCLUDE_DIR}")
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,169 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef HW_LIB_OLED_FONT_CHUC_H
|
|
||||||
#define HW_LIB_OLED_FONT_CHUC_H
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint8_t unicode[2];
|
|
||||||
uint8_t data[32];
|
|
||||||
} Chinese_t;
|
|
||||||
|
|
||||||
uint8_t Hzk_size=16;
|
|
||||||
|
|
||||||
Chinese_t Hzk[] = {
|
|
||||||
{
|
|
||||||
// Original: 姓
|
|
||||||
{ 0x59, 0xD3 },
|
|
||||||
{
|
|
||||||
0x10, 0x20, 0x10, 0x20, 0x11, 0x20, 0x11, 0x24, 0xFD, 0xFE, 0x25, 0x20, 0x26, 0x20, 0x24, 0x20,
|
|
||||||
0x24, 0x28, 0x45, 0xFC, 0x28, 0x20, 0x10, 0x20, 0x28, 0x20, 0x44, 0x24, 0x87, 0xFE, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 名
|
|
||||||
{ 0x54, 0x0D },
|
|
||||||
{
|
|
||||||
0x02, 0x00, 0x02, 0x00, 0x07, 0xF0, 0x04, 0x10, 0x0C, 0x20, 0x12, 0x40, 0x01, 0x80, 0x06, 0x00,
|
|
||||||
0x18, 0x08, 0xEF, 0xFC, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0F, 0xF8, 0x08, 0x08,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 学
|
|
||||||
{ 0x5B, 0x66 },
|
|
||||||
{
|
|
||||||
0x22, 0x08, 0x11, 0x08, 0x11, 0x10, 0x00, 0x20, 0x7F, 0xFE, 0x40, 0x02, 0x80, 0x04, 0x1F, 0xE0,
|
|
||||||
0x00, 0x40, 0x01, 0x84, 0xFF, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 号
|
|
||||||
{ 0x53, 0xF7 },
|
|
||||||
{
|
|
||||||
0x00, 0x10, 0x1F, 0xF8, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x00, 0x04, 0xFF, 0xFE,
|
|
||||||
0x04, 0x00, 0x08, 0x10, 0x1F, 0xF8, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xA0, 0x00, 0x40,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 班
|
|
||||||
{ 0x73, 0xED },
|
|
||||||
{
|
|
||||||
0x01, 0x00, 0x09, 0x04, 0xFD, 0x7E, 0x21, 0x10, 0x25, 0x10, 0x25, 0x10, 0x25, 0x10, 0xF5, 0x7C,
|
|
||||||
0x25, 0x10, 0x29, 0x10, 0x21, 0x10, 0x22, 0x10, 0x3A, 0x10, 0xE2, 0x14, 0x44, 0xFE, 0x08, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 级
|
|
||||||
{ 0x7E, 0xA7 },
|
|
||||||
{
|
|
||||||
0x10, 0x08, 0x17, 0xFC, 0x21, 0x08, 0x21, 0x08, 0x49, 0x10, 0xF9, 0x10, 0x11, 0x3C, 0x21, 0x84,
|
|
||||||
0x41, 0x88, 0xF9, 0x48, 0x02, 0x50, 0x02, 0x20, 0x1A, 0x50, 0xE4, 0x88, 0x49, 0x0E, 0x02, 0x04,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 信
|
|
||||||
{ 0x4F, 0xE1 },
|
|
||||||
{
|
|
||||||
0x08, 0x80, 0x08, 0x44, 0x0F, 0xFE, 0x10, 0x00, 0x10, 0x08, 0x37, 0xFC, 0x50, 0x00, 0x90, 0x08,
|
|
||||||
0x17, 0xFC, 0x10, 0x00, 0x13, 0xF8, 0x12, 0x08, 0x12, 0x08, 0x12, 0x08, 0x13, 0xF8, 0x12, 0x08,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 息
|
|
||||||
{ 0x60, 0x6F },
|
|
||||||
{
|
|
||||||
0x02, 0x00, 0x04, 0x10, 0x1F, 0xF8, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x10, 0x10, 0x1F, 0xF0,
|
|
||||||
0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x02, 0x00, 0x51, 0x84, 0x50, 0x92, 0x90, 0x12, 0x0F, 0xF0,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 显
|
|
||||||
{ 0x66, 0x3E },
|
|
||||||
{
|
|
||||||
0x00, 0x10, 0x1F, 0xF8, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0,
|
|
||||||
0x14, 0x50, 0x44, 0x44, 0x34, 0x4C, 0x14, 0x50, 0x04, 0x40, 0x04, 0x44, 0xFF, 0xFE, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 示
|
|
||||||
{ 0x79, 0x3A },
|
|
||||||
{
|
|
||||||
0x00, 0x10, 0x3F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFE, 0x01, 0x00,
|
|
||||||
0x01, 0x00, 0x09, 0x20, 0x19, 0x18, 0x21, 0x0C, 0x41, 0x04, 0x01, 0x00, 0x05, 0x00, 0x02, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 图
|
|
||||||
{ 0x56, 0xFE },
|
|
||||||
{
|
|
||||||
0x00, 0x04, 0x7F, 0xFE, 0x44, 0x04, 0x47, 0xE4, 0x4C, 0x44, 0x52, 0x84, 0x41, 0x04, 0x42, 0x84,
|
|
||||||
0x46, 0x44, 0x49, 0x3C, 0x70, 0x94, 0x46, 0x04, 0x41, 0x04, 0x40, 0x84, 0x7F, 0xFC, 0x40, 0x04,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 片
|
|
||||||
{ 0x72, 0x47 },
|
|
||||||
{
|
|
||||||
0x00, 0x80, 0x20, 0x80, 0x20, 0x80, 0x20, 0x80, 0x20, 0x84, 0x3F, 0xFE, 0x20, 0x00, 0x20, 0x00,
|
|
||||||
0x3F, 0xC0, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x20, 0x40, 0x40, 0x40, 0x80, 0x40,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 视
|
|
||||||
{ 0x89, 0xC6 },
|
|
||||||
{
|
|
||||||
0x20, 0x08, 0x13, 0xFC, 0x12, 0x08, 0x02, 0x48, 0xFE, 0x48, 0x0A, 0x48, 0x12, 0x48, 0x32, 0x48,
|
|
||||||
0x5A, 0x48, 0x96, 0x68, 0x12, 0xA8, 0x10, 0xA0, 0x11, 0x22, 0x11, 0x22, 0x12, 0x1E, 0x14, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 频
|
|
||||||
{ 0x98, 0x91 },
|
|
||||||
{
|
|
||||||
0x10, 0x04, 0x13, 0xFE, 0x54, 0x20, 0x5E, 0x44, 0x51, 0xFE, 0x55, 0x04, 0xFF, 0x24, 0x11, 0x24,
|
|
||||||
0x55, 0x24, 0x55, 0x24, 0x55, 0x24, 0x95, 0x24, 0x08, 0x20, 0x10, 0x50, 0x20, 0x8C, 0x43, 0x04,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 专
|
|
||||||
{ 0x4E, 0x13 },
|
|
||||||
{
|
|
||||||
0x01, 0x00, 0x01, 0x00, 0x01, 0x10, 0x3F, 0xF8, 0x02, 0x00, 0x02, 0x04, 0xFF, 0xFE, 0x04, 0x00,
|
|
||||||
0x04, 0x00, 0x0F, 0xF8, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x06, 0x80, 0x01, 0x80, 0x00, 0x40,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 业
|
|
||||||
{ 0x4E, 0x1A },
|
|
||||||
{
|
|
||||||
0x04, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, 0x40, 0x44, 0x44, 0x24, 0x44, 0x24, 0x48, 0x14, 0x48,
|
|
||||||
0x14, 0x50, 0x14, 0x50, 0x14, 0x60, 0x04, 0x40, 0x04, 0x40, 0x04, 0x44, 0xFF, 0xFE, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 电
|
|
||||||
{ 0x75, 0x35 },
|
|
||||||
{
|
|
||||||
0x02, 0x00, 0x02, 0x00, 0x02, 0x10, 0x7F, 0xF8, 0x42, 0x10, 0x42, 0x10, 0x7F, 0xF0, 0x42, 0x10,
|
|
||||||
0x42, 0x10, 0x7F, 0xF0, 0x42, 0x10, 0x02, 0x00, 0x02, 0x04, 0x02, 0x04, 0x01, 0xFC, 0x00, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Original: 子
|
|
||||||
{ 0x5B, 0x50 },
|
|
||||||
{
|
|
||||||
0x00, 0x00, 0x3F, 0xF0, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x01, 0x80, 0x01, 0x04, 0xFF, 0xFE,
|
|
||||||
0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x05, 0x00, 0x02, 0x00,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
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];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //HW_LIB_OLED_FONT_CHUC_H
|
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -10,6 +10,7 @@ extern "C" {
|
|||||||
#define NOP() 0
|
#define NOP() 0
|
||||||
#define DELAY1US() NOP()
|
#define DELAY1US() NOP()
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief SPI通信模式枚举
|
* @brief SPI通信模式枚举
|
||||||
**/
|
**/
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -134,7 +134,7 @@ def generate_and_write_chinese_array_output():
|
|||||||
|
|
||||||
# 将数组格式化为文本输出并写入文件
|
# 将数组格式化为文本输出并写入文件
|
||||||
text_output = format_chinese_array_as_text(chinese_array, size)
|
text_output = format_chinese_array_as_text(chinese_array, size)
|
||||||
with open('chinese_array_output.txt', 'w') as file:
|
with open('oled_font_chuc.h', 'w') as file:
|
||||||
file.write(text_output)
|
file.write(text_output)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user