Hi all,

 

Iím having a problem porting a Keil app to SDCC. This is the error message:

 

USB_DESCRIPTOR.c:23: error: struct/union/array 'DeviceDesc' :initialization need

s curly braces

 

This is the struct at line 23:

 

const device_descriptor DeviceDesc =

{

   18,                  // bLength

   0x01,                // bDescriptorType

   0x1001,              // bcdUSB

   0x00,                // bDeviceClass

   0x00,                // bDeviceSubClass

   0x00,                // bDeviceProtocol

   EP0_PACKET_SIZE,     // bMaxPacketSize0

   0xC410,              // idVendor

   0x0000,              // idProduct

   0x0000,              // bcdDevice

   0x01,                // iManufacturer

   0x02,                // iProduct

   0x00,                // iSerialNumber

   0x01                 // bNumConfigurations

}; //end of DeviceDesc

 

and this is the typedef for device_descriptor:

 

typedef code struct

{

   BYTE bLength;                // Size of this Descriptor in Bytes

   BYTE bDescriptorType;        // Descriptor Type (=1)

   WORD bcdUSB;                 // USB Spec Release Number in BCD

   BYTE bDeviceClass;           // Device Class Code

   BYTE bDeviceSubClass;        // Device Subclass Code

   BYTE bDeviceProtocol;        // Device Protocol Code

   BYTE bMaxPacketSize0;        // Maximum Packet Size for EP0

   WORD idVendor;               // Vendor ID

   WORD idProduct;              // Product ID

   WORD bcdDevice;              // Device Release Number in BCD

   BYTE iManufacturer;          // Index of String Desc for Manufacturer

   BYTE iProduct;               // Index of String Desc for Product

   BYTE iSerialNumber;          // Index of String Desc for SerNo

   BYTE bNumConfigurations;     // Number of possible Configurations

} device_descriptor;            // End of Device Descriptor Type

 

anyone have any idea how to solve this problem? I tried putting a backslash after the =

in the struct at line 23 but that didnít work.

 

bert


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 10/07/2003