EETimes

Embedded Systems October 2000 Vol13_11

Issue link: http://dc.ee.ubm-us.com/i/71842

Contents of this Issue

Navigation

Page 65 of 181

:r E In short, a HID can be any device that can function within the limits defined by the specification. Every device must respond to a series of control requests de fin ed by the specification . For example, when the host sends a GecStatus request, the device must return status informa- tion in the expected format. Every device must also stol"e the descriptors that the host will request. The device's serial interface engine 0 1111) ()P<.lIlptor '001 (D ') fila ~dil Psrse Desaiplor About HII) Xte .. DESIGNATOR_lNOEX DESIGNATOR-MINIMUM DESIGNATOR-MAXIMUM STRING_INDEX STRING-MINIMUM STRING-MAXIMUM COLLECTION USAGE-MAXIMUM OUTPUT FEATURE ENO_COLLECTION INPUT LOGlCAL-MINIMUM LOGICAL-MAXIMUM PHYSICAL-MINIMUM PHYSICAL-MAXIMUM UNIT_EXPONENT UNIT REPORT_SIZE REPORT_ID I REPORT_COUNT PUSH Manual Entry I Clear Descriptor I I .- aeport Descriptor ·U}A~~··-Jl·A<:,~ .. --·--.. -·-·-.. _ .. __ ·lt .. USAGE_~A~E . (AI phnumer1 c ~1 s~ USAGE:MINIMUM COLLECTION (Logica ) USAGE rOWS) USAGE Chara.cter wi dth) USAGE Character Height) REPORT_ID (1) USAGE Columns) LOGICAL-MAXIMUM (31) REPORLSIZE (5) REPORT_COUNT (4) - ... LOGICAL-MAXIMUM (2) USAGE (Display Status) COLLECTION (Logical) FEATURE (Cnst,Var,Abs) ENO_COLLECTION REPORT_SIZE (8) REPORT_COUNT (1) USAGE (Stat Not Ready) use rs can experience effects that match their actions, such as more resistance when pull ing the stick to cause a simulated airplane to climb. OLher possible HIDs are remote dis- plays, robots, and devices controlled by a virtual control panel on the host computer. In short, a HID can be any device that can function within the limits defined by the specifi cation. The maj or features and li mitations are: • A fu ll-speed HID can transfer up to 64,000 bytes per second (64 byte in each ] ms frame) . A low-speed device is guaranteed only 800 bytes per second (eight bytes every lOms) • A HID can request the host to poll the device periodically to find out if Lhe device has data to send • All data exchanged by a HID resides in defined data structures USAGE ~ASCII Character Set) USAGE Data Read Back~ USAGE Vertical Scrol ) FEATURE (Cnst,Var,Abs) REPORT_COUNT (3) LOGICAL-MAXIMUM (1) FEATURE (Cnst,Var,Abs) REPORT_SIZE (1) REPORT_COUNT (3) USAGE (Alphanumeric Display LOGICAL-MINIMUM (O~ I ay) USAGE (Displ ay Attributes Report) COLLECTION (Logical) g~ 51 15 00 A1 02 09 20 A1 02 09 35 09 36 09 3D 09 3E 85 01 25 1F 75 05 95 04 B1 03 75 01 95 03 25 01 09 21 09 22 09 29 81 03 95 03 81 03 CO 75 08 95 01 25 02 09 20 A1 02 09 2E - - - - ""~ EJ .. ,... '"'- (SIE) handles the details of sending and receiving the individual bits on the bus, much as a UART does for asyn chronous sel"ial communications. Beyond this, the amount of firmware support required to complete a trans- fer varies with the u" ansfer type and the chip architecture" Besides the requ irements that apply to all devices, HlDs have addi- tional requirements: • A HID must have an interrupt IN endpoin t for sending periodic data to the host. An interrupt OUT end- point for receiving periodic data from the host is optional .E called re-/Jorls. A single report can contain up to 65,535 bytes. The device's firmware must include a re/Jort descriptor that describes the data to be exchanged. The report format is flexible enough to handle just about any type of data Device requirements In many ways, HIDs are no differe nt from othe r USB devices. Every USB peripheral must contain an intelligent controller that knows how to respond to requests and other even ts at i LS USB port. The conu"olle r must have one or more endpoints, which are buffers that store received data or data wai ti ng to be sent. Each endpoint has a num- ber and direction. Endpoint 0 i bidi- rectional and is required for the con- u"ol transfers used in enumerating the device. 64 OCTOBER 2000 Embedded Systems Programming • A HID must contain a class descrip- to r and one or more report descriptors • A HID must support the HID-spe- cific control reques t Get_Report and may support the optional reque t Set_Report • For interrupt IN transfers, the device must place the report data in the interrupt endpoint's buffer and enable the endpoint. For inter- rupt OUT transfers, the device must enabl e the endpoint and retrieve received report data (usu- ally signaled by a device in terrupt) from th e interrupt endpoin t'S buffer. Retrieving descriptors The host computer identifies an attached USB periph e ral when it re trieves a series of descriptors during enumera tion. The enumeration process is triggered when a device is plugged into the bus or when the host powers up with a device attached. Listing ] shows a seri es of de crip- tors for a USB j oystick. Every USB

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems October 2000 Vol13_11