4.5 USB Function
Hardware Setting
¾
Check if 1,2 of J-USB- and J-USB+ short
¾
Check J701 (Short: 5V, Open: 3.3V)
¾
Connect with PC via USB cable
Flowchart
The following flowchart illuminates the procedure to implement a USB mouse, it is not a
certain flow of a function, but provides a clue to study and understand the sample code.
Start
Button, USB core,
HID initialization
Check ButtonInit(),
HIDInit()
Check Ext INT7
occurred?
Initial Endpoint 0
Check
EXTI8_15_IRQHandler()
Get Device, HID
description
Enable Endpoint 5
interrupt transfer
Bus reset
Configure
Endpoint 0-5
Device has been
connected with
Host
Check
USB_2_IRQHandler()
Use interrupt transfer to
communicate with host
Check
HidMouseSendReport()
Check
USB_1_IRQHandler()
Figure 4-8: USB Function Sample Code Flowchart
Usage
1) Make the hardware setting.
2) Watch the mouse moving when pressing “Up”, “Down”, “Left”, “Right” buttons.
18
Содержание 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 ...