B.5 interface descriptor, B.6 endpoint 1 descriptor, B.7 endpoint 2 descriptor – Motorola USB08 User Manual

Page 85: Interface descriptor, Endpoint 1 descriptor, Endpoint 2 descriptor

Advertising
background image

USB08 Descriptors

Interface Descriptor

USB08 Evaluation Board

Designer Reference Manual

MOTOROLA

USB08 Descriptors

85

B.5 Interface Descriptor

const interface_descriptor InterfaceDesc =

{ // Size of this Descriptor in Bytes

sizeof(interface_descriptor),

DT_INTERFACE, // Descriptor Type (=4)

0, // Number of *this* Interface (0..)

0, // Alternative for this Interface (if any)

2, // No of EPs used by this IF (excl. EP0)

0xff, // IF Class Code (0xff = Vendor specific)

0x01, // Interface Subclass Code

0xff, // IF Protocol Code (0xff = Vendor specific)

0 // Index of String Desc for this Interface

}; // end of InterfaceDesc

B.6 Endpoint 1 Descriptor

const endpoint_descriptor Endpoint1Desc =

{ // Size of this Descriptor in Bytes

sizeof(endpoint_descriptor),

DT_ENDPOINT, // Descriptor Type (=5)

0x81, // Endpoint Address (EP1, IN)

0x03, // Interrupt

{0x08, 0x00}, // Max. Endpoint Packet Size

10 // Polling Interval (Interrupt) in ms

}; // end of Endpoint1Desc

B.7 Endpoint 2 Descriptor

const endpoint_descriptor Endpoint2Desc =

{ // Size of this Descriptor in Bytes

sizeof(endpoint_descriptor),

DT_ENDPOINT, // Descriptor Type (=5)

0x02, // Endpoint Address (EP2, OUT)

0x03, // Interrupt

{0x08, 0x00}, // Max. Endpoint Packet Size

10 // Polling Interval (Interrupt) in ms

}; // end of Endpoint2Desc

Advertising