Designer Reference Manual
USB08 Evaluation Board
94
Source Code Files
MOTOROLA
Source Code Files
//----------------------------------------------------------------------------
// Standard Interface Descriptor
// according to USB1.1 spec page 202
//
typedef struct {
uchar bLength;
// Size of this Descriptor in Bytes
uchar bDescriptorType;
// Descriptor Type (=4)
uchar bInterfaceNumber;
// Number of *this* Interface (0..)
uchar bAlternateSetting;
// Alternative for this Interface (if any)
uchar bNumEndpoints;
// No of EPs used by this IF (excl. EP0)
uchar bInterfaceClass;
// Interface Class Code
uchar bInterfaceSubClass;
// Interface Subclass Code
uchar bInterfaceProtocol;
// Interface Protocol Code
uchar iInterface;
// Index of String Desc for this Interface
} interface_descriptor;
//----------------------------------------------------------------------------
// Standard Endpoint Descriptor
// according to USB1.1 spec page 203
//
typedef struct {
uchar bLength;
// Size of this Descriptor in Bytes
uchar bDescriptorType;
// Descriptor Type (=5)
uchar bEndpointAddress;
// Endpoint Address ( Direction)
uchar bmAttributes;
// Endpoint Attributes (Transfer Type)
iword wMaxPacketSize;
// Max. Endpoint Packet Size
uchar bInterval;
// Polling Interval (Interrupt) in ms
} endpoint_descriptor;
//----------------------------------------------------------------------------
// Structure of Setup Packet sent during
// SETUP Stage of Standard Device Requests
// according to USB1.1 spec page 183
//
typedef struct {
uchar bmRequestType;
// Characteristics (Direction,Type,Recipient)
uchar bRequest;
// Standard Request Code
iword wValue;
// Value Field
iword wIndex;
// Index or Offset Field
iword wLength;
// Number of Bytes to transfer (Data Stage)
} setup_buffer;
//----------------------------------------------------------------------------
// USB Status Codes
//
#define US_ATTACHED
0x00
// (not used here)
#define US_POWERED
0x01
#define US_DEFAULT
0x02
#define US_ADDRESSED
0x03
#define US_CONFIGURED
0x04
#define US_SUSPENDED
0x80
Содержание MC68HC908JB8
Страница 2: ...blank ...
Страница 6: ...Designer Reference Manual USB08 Evaluation Board 6 List of Sections MOTOROLA List of Sections ...
Страница 16: ...Designer Reference Manual USB08 Evaluation Board 16 List of Tables MOTOROLA List of Tables ...
Страница 42: ...Designer Reference Manual USB08 Evaluation Board 42 Hardware Description MOTOROLA Hardware Description ...
Страница 88: ...Designer Reference Manual USB08 Evaluation Board 88 USB08 Descriptors MOTOROLA USB08 Descriptors ...
Страница 243: ...blank ...