4.6 USB Host
Hardware Setting
¾
Check if 2,3 of J-USB- and J-USB+ short
¾
Connect with a USB mouse
Flowchart
The following flowchart illuminates the procedure to implement USB host function, which
can catch the position of a USB mouse, it is not a certain flow of a function, but provides
a clue to study and understand the sample code.
Start
Initialize system
clock
Initialize timer
Init USB host
Enumeration
Mouse data
process
Display mouse
data
SystemInit ( )
main ( )
minihost_init( )
USB_Handler ( )
USBF_Handler ( )
get_mouse_data ( )
Main()
Figure 4-9: USB Host Sample Code Flowchart
Usage
1) Make the hardware setting
2) Enable definition “Debug” in the code
3) Run the code.
4) Move the USB mouse, and watch the mouse position in the terminal IO window as
following figure. (Debug viewer window in Keil IDE)
Figure 4-10: USB Mouse Position Display
19
Содержание FSSDC-9B506-EVB
Страница 3: ...Revision History Date Version 2011 04 21 V1 0 3 ...
Страница 12: ... Press reset key on the board Programming will start Figure 3 8 Start Programming 12 ...
Страница 15: ...Figure 4 3 Send UART Data From PC Side 15 ...
Страница 23: ...2 Select a project eww file Figure 5 5 Select a Project 3 Click Project Rebuild All Figure 5 6 Rebuild All 23 ...