作者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