AN249 Silicon_Laboratories, AN249 Datasheet - Page 7

no-image

AN249

Manufacturer Part Number
AN249
Description
Human Interface Device Tutorial
Manufacturer
Silicon_Laboratories
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN2490NFHP
Manufacturer:
PANASONIC/松下
Quantity:
20 000
Part Number:
AN2491NFHP
Manufacturer:
PANASON
Quantity:
5 510
Part Number:
AN2491NFHP
Manufacturer:
MAXIM
Quantity:
5 510
4.2.1. The Control Endpoint Handler
The USB ISR examines USB registers to determine the cause of the interrupt. If the ISR finds that an Endpoint 0
transaction caused the interrupt, the ISR calls the control endpoint handler. The Endpoint 0 handler parses the
Setup Packet sent by the host and stored in the Endpoint 0 buffer to determine what standard USB request has
been made by the host system. The handler then calls the appropriate function. The firmware template file named
F3xx_USB0_Standard_Requests.c defines all standard requests.
Some of these standard requests require the device to transmit information back to the host. One such standard
request, Get_Descriptor, allows the host to gather all basic information about the newly-attached device. Other
standard requests require the device to receive additional packets of information before the transaction terminates.
4.3. Device Detection after Successful Enumeration
Standard requests sent during enumeration by the host system are not controlled by user-level code. When a
device connects with a host’s USB port, the host system software will automatically retrieve descriptors and
determine whether to enable communication with the device. Host-side application software wishing to interface
with the device can then begin communicating with the device using standard API calls.
4.4. Application Communications
Once a device has successfully enumerated, the host can begin sending and receiving data in the form of Reports.
All data passed between an HID device and a host must be structured according to specifications found in the
Report Descriptor. These reports can be transmitted across either the “Control” pipe (endpoint 0) or the “Interrupt”
pipe (endpoints configured to be IN or OUT).
The following sections discuss how to define the report structure inside the report descriptor and how to transfer
these reports across either the “Control” pipe or the “Interrupt” pipe.
Usage Page/Usage Tags
Nested Collections (Application, Physical, Logical)
Application Collection
Usage Page/Usage Tags
Usage Tags,
Data Desc. Items
Report
Report Data
Figure 3. Report Descriptor Example Structure
Rev. 0.2
Usage Tags,
Data Desc. Items
Report
Report Data
AN249
7

Related parts for AN249