Source Code Files
Contents
USB08 Evaluation Board Designer Reference Manual
MOTOROLA Source Code Files 93
U08USB.H
//===================== ======================== ======================= ========
// File: U08_USB.H
// Func: Definitions fo r USB Data Types & Const ants
// Header File for USB08 Demo Applicat io n
// Auth: (C)2000 by MCT Elektronikladen GbR, Ol iver Thamm
// http://www.ele ktronikladen.de/mct
// Rem.: View/Edit this File with TAB-Size=4
//===================== ======================== ======================= ========
//-- Data Type Definiti ons -------------------- ----------------------- --------
typedef struct { // Data Type "Intel Word"
uchar lo; // (High/Low Byte swapped)
uchar hi;
} iword;
//--------------------- ------------------------ ----------------------- --------
// Standard Device Desc riptor
// according to USB1.1 spec page 197
//
typedef struct {
uchar bLength; // Size of this Descriptor in Bytes
uchar bDescriptorType; // Descriptor Type (=1)
iword bcdUSB; // USB Spec Release Num ber in BCD
uchar bDeviceClass; // Device Class Code
uchar bDeviceSubClass; // Device Subclass Code
uchar bDeviceProtocol; // Device Protocol Code
uchar bMaxPacketSize0; // Maximum Packet Siz e for EP0
iword idVendor; // Vendor ID
iword idProduct; // Product ID
iword bcdDevice; // Device Release Number in BCD
uchar iManufacturer; // Index of String Desc for Manufacturer
uchar iProduct; // Index of String De sc for Product
uchar iSerialNumber; // Index of String Desc for SerNo
uchar bNumConfiguration s; // Number of possible C onfigurations
} device_descriptor;
//--------------------- ------------------------ ----------------------- --------
// Standard Configurati on Descriptor
// according to USB1.1 spec page 199
//
typedef struct {
uchar bLength; // Size of this Descriptor in Bytes
uchar bDescriptorType; // Descriptor Type (=2)
iword wTotalLength; // Total Length of Da ta for this Conf
uchar bNumInterfaces; // No of Interfaces sup ported by this Conf
uchar bConfigurationVal ue; // Designator Value for *this* Configuration
uchar iConfiguration; // Index of String Desc for this Conf
uchar bmAttributes; // Configuration Characteri st ic s (see below)
uchar bMaxPower; // Max. Power Consumption in this Conf (*2 mA )
} configuration_descripto r;