作者hanko (小hanko毛)
看板C_and_CPP
標題[問題] 介面卡裡的一行程式想請教
時間Thu May 7 16:20:31 2009
看不懂
DI_Data = (wdDI_Port1_Value << 8)|wdDI_Port0_Value;
請問這裡面DI_Data
究竟是怎由wdDI_Port1_Value與wdDI_Port0_Value決定阿?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.118.140.15
1F:→ adrianshum:看書, bitwise operator 05/07 16:29
2F:→ hayden0828:Port1_Value向左移8位元後把Port0_Value放在1~8個位元 05/07 21:20
3F:→ hayden0828:就等於DI_DATA=Port1_Value*256+Port0_Value 05/07 21:21