* current encoding options, including baud rate, character format, parity mode and total number of \r
* bits in each data chunk.\r
*/\r
-CDC_Line_Coding_t LineCoding = { BaudRateBPS: 9600,\r
- CharFormat: OneStopBit,\r
- ParityType: Parity_None,\r
- DataBits: 8 };\r
+CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600,\r
+ .CharFormat = OneStopBit,\r
+ .ParityType = Parity_None,\r
+ .DataBits = 8 };\r
\r
/** Current address counter. This stores the current address of the FLASH or EEPROM as set by the host,\r
* and is used when reading or writing to the AVRs memory (either FLASH or EEPROM depending on the issued\r
*/\r
USB_Descriptor_Device_t DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x02,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x02,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: FIXED_CONTROL_ENDPOINT_SIZE,\r
+ .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x204A,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x204A,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: NO_DESCRIPTOR,\r
- ProductStrIndex: 0x01,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = NO_DESCRIPTOR,\r
+ .ProductStrIndex = 0x01,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in SRAM memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 2,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 2,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- CCI_Interface:\r
+ .CCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x02,\r
- SubClass: 0x02,\r
- Protocol: 0x01,\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC_Functional_IntHeader:\r
+ .CDC_Functional_IntHeader = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x00,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x00,\r
\r
- Data: {0x10, 0x01}\r
+ .Data = {0x10, 0x01}\r
},\r
\r
- CDC_Functional_CallManagement:\r
+ .CDC_Functional_CallManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x01,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x01,\r
\r
- Data: {0x03, 0x01}\r
+ .Data = {0x03, 0x01}\r
},\r
\r
- CDC_Functional_AbstractControlManagement:\r
+ .CDC_Functional_AbstractControlManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},\r
- SubType: 0x02,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
+ .SubType = 0x02,\r
\r
- Data: {0x06}\r
+ .Data = {0x06}\r
},\r
\r
- CDC_Functional_Union:\r
+ .CDC_Functional_Union = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x06,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x06,\r
\r
- Data: {0x00, 0x01}\r
+ .Data = {0x00, 0x01}\r
}, \r
\r
- ManagementEndpoint:\r
+ .ManagementEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: CDC_NOTIFICATION_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
},\r
\r
- DCI_Interface:\r
+ .DCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x0A,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x0A,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- DataOutEndpoint:\r
+ .DataOutEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
},\r
\r
- DataInEndpoint:\r
+ .DataInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(15), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(15), .Type = DTYPE_String},\r
\r
- UnicodeString: L"AVR CDC Bootloader"\r
+ .UnicodeString = L"AVR CDC Bootloader"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
{\r
uint16_t Words[2];\r
uint32_t Long;\r
- } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};\r
+ } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}};\r
\r
uint32_t CurrFlashPageStartAddress = CurrFlashAddress.Long;\r
uint8_t WordsInFlashPage = 0;\r
{\r
uint16_t Words[2];\r
uint32_t Long;\r
- } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};\r
+ } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}};\r
\r
while (WordsRemaining--)\r
{\r
{\r
uint8_t Bytes[2];\r
uint16_t Word;\r
- } Address[2] = {{Bytes: {SentCommand.Data[2], SentCommand.Data[1]}},\r
- {Bytes: {SentCommand.Data[4], SentCommand.Data[3]}}};\r
+ } Address[2] = {{.Bytes = {SentCommand.Data[2], SentCommand.Data[1]}},\r
+ {.Bytes = {SentCommand.Data[4], SentCommand.Data[3]}}};\r
\r
/* Load in the start and ending read addresses from the sent data packet */\r
StartAddr = Address[0].Word;\r
{\r
uint16_t Words[2];\r
uint32_t Long;\r
- } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};\r
+ } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}};\r
\r
/* Erase the current page's temp buffer */\r
boot_page_erase(CurrFlashAddress.Long);\r
{\r
uint8_t Bytes[2];\r
AppPtr_t FuncPtr;\r
- } Address = {Bytes: {SentCommand.Data[4], SentCommand.Data[3]}};\r
+ } Address = {.Bytes = {SentCommand.Data[4], SentCommand.Data[3]}};\r
\r
AppStartPtr = Address.FuncPtr;\r
\r
*/\r
USB_Descriptor_Device_t DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: FIXED_CONTROL_ENDPOINT_SIZE,\r
+ .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,\r
\r
- VendorID: 0x03EB,\r
- ProductID: PRODUCT_ID_CODE,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = PRODUCT_ID_CODE,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: NO_DESCRIPTOR,\r
- ProductStrIndex: 0x01,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = NO_DESCRIPTOR,\r
+ .ProductStrIndex = 0x01,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 1,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- DFUInterface:\r
+ .DFUInterface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 0,\r
+ .TotalEndpoints = 0,\r
\r
- Class: 0xFE,\r
- SubClass: 0x01,\r
- Protocol: 0x02,\r
+ .Class = 0xFE,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x02,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- DFUFunctional:\r
+ .DFUFunctional = \r
{\r
- Header: {Size: sizeof(USB_DFU_Functional_Descriptor_t), Type: DTYPE_DFUFunctional},\r
+ .Header = {.Size = sizeof(USB_DFU_Functional_Descriptor_t), .Type = DTYPE_DFUFunctional},\r
\r
- Attributes: (ATTR_CAN_UPLOAD | ATTR_CAN_DOWNLOAD),\r
+ .Attributes = (ATTR_CAN_UPLOAD | ATTR_CAN_DOWNLOAD),\r
\r
- DetatchTimeout: 0x0000,\r
- TransferSize: 0x0c00,\r
+ .DetatchTimeout = 0x0000,\r
+ .TransferSize = 0x0c00,\r
\r
- DFUSpecification: VERSION_BCD(01.01)\r
+ .DFUSpecification = VERSION_BCD(01.01)\r
}\r
};\r
\r
*/ \r
USB_Descriptor_String_t LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},\r
\r
- UnicodeString: L"AVR DFU Bootloader"\r
+ .UnicodeString = L"AVR DFU Bootloader"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
if (!(DescriptorNumber))\r
{\r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
*/\r
USB_Descriptor_Device_t DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x16C0,\r
- ProductID: 0x0478,\r
- ReleaseNumber: 0x0010,\r
+ .VendorID = 0x16C0,\r
+ .ProductID = 0x0478,\r
+ .ReleaseNumber = 0x0010,\r
\r
- ManufacturerStrIndex: NO_DESCRIPTOR,\r
- ProductStrIndex: 0x01,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = NO_DESCRIPTOR,\r
+ .ProductStrIndex = 0x01,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 1,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- Interface:\r
+ .Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0x00,\r
- AlternateSetting: 0x00,\r
+ .InterfaceNumber = 0x00,\r
+ .AlternateSetting = 0x00,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x03,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x03,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- HIDDescriptor:\r
+ .HIDDescriptor = \r
{ \r
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
\r
- HIDSpec: VERSION_BCD(01.11),\r
- CountryCode: 0x00,\r
- TotalHIDReports: 0x01,\r
- HIDReportType: DTYPE_Report,\r
- HIDReportLength: sizeof(HIDReport)\r
+ .HIDSpec = VERSION_BCD(01.11),\r
+ .CountryCode = 0x00,\r
+ .TotalHIDReports = 0x01,\r
+ .HIDReportType = DTYPE_Report,\r
+ .HIDReportLength = sizeof(HIDReport)\r
},\r
\r
- HIDEndpoint:\r
+ .HIDEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | HID_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: HID_EPSIZE,\r
- PollingIntervalMS: 0x40\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | HID_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = HID_EPSIZE,\r
+ .PollingIntervalMS = 0x40\r
},\r
};\r
\r
*/\r
USB_Descriptor_String_t LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(21), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(21), .Type = DTYPE_String},\r
\r
- UnicodeString: L"AVR Teensy Bootloader"\r
+ .UnicodeString = L"AVR Teensy Bootloader"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Audio_Task , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Audio_Task , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(02.00),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(02.00),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2047,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2047,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 2,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 2,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- AudioControlInterface:\r
+ .AudioControlInterface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 0,\r
+ .TotalEndpoints = 0,\r
\r
- Class: 0x01,\r
- SubClass: 0x01,\r
- Protocol: 0x00,\r
+ .Class = 0x01,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR \r
+ .InterfaceStrIndex = NO_DESCRIPTOR \r
},\r
\r
- AudioControlInterface_SPC:\r
+ .AudioControlInterface_SPC = \r
{\r
- Header: {Size: sizeof(USB_AudioInterface_AC_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_Header,\r
+ .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_Header,\r
\r
- ACSpecification: VERSION_BCD(01.00),\r
- TotalLength: (sizeof(USB_AudioInterface_AC_t) +\r
- sizeof(USB_AudioInputTerminal_t) +\r
- sizeof(USB_AudioOutputTerminal_t)),\r
+ .ACSpecification = VERSION_BCD(01.00),\r
+ .TotalLength = (sizeof(USB_AudioInterface_AC_t) +\r
+ sizeof(USB_AudioInputTerminal_t) +\r
+ sizeof(USB_AudioOutputTerminal_t)),\r
\r
- InCollection: 1,\r
- InterfaceNumbers: {1}, \r
+ .InCollection = 1,\r
+ .InterfaceNumbers = {1}, \r
},\r
\r
- InputTerminal:\r
+ .InputTerminal = \r
{\r
- Header: {Size: sizeof(USB_AudioInputTerminal_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_InputTerminal,\r
+ .Header = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_InputTerminal,\r
\r
- TerminalID: 0x01,\r
- TerminalType: TERMINAL_IN_MIC,\r
- AssociatedOutputTerminal: 0x00,\r
+ .TerminalID = 0x01,\r
+ .TerminalType = TERMINAL_IN_MIC,\r
+ .AssociatedOutputTerminal = 0x00,\r
\r
- TotalChannels: 1,\r
- ChannelConfig: 0,\r
+ .TotalChannels = 1,\r
+ .ChannelConfig = 0,\r
\r
- ChannelStrIndex: NO_DESCRIPTOR,\r
- TerminalStrIndex: NO_DESCRIPTOR\r
+ .ChannelStrIndex = NO_DESCRIPTOR,\r
+ .TerminalStrIndex = NO_DESCRIPTOR\r
},\r
\r
- OutputTerminal:\r
+ .OutputTerminal = \r
{\r
- Header: {Size: sizeof(USB_AudioOutputTerminal_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_OutputTerminal,\r
+ .Header = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_OutputTerminal,\r
\r
- TerminalID: 0x02,\r
- TerminalType: TERMINAL_STREAMING,\r
- AssociatedInputTerminal: 0x00,\r
+ .TerminalID = 0x02,\r
+ .TerminalType = TERMINAL_STREAMING,\r
+ .AssociatedInputTerminal = 0x00,\r
\r
- SourceID: 0x01,\r
+ .SourceID = 0x01,\r
\r
- TerminalStrIndex: NO_DESCRIPTOR \r
+ .TerminalStrIndex = NO_DESCRIPTOR \r
},\r
\r
- AudioStreamInterface_Alt0:\r
+ .AudioStreamInterface_Alt0 = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 0,\r
+ .TotalEndpoints = 0,\r
\r
- Class: 0x01,\r
- SubClass: 0x02,\r
- Protocol: 0x00,\r
+ .Class = 0x01,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- AudioStreamInterface_Alt1:\r
+ .AudioStreamInterface_Alt1 = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 1,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 1,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x01,\r
- SubClass: 0x02,\r
- Protocol: 0x00,\r
+ .Class = 0x01,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- AudioStreamInterface_SPC:\r
+ .AudioStreamInterface_SPC = \r
{\r
- Header: {Size: sizeof(USB_AudioInterface_AS_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_General,\r
+ .Header = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_General,\r
\r
- TerminalLink: 0x02,\r
+ .TerminalLink = 0x02,\r
\r
- FrameDelay: 1,\r
- AudioFormat: 0x0001\r
+ .FrameDelay = 1,\r
+ .AudioFormat = 0x0001\r
},\r
\r
- AudioFormat:\r
+ .AudioFormat = \r
{\r
- Header: {Size: sizeof(USB_AudioFormat_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_Format,\r
+ .Header = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_Format,\r
\r
- FormatType: 0x01,\r
- Channels: 0x01,\r
+ .FormatType = 0x01,\r
+ .Channels = 0x01,\r
\r
- SubFrameSize: 0x02,\r
- BitResolution: 16,\r
- SampleFrequencyType: (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),\r
+ .SubFrameSize = 0x02,\r
+ .BitResolution = 16,\r
+ .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),\r
\r
- SampleFrequencies: {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
+ .SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
},\r
\r
- AudioEndpoint:\r
+ .AudioEndpoint = \r
{\r
- Endpoint:\r
+ .Endpoint = \r
{\r
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Std_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | AUDIO_STREAM_EPNUM),\r
- Attributes: (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
- EndpointSize: AUDIO_STREAM_EPSIZE,\r
- PollingIntervalMS: 1\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | AUDIO_STREAM_EPNUM),\r
+ .Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = AUDIO_STREAM_EPSIZE,\r
+ .PollingIntervalMS = 1\r
},\r
\r
- Refresh: 0,\r
- SyncEndpointNumber: 0\r
+ .Refresh = 0,\r
+ .SyncEndpointNumber = 0\r
},\r
\r
- AudioEndpoint_SPC:\r
+ .AudioEndpoint_SPC = \r
{\r
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Spc_t), Type: DTYPE_AudioEndpoint},\r
- Subtype: DSUBTYPE_General,\r
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
+ .Subtype = DSUBTYPE_General,\r
\r
- Attributes: 0x00,\r
+ .Attributes = 0x00,\r
\r
- LockDelayUnits: 0x00,\r
- LockDelay: 0x0000\r
+ .LockDelayUnits = 0x00,\r
+ .LockDelay = 0x0000\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Audio In Demo"\r
+ .UnicodeString = L"LUFA Audio In Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Audio_Task , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Audio_Task , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(02.00),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(02.00),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2046,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2046,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 2,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 2,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- AudioControlInterface:\r
+ .AudioControlInterface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 0,\r
+ .TotalEndpoints = 0,\r
\r
- Class: 0x01,\r
- SubClass: 0x01,\r
- Protocol: 0x00,\r
+ .Class = 0x01,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR \r
+ .InterfaceStrIndex = NO_DESCRIPTOR \r
},\r
\r
- AudioControlInterface_SPC:\r
+ .AudioControlInterface_SPC = \r
{\r
- Header: {Size: sizeof(USB_AudioInterface_AC_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_Header,\r
+ .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_Header,\r
\r
- ACSpecification: VERSION_BCD(01.00),\r
- TotalLength: (sizeof(USB_AudioInterface_AC_t) +\r
+ .ACSpecification = VERSION_BCD(01.00),\r
+ .TotalLength = (sizeof(USB_AudioInterface_AC_t) +\r
sizeof(USB_AudioInputTerminal_t) +\r
sizeof(USB_AudioOutputTerminal_t)),\r
\r
- InCollection: 1,\r
- InterfaceNumbers: {1}, \r
+ .InCollection = 1,\r
+ .InterfaceNumbers = {1}, \r
},\r
\r
- InputTerminal:\r
+ .InputTerminal = \r
{\r
- Header: {Size: sizeof(USB_AudioInputTerminal_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_InputTerminal,\r
+ .Header = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_InputTerminal,\r
\r
- TerminalID: 0x01,\r
- TerminalType: TERMINAL_STREAMING,\r
- AssociatedOutputTerminal: 0x00,\r
+ .TerminalID = 0x01,\r
+ .TerminalType = TERMINAL_STREAMING,\r
+ .AssociatedOutputTerminal = 0x00,\r
\r
- TotalChannels: 2,\r
- ChannelConfig: (CHANNEL_LEFT_FRONT | CHANNEL_RIGHT_FRONT),\r
+ .TotalChannels = 2,\r
+ .ChannelConfig = (CHANNEL_LEFT_FRONT | CHANNEL_RIGHT_FRONT),\r
\r
- ChannelStrIndex: NO_DESCRIPTOR,\r
- TerminalStrIndex: NO_DESCRIPTOR\r
+ .ChannelStrIndex = NO_DESCRIPTOR,\r
+ .TerminalStrIndex = NO_DESCRIPTOR\r
},\r
\r
- OutputTerminal:\r
+ .OutputTerminal = \r
{\r
- Header: {Size: sizeof(USB_AudioOutputTerminal_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_OutputTerminal,\r
+ .Header = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_OutputTerminal,\r
\r
- TerminalID: 0x02,\r
- TerminalType: TERMINAL_OUT_SPEAKER,\r
- AssociatedInputTerminal: 0x00,\r
+ .TerminalID = 0x02,\r
+ .TerminalType = TERMINAL_OUT_SPEAKER,\r
+ .AssociatedInputTerminal = 0x00,\r
\r
- SourceID: 0x01,\r
+ .SourceID = 0x01,\r
\r
- TerminalStrIndex: NO_DESCRIPTOR \r
+ .TerminalStrIndex = NO_DESCRIPTOR \r
},\r
\r
- AudioStreamInterface_Alt0:\r
+ .AudioStreamInterface_Alt0 = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 0,\r
+ .TotalEndpoints = 0,\r
\r
- Class: 0x01,\r
- SubClass: 0x02,\r
- Protocol: 0x00,\r
+ .Class = 0x01,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- AudioStreamInterface_Alt1:\r
+ .AudioStreamInterface_Alt1 = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 1,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 1,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x01,\r
- SubClass: 0x02,\r
- Protocol: 0x00,\r
+ .Class = 0x01,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- AudioStreamInterface_SPC:\r
+ .AudioStreamInterface_SPC = \r
{\r
- Header: {Size: sizeof(USB_AudioInterface_AS_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_General,\r
+ .Header = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_General,\r
\r
- TerminalLink: 0x01,\r
+ .TerminalLink = 0x01,\r
\r
- FrameDelay: 1,\r
- AudioFormat: 0x0001\r
+ .FrameDelay = 1,\r
+ .AudioFormat = 0x0001\r
},\r
\r
- AudioFormat:\r
+ .AudioFormat = \r
{\r
- Header: {Size: sizeof(USB_AudioFormat_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_Format,\r
+ .Header = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_Format,\r
\r
- FormatType: 0x01,\r
- Channels: 0x02,\r
+ .FormatType = 0x01,\r
+ .Channels = 0x02,\r
\r
- SubFrameSize: 0x02,\r
- BitResolution: 16,\r
+ .SubFrameSize = 0x02,\r
+ .BitResolution = 16,\r
\r
- SampleFrequencyType: (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)), \r
- SampleFrequencies: {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
+ .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)), \r
+ .SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}\r
},\r
\r
- AudioEndpoint:\r
+ .AudioEndpoint = \r
{\r
- Endpoint:\r
+ .Endpoint = \r
{\r
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Std_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | AUDIO_STREAM_EPNUM),\r
- Attributes: (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
- EndpointSize: AUDIO_STREAM_EPSIZE,\r
- PollingIntervalMS: 1\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | AUDIO_STREAM_EPNUM),\r
+ .Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = AUDIO_STREAM_EPSIZE,\r
+ .PollingIntervalMS = 1\r
},\r
\r
- Refresh: 0,\r
- SyncEndpointNumber: 0\r
+ .Refresh = 0,\r
+ .SyncEndpointNumber = 0\r
},\r
\r
- AudioEndpoint_SPC:\r
+ .AudioEndpoint_SPC = \r
{\r
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Spc_t), Type: DTYPE_AudioEndpoint},\r
- Subtype: DSUBTYPE_General,\r
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},\r
+ .Subtype = DSUBTYPE_General,\r
\r
- Attributes: EP_ACCEPTS_SMALL_PACKETS,\r
+ .Attributes = EP_ACCEPTS_SMALL_PACKETS,\r
\r
- LockDelayUnits: 0x00,\r
- LockDelay: 0x0000\r
+ .LockDelayUnits = 0x00,\r
+ .LockDelay = 0x0000\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(19), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Audio Out Demo"\r
+ .UnicodeString = L"LUFA Audio Out Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
case 0x00:\r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: CDC_Task , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = CDC_Task , .TaskStatus = TASK_STOP },\r
};\r
\r
/* Globals: */\r
* It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
* serial link characteristics and instead sends and receives data in endpoint streams.\r
*/\r
-CDC_Line_Coding_t LineCoding = { BaudRateBPS: 9600,\r
- CharFormat: OneStopBit,\r
- ParityType: Parity_None,\r
- DataBits: 8 };\r
+CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600,\r
+ .CharFormat = OneStopBit,\r
+ .ParityType = Parity_None,\r
+ .DataBits = 8 };\r
\r
/** String to print through the virtual serial port when the joystick is pressed upwards. */\r
char JoystickUpString[] = "Joystick Up\r\n";\r
*/\r
USB_Notification_Header_t Notification = (USB_Notification_Header_t)\r
{\r
- NotificationType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
- Notification: NOTIF_SerialState,\r
- wValue: 0,\r
- wIndex: 0,\r
- wLength: sizeof(uint16_t),\r
+ .NotificationType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ .Notification = NOTIF_SerialState,\r
+ .wValue = 0,\r
+ .wIndex = 0,\r
+ .wLength = sizeof(uint16_t),\r
};\r
\r
uint16_t LineStateMask;\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x02,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x02,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2044,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2044,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 2,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 2,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- CCI_Interface:\r
+ .CCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x02,\r
- SubClass: 0x02,\r
- Protocol: 0x01,\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC_Functional_IntHeader:\r
+ .CDC_Functional_IntHeader = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x00,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x00,\r
\r
- Data: {0x01, 0x10}\r
+ .Data = {0x01, 0x10}\r
},\r
\r
- CDC_Functional_CallManagement:\r
+ .CDC_Functional_CallManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x01,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x01,\r
\r
- Data: {0x03, 0x01}\r
+ .Data = {0x03, 0x01}\r
},\r
\r
- CDC_Functional_AbstractControlManagement:\r
+ .CDC_Functional_AbstractControlManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},\r
- SubType: 0x02,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
+ .SubType = 0x02,\r
\r
- Data: {0x06}\r
+ .Data = {0x06}\r
},\r
\r
- CDC_Functional_Union:\r
+ .CDC_Functional_Union = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x06,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x06,\r
\r
- Data: {0x00, 0x01}\r
+ .Data = {0x00, 0x01}\r
},\r
\r
- ManagementEndpoint:\r
+ .ManagementEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: CDC_NOTIFICATION_EPSIZE,\r
- PollingIntervalMS: 0xFF\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,\r
+ .PollingIntervalMS = 0xFF\r
},\r
\r
- DCI_Interface:\r
+ .DCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x0A,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x0A,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- DataOutEndpoint:\r
+ .DataOutEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
},\r
\r
- DataInEndpoint:\r
+ .DataInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(13), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA CDC Demo"\r
+ .UnicodeString = L"LUFA CDC Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0xEF,\r
- SubClass: 0x02,\r
- Protocol: 0x01,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0xEF,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x204E,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x204E,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 4,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 4,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- IAD1:\r
+ .IAD1 = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_Association_t), Type: DTYPE_InterfaceAssociation},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},\r
\r
- FirstInterfaceIndex: 0,\r
- TotalInterfaces: 2,\r
+ .FirstInterfaceIndex = 0,\r
+ .TotalInterfaces = 2,\r
\r
- Class: 0x02,\r
- SubClass: 0x02,\r
- Protocol: 0x01,\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
\r
- IADStrIndex: NO_DESCRIPTOR\r
+ .IADStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC1_CCI_Interface:\r
+ .CDC1_CCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x02,\r
- SubClass: 0x02,\r
- Protocol: 0x01,\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC1_Functional_IntHeader:\r
+ .CDC1_Functional_IntHeader = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x00,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x00,\r
\r
- Data: {0x01, 0x10}\r
+ .Data = {0x01, 0x10}\r
},\r
\r
- CDC1_Functional_CallManagement:\r
+ .CDC1_Functional_CallManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x01,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x01,\r
\r
- Data: {0x03, 0x01}\r
+ .Data = {0x03, 0x01}\r
},\r
\r
- CDC1_Functional_AbstractControlManagement:\r
+ .CDC1_Functional_AbstractControlManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},\r
- SubType: 0x02,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
+ .SubType = 0x02,\r
\r
- Data: {0x06}\r
+ .Data = {0x06}\r
},\r
\r
- CDC1_Functional_Union:\r
+ .CDC1_Functional_Union = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x06,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x06,\r
\r
- Data: {0x00, 0x01}\r
+ .Data = {0x00, 0x01}\r
},\r
\r
- CDC1_ManagementEndpoint:\r
+ .CDC1_ManagementEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC1_NOTIFICATION_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: CDC_NOTIFICATION_EPSIZE,\r
- PollingIntervalMS: 0xFF\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC1_NOTIFICATION_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,\r
+ .PollingIntervalMS = 0xFF\r
},\r
\r
- CDC1_DCI_Interface:\r
+ .CDC1_DCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x0A,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x0A,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC1_DataOutEndpoint:\r
+ .CDC1_DataOutEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC1_RX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC1_RX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
},\r
\r
- CDC1_DataInEndpoint:\r
+ .CDC1_DataInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC1_TX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC1_TX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
},\r
\r
- IAD2:\r
+ .IAD2 = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_Association_t), Type: DTYPE_InterfaceAssociation},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},\r
\r
- FirstInterfaceIndex: 2,\r
- TotalInterfaces: 2,\r
+ .FirstInterfaceIndex = 2,\r
+ .TotalInterfaces = 2,\r
\r
- Class: 0x02,\r
- SubClass: 0x02,\r
- Protocol: 0x01,\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
\r
- IADStrIndex: NO_DESCRIPTOR\r
+ .IADStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC2_CCI_Interface:\r
+ .CDC2_CCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 2,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 2,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x02,\r
- SubClass: 0x02,\r
- Protocol: 0x01,\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC2_Functional_IntHeader:\r
+ .CDC2_Functional_IntHeader = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x00,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x00,\r
\r
- Data: {0x01, 0x10}\r
+ .Data = {0x01, 0x10}\r
},\r
\r
- CDC2_Functional_CallManagement:\r
+ .CDC2_Functional_CallManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x01,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x01,\r
\r
- Data: {0x03, 0x03}\r
+ .Data = {0x03, 0x03}\r
},\r
\r
- CDC2_Functional_AbstractControlManagement:\r
+ .CDC2_Functional_AbstractControlManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},\r
- SubType: 0x02,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
+ .SubType = 0x02,\r
\r
- Data: {0x06}\r
+ .Data = {0x06}\r
},\r
\r
- CDC2_Functional_Union:\r
+ .CDC2_Functional_Union = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x06,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x06,\r
\r
- Data: {0x02, 0x03}\r
+ .Data = {0x02, 0x03}\r
},\r
\r
- CDC2_ManagementEndpoint:\r
+ .CDC2_ManagementEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC2_NOTIFICATION_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: CDC_NOTIFICATION_EPSIZE,\r
- PollingIntervalMS: 0xFF\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC2_NOTIFICATION_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,\r
+ .PollingIntervalMS = 0xFF\r
},\r
\r
- CDC2_DCI_Interface:\r
+ .CDC2_DCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 3,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 3,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x0A,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x0A,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC2_DataOutEndpoint:\r
+ .CDC2_DataOutEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC2_RX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC2_RX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
},\r
\r
- CDC2_DataInEndpoint:\r
+ .CDC2_DataInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC2_TX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC2_TX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(13), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Dual CDC Demo"\r
+ .UnicodeString = L"LUFA Dual CDC Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: CDC1_Task , TaskStatus: TASK_STOP },\r
- { Task: CDC2_Task , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = CDC1_Task , .TaskStatus = TASK_STOP },\r
+ { .Task = CDC2_Task , .TaskStatus = TASK_STOP },\r
};\r
\r
/* Globals: */\r
* It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
* serial link characteristics and instead sends and receives data in endpoint streams.\r
*/\r
-CDC_Line_Coding_t LineCoding1 = { BaudRateBPS: 9600,\r
- CharFormat: OneStopBit,\r
- ParityType: Parity_None,\r
- DataBits: 8 };\r
+CDC_Line_Coding_t LineCoding1 = { .BaudRateBPS = 9600,\r
+ .CharFormat = OneStopBit,\r
+ .ParityType = Parity_None,\r
+ .DataBits = 8 };\r
\r
/** Contains the current baud rate and other settings of the second virtual serial port. While this demo does not use\r
* the physical USART and thus does not use these settings, they must still be retained and returned to the host\r
* It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical\r
* serial link characteristics and instead sends and receives data in endpoint streams.\r
*/\r
-CDC_Line_Coding_t LineCoding2 = { BaudRateBPS: 9600,\r
- CharFormat: OneStopBit,\r
- ParityType: Parity_None,\r
- DataBits: 8 };\r
+CDC_Line_Coding_t LineCoding2 = { .BaudRateBPS = 9600,\r
+ .CharFormat = OneStopBit,\r
+ .ParityType = Parity_None,\r
+ .DataBits = 8 };\r
\r
/** String to print through the first virtual serial port when the joystick is pressed upwards. */\r
char JoystickUpString[] = "Joystick Up\r\n";\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x204F,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x204F,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 1,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- Interface:\r
+ .Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0x00,\r
- AlternateSetting: 0x00,\r
+ .InterfaceNumber = 0x00,\r
+ .AlternateSetting = 0x00,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x03,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x03,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- GenericHID:\r
+ .GenericHID = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
\r
- HIDSpec: VERSION_BCD(01.11),\r
- CountryCode: 0x00,\r
- TotalHIDReports: 0x01,\r
- HIDReportType: DTYPE_Report,\r
- HIDReportLength: sizeof(GenericReport)\r
+ .HIDSpec = VERSION_BCD(01.11),\r
+ .CountryCode = 0x00,\r
+ .TotalHIDReports = 0x01,\r
+ .HIDReportType = DTYPE_Report,\r
+ .HIDReportLength = sizeof(GenericReport)\r
},\r
\r
- GenericINEndpoint:\r
+ .GenericINEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | GENERIC_IN_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: GENERIC_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | GENERIC_IN_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = GENERIC_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
},\r
\r
- GenericOUTEndpoint:\r
+ .GenericOUTEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | GENERIC_OUT_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: GENERIC_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | GENERIC_OUT_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = GENERIC_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(13), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(21), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA HID Demo"\r
+ .UnicodeString = L"LUFA Generic HID Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
}\r
\r
break;\r
- case DTYPE_HID:\r
+ case DTYPE_HID: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.GenericHID);\r
Size = sizeof(USB_Descriptor_HID_t);\r
break;\r
- case DTYPE_Report:\r
+ case DTYPE_Report: \r
Address = DESCRIPTOR_ADDRESS(GenericReport);\r
Size = sizeof(GenericReport);\r
break;\r
TASK_LIST\r
{\r
#if !defined(INTERRUPT_CONTROL_ENDPOINT)\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
#endif\r
\r
#if !defined(INTERRUPT_DATA_ENDPOINT)\r
- { Task: USB_HID_Report , TaskStatus: TASK_STOP },\r
+ { .Task = USB_HID_Report , .TaskStatus = TASK_STOP },\r
#endif\r
};\r
\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2043,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2043,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 1,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- Interface:\r
+ .Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0x00,\r
- AlternateSetting: 0x00,\r
+ .InterfaceNumber = 0x00,\r
+ .AlternateSetting = 0x00,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x03,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x03,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- JoystickHID:\r
+ .JoystickHID = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
\r
- HIDSpec: VERSION_BCD(01.11),\r
- CountryCode: 0x00,\r
- TotalHIDReports: 0x01,\r
- HIDReportType: DTYPE_Report,\r
- HIDReportLength: sizeof(JoystickReport)\r
+ .HIDSpec = VERSION_BCD(01.11),\r
+ .CountryCode = 0x00,\r
+ .TotalHIDReports = 0x01,\r
+ .HIDReportType = DTYPE_Report,\r
+ .HIDReportLength = sizeof(JoystickReport)\r
},\r
\r
- JoystickEndpoint:\r
+ .JoystickEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | JOYSTICK_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: JOYSTICK_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | JOYSTICK_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = JOYSTICK_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
} \r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Joystick Demo"\r
+ .UnicodeString = L"LUFA Joystick Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
}\r
\r
break;\r
- case DTYPE_HID:\r
+ case DTYPE_HID: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.JoystickHID);\r
Size = sizeof(USB_Descriptor_HID_t);\r
break;\r
- case DTYPE_Report:\r
+ case DTYPE_Report: \r
Address = DESCRIPTOR_ADDRESS(JoystickReport);\r
Size = sizeof(JoystickReport);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Joystick_Report , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Joystick_Report , .TaskStatus = TASK_STOP },\r
};\r
\r
/** Main program entry point. This routine configures the hardware required by the application, then\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2042,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2042,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 1,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- Interface:\r
+ .Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0x00,\r
- AlternateSetting: 0x00,\r
+ .InterfaceNumber = 0x00,\r
+ .AlternateSetting = 0x00,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x03,\r
- SubClass: 0x01,\r
- Protocol: 0x01,\r
+ .Class = 0x03,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x01,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- KeyboardHID:\r
+ .KeyboardHID = \r
{ \r
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
\r
- HIDSpec: VERSION_BCD(01.11),\r
- CountryCode: 0x00,\r
- TotalHIDReports: 0x01,\r
- HIDReportType: DTYPE_Report,\r
- HIDReportLength: sizeof(KeyboardReport)\r
+ .HIDSpec = VERSION_BCD(01.11),\r
+ .CountryCode = 0x00,\r
+ .TotalHIDReports = 0x01,\r
+ .HIDReportType = DTYPE_Report,\r
+ .HIDReportLength = sizeof(KeyboardReport)\r
},\r
\r
- KeyboardEndpoint:\r
+ .KeyboardEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: KEYBOARD_EPSIZE,\r
- PollingIntervalMS: 0x04\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = KEYBOARD_EPSIZE,\r
+ .PollingIntervalMS = 0x04\r
},\r
\r
- KeyboardLEDsEndpoint:\r
+ .KeyboardLEDsEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | KEYBOARD_LEDS_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: KEYBOARD_EPSIZE,\r
- PollingIntervalMS: 0x04\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | KEYBOARD_LEDS_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = KEYBOARD_EPSIZE,\r
+ .PollingIntervalMS = 0x04\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(16), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(16), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Denver Gingerich"\r
+ .UnicodeString = L"Denver Gingerich"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Keyboard Demo"\r
+ .UnicodeString = L"LUFA Keyboard Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
\r
switch (DescriptorType)\r
{\r
- case DTYPE_Device:\r
+ case DTYPE_Device: \r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
}\r
\r
break;\r
- case DTYPE_HID:\r
+ case DTYPE_HID: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.KeyboardHID);\r
Size = sizeof(USB_Descriptor_HID_t);\r
break;\r
- case DTYPE_Report:\r
+ case DTYPE_Report: \r
Address = DESCRIPTOR_ADDRESS(KeyboardReport);\r
Size = sizeof(KeyboardReport);\r
break;\r
TASK_LIST\r
{\r
#if !defined(INTERRUPT_CONTROL_ENDPOINT)\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
#endif\r
\r
#if !defined(INTERRUPT_DATA_ENDPOINT)\r
- { Task: USB_Keyboard_Report , TaskStatus: TASK_STOP },\r
+ { .Task = USB_Keyboard_Report , .TaskStatus = TASK_STOP },\r
#endif\r
};\r
\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x204D,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x204D,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 2,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 2,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- KeyboardInterface:\r
+ .KeyboardInterface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0x00,\r
- AlternateSetting: 0x00,\r
+ .InterfaceNumber = 0x00,\r
+ .AlternateSetting = 0x00,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x03,\r
- SubClass: 0x01,\r
- Protocol: 0x01,\r
+ .Class = 0x03,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x01,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- KeyboardHID:\r
+ .KeyboardHID = \r
{ \r
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
\r
- HIDSpec: VERSION_BCD(01.11),\r
- CountryCode: 0x00,\r
- TotalHIDReports: 0x01,\r
- HIDReportType: DTYPE_Report,\r
- HIDReportLength: sizeof(KeyboardReport)\r
+ .HIDSpec = VERSION_BCD(01.11),\r
+ .CountryCode = 0x00,\r
+ .TotalHIDReports = 0x01,\r
+ .HIDReportType = DTYPE_Report,\r
+ .HIDReportLength = sizeof(KeyboardReport)\r
},\r
\r
- KeyboardInEndpoint:\r
+ .KeyboardInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_IN_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: HID_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_IN_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = HID_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
},\r
\r
- KeyboardOutEndpoint:\r
+ .KeyboardOutEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | KEYBOARD_OUT_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: HID_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | KEYBOARD_OUT_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = HID_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
},\r
\r
- MouseInterface:\r
+ .MouseInterface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0x01,\r
- AlternateSetting: 0x00,\r
+ .InterfaceNumber = 0x01,\r
+ .AlternateSetting = 0x00,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x03,\r
- SubClass: 0x01,\r
- Protocol: 0x02,\r
+ .Class = 0x03,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x02,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- MouseHID:\r
+ .MouseHID = \r
{ \r
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
\r
- HIDSpec: VERSION_BCD(01.11),\r
- CountryCode: 0x00,\r
- TotalHIDReports: 0x01,\r
- HIDReportType: DTYPE_Report,\r
- HIDReportLength: sizeof(MouseReport)\r
+ .HIDSpec = VERSION_BCD(01.11),\r
+ .CountryCode = 0x00,\r
+ .TotalHIDReports = 0x01,\r
+ .HIDReportType = DTYPE_Report,\r
+ .HIDReportLength = sizeof(MouseReport)\r
},\r
\r
- MouseInEndpoint:\r
+ .MouseInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_IN_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: HID_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_IN_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = HID_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(28), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(28), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Mouse and Keyboard Demo"\r
+ .UnicodeString = L"LUFA Mouse and Keyboard Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
\r
switch (DescriptorType)\r
{\r
- case DTYPE_Device:\r
+ case DTYPE_Device: \r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
}\r
\r
break;\r
- case DTYPE_HID:\r
+ case DTYPE_HID: \r
if (!(wIndex))\r
{\r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.KeyboardHID);\r
Size = sizeof(USB_Descriptor_HID_t); \r
}\r
break;\r
- case DTYPE_Report:\r
+ case DTYPE_Report: \r
if (!(wIndex))\r
{\r
Address = DESCRIPTOR_ADDRESS(KeyboardReport);\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Mouse , TaskStatus: TASK_RUN },\r
- { Task: USB_Keyboard , TaskStatus: TASK_RUN },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Mouse , .TaskStatus = TASK_RUN },\r
+ { .Task = USB_Keyboard , .TaskStatus = TASK_RUN },\r
};\r
\r
/* Global Variables */\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2048,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2048,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 2,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 2,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- AudioControlInterface:\r
+ .AudioControlInterface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 0,\r
+ .TotalEndpoints = 0,\r
\r
- Class: 0x01,\r
- SubClass: 0x01,\r
- Protocol: 0x00,\r
+ .Class = 0x01,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR \r
+ .InterfaceStrIndex = NO_DESCRIPTOR \r
},\r
\r
- AudioControlInterface_SPC:\r
+ .AudioControlInterface_SPC = \r
{\r
- Header: {Size: sizeof(USB_AudioInterface_AC_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_Header,\r
+ .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_Header,\r
\r
- ACSpecification: VERSION_BCD(01.00),\r
- TotalLength: sizeof(USB_AudioInterface_AC_t),\r
+ .ACSpecification = VERSION_BCD(01.00),\r
+ .TotalLength = sizeof(USB_AudioInterface_AC_t),\r
\r
- InCollection: 1,\r
- InterfaceNumbers: {1}, \r
+ .InCollection = 1,\r
+ .InterfaceNumbers = {1}, \r
},\r
\r
- AudioStreamInterface:\r
+ .AudioStreamInterface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x01,\r
- SubClass: 0x03,\r
- Protocol: 0x00,\r
+ .Class = 0x01,\r
+ .SubClass = 0x03,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- AudioStreamInterface_SPC:\r
+ .AudioStreamInterface_SPC = \r
{\r
- Header: {Size: sizeof(USB_AudioInterface_MIDI_AS_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_General,\r
+ .Header = {.Size = sizeof(USB_AudioInterface_MIDI_AS_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_General,\r
\r
- AudioSpecification: VERSION_BCD(01.00),\r
+ .AudioSpecification = VERSION_BCD(01.00),\r
\r
- TotalLength: (sizeof(USB_Descriptor_Configuration_t) - offsetof(USB_Descriptor_Configuration_t, AudioStreamInterface_SPC))\r
+ .TotalLength = (sizeof(USB_Descriptor_Configuration_t) - offsetof(USB_Descriptor_Configuration_t, AudioStreamInterface_SPC))\r
},\r
\r
- MIDI_In_Jack_Emb:\r
+ .MIDI_In_Jack_Emb = \r
{\r
- Header: {Size: sizeof(USB_MIDI_In_Jack_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_InputJack,\r
+ .Header = {.Size = sizeof(USB_MIDI_In_Jack_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_InputJack,\r
\r
- JackType: JACKTYPE_EMBEDDED,\r
- JackID: 0x01,\r
+ .JackType = JACKTYPE_EMBEDDED,\r
+ .JackID = 0x01,\r
\r
- JackStrIndex: NO_DESCRIPTOR\r
+ .JackStrIndex = NO_DESCRIPTOR\r
},\r
\r
- MIDI_In_Jack_Ext:\r
+ .MIDI_In_Jack_Ext = \r
{\r
- Header: {Size: sizeof(USB_MIDI_In_Jack_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_InputJack,\r
+ .Header = {.Size = sizeof(USB_MIDI_In_Jack_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_InputJack,\r
\r
- JackType: JACKTYPE_EXTERNAL,\r
- JackID: 0x02,\r
+ .JackType = JACKTYPE_EXTERNAL,\r
+ .JackID = 0x02,\r
\r
- JackStrIndex: NO_DESCRIPTOR\r
+ .JackStrIndex = NO_DESCRIPTOR\r
},\r
\r
- MIDI_Out_Jack_Emb:\r
+ .MIDI_Out_Jack_Emb = \r
{\r
- Header: {Size: sizeof(USB_MIDI_Out_Jack_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_OutputJack,\r
+ .Header = {.Size = sizeof(USB_MIDI_Out_Jack_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_OutputJack,\r
\r
- JackType: JACKTYPE_EMBEDDED,\r
- JackID: 0x03,\r
+ .JackType = JACKTYPE_EMBEDDED,\r
+ .JackID = 0x03,\r
\r
- NumberOfPins: 1,\r
- SourceJackID: {0x02},\r
- SourcePinID: {0x01},\r
+ .NumberOfPins = 1,\r
+ .SourceJackID = {0x02},\r
+ .SourcePinID = {0x01},\r
\r
- JackStrIndex: NO_DESCRIPTOR\r
+ .JackStrIndex = NO_DESCRIPTOR\r
},\r
\r
- MIDI_Out_Jack_Ext:\r
+ .MIDI_Out_Jack_Ext = \r
{\r
- Header: {Size: sizeof(USB_MIDI_Out_Jack_t), Type: DTYPE_AudioInterface},\r
- Subtype: DSUBTYPE_OutputJack,\r
+ .Header = {.Size = sizeof(USB_MIDI_Out_Jack_t), .Type = DTYPE_AudioInterface},\r
+ .Subtype = DSUBTYPE_OutputJack,\r
\r
- JackType: JACKTYPE_EXTERNAL,\r
- JackID: 0x04,\r
+ .JackType = JACKTYPE_EXTERNAL,\r
+ .JackID = 0x04,\r
\r
- NumberOfPins: 1,\r
- SourceJackID: {0x01},\r
- SourcePinID: {0x01},\r
+ .NumberOfPins = 1,\r
+ .SourceJackID = {0x01},\r
+ .SourcePinID = {0x01},\r
\r
- JackStrIndex: NO_DESCRIPTOR\r
+ .JackStrIndex = NO_DESCRIPTOR\r
},\r
\r
- MIDI_In_Jack_Endpoint:\r
+ .MIDI_In_Jack_Endpoint = \r
{\r
- Endpoint:\r
+ .Endpoint = \r
{\r
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Std_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | MIDI_STREAM_OUT_EPNUM),\r
- Attributes: (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
- EndpointSize: MIDI_STREAM_EPSIZE,\r
- PollingIntervalMS: 0\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MIDI_STREAM_OUT_EPNUM),\r
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = MIDI_STREAM_EPSIZE,\r
+ .PollingIntervalMS = 0\r
},\r
\r
- Refresh: 0,\r
- SyncEndpointNumber: 0\r
+ .Refresh = 0,\r
+ .SyncEndpointNumber = 0\r
},\r
\r
- MIDI_In_Jack_Endpoint_SPC:\r
+ .MIDI_In_Jack_Endpoint_SPC = \r
{\r
- Header: {Size: sizeof(USB_MIDI_Jack_Endpoint_t), Type: DTYPE_AudioEndpoint},\r
- Subtype: DSUBTYPE_General,\r
+ .Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint},\r
+ .Subtype = DSUBTYPE_General,\r
\r
- TotalEmbeddedJacks: 0x01,\r
- AssociatedJackID: {0x01}\r
+ .TotalEmbeddedJacks = 0x01,\r
+ .AssociatedJackID = {0x01}\r
},\r
\r
- MIDI_Out_Jack_Endpoint:\r
+ .MIDI_Out_Jack_Endpoint = \r
{\r
- Endpoint:\r
+ .Endpoint = \r
{\r
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Std_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | MIDI_STREAM_IN_EPNUM),\r
- Attributes: (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
- EndpointSize: MIDI_STREAM_EPSIZE,\r
- PollingIntervalMS: 0\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MIDI_STREAM_IN_EPNUM),\r
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),\r
+ .EndpointSize = MIDI_STREAM_EPSIZE,\r
+ .PollingIntervalMS = 0\r
},\r
\r
- Refresh: 0,\r
- SyncEndpointNumber: 0\r
+ .Refresh = 0,\r
+ .SyncEndpointNumber = 0\r
},\r
\r
- MIDI_Out_Jack_Endpoint_SPC:\r
+ .MIDI_Out_Jack_Endpoint_SPC = \r
{\r
- Header: {Size: sizeof(USB_MIDI_Jack_Endpoint_t), Type: DTYPE_AudioEndpoint},\r
- Subtype: DSUBTYPE_General,\r
+ .Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint},\r
+ .Subtype = DSUBTYPE_General,\r
\r
- TotalEmbeddedJacks: 0x01,\r
- AssociatedJackID: {0x03}\r
+ .TotalEmbeddedJacks = 0x01,\r
+ .AssociatedJackID = {0x03}\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(14), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(14), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA MIDI Demo"\r
+ .UnicodeString = L"LUFA MIDI Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
\r
switch (DescriptorType)\r
{\r
- case DTYPE_Device:\r
+ case DTYPE_Device: \r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_MIDI_Task , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_MIDI_Task , .TaskStatus = TASK_STOP },\r
};\r
\r
/** Main program entry point. This routine configures the hardware required by the application, then\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2045,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2045,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: 0x03,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = 0x03,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 1,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: USB_CONFIG_ATTR_BUSPOWERED,\r
+ .ConfigAttributes = USB_CONFIG_ATTR_BUSPOWERED,\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- Interface:\r
+ .Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x08,\r
- SubClass: 0x06,\r
- Protocol: 0x50,\r
+ .Class = 0x08,\r
+ .SubClass = 0x06,\r
+ .Protocol = 0x50,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- DataInEndpoint:\r
+ .DataInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | MASS_STORAGE_IN_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: MASS_STORAGE_IO_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MASS_STORAGE_IN_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = MASS_STORAGE_IO_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
},\r
\r
- DataOutEndpoint:\r
+ .DataOutEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | MASS_STORAGE_OUT_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: MASS_STORAGE_IO_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MASS_STORAGE_OUT_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = MASS_STORAGE_IO_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(22), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(22), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Mass Storage Demo"\r
+ .UnicodeString = L"LUFA Mass Storage Demo"\r
};\r
\r
/** Serial number descriptor string. This is a Unicode string containing a string of HEX characters at least 12\r
*/\r
USB_Descriptor_String_t PROGMEM SerialNumberString =\r
{\r
- Header: {Size: USB_STRING_LEN(12), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(12), .Type = DTYPE_String},\r
\r
- UnicodeString: L"000000000000"\r
+ .UnicodeString = L"000000000000"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
\r
switch (DescriptorType)\r
{\r
- case DTYPE_Device:\r
+ case DTYPE_Device: \r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
- case 0x03:\r
+ case 0x03: \r
Address = DESCRIPTOR_ADDRESS(SerialNumberString);\r
Size = pgm_read_byte(&SerialNumberString.Header.Size);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_MassStorage , TaskStatus: TASK_STOP },\r
+ { .Task = USB_MassStorage , .TaskStatus = TASK_STOP },\r
};\r
\r
/* Global Variables */\r
CommandBlockWrapper_t CommandBlock;\r
\r
/** Structure to hold the latest Command Status Wrapper to return to the host, containing the status of the last issued command. */\r
-CommandStatusWrapper_t CommandStatus = { Signature: CSW_SIGNATURE };\r
+CommandStatusWrapper_t CommandStatus = { .Signature = CSW_SIGNATURE };\r
\r
/** Flag to asynchronously abort any in-progress data transfers upon the reception of a mass storage reset command. */\r
volatile bool IsMassStoreReset = false;\r
*/\r
SCSI_Inquiry_Response_t InquiryData = \r
{\r
- DeviceType: 0,\r
- PeripheralQualifier: 0,\r
+ .DeviceType = 0,\r
+ .PeripheralQualifier = 0,\r
\r
- Removable: true,\r
+ .Removable = true,\r
\r
- Version: 0,\r
+ .Version = 0,\r
\r
- ResponseDataFormat: 2,\r
- NormACA: false,\r
- TrmTsk: false,\r
- AERC: false,\r
+ .ResponseDataFormat = 2,\r
+ .NormACA = false,\r
+ .TrmTsk = false,\r
+ .AERC = false,\r
\r
- AdditionalLength: 0x1F,\r
+ .AdditionalLength = 0x1F,\r
\r
- SoftReset: false,\r
- CmdQue: false,\r
- Linked: false,\r
- Sync: false,\r
- WideBus16Bit: false,\r
- WideBus32Bit: false,\r
- RelAddr: false,\r
+ .SoftReset = false,\r
+ .CmdQue = false,\r
+ .Linked = false,\r
+ .Sync = false,\r
+ .WideBus16Bit = false,\r
+ .WideBus32Bit = false,\r
+ .RelAddr = false,\r
\r
- VendorID: "LUFA",\r
- ProductID: "Dataflash Disk",\r
- RevisionID: {'0','.','0','0'},\r
+ .VendorID = "LUFA",\r
+ .ProductID = "Dataflash Disk",\r
+ .RevisionID = {'0','.','0','0'},\r
};\r
\r
/** Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE\r
*/\r
SCSI_Request_Sense_Response_t SenseData =\r
{\r
- ResponseCode: 0x70,\r
- AdditionalLength: 0x0A,\r
+ .ResponseCode = 0x70,\r
+ .AdditionalLength = 0x0A,\r
};\r
\r
\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2041,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2041,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 1,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- Interface:\r
+ .Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0x00,\r
- AlternateSetting: 0x00,\r
+ .InterfaceNumber = 0x00,\r
+ .AlternateSetting = 0x00,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x03,\r
- SubClass: 0x01,\r
- Protocol: 0x02,\r
+ .Class = 0x03,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x02,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- MouseHID:\r
+ .MouseHID = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
\r
- HIDSpec: VERSION_BCD(01.11),\r
- CountryCode: 0x00,\r
- TotalHIDReports: 0x01,\r
- HIDReportType: DTYPE_Report,\r
- HIDReportLength: sizeof(MouseReport)\r
+ .HIDSpec = VERSION_BCD(01.11),\r
+ .CountryCode = 0x00,\r
+ .TotalHIDReports = 0x01,\r
+ .HIDReportType = DTYPE_Report,\r
+ .HIDReportLength = sizeof(MouseReport)\r
},\r
\r
- MouseEndpoint:\r
+ .MouseEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: MOUSE_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = MOUSE_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
} \r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(15), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(15), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Mouse Demo"\r
+ .UnicodeString = L"LUFA Mouse Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
}\r
\r
break;\r
- case DTYPE_HID:\r
+ case DTYPE_HID: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.MouseHID);\r
Size = sizeof(USB_Descriptor_HID_t);\r
break;\r
- case DTYPE_Report:\r
+ case DTYPE_Report: \r
Address = DESCRIPTOR_ADDRESS(MouseReport);\r
Size = sizeof(MouseReport);\r
break;\r
TASK_LIST\r
{\r
#if !defined(INTERRUPT_CONTROL_ENDPOINT)\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
#endif\r
\r
#if !defined(INTERRUPT_DATA_ENDPOINT)\r
- { Task: USB_Mouse_Report , TaskStatus: TASK_STOP },\r
+ { .Task = USB_Mouse_Report , .TaskStatus = TASK_STOP },\r
#endif\r
};\r
\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x02,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x02,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x204C,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x204C,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 2,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 2,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- CCI_Interface:\r
+ .CCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x02,\r
- SubClass: 0x02,\r
- Protocol: 0xFF,\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0xFF,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC_Functional_Header:\r
+ .CDC_Functional_Header = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x00,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x00,\r
\r
- Data: {0x01, 0x10}\r
+ .Data = {0x01, 0x10}\r
},\r
\r
- CDC_Functional_CallManagement:\r
+ .CDC_Functional_CallManagement= \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x01,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x01,\r
\r
- Data: {0x00, 0x00}\r
+ .Data = {0x00, 0x00}\r
},\r
\r
- CDC_Functional_AbstractControlManagement:\r
+ .CDC_Functional_AbstractControlManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},\r
- SubType: 0x02,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
+ .SubType = 0x02,\r
\r
- Data: {0x00}\r
+ .Data = {0x00}\r
},\r
\r
- CDC_Functional_Union:\r
+ .CDC_Functional_Union = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x06,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x06,\r
\r
- Data: {0x00, 0x01}\r
+ .Data = {0x00, 0x01}\r
},\r
\r
- ManagementEndpoint:\r
+ .ManagementEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: CDC_NOTIFICATION_EPSIZE,\r
- PollingIntervalMS: 0x02\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,\r
+ .PollingIntervalMS = 0x02\r
},\r
\r
- DCI_Interface:\r
+ .DCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x0A,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x0A,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- DataOutEndpoint:\r
+ .DataOutEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
},\r
\r
- DataInEndpoint:\r
+ .DataInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(19), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA RNDIS CDC Demo"\r
+ .UnicodeString = L"LUFA RNDIS CDC Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: Ethernet_Task , TaskStatus: TASK_STOP },\r
- { Task: TCP_Task , TaskStatus: TASK_STOP },\r
- { Task: RNDIS_Task , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = Ethernet_Task , .TaskStatus = TASK_STOP },\r
+ { .Task = TCP_Task , .TaskStatus = TASK_STOP },\r
+ { .Task = RNDIS_Task , .TaskStatus = TASK_STOP },\r
};\r
\r
/** Main program entry point. This routine configures the hardware required by the application, then\r
{\r
USB_Notification_t Notification = (USB_Notification_t)\r
{\r
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
- bNotification: NOTIF_RESPONSE_AVAILABLE,\r
- wValue: 0,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ .bNotification = NOTIF_RESPONSE_AVAILABLE,\r
+ .wValue = 0,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Indicate that a message response is ready for the host */\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x02,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x02,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2044,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2044,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 2,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 2,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- CCI_Interface:\r
+ .CCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 0,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x02,\r
- SubClass: 0x02,\r
- Protocol: 0x01,\r
+ .Class = 0x02,\r
+ .SubClass = 0x02,\r
+ .Protocol = 0x01,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- CDC_Functional_IntHeader:\r
+ .CDC_Functional_IntHeader = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x00,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x00,\r
\r
- Data: {0x01, 0x10}\r
+ .Data = {0x01, 0x10}\r
},\r
\r
- CDC_Functional_CallManagement:\r
+ .CDC_Functional_CallManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x01,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x01,\r
\r
- Data: {0x03, 0x01}\r
+ .Data = {0x03, 0x01}\r
},\r
\r
- CDC_Functional_AbstractControlManagement:\r
+ .CDC_Functional_AbstractControlManagement = \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},\r
- SubType: 0x02,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},\r
+ .SubType = 0x02,\r
\r
- Data: {0x06}\r
+ .Data = {0x06}\r
},\r
\r
- CDC_Functional_Union:\r
+ .CDC_Functional_Union= \r
{\r
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},\r
- SubType: 0x06,\r
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},\r
+ .SubType = 0x06,\r
\r
- Data: {0x00, 0x01}\r
+ .Data = {0x00, 0x01}\r
},\r
\r
- ManagementEndpoint:\r
+ .ManagementEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: CDC_NOTIFICATION_EPSIZE,\r
- PollingIntervalMS: 0xFF\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,\r
+ .PollingIntervalMS = 0xFF\r
},\r
\r
- DCI_Interface:\r
+ .DCI_Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 2,\r
+ .TotalEndpoints = 2,\r
\r
- Class: 0x0A,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0x0A,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- DataOutEndpoint:\r
+ .DataOutEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS = 0x00\r
},\r
\r
- DataInEndpoint:\r
+ .DataInEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
- Attributes: EP_TYPE_BULK,\r
- EndpointSize: CDC_TXRX_EPSIZE,\r
- PollingIntervalMS: 0x00\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),\r
+ .Attributes = EP_TYPE_BULK,\r
+ .EndpointSize = CDC_TXRX_EPSIZE,\r
+ .PollingIntervalMS= 0x00\r
}\r
};\r
\r
*/\r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(19), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA USB-RS232 Demo"\r
+ .UnicodeString = L"LUFA USB-RS232 Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
\r
switch (DescriptorType)\r
{\r
- case DTYPE_Device:\r
+ case DTYPE_Device: \r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: CDC_Task , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = CDC_Task , .TaskStatus = TASK_STOP },\r
};\r
\r
/* Globals: */\r
* These values are set by the host via a class-specific request, and the physical USART should be reconfigured to match the\r
* new settings each time they are changed by the host.\r
*/\r
-CDC_Line_Coding_t LineCoding = { BaudRateBPS: 9600,\r
- CharFormat: OneStopBit,\r
- ParityType: Parity_None,\r
- DataBits: 8 };\r
+CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600,\r
+ .CharFormat = OneStopBit,\r
+ .ParityType = Parity_None,\r
+ .DataBits = 8 };\r
\r
/** Ring (circular) buffer to hold the RX data - data from the host to the attached device on the serial port. */\r
RingBuff_t Rx_Buffer;\r
\r
USB_Notification_Header_t Notification = (USB_Notification_Header_t)\r
{\r
- NotificationType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
- Notification: NOTIF_SerialState,\r
- wValue: 0,\r
- wIndex: 0,\r
- wLength: sizeof(uint16_t),\r
+ .NotificationType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ .Notification = NOTIF_SerialState,\r
+ .wValue = 0,\r
+ .wIndex = 0,\r
+ .wLength = sizeof(uint16_t),\r
};\r
\r
uint16_t LineStateMask;\r
/* Select the Serial Rx Endpoint */\r
Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
\r
+ /* Check to see if a packet has been received from the host */\r
if (Endpoint_IsOUTReceived())\r
{\r
/* Read the bytes in from the endpoint into the buffer while space is available */\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_CDC_Host , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_CDC_Host , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
/* Standard request to set the device configuration to configuration 1 */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetConfiguration,\r
- wValue: 1,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetConfiguration,\r
+ .wValue = 1,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_HID_Host , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_HID_Host , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
/* Class specific request to send a HID report to the device */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
- bRequest: REQ_SetReport,\r
- wValue: ((ReportType << 8) | ReportIndex),\r
- wIndex: 0,\r
- wLength: ReportLength,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ .bRequest = REQ_SetReport,\r
+ .wValue = ((ReportType << 8) | ReportIndex),\r
+ .wIndex = 0,\r
+ .wLength = ReportLength,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* Standard request to set the device configuration to configuration 1 */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetConfiguration,\r
- wValue: 1,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetConfiguration,\r
+ .wValue = 1,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Keyboard_Host , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Keyboard_Host , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
/* Standard request to set the device configuration to configuration 1 */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetConfiguration,\r
- wValue: 1,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetConfiguration,\r
+ .wValue = 1,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* HID class request to set the keyboard protocol to the Boot Protocol */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
- bRequest: REQ_SetProtocol,\r
- wValue: 0,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ .bRequest = REQ_SetProtocol,\r
+ .wValue = 0,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),\r
- bRequest: REQ_GetDescriptor,\r
- wValue: (DTYPE_Report << 8),\r
- wIndex: 0,\r
- wLength: HIDReportSize,\r
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),\r
+ .bRequest = REQ_GetDescriptor,\r
+ .wValue = (DTYPE_Report << 8),\r
+ .wIndex = 0,\r
+ .wLength = HIDReportSize,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Keyboard_Host , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Keyboard_Host , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
/* Standard request to set the device configuration to configuration 1 */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetConfiguration,\r
- wValue: 1,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetConfiguration,\r
+ .wValue = 1,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_MassStore_Host , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_MassStore_Host , .TaskStatus = TASK_STOP },\r
};\r
\r
/* Globals */\r
/* Standard request to set the device configuration to configuration 1 */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetConfiguration,\r
- wValue: 1,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetConfiguration,\r
+ .wValue = 1,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
{\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),\r
- bRequest: REQ_ClearFeature,\r
- wValue: FEATURE_ENDPOINT_HALT,\r
- wIndex: EndpointNum,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),\r
+ .bRequest = REQ_ClearFeature,\r
+ .wValue = FEATURE_ENDPOINT_HALT,\r
+ .wIndex = EndpointNum,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
{\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
- bRequest: REQ_MassStorageReset,\r
- wValue: 0,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ .bRequest = REQ_MassStorageReset,\r
+ .wValue = 0,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
- bRequest: REQ_GetMaxLUN,\r
- wValue: 0,\r
- wIndex: 0,\r
- wLength: 1,\r
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ .bRequest = REQ_GetMaxLUN,\r
+ .wValue = 0,\r
+ .wIndex = 0,\r
+ .wLength = 1,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* Create a CBW with a SCSI command to issue REQUEST SENSE command */\r
SCSICommandBlock = (CommandBlockWrapper_t)\r
{\r
- Header:\r
+ .Header =\r
{\r
- Signature: CBW_SIGNATURE,\r
- Tag: MassStore_Tag,\r
- DataTransferLength: sizeof(SCSI_Request_Sense_Response_t),\r
- Flags: COMMAND_DIRECTION_DATA_IN,\r
- LUN: LUNIndex,\r
- SCSICommandLength: 6\r
+ .Signature = CBW_SIGNATURE,\r
+ .Tag = MassStore_Tag,\r
+ .DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),\r
+ .Flags = COMMAND_DIRECTION_DATA_IN,\r
+ .LUN = LUNIndex,\r
+ .SCSICommandLength = 6\r
},\r
\r
- SCSICommandData:\r
+ .SCSICommandData =\r
{\r
SCSI_CMD_REQUEST_SENSE,\r
0x00, // Reserved\r
/* Create a CBW with a SCSI command to read in the given blocks from the device */\r
SCSICommandBlock = (CommandBlockWrapper_t)\r
{\r
- Header:\r
+ .Header =\r
{\r
- Signature: CBW_SIGNATURE,\r
- Tag: MassStore_Tag,\r
- DataTransferLength: ((uint32_t)Blocks * BlockSize),\r
- Flags: COMMAND_DIRECTION_DATA_IN,\r
- LUN: LUNIndex,\r
- SCSICommandLength: 10\r
+ .Signature = CBW_SIGNATURE,\r
+ .Tag = MassStore_Tag,\r
+ .DataTransferLength = ((uint32_t)Blocks * BlockSize),\r
+ .Flags = COMMAND_DIRECTION_DATA_IN,\r
+ .LUN = LUNIndex,\r
+ .SCSICommandLength = 10\r
},\r
\r
- SCSICommandData:\r
+ .SCSICommandData =\r
{\r
SCSI_CMD_READ_10,\r
0x00, // Unused (control bits, all off)\r
/* Create a CBW with a SCSI command to write the given blocks to the device */\r
SCSICommandBlock = (CommandBlockWrapper_t)\r
{\r
- Header:\r
+ .Header =\r
{\r
- Signature: CBW_SIGNATURE,\r
- Tag: MassStore_Tag,\r
- DataTransferLength: ((uint32_t)Blocks * BlockSize),\r
- Flags: COMMAND_DIRECTION_DATA_OUT,\r
- LUN: LUNIndex,\r
- SCSICommandLength: 10\r
+ .Signature = CBW_SIGNATURE,\r
+ .Tag = MassStore_Tag,\r
+ .DataTransferLength = ((uint32_t)Blocks * BlockSize),\r
+ .Flags = COMMAND_DIRECTION_DATA_OUT,\r
+ .LUN = LUNIndex,\r
+ .SCSICommandLength = 10\r
},\r
\r
- SCSICommandData:\r
+ .SCSICommandData =\r
{\r
SCSI_CMD_WRITE_10,\r
0x00, // Unused (control bits, all off)\r
/* Create a CBW with a SCSI command to issue TEST UNIT READY command */\r
SCSICommandBlock = (CommandBlockWrapper_t)\r
{\r
- Header:\r
+ .Header =\r
{\r
- Signature: CBW_SIGNATURE,\r
- Tag: MassStore_Tag,\r
- DataTransferLength: 0,\r
- Flags: COMMAND_DIRECTION_DATA_IN,\r
- LUN: LUNIndex,\r
- SCSICommandLength: 6\r
+ .Signature = CBW_SIGNATURE,\r
+ .Tag = MassStore_Tag,\r
+ .DataTransferLength = 0,\r
+ .Flags = COMMAND_DIRECTION_DATA_IN,\r
+ .LUN = LUNIndex,\r
+ .SCSICommandLength = 6\r
},\r
\r
- SCSICommandData:\r
+ .SCSICommandData =\r
{\r
SCSI_CMD_TEST_UNIT_READY,\r
0x00, // Reserved\r
/* Create a CBW with a SCSI command to issue READ CAPACITY command */\r
SCSICommandBlock = (CommandBlockWrapper_t)\r
{\r
- Header:\r
+ .Header =\r
{\r
- Signature: CBW_SIGNATURE,\r
- Tag: MassStore_Tag,\r
- DataTransferLength: 8,\r
- Flags: COMMAND_DIRECTION_DATA_IN,\r
- LUN: LUNIndex,\r
- SCSICommandLength: 10\r
+ .Signature = CBW_SIGNATURE,\r
+ .Tag = MassStore_Tag,\r
+ .DataTransferLength = 8,\r
+ .Flags = COMMAND_DIRECTION_DATA_IN,\r
+ .LUN = LUNIndex,\r
+ .SCSICommandLength = 10\r
},\r
\r
- SCSICommandData:\r
+ .SCSICommandData =\r
{\r
SCSI_CMD_READ_CAPACITY_10,\r
0x00, // Reserved\r
/* Create a CBW with a SCSI command to issue PREVENT ALLOW MEDIUM REMOVAL command */\r
SCSICommandBlock = (CommandBlockWrapper_t)\r
{\r
- Header:\r
+ .Header =\r
{\r
- Signature: CBW_SIGNATURE,\r
- Tag: MassStore_Tag,\r
- DataTransferLength: 0,\r
- Flags: COMMAND_DIRECTION_DATA_OUT,\r
- LUN: LUNIndex,\r
- SCSICommandLength: 6\r
+ .Signature = CBW_SIGNATURE,\r
+ .Tag = MassStore_Tag,\r
+ .DataTransferLength = 0,\r
+ .Flags = COMMAND_DIRECTION_DATA_OUT,\r
+ .LUN = LUNIndex,\r
+ .SCSICommandLength = 6\r
},\r
\r
- SCSICommandData:\r
+ .SCSICommandData =\r
{\r
SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL,\r
0x00, // Reserved\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Mouse_Host , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Mouse_Host , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
/* Standard request to set the device configuration to configuration 1 */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetConfiguration,\r
- wValue: 1,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetConfiguration,\r
+ .wValue = 1,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* HID class request to set the mouse protocol to the Boot Protocol */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
- bRequest: REQ_SetProtocol,\r
- wValue: 0,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
+ .bRequest = REQ_SetProtocol,\r
+ .wValue = 0,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),\r
- bRequest: REQ_GetDescriptor,\r
- wValue: (DTYPE_Report << 8),\r
- wIndex: 0,\r
- wLength: HIDReportSize,\r
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),\r
+ .bRequest = REQ_GetDescriptor,\r
+ .wValue = (DTYPE_Report << 8),\r
+ .wIndex = 0,\r
+ .wLength = HIDReportSize,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Mouse_Host , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Mouse_Host , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
/* Standard request to set the device configuration to configuration 1 */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetConfiguration,\r
- wValue: 1,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetConfiguration,\r
+ .wValue = 1,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
{\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),\r
- bRequest: REQ_ClearFeature,\r
- wValue: FEATURE_ENDPOINT_HALT,\r
- wIndex: EndpointNum,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),\r
+ .bRequest = REQ_ClearFeature,\r
+ .wValue = FEATURE_ENDPOINT_HALT,\r
+ .wIndex = EndpointNum,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_SImage_Host , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_SImage_Host , .TaskStatus = TASK_STOP },\r
};\r
\r
\r
/* Standard request to set the device configuration to configuration 1 */\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetConfiguration,\r
- wValue: 1,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetConfiguration,\r
+ .wValue = 1,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
/* Select the control pipe for the request transfer */\r
\r
PIMA_SendBlock = (PIMA_Container_t)\r
{\r
- DataLength: PIMA_COMMAND_SIZE(0),\r
- Type: CType_CommandBlock,\r
- Code: PIMA_OPERATION_GETDEVICEINFO,\r
- TransactionID: 0x00000000,\r
- Params: {},\r
+ .DataLength = PIMA_COMMAND_SIZE(0),\r
+ .Type = CType_CommandBlock,\r
+ .Code = PIMA_OPERATION_GETDEVICEINFO,\r
+ .TransactionID = 0x00000000,\r
+ .Params = {},\r
};\r
\r
/* Send the GETDEVICEINFO block */\r
\r
PIMA_SendBlock = (PIMA_Container_t)\r
{\r
- DataLength: PIMA_COMMAND_SIZE(1),\r
- Type: CType_CommandBlock,\r
- Code: PIMA_OPERATION_OPENSESSION,\r
- TransactionID: 0x00000000,\r
- Params: {0x00000001},\r
+ .DataLength = PIMA_COMMAND_SIZE(1),\r
+ .Type = CType_CommandBlock,\r
+ .Code = PIMA_OPERATION_OPENSESSION,\r
+ .TransactionID = 0x00000000,\r
+ .Params = {0x00000001},\r
};\r
\r
/* Send the OPENSESSION block, open a session with an ID of 0x0001 */\r
\r
PIMA_SendBlock = (PIMA_Container_t)\r
{\r
- DataLength: PIMA_COMMAND_SIZE(1),\r
- Type: CType_CommandBlock,\r
- Code: PIMA_OPERATION_CLOSESESSION,\r
- TransactionID: 0x00000001,\r
- Params: {0x00000001},\r
+ .DataLength = PIMA_COMMAND_SIZE(1),\r
+ .Type = CType_CommandBlock,\r
+ .Code = PIMA_OPERATION_CLOSESESSION,\r
+ .TransactionID = 0x00000001,\r
+ .Params = {0x00000001},\r
};\r
\r
/* Send the CLOSESESSION block, close the session with an ID of 0x0001 */\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2040,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2040,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: ( sizeof(USB_Descriptor_Configuration_Header_t)\r
- + sizeof(USB_Descriptor_Interface_t) ),\r
+ .TotalConfigurationSize = ( sizeof(USB_Descriptor_Configuration_Header_t)\r
+ + sizeof(USB_Descriptor_Interface_t) ),\r
\r
- TotalInterfaces: 1,\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- Interface:\r
+ .Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 1,\r
- AlternateSetting: 0,\r
+ .InterfaceNumber = 1,\r
+ .AlternateSetting = 0,\r
\r
- TotalEndpoints: 0,\r
+ .TotalEndpoints = 0,\r
\r
- Class: 0xFF,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .Class = 0xFF,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
};\r
\r
*/ \r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera"\r
+ .UnicodeString = L"Dean Camera"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(9), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(9), .Type = DTYPE_String},\r
\r
- UnicodeString: L"LUFA Demo"\r
+ .UnicodeString = L"LUFA Demo"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);\r
Size = sizeof(USB_Descriptor_Device_t);\r
break;\r
- case DTYPE_Configuration:\r
+ case DTYPE_Configuration: \r
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);\r
Size = sizeof(USB_Descriptor_Configuration_t);\r
break;\r
- case DTYPE_String:\r
+ case DTYPE_String: \r
switch (DescriptorNumber)\r
{\r
- case 0x00:\r
+ case 0x00: \r
Address = DESCRIPTOR_ADDRESS(LanguageString);\r
Size = pgm_read_byte(&LanguageString.Header.Size);\r
break;\r
- case 0x01:\r
+ case 0x01: \r
Address = DESCRIPTOR_ADDRESS(ManufacturerString);\r
Size = pgm_read_byte(&ManufacturerString.Header.Size);\r
break;\r
- case 0x02:\r
+ case 0x02: \r
Address = DESCRIPTOR_ADDRESS(ProductString);\r
Size = pgm_read_byte(&ProductString.Header.Size);\r
break;\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: TestApp_CheckJoystick, TaskStatus: TASK_RUN },\r
- { Task: TestApp_CheckHWB , TaskStatus: TASK_RUN },\r
- { Task: TestApp_CheckTemp , TaskStatus: TASK_RUN },\r
- { Task: USB_USBTask , TaskStatus: TASK_RUN },\r
+ { .Task = TestApp_CheckJoystick, .TaskStatus = TASK_RUN },\r
+ { .Task = TestApp_CheckHWB , .TaskStatus = TASK_RUN },\r
+ { .Task = TestApp_CheckTemp , .TaskStatus = TASK_RUN },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_RUN },\r
};\r
\r
/** Main program entry point. This routine configures the hardware required by the application, then\r
* - Fixed incorrect HID interface class and subclass values in the Mouse and KeyboardMouse demos (thanks to Brian Dickman)\r
* - Capitalised the "Descriptor_Search" and "Descriptor_Search_Comp" prefixes of the values in the DSearch_Return_ErrorCodes_t and\r
* DSearch_Comp_Return_ErrorCodes_t enums\r
+ * - Changed over all deprecated GCC structure tag initializers to the standardized C99 format (thanks to Mike Alexander)\r
* \r
*\r
* \section Sec_ChangeLog090401 Version 090401\r
\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_GetDescriptor,\r
- wValue: (DTYPE_Configuration << 8),\r
- wIndex: 0,\r
- wLength: sizeof(USB_Descriptor_Configuration_Header_t),\r
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_GetDescriptor,\r
+ .wValue = (DTYPE_Configuration << 8),\r
+ .wIndex = 0,\r
+ .wLength = sizeof(USB_Descriptor_Configuration_Header_t),\r
};\r
\r
Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
case HOST_STATE_Default:\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_GetDescriptor,\r
- wValue: (DTYPE_Device << 8),\r
- wIndex: 0,\r
- wLength: PIPE_CONTROLPIPE_DEFAULT_SIZE,\r
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_GetDescriptor,\r
+ .wValue = (DTYPE_Device << 8),\r
+ .wIndex = 0,\r
+ .wLength = PIPE_CONTROLPIPE_DEFAULT_SIZE,\r
};\r
\r
uint8_t DataBuffer[PIPE_CONTROLPIPE_DEFAULT_SIZE];\r
\r
USB_HostRequest = (USB_Host_Request_Header_t)\r
{\r
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
- bRequest: REQ_SetAddress,\r
- wValue: USB_HOST_DEVICEADDRESS,\r
- wIndex: 0,\r
- wLength: 0,\r
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),\r
+ .bRequest = REQ_SetAddress,\r
+ .wValue = USB_HOST_DEVICEADDRESS,\r
+ .wIndex = 0,\r
+ .wLength = 0,\r
};\r
\r
if ((SubErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)\r
*\r
* \ingroup Group_PipeRW\r
*/\r
- static inline void Pipe_Ignore_DWord(void) ATTR_ALWAYS_INLINE;\r
- static inline void Pipe_Ignore_DWord(void)\r
+ static inline void Pipe_Discard_DWord(void) ATTR_ALWAYS_INLINE;\r
+ static inline void Pipe_Discard_DWord(void)\r
{\r
uint8_t Dummy;\r
\r
/** Spinloops until the currently selected non-control pipe is ready for the next packed of data\r
* to be read or written to it.\r
*\r
- * \note This routine should not be called on CONTROL type pipes.\r
- *\r
* \ingroup Group_PipeRW\r
*\r
* \return A value from the Pipe_WaitUntilReady_ErrorCodes_t enum.\r
uint8_t Mem_Block_Flags[(NUM_BLOCKS / 4) + ((NUM_BLOCKS % 4) ? 1 : 0)];\r
uint8_t FlagMaskLookupMask[4];\r
uint8_t FlagMaskLookupNum[4];\r
-} Mem_MemData = {FlagMaskLookupMask: {(3 << 0), (3 << 2), (3 << 4), (3 << 6)},\r
- FlagMaskLookupNum: { 0, 2, 4, 6}};\r
+} Mem_MemData = {.FlagMaskLookupMask = {(3 << 0), (3 << 2), (3 << 4), (3 << 6)},\r
+ .FlagMaskLookupNum = { 0, 2, 4, 6}};\r
\r
static uint8_t Mem_GetBlockFlags(const Block_Number_t BlockNum)\r
{\r
* - All pipe read/write/discard aliases which did not have an explicitly endianness specifier (such as Pipe_Read_Word()) have\r
* been removed for clarity. Existing projects should use the "_LE" suffix on such calls to use the explicit Little Endian versions.\r
* - The Host_IsResetBusDone() macro has been renamed to Host_IsBusResetComplete().\r
- * - The Pipe_Ignore_Word() function has been renamed to Pipe_Discard_Word() to remain consistent with the rest of the pipe API.\r
+ * - The Pipe_Ignore_Word() and Pipe_Ignore_DWord() functions have been renamed to Pipe_Discard_Word() and Pipe_Discard_DWord() to remain\r
+ * consistent with the rest of the pipe API.\r
* - It is no longer needed to manually include the headers from LUFA/Drivers/USB/Class, as they are now included along with the rest\r
* of the USB headers when LUFA/Drivers/USB/USB.h is included.\r
* - Functions in the ConfigDescriptor.h header file no longer have "Host_" as part of their names.\r
* \r
* TASK_LIST\r
* {\r
- * { Task: MyTask1, TaskStatus: TASK_RUN, GroupID: 1 },\r
- * { Task: MyTask2, TaskStatus: TASK_RUN, GroupID: 1 },\r
+ * { .Task = MyTask1, .TaskStatus = TASK_RUN, .GroupID = 1 },\r
+ * { .Task = MyTask2, .TaskStatus = TASK_RUN, .GroupID = 1 },\r
* }\r
*\r
* int main(void)\r
* \code\r
* TASK_LIST\r
* {\r
- * { Task: MyTask1, TaskStatus: TASK_RUN, GroupID: 1 },\r
+ * { .Task = MyTask1, .TaskStatus = TASK_RUN, .GroupID = 1 },\r
* // More task entries here\r
* }\r
* \endcode\r
*/\r
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =\r
{\r
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},\r
\r
- USBSpecification: VERSION_BCD(01.10),\r
- Class: 0x00,\r
- SubClass: 0x00,\r
- Protocol: 0x00,\r
+ .USBSpecification = VERSION_BCD(01.10),\r
+ .Class = 0x00,\r
+ .SubClass = 0x00,\r
+ .Protocol = 0x00,\r
\r
- Endpoint0Size: 8,\r
+ .Endpoint0Size = 8,\r
\r
- VendorID: 0x03EB,\r
- ProductID: 0x2042,\r
- ReleaseNumber: 0x0000,\r
+ .VendorID = 0x03EB,\r
+ .ProductID = 0x2042,\r
+ .ReleaseNumber = 0x0000,\r
\r
- ManufacturerStrIndex: 0x01,\r
- ProductStrIndex: 0x02,\r
- SerialNumStrIndex: NO_DESCRIPTOR,\r
+ .ManufacturerStrIndex = 0x01,\r
+ .ProductStrIndex = 0x02,\r
+ .SerialNumStrIndex = NO_DESCRIPTOR,\r
\r
- NumberOfConfigurations: 1\r
+ .NumberOfConfigurations = 1\r
};\r
\r
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage\r
*/\r
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =\r
{\r
- Config:\r
+ .Config = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},\r
\r
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),\r
- TotalInterfaces: 1,\r
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),\r
+ .TotalInterfaces = 1,\r
\r
- ConfigurationNumber: 1,\r
- ConfigurationStrIndex: NO_DESCRIPTOR,\r
+ .ConfigurationNumber = 1,\r
+ .ConfigurationStrIndex = NO_DESCRIPTOR,\r
\r
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),\r
\r
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)\r
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)\r
},\r
\r
- Interface:\r
+ .Interface = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},\r
\r
- InterfaceNumber: 0x00,\r
- AlternateSetting: 0x00,\r
+ .InterfaceNumber = 0x00,\r
+ .AlternateSetting = 0x00,\r
\r
- TotalEndpoints: 1,\r
+ .TotalEndpoints = 1,\r
\r
- Class: 0x03,\r
- SubClass: 0x01,\r
- Protocol: 0x01,\r
+ .Class = 0x03,\r
+ .SubClass = 0x01,\r
+ .Protocol = 0x01,\r
\r
- InterfaceStrIndex: NO_DESCRIPTOR\r
+ .InterfaceStrIndex = NO_DESCRIPTOR\r
},\r
\r
- KeyboardHID:\r
+ .KeyboardHID = \r
{ \r
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},\r
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},\r
\r
- HIDSpec: VERSION_BCD(01.11),\r
- CountryCode: 0x00,\r
- TotalHIDReports: 0x01,\r
- HIDReportType: DTYPE_Report,\r
- HIDReportLength: sizeof(KeyboardReport)\r
+ .HIDSpec = VERSION_BCD(01.11),\r
+ .CountryCode = 0x00,\r
+ .TotalHIDReports = 0x01,\r
+ .HIDReportType = DTYPE_Report,\r
+ .HIDReportLength = sizeof(KeyboardReport)\r
},\r
\r
- KeyboardEndpoint:\r
+ .KeyboardEndpoint = \r
{\r
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},\r
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},\r
\r
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM),\r
- Attributes: EP_TYPE_INTERRUPT,\r
- EndpointSize: KEYBOARD_EPSIZE,\r
- PollingIntervalMS: 0x04\r
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM),\r
+ .Attributes = EP_TYPE_INTERRUPT,\r
+ .EndpointSize = KEYBOARD_EPSIZE,\r
+ .PollingIntervalMS = 0x04\r
},\r
};\r
\r
* via the language ID table available at USB.org what languages the device supports for its string descriptors. */ \r
USB_Descriptor_String_t PROGMEM LanguageString =\r
{\r
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},\r
\r
- UnicodeString: {LANGUAGE_ID_ENG}\r
+ .UnicodeString = {LANGUAGE_ID_ENG}\r
};\r
\r
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable\r
*/\r
USB_Descriptor_String_t PROGMEM ManufacturerString =\r
{\r
- Header: {Size: USB_STRING_LEN(32), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(32), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Dean Camera and Denver Gingerich"\r
+ .UnicodeString = L"Dean Camera and Denver Gingerich"\r
};\r
\r
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,\r
*/\r
USB_Descriptor_String_t PROGMEM ProductString =\r
{\r
- Header: {Size: USB_STRING_LEN(20), Type: DTYPE_String},\r
+ .Header = {.Size = USB_STRING_LEN(20), .Type = DTYPE_String},\r
\r
- UnicodeString: L"Magnetic Card Reader"\r
+ .UnicodeString = L"Magnetic Card Reader"\r
};\r
\r
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
- { Task: USB_USBTask , TaskStatus: TASK_STOP },\r
- { Task: USB_Keyboard_Report , TaskStatus: TASK_STOP },\r
- { Task: Magstripe_Read , TaskStatus: TASK_STOP },\r
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },\r
+ { .Task = USB_Keyboard_Report , .TaskStatus = TASK_STOP },\r
+ { .Task = Magstripe_Read , .TaskStatus = TASK_STOP },\r
};\r
\r
/* Global Variables */\r