Hardware Reference
In-Depth Information
7.9 GET_INTERFACE
Es ist möglich, einer Konfiguration mehrere Interfaces zuzuordnen. Es kann jeweils
ein Interface aktiv sein. Wenn eine Konfiguration mehrere Interfaces besitzt, wird
das im Datenfeld bNumInterfaces des aktiven Configuration Descriptors mitgeteilt.
Wenn dieser Wert null ist, dann besitzt die Konfiguration genau ein Interface [USB
2.0: 9.4.4, 9.6.5]. So ist es auch bei dem in diesem Buch behandelten Beispielgerät.
Der Get Interface Request liefert als Antwort in einem Byte die Nummer des akti-
ven Interfaces.
Datenfeld
Wert
Bedeutung
bmRequestType
10000001
Standard, Device to Host, Recipient: Interface
bRequest
00001010
GET_INTERFACE
wValue
0x0000
Kein Parameter
wIndex
0x0000
Kein Parameter
wLength
0x0001
Es wird ein Byte als Antwort erwartet
;******************************************************************************
; USB Standard Request: GET_INTERFACE
;******************************************************************************
; Reference: USB2.0 Chapter 9.4.4
GET_INTERFACE
movlw 0x01
cpfseq bConfigurationValue
bra
transtest_stall_0 ;device is not configured
clrf WREG
movff WREG,wStatusLOW
call
transmitBYTE
bra
transtest_over_ctl_out
 
Search WWH ::




Custom Search