typedef enum{a,//枚举模式即可b,c,d,} NVM_Mode;(第27行)void nvm_ModeSet(NVM_Mode mode_name);(第37行)void nvm_ModeSet(NVM_Mode mode_name){uint8_t A;A = mode_name;//寄存器 = mode_name;即可}eeprom.h:18:27: error: (372) "," expectedeeprom.h:18:37: non-expected function declaration for "nvm_ModeSet"eeprom.h:18:37: error: (313) function body expectedeeprom.c:3:37: error: (987) arguments redeclaredeeprom.c:3:37: error: (1098) conflicting declarations for variable "nvm_ModeSet" (eeprom.c:3)
1 回答

月关宝盒
TA贡献1772条经验 获得超5个赞
自定义函数;函数体在main前面,不用声明;如下
void fun()//不用加声明;在main函数后定义函数体,要加;
void fun(){
函数体
}
int main(){
return 0;
}
还有uint8_t,包含在
文件stdint.h中
看是否遗漏#include<stdint.h>
- 1 回答
- 0 关注
- 132 浏览
添加回答
举报
0/150
提交
取消