在 h 文件中:
typedef struct mainScreen_t
{
uint8_t line;
uint8_t position;
char value[16];
}mainScreen_t;
const mainScreen_t Screen1 = {0, 10, {"GPS"}};
const mainScreen_t Screen2 = {1, 10, {"A/D"}};
在 c 文件中:
mainScreen_t lvl_1[LCD_MAIN_MENUS] = {Screen1, Screen2};
CCS 错误:
"../main.c", line 41: error #28: expression must have a constant value "../main.c", line 41: error #28: expression must have a constant value
我将会有一组预定义的菜单(固定位置和恒定文本)。 我想创建一个数组、正如您所看到的。 我收到以下编译错误...我必须更改什么才能不获得此错误?
谢谢


