[問題] 出現一個不懂的ERROR= =

看板ASM作者 (saber.c)時間15年前 (2009/07/21 12:49), 編輯推噓3(302)
留言5則, 4人參與, 最新討論串1/1
小弟再寫一個晶片的功能 因為有範例所以 我拿來改 可是在編譯時出現如下的訊息= = Test_MCP2510.c:In funtion 'MCP2510_IO_CS_Init'; Test_MCP2510.c:61:error:suggest parentheses around arithmetic in operand of | Test_MCP2510.c:62:error:suggest parentheses around arithmetic in operand of | Test_MCP2510.c:63:error:suggest parentheses around arithmetic in operand of | Test_MCP2510.c:64:error:suggest parentheses around arithmetic in operand of | 後來查看感覺是定義IO腳位那邊的問題 可是又看不出啥問題QQ 不知道板上大大能不能幫忙看一下 程式碼如下 http://nopaste.info/03fc16dbea.html -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.130.22.88

07/21 13:36, , 1F
看起來像是程式碼語法錯誤?
07/21 13:36, 1F

07/21 13:52, , 2F
是OR運算子那邊的錯誤,可能是括號的問題
07/21 13:52, 2F

07/21 15:13, , 3F
有些單晶片編譯器無法接受連續的邏輯演算用括號分群一下
07/21 15:13, 3F

07/21 18:24, , 4F
你有沒有發現錯誤這幾個的#define都被你分成二行.
07/21 18:24, 4F

07/21 18:25, , 5F
如果一定要分成兩行.看要不要在換行前加\
07/21 18:25, 5F
文章代碼(AID): #1APKZt_R (ASM)