|
一个按nibble通信的程序,下面是出问题的语句
// Convert byte count into nibble count.
#define NIB(_byteCount) \// bytes change into nibbles
( 2* ( _byteCount)) <=================错误行157
// Get nibble value at specific index into an array.
#define GET_NIBBLE(_array, _index) \
// nibble地址为奇数的,取低四位;nibble地址为偶数的,取高四位;array[]是byte存储空间
( (_index) & 0x01) ? ((_array)[(_index) >> 1] & 0x0F) : ((_array)[(_index) >> 1] >> 4) <==================错误行162
报错如下:
Error[Pe040]: expected an identifier C:\Users\asus\Desktop\FSK-16gaiwan\plm1.c 157
Warning[Pe1051]: standard requires that parameter "_byteCount" be given a type by a subsequent declaration ("int" assumed) C:\Users\asus\Desktop\FSK-16gaiwan\plm1.c 157
Error[Pe079]: expected a type specifier C:\Users\asus\Desktop\FSK-16gaiwan\plm1.c 162
Error[Pe090]: function returning function is not allowed C:\Users\asus\Desktop\FSK-16gaiwan\plm1.c 162
Error[Pe130]: expected a "{" C:\Users\asus\Desktop\FSK-16gaiwan\plm1.c 162
检查未发现语法错误,编译环境是IAR611,请高手指点!
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
阿莫论坛20周年了!感谢大家的支持与爱护!!
一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。
|