看板 ASM 關於我們 聯絡資訊
小弟再寫一個晶片的功能 因為有範例所以 我拿來改 可是在編譯時出現如下的訊息= = 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
menspower:看起來像是程式碼語法錯誤? 07/21 13:36
hayden0828:是OR運算子那邊的錯誤,可能是括號的問題 07/21 13:52
WolfLord:有些單晶片編譯器無法接受連續的邏輯演算用括號分群一下 07/21 15:13
utility:你有沒有發現錯誤這幾個的#define都被你分成二行. 07/21 18:24
utility:如果一定要分成兩行.看要不要在換行前加\ 07/21 18:25