This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
P1IFG 及 P1DIR 都在頭文件中被定為 volatile, 意思是存或取它們時可能有副作用, 所以編譯時不可勿略, 而且必需尊守原程序存或取的順序。 可是根據 c 語言, 原程序中的 (P1IFG&(~P1DIR)) 並沒有先取 P1IFG 或先取 P1DIR 的明確含意。所以產生了杞人憂天似的警告。你大可一笑置之。