refactor(gbk_text): 重构GBK文本常量定义并优化命名 移除过时的文本定义,使用更简洁通用的名称替换原有特定功能的文本 常量,并更新相应的长度定义和别名映射。 BREAKING CHANGE: 原有的特定功能文本常量已被移除,需使用新的通 用名称进行访问。 ```
52 lines
1.6 KiB
C
52 lines
1.6 KiB
C
#ifndef __GBK_TEXT_H__
|
||
#define __GBK_TEXT_H__
|
||
|
||
#include <stdint.h>
|
||
|
||
// GBK文本数组声明(定义在gbk_text.c中)
|
||
extern const uint8_t text_device_name_GBK[];
|
||
extern const uint8_t text_loading_GBK[];
|
||
extern const uint8_t text_massage_on_GBK[];
|
||
extern const uint8_t text_massage_off_GBK[];
|
||
extern const uint8_t text_heat_on_GBK[];
|
||
extern const uint8_t text_heat_off_GBK[];
|
||
extern const uint8_t text_gear_GBK[];
|
||
extern const uint8_t text_time_GBK[];
|
||
extern const uint8_t text_cont_GBK[];
|
||
extern const uint8_t text_remaining_GBK[];
|
||
extern const uint8_t text_running_GBK[];
|
||
extern const uint8_t text_paused_GBK[];
|
||
extern const uint8_t text_ended_GBK[];
|
||
|
||
// GBK文本长度宏(预计算,不含\0)
|
||
#define text_device_name_LEN (10)
|
||
#define text_loading_LEN (6)
|
||
#define text_massage_on_LEN (8)
|
||
#define text_massage_off_LEN (8)
|
||
#define text_heat_on_LEN (8)
|
||
#define text_heat_off_LEN (8)
|
||
#define text_gear_LEN (4)
|
||
#define text_time_LEN (6)
|
||
#define text_cont_LEN (4)
|
||
#define text_remaining_LEN (8)
|
||
#define text_running_LEN (6)
|
||
#define text_paused_LEN (6)
|
||
#define text_ended_LEN (6)
|
||
|
||
// 兼容旧代码的别名
|
||
#define text_device_name text_device_name_GBK
|
||
#define text_loading text_loading_GBK
|
||
#define text_massage_on text_massage_on_GBK
|
||
#define text_massage_off text_massage_off_GBK
|
||
#define text_heat_on text_heat_on_GBK
|
||
#define text_heat_off text_heat_off_GBK
|
||
#define text_gear text_gear_GBK
|
||
#define text_time text_time_GBK
|
||
#define text_cont text_cont_GBK
|
||
#define text_remaining text_remaining_GBK
|
||
#define text_running text_running_GBK
|
||
#define text_paused text_paused_GBK
|
||
#define text_ended text_ended_GBK
|
||
|
||
#endif // __GBK_TEXT_H__
|