Hello,
This is a bit of a puzzle, trying to locate decriptors in flas seems to
result in
byte swapping ...
typedef unsigned char byte;
typedef unsigned int word;
typedef struct
{
byte bLength; byte bDscType; word bcdUSB;
byte bDevCls; byte bDevSubCls; byte bDevProtocol;
byte bMaxPktSize0; word idVendor; word idProduct;
word bcdDevice; byte iMFR; byte iProduct;
byte iSerialNum; byte bNumCfg;
} USB_DEV_DSC;
#define ROMADVDSC 0x02000
#define DSC_DEV 0x98
#define CDC_DEVICE 0x76
#define EP0_BUFF_SIZE 0x54
const USB_DEV_DSC at ROMADVDSC dvDscFlash =
/* Device Descriptor */
{
sizeof(USB_DEV_DSC), // Size of this descriptor in bytes
DSC_DEV, // DEVICE descriptor type
0x0200, // USB Spec Release Number in BCD format
CDC_DEVICE, // Class Code
0x00, // Subclass code
0x00, // Protocol code
EP0_BUFF_SIZE, // Max packet size for EP0, see usbcfg.h
0x04D8, // Vendor ID
0x000A, // Product ID: CDC RS-232 Emulation Demo
0x0000, // Device release number in BCD format
0x01, // Manufacturer string index
0x02, // Product string index
0x00, // Device serial number string index
0x01 // Number of possible configurations
};
USB_DEV_DSC dvDscRam =
/* Device Descriptor */
{
sizeof(USB_DEV_DSC), // Size of this descriptor in bytes
DSC_DEV, // DEVICE descriptor type
0x0200, // USB Spec Release Number in BCD format
CDC_DEVICE, // Class Code
0x00, // Subclass code
0x00, // Protocol code
EP0_BUFF_SIZE, // Max packet size for EP0, see usbcfg.h
0x04D8, // Vendor ID
0x000A, // Product ID: CDC RS-232 Emulation Demo
0x0000, // Device release number in BCD format
0x01, // Manufacturer string index
0x02, // Product string index
0x00, // Device serial number string index
0x01 // Number of possible configurations
};
void main() {
while(1) {};
}
No doubt someone can point me to the FM I should R .. TIA
polly
--
<=>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user