U08usb.h – Motorola USB08 User Manual
Page 93

Source Code Files
Contents
USB08 Evaluation Board
Designer Reference Manual
MOTOROLA
Source Code Files
93
U08USB.H
//============================================================================
// File: U08_USB.H
// Func: Definitions for USB Data Types & Constants
//
Header File for USB08 Demo Application
// Auth: (C)2000 by MCT Elektronikladen GbR, Oliver Thamm
// http://www.elektronikladen.de/mct
// Rem.: View/Edit this File with TAB-Size=4
//============================================================================
//-- Data Type Definitions ---------------------------------------------------
typedef struct {
// Data Type "Intel Word"
uchar lo;
// (High/Low Byte swapped)
uchar hi;
} iword;
//----------------------------------------------------------------------------
// Standard Device Descriptor
// 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 Number in BCD
uchar bDeviceClass;
// Device Class Code
uchar bDeviceSubClass;
// Device Subclass Code
uchar bDeviceProtocol;
// Device Protocol Code
uchar bMaxPacketSize0;
// Maximum Packet Size 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 Desc for Product
uchar iSerialNumber;
// Index of String Desc for SerNo
uchar bNumConfigurations;
// Number of possible Configurations
} device_descriptor;
//----------------------------------------------------------------------------
// Standard Configuration 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 Data for this Conf
uchar bNumInterfaces;
// No of Interfaces supported by this Conf
uchar bConfigurationValue;
// Designator Value for *this* Configuration
uchar iConfiguration;
// Index of String Desc for this Conf
uchar bmAttributes;
// Configuration Characteristics (see below)
uchar bMaxPower;
// Max. Power Consumption in this Conf (*2mA)
} configuration_descriptor;