In Ep0 Handler - Motorola M68HC08 Designer Reference Manual

Hide thumbs Also See for M68HC08:
Table of Contents

Advertisement

High Data Rate Wireless USB Optical Mouse Solution
MOTOROLA
Freescale Semiconductor, Inc.
OUT EP0 HANDLER
SET NAK TO IN EP0
STATUS STAGE?
NO
ALL DATA
SENT?
NO
One timer interrupt routine is used to capture the RF mouse data. The firmware
flow is shown
Figure
7-6. This timer is set to input capture mode. When an
interrupt happens on the falling and rising edge, it can calculate the pulse width
of the RF data.
The routine will proceed to detect data only if the pulse width matches the data
structure of the RF packet. The detected data bit will be put into a temporary
buffer. The timer interrupt events will continue to occur until one complete RF
packet has been received. All the received data will then be put into a receiver
buffer queue for the main program to process. In the case where an USB bus
is being suspended, a received mouse packet means the USB bus and the host
computer needed to wake up. The routine will then signal the main routine to
wakeup the host instead of update the receiver buffer queue.
For more detailed information, refer to
Receiver Firmware
For More Information On This Product,
Go to: www.freescale.com
SET STALL T0 EP0 OUT
YES
(CONTROL TRANSFER
COMPLETED)
YES
PREPARE FOR
OUT STAGE
PREPARE FOR
NEXT DATA STAGE
Figure 7-5. IN EP0 Handler
7.3.1 Wakeup Detection
Receiver Firmware
Firmware Structure
RETURN
Mechanism.
DRM055
33

Advertisement

Table of Contents
loading

Table of Contents