10
DualMain
GetMouseType
USB Main
PS2 Interface
System
Initialization
USB Initialization
USBTaskLoop
ProcessButtons
ProcessOptics
ReadMotionReg
ReadDeltaX
ReadDeltaY
Read Z Wheel
Load new mouse
packet to EP1
buffer & enable
EP1
Load SROM
AdjustLASER
Figure 6. USB Operation Function Call Map
configured for boot or report
protocol. See the HID class
documentation for more details.
getDeviceConfiguration
– This
routine is entered whenever a
GET CONFIGURATION Request
is received. This function then
starts a control read
transaction that sends the
configuration, interface,
endpoint, and HID descriptors
to the host.
requestNotSupported
–
Unsupported or invalid
descriptor requests will cause
this firmware to STALL these
transactions.
PS/2 Firmware Description
A function call map for PS/2
operation is shown in Figure 7.
The following are descriptions
of the functions in
Adns-
6000.asm
PS/2 Functions
PS2Main
– Initializes the PS/2
related parameter to their
default state, enables the serial
interface and sends a BAT
code (AAh followed by 00h) to
the host. After the initialization,
the program goes into the
infinite
PS2TaskLoop
loop.
PS2TaskLoop
– This function
spins in an infinite loop
waiting for an event that needs
servicing. The
ProcessButtons
and
ReadProcessOptics
functions are called within this
loop to retrieve any new
motion or button information.
The data received from these
functions will be loaded into
the endpoint 1 buffer to be
sent to the host.
PS2BAT
– delays for 500
milliseconds, then sends the
AAh followed by 00h
initialization string to the host
for the PS/2 Basic Assurance
Test.