12
ps2Main
PS2 Initialization
ps2TaskLoop
PS2BAT
SetDefault
ps2SendNextByte
ProcessOptics
PS2DoCommand
ProcessButtons
GetHostByte
LoadMousePacket
HostRequestToSend
PS2Receive
GetBit
send0
ReadMotionReg
PS2SendResponseByte
PS2Send
Send_1
Send_0
ResetInterval
PS2SetScaling
SetWrapMode
SetDefault
PS2StatusRequest
SetRemoteMode
CheckWheel
Resend
PS2SetStreamMode
ReadDeviceType
Reset
Enable
ResetWrapMode
Disable
PS2ResetScaling
ReadDeltaX
ReadDeltaY
Read Z Wheel
HostRequestToSend
PS2HostINhibit
PS2Send
Send_1
Send_0
Figure 7. PS/2 Operation Function Call Map
output by right-shifting the
mouse counts to achieve a /2
for each resolution factor.
void ApplyScaling(void)
–
This routine scales the mouse
output according to the
following to the PS/2 mouse
specification, when scaling is
enabled by the host.
send_1
– sends a PS/2 1 bit
send_0
– sends a PS/2 0 bit
GetBit
– receives a PS/2 bit
from the host