aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bootloaders/CDC/BootloaderCDC.c8
-rw-r--r--Bootloaders/CDC/Descriptors.c154
-rw-r--r--Bootloaders/DFU/BootloaderDFU.c12
-rw-r--r--Bootloaders/DFU/Descriptors.c84
-rw-r--r--Bootloaders/TeensyHID/Descriptors.c94
-rw-r--r--Demos/Device/AudioInput/AudioInput.c4
-rw-r--r--Demos/Device/AudioInput/Descriptors.c232
-rw-r--r--Demos/Device/AudioOutput/AudioOutput.c4
-rw-r--r--Demos/Device/AudioOutput/Descriptors.c224
-rw-r--r--Demos/Device/CDC/CDC.c22
-rw-r--r--Demos/Device/CDC/Descriptors.c168
-rw-r--r--Demos/Device/DualCDC/Descriptors.c304
-rw-r--r--Demos/Device/DualCDC/DualCDC.c22
-rw-r--r--Demos/Device/GenericHID/Descriptors.c124
-rw-r--r--Demos/Device/GenericHID/GenericHID.c4
-rw-r--r--Demos/Device/Joystick/Descriptors.c112
-rw-r--r--Demos/Device/Joystick/Joystick.c4
-rw-r--r--Demos/Device/Keyboard/Descriptors.c126
-rw-r--r--Demos/Device/Keyboard/Keyboard.c4
-rw-r--r--Demos/Device/KeyboardMouse/Descriptors.c170
-rw-r--r--Demos/Device/KeyboardMouse/KeyboardMouse.c6
-rw-r--r--Demos/Device/MIDI/Descriptors.c242
-rw-r--r--Demos/Device/MIDI/MIDI.c4
-rw-r--r--Demos/Device/MassStorage/Descriptors.c114
-rw-r--r--Demos/Device/MassStorage/MassStorage.c4
-rw-r--r--Demos/Device/MassStorage/SCSI.c42
-rw-r--r--Demos/Device/Mouse/Descriptors.c102
-rw-r--r--Demos/Device/Mouse/Mouse.c4
-rw-r--r--Demos/Device/RNDISEthernet/Descriptors.c160
-rw-r--r--Demos/Device/RNDISEthernet/RNDISEthernet.c18
-rw-r--r--Demos/Device/USBtoSerial/Descriptors.c170
-rw-r--r--Demos/Device/USBtoSerial/USBtoSerial.c23
-rw-r--r--Demos/Host/CDCHost/CDCHost.c14
-rw-r--r--Demos/Host/GenericHIDHost/GenericHIDHost.c24
-rw-r--r--Demos/Host/KeyboardHost/KeyboardHost.c24
-rw-r--r--Demos/Host/KeyboardHostWithParser/HIDReport.c10
-rw-r--r--Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c14
-rw-r--r--Demos/Host/MassStorageHost/MassStorageHost.c14
-rw-r--r--Demos/Host/MassStorageHost/MassStoreCommands.c126
-rw-r--r--Demos/Host/MouseHost/MouseHost.c24
-rw-r--r--Demos/Host/MouseHostWithParser/HIDReport.c10
-rw-r--r--Demos/Host/MouseHostWithParser/MouseHostWithParser.c14
-rw-r--r--Demos/Host/StillImageHost/StillImageCommands.c10
-rw-r--r--Demos/Host/StillImageHost/StillImageHost.c44
-rw-r--r--Demos/OTG/TestApp/Descriptors.c84
-rw-r--r--Demos/OTG/TestApp/TestApp.c8
-rw-r--r--LUFA/ChangeLog.txt1
-rw-r--r--LUFA/Drivers/USB/Class/ConfigDescriptor.c10
-rw-r--r--LUFA/Drivers/USB/HighLevel/USBTask.c20
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.h6
-rw-r--r--LUFA/MemoryAllocator/DynAlloc.c4
-rw-r--r--LUFA/MigrationInformation.txt3
-rw-r--r--LUFA/Scheduler/Scheduler.h6
-rw-r--r--Projects/Magstripe/Descriptors.c98
-rw-r--r--Projects/Magstripe/Magstripe.c6
55 files changed, 1670 insertions, 1669 deletions
diff --git a/Bootloaders/CDC/BootloaderCDC.c b/Bootloaders/CDC/BootloaderCDC.c
index cb2672c75..9cdb77695 100644
--- a/Bootloaders/CDC/BootloaderCDC.c
+++ b/Bootloaders/CDC/BootloaderCDC.c
@@ -43,10 +43,10 @@
* current encoding options, including baud rate, character format, parity mode and total number of
* bits in each data chunk.
*/
-CDC_Line_Coding_t LineCoding = { BaudRateBPS: 9600,
- CharFormat: OneStopBit,
- ParityType: Parity_None,
- DataBits: 8 };
+CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600,
+ .CharFormat = OneStopBit,
+ .ParityType = Parity_None,
+ .DataBits = 8 };
/** Current address counter. This stores the current address of the FLASH or EEPROM as set by the host,
* and is used when reading or writing to the AVRs memory (either FLASH or EEPROM depending on the issued
diff --git a/Bootloaders/CDC/Descriptors.c b/Bootloaders/CDC/Descriptors.c
index bfa66a738..e9787cf7f 100644
--- a/Bootloaders/CDC/Descriptors.c
+++ b/Bootloaders/CDC/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x02,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x02,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: FIXED_CONTROL_ENDPOINT_SIZE,
+ .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
- VendorID: 0x03EB,
- ProductID: 0x204A,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x204A,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: NO_DESCRIPTOR,
- ProductStrIndex: 0x01,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = NO_DESCRIPTOR,
+ .ProductStrIndex = 0x01,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in SRAM memory, describes the usage
@@ -71,113 +71,113 @@ USB_Descriptor_Device_t DeviceDescriptor =
*/
USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 2,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- CCI_Interface:
+ .CCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x02,
- SubClass: 0x02,
- Protocol: 0x01,
+ .Class = 0x02,
+ .SubClass = 0x02,
+ .Protocol = 0x01,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- CDC_Functional_IntHeader:
+ .CDC_Functional_IntHeader =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x00,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x00,
- Data: {0x10, 0x01}
+ .Data = {0x10, 0x01}
},
- CDC_Functional_CallManagement:
+ .CDC_Functional_CallManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x01,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x01,
- Data: {0x03, 0x01}
+ .Data = {0x03, 0x01}
},
- CDC_Functional_AbstractControlManagement:
+ .CDC_Functional_AbstractControlManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},
- SubType: 0x02,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
+ .SubType = 0x02,
- Data: {0x06}
+ .Data = {0x06}
},
- CDC_Functional_Union:
+ .CDC_Functional_Union =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x06,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x06,
- Data: {0x00, 0x01}
+ .Data = {0x00, 0x01}
},
- ManagementEndpoint:
+ .ManagementEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: CDC_NOTIFICATION_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,
+ .PollingIntervalMS = 0x02
},
- DCI_Interface:
+ .DCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x0A,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x0A,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- DataOutEndpoint:
+ .DataOutEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
},
- DataInEndpoint:
+ .DataInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
}
};
@@ -187,9 +187,9 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
*/
USB_Descriptor_String_t LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -198,9 +198,9 @@ USB_Descriptor_String_t LanguageString =
*/
USB_Descriptor_String_t ProductString =
{
- Header: {Size: USB_STRING_LEN(15), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(15), .Type = DTYPE_String},
- UnicodeString: L"AVR CDC Bootloader"
+ .UnicodeString = L"AVR CDC Bootloader"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c
index f3580163e..00c1ea54b 100644
--- a/Bootloaders/DFU/BootloaderDFU.c
+++ b/Bootloaders/DFU/BootloaderDFU.c
@@ -225,7 +225,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
{
uint16_t Words[2];
uint32_t Long;
- } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};
+ } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}};
uint32_t CurrFlashPageStartAddress = CurrFlashAddress.Long;
uint8_t WordsInFlashPage = 0;
@@ -336,7 +336,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
{
uint16_t Words[2];
uint32_t Long;
- } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};
+ } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}};
while (WordsRemaining--)
{
@@ -531,8 +531,8 @@ static void LoadStartEndAddresses(void)
{
uint8_t Bytes[2];
uint16_t Word;
- } Address[2] = {{Bytes: {SentCommand.Data[2], SentCommand.Data[1]}},
- {Bytes: {SentCommand.Data[4], SentCommand.Data[3]}}};
+ } Address[2] = {{.Bytes = {SentCommand.Data[2], SentCommand.Data[1]}},
+ {.Bytes = {SentCommand.Data[4], SentCommand.Data[3]}}};
/* Load in the start and ending read addresses from the sent data packet */
StartAddr = Address[0].Word;
@@ -557,7 +557,7 @@ static void ProcessMemProgCommand(void)
{
uint16_t Words[2];
uint32_t Long;
- } CurrFlashAddress = {Words: {StartAddr, Flash64KBPage}};
+ } CurrFlashAddress = {.Words = {StartAddr, Flash64KBPage}};
/* Erase the current page's temp buffer */
boot_page_erase(CurrFlashAddress.Long);
@@ -639,7 +639,7 @@ static void ProcessWriteCommand(void)
{
uint8_t Bytes[2];
AppPtr_t FuncPtr;
- } Address = {Bytes: {SentCommand.Data[4], SentCommand.Data[3]}};
+ } Address = {.Bytes = {SentCommand.Data[4], SentCommand.Data[3]}};
AppStartPtr = Address.FuncPtr;
diff --git a/Bootloaders/DFU/Descriptors.c b/Bootloaders/DFU/Descriptors.c
index 1313118c9..3e8978a92 100644
--- a/Bootloaders/DFU/Descriptors.c
+++ b/Bootloaders/DFU/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: FIXED_CONTROL_ENDPOINT_SIZE,
+ .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
- VendorID: 0x03EB,
- ProductID: PRODUCT_ID_CODE,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = PRODUCT_ID_CODE,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: NO_DESCRIPTOR,
- ProductStrIndex: 0x01,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = NO_DESCRIPTOR,
+ .ProductStrIndex = 0x01,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,47 +71,47 @@ USB_Descriptor_Device_t DeviceDescriptor =
*/
USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 1,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- DFUInterface:
+ .DFUInterface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 0,
+ .TotalEndpoints = 0,
- Class: 0xFE,
- SubClass: 0x01,
- Protocol: 0x02,
+ .Class = 0xFE,
+ .SubClass = 0x01,
+ .Protocol = 0x02,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- DFUFunctional:
+ .DFUFunctional =
{
- Header: {Size: sizeof(USB_DFU_Functional_Descriptor_t), Type: DTYPE_DFUFunctional},
+ .Header = {.Size = sizeof(USB_DFU_Functional_Descriptor_t), .Type = DTYPE_DFUFunctional},
- Attributes: (ATTR_CAN_UPLOAD | ATTR_CAN_DOWNLOAD),
+ .Attributes = (ATTR_CAN_UPLOAD | ATTR_CAN_DOWNLOAD),
- DetatchTimeout: 0x0000,
- TransferSize: 0x0c00,
+ .DetatchTimeout = 0x0000,
+ .TransferSize = 0x0c00,
- DFUSpecification: VERSION_BCD(01.01)
+ .DFUSpecification = VERSION_BCD(01.01)
}
};
@@ -121,9 +121,9 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
*/
USB_Descriptor_String_t LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -132,9 +132,9 @@ USB_Descriptor_String_t LanguageString =
*/
USB_Descriptor_String_t ProductString =
{
- Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},
- UnicodeString: L"AVR DFU Bootloader"
+ .UnicodeString = L"AVR DFU Bootloader"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -157,11 +157,11 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
if (!(DescriptorNumber))
{
Address = DESCRIPTOR_ADDRESS(LanguageString);
diff --git a/Bootloaders/TeensyHID/Descriptors.c b/Bootloaders/TeensyHID/Descriptors.c
index d17f4cfdc..68b9c4306 100644
--- a/Bootloaders/TeensyHID/Descriptors.c
+++ b/Bootloaders/TeensyHID/Descriptors.c
@@ -64,24 +64,24 @@ USB_Descriptor_HIDReport_Datatype_t HIDReport[] =
*/
USB_Descriptor_Device_t DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x16C0,
- ProductID: 0x0478,
- ReleaseNumber: 0x0010,
+ .VendorID = 0x16C0,
+ .ProductID = 0x0478,
+ .ReleaseNumber = 0x0010,
- ManufacturerStrIndex: NO_DESCRIPTOR,
- ProductStrIndex: 0x01,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = NO_DESCRIPTOR,
+ .ProductStrIndex = 0x01,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -91,56 +91,56 @@ USB_Descriptor_Device_t DeviceDescriptor =
*/
USB_Descriptor_Configuration_t ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 1,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- Interface:
+ .Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0x00,
- AlternateSetting: 0x00,
+ .InterfaceNumber = 0x00,
+ .AlternateSetting = 0x00,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x03,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x03,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- HIDDescriptor:
+ .HIDDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
- HIDSpec: VERSION_BCD(01.11),
- CountryCode: 0x00,
- TotalHIDReports: 0x01,
- HIDReportType: DTYPE_Report,
- HIDReportLength: sizeof(HIDReport)
+ .HIDSpec = VERSION_BCD(01.11),
+ .CountryCode = 0x00,
+ .TotalHIDReports = 0x01,
+ .HIDReportType = DTYPE_Report,
+ .HIDReportLength = sizeof(HIDReport)
},
- HIDEndpoint:
+ .HIDEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | HID_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: HID_EPSIZE,
- PollingIntervalMS: 0x40
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | HID_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = HID_EPSIZE,
+ .PollingIntervalMS = 0x40
},
};
@@ -150,9 +150,9 @@ USB_Descriptor_Configuration_t ConfigurationDescriptor =
*/
USB_Descriptor_String_t LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -161,9 +161,9 @@ USB_Descriptor_String_t LanguageString =
*/
USB_Descriptor_String_t ProductString =
{
- Header: {Size: USB_STRING_LEN(21), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(21), .Type = DTYPE_String},
- UnicodeString: L"AVR Teensy Bootloader"
+ .UnicodeString = L"AVR Teensy Bootloader"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
diff --git a/Demos/Device/AudioInput/AudioInput.c b/Demos/Device/AudioInput/AudioInput.c
index c0166944b..ade3aa5a3 100644
--- a/Demos/Device/AudioInput/AudioInput.c
+++ b/Demos/Device/AudioInput/AudioInput.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Audio_Task , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Audio_Task , .TaskStatus = TASK_STOP },
};
diff --git a/Demos/Device/AudioInput/Descriptors.c b/Demos/Device/AudioInput/Descriptors.c
index 95b2906e8..eb9b32af4 100644
--- a/Demos/Device/AudioInput/Descriptors.c
+++ b/Demos/Device/AudioInput/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(02.00),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(02.00),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2047,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2047,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,164 +71,164 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 2,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- AudioControlInterface:
+ .AudioControlInterface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 0,
+ .TotalEndpoints = 0,
- Class: 0x01,
- SubClass: 0x01,
- Protocol: 0x00,
+ .Class = 0x01,
+ .SubClass = 0x01,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- AudioControlInterface_SPC:
+ .AudioControlInterface_SPC =
{
- Header: {Size: sizeof(USB_AudioInterface_AC_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_Header,
+ .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_Header,
- ACSpecification: VERSION_BCD(01.00),
- TotalLength: (sizeof(USB_AudioInterface_AC_t) +
- sizeof(USB_AudioInputTerminal_t) +
- sizeof(USB_AudioOutputTerminal_t)),
+ .ACSpecification = VERSION_BCD(01.00),
+ .TotalLength = (sizeof(USB_AudioInterface_AC_t) +
+ sizeof(USB_AudioInputTerminal_t) +
+ sizeof(USB_AudioOutputTerminal_t)),
- InCollection: 1,
- InterfaceNumbers: {1},
+ .InCollection = 1,
+ .InterfaceNumbers = {1},
},
- InputTerminal:
+ .InputTerminal =
{
- Header: {Size: sizeof(USB_AudioInputTerminal_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_InputTerminal,
+ .Header = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_InputTerminal,
- TerminalID: 0x01,
- TerminalType: TERMINAL_IN_MIC,
- AssociatedOutputTerminal: 0x00,
+ .TerminalID = 0x01,
+ .TerminalType = TERMINAL_IN_MIC,
+ .AssociatedOutputTerminal = 0x00,
- TotalChannels: 1,
- ChannelConfig: 0,
+ .TotalChannels = 1,
+ .ChannelConfig = 0,
- ChannelStrIndex: NO_DESCRIPTOR,
- TerminalStrIndex: NO_DESCRIPTOR
+ .ChannelStrIndex = NO_DESCRIPTOR,
+ .TerminalStrIndex = NO_DESCRIPTOR
},
- OutputTerminal:
+ .OutputTerminal =
{
- Header: {Size: sizeof(USB_AudioOutputTerminal_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_OutputTerminal,
+ .Header = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_OutputTerminal,
- TerminalID: 0x02,
- TerminalType: TERMINAL_STREAMING,
- AssociatedInputTerminal: 0x00,
+ .TerminalID = 0x02,
+ .TerminalType = TERMINAL_STREAMING,
+ .AssociatedInputTerminal = 0x00,
- SourceID: 0x01,
+ .SourceID = 0x01,
- TerminalStrIndex: NO_DESCRIPTOR
+ .TerminalStrIndex = NO_DESCRIPTOR
},
- AudioStreamInterface_Alt0:
+ .AudioStreamInterface_Alt0 =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 0,
+ .TotalEndpoints = 0,
- Class: 0x01,
- SubClass: 0x02,
- Protocol: 0x00,
+ .Class = 0x01,
+ .SubClass = 0x02,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- AudioStreamInterface_Alt1:
+ .AudioStreamInterface_Alt1 =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 1,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 1,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x01,
- SubClass: 0x02,
- Protocol: 0x00,
+ .Class = 0x01,
+ .SubClass = 0x02,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- AudioStreamInterface_SPC:
+ .AudioStreamInterface_SPC =
{
- Header: {Size: sizeof(USB_AudioInterface_AS_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_General,
- TerminalLink: 0x02,
+ .TerminalLink = 0x02,
- FrameDelay: 1,
- AudioFormat: 0x0001
+ .FrameDelay = 1,
+ .AudioFormat = 0x0001
},
- AudioFormat:
+ .AudioFormat =
{
- Header: {Size: sizeof(USB_AudioFormat_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_Format,
+ .Header = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_Format,
- FormatType: 0x01,
- Channels: 0x01,
+ .FormatType = 0x01,
+ .Channels = 0x01,
- SubFrameSize: 0x02,
- BitResolution: 16,
- SampleFrequencyType: (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),
+ .SubFrameSize = 0x02,
+ .BitResolution = 16,
+ .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),
- SampleFrequencies: {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
+ .SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
},
- AudioEndpoint:
+ .AudioEndpoint =
{
- Endpoint:
+ .Endpoint =
{
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Std_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | AUDIO_STREAM_EPNUM),
- Attributes: (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
- EndpointSize: AUDIO_STREAM_EPSIZE,
- PollingIntervalMS: 1
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | AUDIO_STREAM_EPNUM),
+ .Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = AUDIO_STREAM_EPSIZE,
+ .PollingIntervalMS = 1
},
- Refresh: 0,
- SyncEndpointNumber: 0
+ .Refresh = 0,
+ .SyncEndpointNumber = 0
},
- AudioEndpoint_SPC:
+ .AudioEndpoint_SPC =
{
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Spc_t), Type: DTYPE_AudioEndpoint},
- Subtype: DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
+ .Subtype = DSUBTYPE_General,
- Attributes: 0x00,
+ .Attributes = 0x00,
- LockDelayUnits: 0x00,
- LockDelay: 0x0000
+ .LockDelayUnits = 0x00,
+ .LockDelay = 0x0000
}
};
@@ -238,9 +238,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -249,9 +249,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -260,9 +260,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},
- UnicodeString: L"LUFA Audio In Demo"
+ .UnicodeString = L"LUFA Audio In Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -285,22 +285,22 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
diff --git a/Demos/Device/AudioOutput/AudioOutput.c b/Demos/Device/AudioOutput/AudioOutput.c
index fcd881277..aae01680a 100644
--- a/Demos/Device/AudioOutput/AudioOutput.c
+++ b/Demos/Device/AudioOutput/AudioOutput.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Audio_Task , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Audio_Task , .TaskStatus = TASK_STOP },
};
diff --git a/Demos/Device/AudioOutput/Descriptors.c b/Demos/Device/AudioOutput/Descriptors.c
index 30af5e851..99b6802ed 100644
--- a/Demos/Device/AudioOutput/Descriptors.c
+++ b/Demos/Device/AudioOutput/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(02.00),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(02.00),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2046,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2046,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,164 +71,164 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 2,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- AudioControlInterface:
+ .AudioControlInterface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 0,
+ .TotalEndpoints = 0,
- Class: 0x01,
- SubClass: 0x01,
- Protocol: 0x00,
+ .Class = 0x01,
+ .SubClass = 0x01,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- AudioControlInterface_SPC:
+ .AudioControlInterface_SPC =
{
- Header: {Size: sizeof(USB_AudioInterface_AC_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_Header,
+ .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_Header,
- ACSpecification: VERSION_BCD(01.00),
- TotalLength: (sizeof(USB_AudioInterface_AC_t) +
+ .ACSpecification = VERSION_BCD(01.00),
+ .TotalLength = (sizeof(USB_AudioInterface_AC_t) +
sizeof(USB_AudioInputTerminal_t) +
sizeof(USB_AudioOutputTerminal_t)),
- InCollection: 1,
- InterfaceNumbers: {1},
+ .InCollection = 1,
+ .InterfaceNumbers = {1},
},
- InputTerminal:
+ .InputTerminal =
{
- Header: {Size: sizeof(USB_AudioInputTerminal_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_InputTerminal,
+ .Header = {.Size = sizeof(USB_AudioInputTerminal_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_InputTerminal,
- TerminalID: 0x01,
- TerminalType: TERMINAL_STREAMING,
- AssociatedOutputTerminal: 0x00,
+ .TerminalID = 0x01,
+ .TerminalType = TERMINAL_STREAMING,
+ .AssociatedOutputTerminal = 0x00,
- TotalChannels: 2,
- ChannelConfig: (CHANNEL_LEFT_FRONT | CHANNEL_RIGHT_FRONT),
+ .TotalChannels = 2,
+ .ChannelConfig = (CHANNEL_LEFT_FRONT | CHANNEL_RIGHT_FRONT),
- ChannelStrIndex: NO_DESCRIPTOR,
- TerminalStrIndex: NO_DESCRIPTOR
+ .ChannelStrIndex = NO_DESCRIPTOR,
+ .TerminalStrIndex = NO_DESCRIPTOR
},
- OutputTerminal:
+ .OutputTerminal =
{
- Header: {Size: sizeof(USB_AudioOutputTerminal_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_OutputTerminal,
+ .Header = {.Size = sizeof(USB_AudioOutputTerminal_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_OutputTerminal,
- TerminalID: 0x02,
- TerminalType: TERMINAL_OUT_SPEAKER,
- AssociatedInputTerminal: 0x00,
+ .TerminalID = 0x02,
+ .TerminalType = TERMINAL_OUT_SPEAKER,
+ .AssociatedInputTerminal = 0x00,
- SourceID: 0x01,
+ .SourceID = 0x01,
- TerminalStrIndex: NO_DESCRIPTOR
+ .TerminalStrIndex = NO_DESCRIPTOR
},
- AudioStreamInterface_Alt0:
+ .AudioStreamInterface_Alt0 =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 0,
+ .TotalEndpoints = 0,
- Class: 0x01,
- SubClass: 0x02,
- Protocol: 0x00,
+ .Class = 0x01,
+ .SubClass = 0x02,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- AudioStreamInterface_Alt1:
+ .AudioStreamInterface_Alt1 =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 1,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 1,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x01,
- SubClass: 0x02,
- Protocol: 0x00,
+ .Class = 0x01,
+ .SubClass = 0x02,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- AudioStreamInterface_SPC:
+ .AudioStreamInterface_SPC =
{
- Header: {Size: sizeof(USB_AudioInterface_AS_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_AudioInterface_AS_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_General,
- TerminalLink: 0x01,
+ .TerminalLink = 0x01,
- FrameDelay: 1,
- AudioFormat: 0x0001
+ .FrameDelay = 1,
+ .AudioFormat = 0x0001
},
- AudioFormat:
+ .AudioFormat =
{
- Header: {Size: sizeof(USB_AudioFormat_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_Format,
+ .Header = {.Size = sizeof(USB_AudioFormat_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_Format,
- FormatType: 0x01,
- Channels: 0x02,
+ .FormatType = 0x01,
+ .Channels = 0x02,
- SubFrameSize: 0x02,
- BitResolution: 16,
+ .SubFrameSize = 0x02,
+ .BitResolution = 16,
- SampleFrequencyType: (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),
- SampleFrequencies: {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
+ .SampleFrequencyType = (sizeof(ConfigurationDescriptor.AudioFormat.SampleFrequencies) / sizeof(AudioSampleFreq_t)),
+ .SampleFrequencies = {SAMPLE_FREQ(AUDIO_SAMPLE_FREQUENCY)}
},
- AudioEndpoint:
+ .AudioEndpoint =
{
- Endpoint:
+ .Endpoint =
{
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Std_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | AUDIO_STREAM_EPNUM),
- Attributes: (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
- EndpointSize: AUDIO_STREAM_EPSIZE,
- PollingIntervalMS: 1
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | AUDIO_STREAM_EPNUM),
+ .Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = AUDIO_STREAM_EPSIZE,
+ .PollingIntervalMS = 1
},
- Refresh: 0,
- SyncEndpointNumber: 0
+ .Refresh = 0,
+ .SyncEndpointNumber = 0
},
- AudioEndpoint_SPC:
+ .AudioEndpoint_SPC =
{
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Spc_t), Type: DTYPE_AudioEndpoint},
- Subtype: DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Spc_t), .Type = DTYPE_AudioEndpoint},
+ .Subtype = DSUBTYPE_General,
- Attributes: EP_ACCEPTS_SMALL_PACKETS,
+ .Attributes = EP_ACCEPTS_SMALL_PACKETS,
- LockDelayUnits: 0x00,
- LockDelay: 0x0000
+ .LockDelayUnits = 0x00,
+ .LockDelay = 0x0000
}
};
@@ -238,9 +238,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -249,9 +249,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -260,9 +260,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(19), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},
- UnicodeString: L"LUFA Audio Out Demo"
+ .UnicodeString = L"LUFA Audio Out Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -289,18 +289,18 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
diff --git a/Demos/Device/CDC/CDC.c b/Demos/Device/CDC/CDC.c
index 29bc00373..4c51fc6b7 100644
--- a/Demos/Device/CDC/CDC.c
+++ b/Demos/Device/CDC/CDC.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: CDC_Task , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = CDC_Task , .TaskStatus = TASK_STOP },
};
/* Globals: */
@@ -52,10 +52,10 @@ TASK_LIST
* It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical
* serial link characteristics and instead sends and receives data in endpoint streams.
*/
-CDC_Line_Coding_t LineCoding = { BaudRateBPS: 9600,
- CharFormat: OneStopBit,
- ParityType: Parity_None,
- DataBits: 8 };
+CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600,
+ .CharFormat = OneStopBit,
+ .ParityType = Parity_None,
+ .DataBits = 8 };
/** String to print through the virtual serial port when the joystick is pressed upwards. */
char JoystickUpString[] = "Joystick Up\r\n";
@@ -256,11 +256,11 @@ TASK(CDC_Task)
*/
USB_Notification_Header_t Notification = (USB_Notification_Header_t)
{
- NotificationType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- Notification: NOTIF_SerialState,
- wValue: 0,
- wIndex: 0,
- wLength: sizeof(uint16_t),
+ .NotificationType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
+ .Notification = NOTIF_SerialState,
+ .wValue = 0,
+ .wIndex = 0,
+ .wLength = sizeof(uint16_t),
};
uint16_t LineStateMask;
diff --git a/Demos/Device/CDC/Descriptors.c b/Demos/Device/CDC/Descriptors.c
index 869dc5deb..41b6e4d22 100644
--- a/Demos/Device/CDC/Descriptors.c
+++ b/Demos/Device/CDC/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x02,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x02,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2044,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2044,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,113 +71,113 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 2,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- CCI_Interface:
+ .CCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x02,
- SubClass: 0x02,
- Protocol: 0x01,
+ .Class = 0x02,
+ .SubClass = 0x02,
+ .Protocol = 0x01,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- CDC_Functional_IntHeader:
+ .CDC_Functional_IntHeader =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x00,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x00,
- Data: {0x01, 0x10}
+ .Data = {0x01, 0x10}
},
- CDC_Functional_CallManagement:
+ .CDC_Functional_CallManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x01,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x01,
- Data: {0x03, 0x01}
+ .Data = {0x03, 0x01}
},
- CDC_Functional_AbstractControlManagement:
+ .CDC_Functional_AbstractControlManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},
- SubType: 0x02,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
+ .SubType = 0x02,
- Data: {0x06}
+ .Data = {0x06}
},
- CDC_Functional_Union:
+ .CDC_Functional_Union =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x06,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x06,
- Data: {0x00, 0x01}
+ .Data = {0x00, 0x01}
},
- ManagementEndpoint:
+ .ManagementEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: CDC_NOTIFICATION_EPSIZE,
- PollingIntervalMS: 0xFF
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,
+ .PollingIntervalMS = 0xFF
},
- DCI_Interface:
+ .DCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x0A,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x0A,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- DataOutEndpoint:
+ .DataOutEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
},
- DataInEndpoint:
+ .DataInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
}
};
@@ -187,9 +187,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -198,9 +198,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -209,9 +209,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(13), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String},
- UnicodeString: L"LUFA CDC Demo"
+ .UnicodeString = L"LUFA CDC Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -234,22 +234,22 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
diff --git a/Demos/Device/DualCDC/Descriptors.c b/Demos/Device/DualCDC/Descriptors.c
index 91ae50eea..e5d7ee26c 100644
--- a/Demos/Device/DualCDC/Descriptors.c
+++ b/Demos/Device/DualCDC/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0xEF,
- SubClass: 0x02,
- Protocol: 0x01,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0xEF,
+ .SubClass = 0x02,
+ .Protocol = 0x01,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x204E,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x204E,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,235 +71,235 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 4,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 4,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- IAD1:
+ .IAD1 =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_Association_t), Type: DTYPE_InterfaceAssociation},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
- FirstInterfaceIndex: 0,
- TotalInterfaces: 2,
+ .FirstInterfaceIndex = 0,
+ .TotalInterfaces = 2,
- Class: 0x02,
- SubClass: 0x02,
- Protocol: 0x01,
+ .Class = 0x02,
+ .SubClass = 0x02,
+ .Protocol = 0x01,
- IADStrIndex: NO_DESCRIPTOR
+ .IADStrIndex = NO_DESCRIPTOR
},
- CDC1_CCI_Interface:
+ .CDC1_CCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x02,
- SubClass: 0x02,
- Protocol: 0x01,
+ .Class = 0x02,
+ .SubClass = 0x02,
+ .Protocol = 0x01,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- CDC1_Functional_IntHeader:
+ .CDC1_Functional_IntHeader =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x00,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x00,
- Data: {0x01, 0x10}
+ .Data = {0x01, 0x10}
},
- CDC1_Functional_CallManagement:
+ .CDC1_Functional_CallManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x01,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x01,
- Data: {0x03, 0x01}
+ .Data = {0x03, 0x01}
},
- CDC1_Functional_AbstractControlManagement:
+ .CDC1_Functional_AbstractControlManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},
- SubType: 0x02,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
+ .SubType = 0x02,
- Data: {0x06}
+ .Data = {0x06}
},
- CDC1_Functional_Union:
+ .CDC1_Functional_Union =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x06,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x06,
- Data: {0x00, 0x01}
+ .Data = {0x00, 0x01}
},
- CDC1_ManagementEndpoint:
+ .CDC1_ManagementEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC1_NOTIFICATION_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: CDC_NOTIFICATION_EPSIZE,
- PollingIntervalMS: 0xFF
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC1_NOTIFICATION_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,
+ .PollingIntervalMS = 0xFF
},
- CDC1_DCI_Interface:
+ .CDC1_DCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x0A,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x0A,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- CDC1_DataOutEndpoint:
+ .CDC1_DataOutEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC1_RX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC1_RX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
},
- CDC1_DataInEndpoint:
+ .CDC1_DataInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC1_TX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC1_TX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
},
- IAD2:
+ .IAD2 =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_Association_t), Type: DTYPE_InterfaceAssociation},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_Association_t), .Type = DTYPE_InterfaceAssociation},
- FirstInterfaceIndex: 2,
- TotalInterfaces: 2,
+ .FirstInterfaceIndex = 2,
+ .TotalInterfaces = 2,
- Class: 0x02,
- SubClass: 0x02,
- Protocol: 0x01,
+ .Class = 0x02,
+ .SubClass = 0x02,
+ .Protocol = 0x01,
- IADStrIndex: NO_DESCRIPTOR
+ .IADStrIndex = NO_DESCRIPTOR
},
- CDC2_CCI_Interface:
+ .CDC2_CCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 2,
- AlternateSetting: 0,
+ .InterfaceNumber = 2,
+ .AlternateSetting = 0,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x02,
- SubClass: 0x02,
- Protocol: 0x01,
+ .Class = 0x02,
+ .SubClass = 0x02,
+ .Protocol = 0x01,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- CDC2_Functional_IntHeader:
+ .CDC2_Functional_IntHeader =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x00,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x00,
- Data: {0x01, 0x10}
+ .Data = {0x01, 0x10}
},
- CDC2_Functional_CallManagement:
+ .CDC2_Functional_CallManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x01,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x01,
- Data: {0x03, 0x03}
+ .Data = {0x03, 0x03}
},
- CDC2_Functional_AbstractControlManagement:
+ .CDC2_Functional_AbstractControlManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},
- SubType: 0x02,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
+ .SubType = 0x02,
- Data: {0x06}
+ .Data = {0x06}
},
- CDC2_Functional_Union:
+ .CDC2_Functional_Union =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x06,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x06,
- Data: {0x02, 0x03}
+ .Data = {0x02, 0x03}
},
- CDC2_ManagementEndpoint:
+ .CDC2_ManagementEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC2_NOTIFICATION_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: CDC_NOTIFICATION_EPSIZE,
- PollingIntervalMS: 0xFF
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC2_NOTIFICATION_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,
+ .PollingIntervalMS = 0xFF
},
- CDC2_DCI_Interface:
+ .CDC2_DCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 3,
- AlternateSetting: 0,
+ .InterfaceNumber = 3,
+ .AlternateSetting = 0,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x0A,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x0A,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- CDC2_DataOutEndpoint:
+ .CDC2_DataOutEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC2_RX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC2_RX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
},
- CDC2_DataInEndpoint:
+ .CDC2_DataInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC2_TX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC2_TX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
}
};
@@ -309,9 +309,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -320,9 +320,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -331,9 +331,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(13), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String},
- UnicodeString: L"LUFA Dual CDC Demo"
+ .UnicodeString = L"LUFA Dual CDC Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -356,22 +356,22 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
diff --git a/Demos/Device/DualCDC/DualCDC.c b/Demos/Device/DualCDC/DualCDC.c
index 56eebb305..69d26c488 100644
--- a/Demos/Device/DualCDC/DualCDC.c
+++ b/Demos/Device/DualCDC/DualCDC.c
@@ -39,9 +39,9 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: CDC1_Task , TaskStatus: TASK_STOP },
- { Task: CDC2_Task , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = CDC1_Task , .TaskStatus = TASK_STOP },
+ { .Task = CDC2_Task , .TaskStatus = TASK_STOP },
};
/* Globals: */
@@ -53,10 +53,10 @@ TASK_LIST
* It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical
* serial link characteristics and instead sends and receives data in endpoint streams.
*/
-CDC_Line_Coding_t LineCoding1 = { BaudRateBPS: 9600,
- CharFormat: OneStopBit,
- ParityType: Parity_None,
- DataBits: 8 };
+CDC_Line_Coding_t LineCoding1 = { .BaudRateBPS = 9600,
+ .CharFormat = OneStopBit,
+ .ParityType = Parity_None,
+ .DataBits = 8 };
/** Contains the current baud rate and other settings of the second virtual serial port. While this demo does not use
* the physical USART and thus does not use these settings, they must still be retained and returned to the host
@@ -66,10 +66,10 @@ CDC_Line_Coding_t LineCoding1 = { BaudRateBPS: 9600,
* It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical
* serial link characteristics and instead sends and receives data in endpoint streams.
*/
-CDC_Line_Coding_t LineCoding2 = { BaudRateBPS: 9600,
- CharFormat: OneStopBit,
- ParityType: Parity_None,
- DataBits: 8 };
+CDC_Line_Coding_t LineCoding2 = { .BaudRateBPS = 9600,
+ .CharFormat = OneStopBit,
+ .ParityType = Parity_None,
+ .DataBits = 8 };
/** String to print through the first virtual serial port when the joystick is pressed upwards. */
char JoystickUpString[] = "Joystick Up\r\n";
diff --git a/Demos/Device/GenericHID/Descriptors.c b/Demos/Device/GenericHID/Descriptors.c
index 0c3fac7f5..9b87a0484 100644
--- a/Demos/Device/GenericHID/Descriptors.c
+++ b/Demos/Device/GenericHID/Descriptors.c
@@ -70,24 +70,24 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM GenericReport[] =
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x204F,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x204F,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -97,66 +97,66 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 1,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- Interface:
+ .Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0x00,
- AlternateSetting: 0x00,
+ .InterfaceNumber = 0x00,
+ .AlternateSetting = 0x00,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x03,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x03,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- GenericHID:
+ .GenericHID =
{
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
- HIDSpec: VERSION_BCD(01.11),
- CountryCode: 0x00,
- TotalHIDReports: 0x01,
- HIDReportType: DTYPE_Report,
- HIDReportLength: sizeof(GenericReport)
+ .HIDSpec = VERSION_BCD(01.11),
+ .CountryCode = 0x00,
+ .TotalHIDReports = 0x01,
+ .HIDReportType = DTYPE_Report,
+ .HIDReportLength = sizeof(GenericReport)
},
- GenericINEndpoint:
+ .GenericINEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | GENERIC_IN_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: GENERIC_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | GENERIC_IN_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = GENERIC_EPSIZE,
+ .PollingIntervalMS = 0x02
},
- GenericOUTEndpoint:
+ .GenericOUTEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | GENERIC_OUT_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: GENERIC_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | GENERIC_OUT_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = GENERIC_EPSIZE,
+ .PollingIntervalMS = 0x02
}
};
@@ -166,9 +166,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -177,9 +177,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -188,9 +188,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(13), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(21), .Type = DTYPE_String},
- UnicodeString: L"LUFA HID Demo"
+ .UnicodeString = L"LUFA Generic HID Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -213,33 +213,33 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
break;
- case DTYPE_HID:
+ case DTYPE_HID:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.GenericHID);
Size = sizeof(USB_Descriptor_HID_t);
break;
- case DTYPE_Report:
+ case DTYPE_Report:
Address = DESCRIPTOR_ADDRESS(GenericReport);
Size = sizeof(GenericReport);
break;
diff --git a/Demos/Device/GenericHID/GenericHID.c b/Demos/Device/GenericHID/GenericHID.c
index a9ecfa7d7..a0d4f150c 100644
--- a/Demos/Device/GenericHID/GenericHID.c
+++ b/Demos/Device/GenericHID/GenericHID.c
@@ -40,11 +40,11 @@
TASK_LIST
{
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
#endif
#if !defined(INTERRUPT_DATA_ENDPOINT)
- { Task: USB_HID_Report , TaskStatus: TASK_STOP },
+ { .Task = USB_HID_Report , .TaskStatus = TASK_STOP },
#endif
};
diff --git a/Demos/Device/Joystick/Descriptors.c b/Demos/Device/Joystick/Descriptors.c
index 788596e11..81071a6a3 100644
--- a/Demos/Device/Joystick/Descriptors.c
+++ b/Demos/Device/Joystick/Descriptors.c
@@ -80,24 +80,24 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] =
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2043,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2043,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -107,56 +107,56 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 1,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- Interface:
+ .Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0x00,
- AlternateSetting: 0x00,
+ .InterfaceNumber = 0x00,
+ .AlternateSetting = 0x00,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x03,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x03,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- JoystickHID:
+ .JoystickHID =
{
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
- HIDSpec: VERSION_BCD(01.11),
- CountryCode: 0x00,
- TotalHIDReports: 0x01,
- HIDReportType: DTYPE_Report,
- HIDReportLength: sizeof(JoystickReport)
+ .HIDSpec = VERSION_BCD(01.11),
+ .CountryCode = 0x00,
+ .TotalHIDReports = 0x01,
+ .HIDReportType = DTYPE_Report,
+ .HIDReportLength = sizeof(JoystickReport)
},
- JoystickEndpoint:
+ .JoystickEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | JOYSTICK_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: JOYSTICK_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | JOYSTICK_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = JOYSTICK_EPSIZE,
+ .PollingIntervalMS = 0x02
}
};
@@ -166,9 +166,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -177,9 +177,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -188,9 +188,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},
- UnicodeString: L"LUFA Joystick Demo"
+ .UnicodeString = L"LUFA Joystick Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -213,33 +213,33 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
break;
- case DTYPE_HID:
+ case DTYPE_HID:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.JoystickHID);
Size = sizeof(USB_Descriptor_HID_t);
break;
- case DTYPE_Report:
+ case DTYPE_Report:
Address = DESCRIPTOR_ADDRESS(JoystickReport);
Size = sizeof(JoystickReport);
break;
diff --git a/Demos/Device/Joystick/Joystick.c b/Demos/Device/Joystick/Joystick.c
index c5d90e76f..60eef548e 100644
--- a/Demos/Device/Joystick/Joystick.c
+++ b/Demos/Device/Joystick/Joystick.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Joystick_Report , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Joystick_Report , .TaskStatus = TASK_STOP },
};
/** Main program entry point. This routine configures the hardware required by the application, then
diff --git a/Demos/Device/Keyboard/Descriptors.c b/Demos/Device/Keyboard/Descriptors.c
index 722b65818..1c99813f2 100644
--- a/Demos/Device/Keyboard/Descriptors.c
+++ b/Demos/Device/Keyboard/Descriptors.c
@@ -87,24 +87,24 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] =
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2042,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2042,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -114,66 +114,66 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 1,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- Interface:
+ .Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0x00,
- AlternateSetting: 0x00,
+ .InterfaceNumber = 0x00,
+ .AlternateSetting = 0x00,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x03,
- SubClass: 0x01,
- Protocol: 0x01,
+ .Class = 0x03,
+ .SubClass = 0x01,
+ .Protocol = 0x01,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- KeyboardHID:
+ .KeyboardHID =
{
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
- HIDSpec: VERSION_BCD(01.11),
- CountryCode: 0x00,
- TotalHIDReports: 0x01,
- HIDReportType: DTYPE_Report,
- HIDReportLength: sizeof(KeyboardReport)
+ .HIDSpec = VERSION_BCD(01.11),
+ .CountryCode = 0x00,
+ .TotalHIDReports = 0x01,
+ .HIDReportType = DTYPE_Report,
+ .HIDReportLength = sizeof(KeyboardReport)
},
- KeyboardEndpoint:
+ .KeyboardEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: KEYBOARD_EPSIZE,
- PollingIntervalMS: 0x04
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = KEYBOARD_EPSIZE,
+ .PollingIntervalMS = 0x04
},
- KeyboardLEDsEndpoint:
+ .KeyboardLEDsEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | KEYBOARD_LEDS_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: KEYBOARD_EPSIZE,
- PollingIntervalMS: 0x04
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | KEYBOARD_LEDS_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = KEYBOARD_EPSIZE,
+ .PollingIntervalMS = 0x04
}
};
@@ -183,9 +183,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -194,9 +194,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(16), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(16), .Type = DTYPE_String},
- UnicodeString: L"Denver Gingerich"
+ .UnicodeString = L"Denver Gingerich"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -205,9 +205,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(18), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},
- UnicodeString: L"LUFA Keyboard Demo"
+ .UnicodeString = L"LUFA Keyboard Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -226,37 +226,37 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
- case DTYPE_Device:
+ case DTYPE_Device:
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
break;
- case DTYPE_HID:
+ case DTYPE_HID:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.KeyboardHID);
Size = sizeof(USB_Descriptor_HID_t);
break;
- case DTYPE_Report:
+ case DTYPE_Report:
Address = DESCRIPTOR_ADDRESS(KeyboardReport);
Size = sizeof(KeyboardReport);
break;
diff --git a/Demos/Device/Keyboard/Keyboard.c b/Demos/Device/Keyboard/Keyboard.c
index 8c4157a56..f0e0186d0 100644
--- a/Demos/Device/Keyboard/Keyboard.c
+++ b/Demos/Device/Keyboard/Keyboard.c
@@ -41,11 +41,11 @@
TASK_LIST
{
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
#endif
#if !defined(INTERRUPT_DATA_ENDPOINT)
- { Task: USB_Keyboard_Report , TaskStatus: TASK_STOP },
+ { .Task = USB_Keyboard_Report , .TaskStatus = TASK_STOP },
#endif
};
diff --git a/Demos/Device/KeyboardMouse/Descriptors.c b/Demos/Device/KeyboardMouse/Descriptors.c
index 39c1d4a2e..b5bc15ae6 100644
--- a/Demos/Device/KeyboardMouse/Descriptors.c
+++ b/Demos/Device/KeyboardMouse/Descriptors.c
@@ -120,24 +120,24 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] =
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x204D,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x204D,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -147,103 +147,103 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 2,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- KeyboardInterface:
+ .KeyboardInterface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0x00,
- AlternateSetting: 0x00,
+ .InterfaceNumber = 0x00,
+ .AlternateSetting = 0x00,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x03,
- SubClass: 0x01,
- Protocol: 0x01,
+ .Class = 0x03,
+ .SubClass = 0x01,
+ .Protocol = 0x01,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- KeyboardHID:
+ .KeyboardHID =
{
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
- HIDSpec: VERSION_BCD(01.11),
- CountryCode: 0x00,
- TotalHIDReports: 0x01,
- HIDReportType: DTYPE_Report,
- HIDReportLength: sizeof(KeyboardReport)
+ .HIDSpec = VERSION_BCD(01.11),
+ .CountryCode = 0x00,
+ .TotalHIDReports = 0x01,
+ .HIDReportType = DTYPE_Report,
+ .HIDReportLength = sizeof(KeyboardReport)
},
- KeyboardInEndpoint:
+ .KeyboardInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_IN_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: HID_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_IN_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = HID_EPSIZE,
+ .PollingIntervalMS = 0x02
},
- KeyboardOutEndpoint:
+ .KeyboardOutEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | KEYBOARD_OUT_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: HID_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | KEYBOARD_OUT_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = HID_EPSIZE,
+ .PollingIntervalMS = 0x02
},
- MouseInterface:
+ .MouseInterface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0x01,
- AlternateSetting: 0x00,
+ .InterfaceNumber = 0x01,
+ .AlternateSetting = 0x00,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x03,
- SubClass: 0x01,
- Protocol: 0x02,
+ .Class = 0x03,
+ .SubClass = 0x01,
+ .Protocol = 0x02,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- MouseHID:
+ .MouseHID =
{
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
- HIDSpec: VERSION_BCD(01.11),
- CountryCode: 0x00,
- TotalHIDReports: 0x01,
- HIDReportType: DTYPE_Report,
- HIDReportLength: sizeof(MouseReport)
+ .HIDSpec = VERSION_BCD(01.11),
+ .CountryCode = 0x00,
+ .TotalHIDReports = 0x01,
+ .HIDReportType = DTYPE_Report,
+ .HIDReportLength = sizeof(MouseReport)
},
- MouseInEndpoint:
+ .MouseInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_IN_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: HID_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_IN_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = HID_EPSIZE,
+ .PollingIntervalMS = 0x02
}
};
@@ -253,9 +253,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -264,9 +264,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -275,9 +275,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(28), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(28), .Type = DTYPE_String},
- UnicodeString: L"LUFA Mouse and Keyboard Demo"
+ .UnicodeString = L"LUFA Mouse and Keyboard Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -296,33 +296,33 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
- case DTYPE_Device:
+ case DTYPE_Device:
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
}
break;
- case DTYPE_HID:
+ case DTYPE_HID:
if (!(wIndex))
{
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.KeyboardHID);
@@ -334,7 +334,7 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Size = sizeof(USB_Descriptor_HID_t);
}
break;
- case DTYPE_Report:
+ case DTYPE_Report:
if (!(wIndex))
{
Address = DESCRIPTOR_ADDRESS(KeyboardReport);
diff --git a/Demos/Device/KeyboardMouse/KeyboardMouse.c b/Demos/Device/KeyboardMouse/KeyboardMouse.c
index 71e23ab1e..957b9b38c 100644
--- a/Demos/Device/KeyboardMouse/KeyboardMouse.c
+++ b/Demos/Device/KeyboardMouse/KeyboardMouse.c
@@ -40,9 +40,9 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Mouse , TaskStatus: TASK_RUN },
- { Task: USB_Keyboard , TaskStatus: TASK_RUN },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Mouse , .TaskStatus = TASK_RUN },
+ { .Task = USB_Keyboard , .TaskStatus = TASK_RUN },
};
/* Global Variables */
diff --git a/Demos/Device/MIDI/Descriptors.c b/Demos/Device/MIDI/Descriptors.c
index 81f574829..41502238c 100644
--- a/Demos/Device/MIDI/Descriptors.c
+++ b/Demos/Device/MIDI/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2048,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2048,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,175 +71,175 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 2,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- AudioControlInterface:
+ .AudioControlInterface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 0,
+ .TotalEndpoints = 0,
- Class: 0x01,
- SubClass: 0x01,
- Protocol: 0x00,
+ .Class = 0x01,
+ .SubClass = 0x01,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- AudioControlInterface_SPC:
+ .AudioControlInterface_SPC =
{
- Header: {Size: sizeof(USB_AudioInterface_AC_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_Header,
+ .Header = {.Size = sizeof(USB_AudioInterface_AC_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_Header,
- ACSpecification: VERSION_BCD(01.00),
- TotalLength: sizeof(USB_AudioInterface_AC_t),
+ .ACSpecification = VERSION_BCD(01.00),
+ .TotalLength = sizeof(USB_AudioInterface_AC_t),
- InCollection: 1,
- InterfaceNumbers: {1},
+ .InCollection = 1,
+ .InterfaceNumbers = {1},
},
- AudioStreamInterface:
+ .AudioStreamInterface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x01,
- SubClass: 0x03,
- Protocol: 0x00,
+ .Class = 0x01,
+ .SubClass = 0x03,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- AudioStreamInterface_SPC:
+ .AudioStreamInterface_SPC =
{
- Header: {Size: sizeof(USB_AudioInterface_MIDI_AS_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_AudioInterface_MIDI_AS_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_General,
- AudioSpecification: VERSION_BCD(01.00),
+ .AudioSpecification = VERSION_BCD(01.00),
- TotalLength: (sizeof(USB_Descriptor_Configuration_t) - offsetof(USB_Descriptor_Configuration_t, AudioStreamInterface_SPC))
+ .TotalLength = (sizeof(USB_Descriptor_Configuration_t) - offsetof(USB_Descriptor_Configuration_t, AudioStreamInterface_SPC))
},
- MIDI_In_Jack_Emb:
+ .MIDI_In_Jack_Emb =
{
- Header: {Size: sizeof(USB_MIDI_In_Jack_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_InputJack,
+ .Header = {.Size = sizeof(USB_MIDI_In_Jack_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_InputJack,
- JackType: JACKTYPE_EMBEDDED,
- JackID: 0x01,
+ .JackType = JACKTYPE_EMBEDDED,
+ .JackID = 0x01,
- JackStrIndex: NO_DESCRIPTOR
+ .JackStrIndex = NO_DESCRIPTOR
},
- MIDI_In_Jack_Ext:
+ .MIDI_In_Jack_Ext =
{
- Header: {Size: sizeof(USB_MIDI_In_Jack_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_InputJack,
+ .Header = {.Size = sizeof(USB_MIDI_In_Jack_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_InputJack,
- JackType: JACKTYPE_EXTERNAL,
- JackID: 0x02,
+ .JackType = JACKTYPE_EXTERNAL,
+ .JackID = 0x02,
- JackStrIndex: NO_DESCRIPTOR
+ .JackStrIndex = NO_DESCRIPTOR
},
- MIDI_Out_Jack_Emb:
+ .MIDI_Out_Jack_Emb =
{
- Header: {Size: sizeof(USB_MIDI_Out_Jack_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_OutputJack,
+ .Header = {.Size = sizeof(USB_MIDI_Out_Jack_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_OutputJack,
- JackType: JACKTYPE_EMBEDDED,
- JackID: 0x03,
+ .JackType = JACKTYPE_EMBEDDED,
+ .JackID = 0x03,
- NumberOfPins: 1,
- SourceJackID: {0x02},
- SourcePinID: {0x01},
+ .NumberOfPins = 1,
+ .SourceJackID = {0x02},
+ .SourcePinID = {0x01},
- JackStrIndex: NO_DESCRIPTOR
+ .JackStrIndex = NO_DESCRIPTOR
},
- MIDI_Out_Jack_Ext:
+ .MIDI_Out_Jack_Ext =
{
- Header: {Size: sizeof(USB_MIDI_Out_Jack_t), Type: DTYPE_AudioInterface},
- Subtype: DSUBTYPE_OutputJack,
+ .Header = {.Size = sizeof(USB_MIDI_Out_Jack_t), .Type = DTYPE_AudioInterface},
+ .Subtype = DSUBTYPE_OutputJack,
- JackType: JACKTYPE_EXTERNAL,
- JackID: 0x04,
+ .JackType = JACKTYPE_EXTERNAL,
+ .JackID = 0x04,
- NumberOfPins: 1,
- SourceJackID: {0x01},
- SourcePinID: {0x01},
+ .NumberOfPins = 1,
+ .SourceJackID = {0x01},
+ .SourcePinID = {0x01},
- JackStrIndex: NO_DESCRIPTOR
+ .JackStrIndex = NO_DESCRIPTOR
},
- MIDI_In_Jack_Endpoint:
+ .MIDI_In_Jack_Endpoint =
{
- Endpoint:
+ .Endpoint =
{
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Std_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
- Attributes: (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
- EndpointSize: MIDI_STREAM_EPSIZE,
- PollingIntervalMS: 0
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = MIDI_STREAM_EPSIZE,
+ .PollingIntervalMS = 0
},
- Refresh: 0,
- SyncEndpointNumber: 0
+ .Refresh = 0,
+ .SyncEndpointNumber = 0
},
- MIDI_In_Jack_Endpoint_SPC:
+ .MIDI_In_Jack_Endpoint_SPC =
{
- Header: {Size: sizeof(USB_MIDI_Jack_Endpoint_t), Type: DTYPE_AudioEndpoint},
- Subtype: DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint},
+ .Subtype = DSUBTYPE_General,
- TotalEmbeddedJacks: 0x01,
- AssociatedJackID: {0x01}
+ .TotalEmbeddedJacks = 0x01,
+ .AssociatedJackID = {0x01}
},
- MIDI_Out_Jack_Endpoint:
+ .MIDI_Out_Jack_Endpoint =
{
- Endpoint:
+ .Endpoint =
{
- Header: {Size: sizeof(USB_AudioStreamEndpoint_Std_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_AudioStreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | MIDI_STREAM_IN_EPNUM),
- Attributes: (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
- EndpointSize: MIDI_STREAM_EPSIZE,
- PollingIntervalMS: 0
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MIDI_STREAM_IN_EPNUM),
+ .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
+ .EndpointSize = MIDI_STREAM_EPSIZE,
+ .PollingIntervalMS = 0
},
- Refresh: 0,
- SyncEndpointNumber: 0
+ .Refresh = 0,
+ .SyncEndpointNumber = 0
},
- MIDI_Out_Jack_Endpoint_SPC:
+ .MIDI_Out_Jack_Endpoint_SPC =
{
- Header: {Size: sizeof(USB_MIDI_Jack_Endpoint_t), Type: DTYPE_AudioEndpoint},
- Subtype: DSUBTYPE_General,
+ .Header = {.Size = sizeof(USB_MIDI_Jack_Endpoint_t), .Type = DTYPE_AudioEndpoint},
+ .Subtype = DSUBTYPE_General,
- TotalEmbeddedJacks: 0x01,
- AssociatedJackID: {0x03}
+ .TotalEmbeddedJacks = 0x01,
+ .AssociatedJackID = {0x03}
}
};
@@ -249,9 +249,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -260,9 +260,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -271,9 +271,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(14), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(14), .Type = DTYPE_String},
- UnicodeString: L"LUFA MIDI Demo"
+ .UnicodeString = L"LUFA MIDI Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -292,26 +292,26 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
- case DTYPE_Device:
+ case DTYPE_Device:
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
diff --git a/Demos/Device/MIDI/MIDI.c b/Demos/Device/MIDI/MIDI.c
index e286dcbd6..7e1d21156 100644
--- a/Demos/Device/MIDI/MIDI.c
+++ b/Demos/Device/MIDI/MIDI.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_MIDI_Task , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_MIDI_Task , .TaskStatus = TASK_STOP },
};
/** Main program entry point. This routine configures the hardware required by the application, then
diff --git a/Demos/Device/MassStorage/Descriptors.c b/Demos/Device/MassStorage/Descriptors.c
index dd98db59a..3592e9da6 100644
--- a/Demos/Device/MassStorage/Descriptors.c
+++ b/Demos/Device/MassStorage/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2045,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2045,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: 0x03,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = 0x03,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,55 +71,55 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 1,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: USB_CONFIG_ATTR_BUSPOWERED,
+ .ConfigAttributes = USB_CONFIG_ATTR_BUSPOWERED,
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- Interface:
+ .Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x08,
- SubClass: 0x06,
- Protocol: 0x50,
+ .Class = 0x08,
+ .SubClass = 0x06,
+ .Protocol = 0x50,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- DataInEndpoint:
+ .DataInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | MASS_STORAGE_IN_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: MASS_STORAGE_IO_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = MASS_STORAGE_IO_EPSIZE,
+ .PollingIntervalMS = 0x00
},
- DataOutEndpoint:
+ .DataOutEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: MASS_STORAGE_IO_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = MASS_STORAGE_IO_EPSIZE,
+ .PollingIntervalMS = 0x00
}
};
@@ -129,9 +129,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -140,9 +140,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -151,9 +151,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(22), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(22), .Type = DTYPE_String},
- UnicodeString: L"LUFA Mass Storage Demo"
+ .UnicodeString = L"LUFA Mass Storage Demo"
};
/** Serial number descriptor string. This is a Unicode string containing a string of HEX characters at least 12
@@ -165,9 +165,9 @@ USB_Descriptor_String_t PROGMEM ProductString =
*/
USB_Descriptor_String_t PROGMEM SerialNumberString =
{
- Header: {Size: USB_STRING_LEN(12), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(12), .Type = DTYPE_String},
- UnicodeString: L"000000000000"
+ .UnicodeString = L"000000000000"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -186,30 +186,30 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
- case DTYPE_Device:
+ case DTYPE_Device:
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
- case 0x03:
+ case 0x03:
Address = DESCRIPTOR_ADDRESS(SerialNumberString);
Size = pgm_read_byte(&SerialNumberString.Header.Size);
break;
diff --git a/Demos/Device/MassStorage/MassStorage.c b/Demos/Device/MassStorage/MassStorage.c
index 48ce5f34d..7ddb8f05a 100644
--- a/Demos/Device/MassStorage/MassStorage.c
+++ b/Demos/Device/MassStorage/MassStorage.c
@@ -40,7 +40,7 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_MassStorage , TaskStatus: TASK_STOP },
+ { .Task = USB_MassStorage , .TaskStatus = TASK_STOP },
};
/* Global Variables */
@@ -48,7 +48,7 @@ TASK_LIST
CommandBlockWrapper_t CommandBlock;
/** Structure to hold the latest Command Status Wrapper to return to the host, containing the status of the last issued command. */
-CommandStatusWrapper_t CommandStatus = { Signature: CSW_SIGNATURE };
+CommandStatusWrapper_t CommandStatus = { .Signature = CSW_SIGNATURE };
/** Flag to asynchronously abort any in-progress data transfers upon the reception of a mass storage reset command. */
volatile bool IsMassStoreReset = false;
diff --git a/Demos/Device/MassStorage/SCSI.c b/Demos/Device/MassStorage/SCSI.c
index e92be7ff8..6ddd144ca 100644
--- a/Demos/Device/MassStorage/SCSI.c
+++ b/Demos/Device/MassStorage/SCSI.c
@@ -43,31 +43,31 @@
*/
SCSI_Inquiry_Response_t InquiryData =
{
- DeviceType: 0,
- PeripheralQualifier: 0,
+ .DeviceType = 0,
+ .PeripheralQualifier = 0,
- Removable: true,
+ .Removable = true,
- Version: 0,
+ .Version = 0,
- ResponseDataFormat: 2,
- NormACA: false,
- TrmTsk: false,
- AERC: false,
+ .ResponseDataFormat = 2,
+ .NormACA = false,
+ .TrmTsk = false,
+ .AERC = false,
- AdditionalLength: 0x1F,
+ .AdditionalLength = 0x1F,
- SoftReset: false,
- CmdQue: false,
- Linked: false,
- Sync: false,
- WideBus16Bit: false,
- WideBus32Bit: false,
- RelAddr: false,
+ .SoftReset = false,
+ .CmdQue = false,
+ .Linked = false,
+ .Sync = false,
+ .WideBus16Bit = false,
+ .WideBus32Bit = false,
+ .RelAddr = false,
- VendorID: "LUFA",
- ProductID: "Dataflash Disk",
- RevisionID: {'0','.','0','0'},
+ .VendorID = "LUFA",
+ .ProductID = "Dataflash Disk",
+ .RevisionID = {'0','.','0','0'},
};
/** Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE
@@ -75,8 +75,8 @@ SCSI_Inquiry_Response_t InquiryData =
*/
SCSI_Request_Sense_Response_t SenseData =
{
- ResponseCode: 0x70,
- AdditionalLength: 0x0A,
+ .ResponseCode = 0x70,
+ .AdditionalLength = 0x0A,
};
diff --git a/Demos/Device/Mouse/Descriptors.c b/Demos/Device/Mouse/Descriptors.c
index a93d51241..858a562ac 100644
--- a/Demos/Device/Mouse/Descriptors.c
+++ b/Demos/Device/Mouse/Descriptors.c
@@ -80,24 +80,24 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM MouseReport[] =
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2041,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2041,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -107,56 +107,56 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 1,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- Interface:
+ .Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0x00,
- AlternateSetting: 0x00,
+ .InterfaceNumber = 0x00,
+ .AlternateSetting = 0x00,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x03,
- SubClass: 0x01,
- Protocol: 0x02,
+ .Class = 0x03,
+ .SubClass = 0x01,
+ .Protocol = 0x02,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- MouseHID:
+ .MouseHID =
{
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
- HIDSpec: VERSION_BCD(01.11),
- CountryCode: 0x00,
- TotalHIDReports: 0x01,
- HIDReportType: DTYPE_Report,
- HIDReportLength: sizeof(MouseReport)
+ .HIDSpec = VERSION_BCD(01.11),
+ .CountryCode = 0x00,
+ .TotalHIDReports = 0x01,
+ .HIDReportType = DTYPE_Report,
+ .HIDReportLength = sizeof(MouseReport)
},
- MouseEndpoint:
+ .MouseEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: MOUSE_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | MOUSE_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = MOUSE_EPSIZE,
+ .PollingIntervalMS = 0x02
}
};
@@ -166,9 +166,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -177,9 +177,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -188,9 +188,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(15), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(15), .Type = DTYPE_String},
- UnicodeString: L"LUFA Mouse Demo"
+ .UnicodeString = L"LUFA Mouse Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -235,11 +235,11 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
}
break;
- case DTYPE_HID:
+ case DTYPE_HID:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor.MouseHID);
Size = sizeof(USB_Descriptor_HID_t);
break;
- case DTYPE_Report:
+ case DTYPE_Report:
Address = DESCRIPTOR_ADDRESS(MouseReport);
Size = sizeof(MouseReport);
break;
diff --git a/Demos/Device/Mouse/Mouse.c b/Demos/Device/Mouse/Mouse.c
index e74002b7c..38a7086d5 100644
--- a/Demos/Device/Mouse/Mouse.c
+++ b/Demos/Device/Mouse/Mouse.c
@@ -40,11 +40,11 @@
TASK_LIST
{
#if !defined(INTERRUPT_CONTROL_ENDPOINT)
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
#endif
#if !defined(INTERRUPT_DATA_ENDPOINT)
- { Task: USB_Mouse_Report , TaskStatus: TASK_STOP },
+ { .Task = USB_Mouse_Report , .TaskStatus = TASK_STOP },
#endif
};
diff --git a/Demos/Device/RNDISEthernet/Descriptors.c b/Demos/Device/RNDISEthernet/Descriptors.c
index 0e7b9348e..46c3be1ec 100644
--- a/Demos/Device/RNDISEthernet/Descriptors.c
+++ b/Demos/Device/RNDISEthernet/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x02,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x02,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x204C,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x204C,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,113 +71,113 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 2,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- CCI_Interface:
+ .CCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x02,
- SubClass: 0x02,
- Protocol: 0xFF,
+ .Class = 0x02,
+ .SubClass = 0x02,
+ .Protocol = 0xFF,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- CDC_Functional_Header:
+ .CDC_Functional_Header =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x00,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x00,
- Data: {0x01, 0x10}
+ .Data = {0x01, 0x10}
},
- CDC_Functional_CallManagement:
+ .CDC_Functional_CallManagement=
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x01,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x01,
- Data: {0x00, 0x00}
+ .Data = {0x00, 0x00}
},
- CDC_Functional_AbstractControlManagement:
+ .CDC_Functional_AbstractControlManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},
- SubType: 0x02,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
+ .SubType = 0x02,
- Data: {0x00}
+ .Data = {0x00}
},
- CDC_Functional_Union:
+ .CDC_Functional_Union =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x06,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x06,
- Data: {0x00, 0x01}
+ .Data = {0x00, 0x01}
},
- ManagementEndpoint:
+ .ManagementEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: CDC_NOTIFICATION_EPSIZE,
- PollingIntervalMS: 0x02
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,
+ .PollingIntervalMS = 0x02
},
- DCI_Interface:
+ .DCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x0A,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x0A,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- DataOutEndpoint:
+ .DataOutEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
},
- DataInEndpoint:
+ .DataInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
}
};
@@ -187,9 +187,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -198,9 +198,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -209,9 +209,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(19), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},
- UnicodeString: L"LUFA RNDIS CDC Demo"
+ .UnicodeString = L"LUFA RNDIS CDC Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -234,7 +234,7 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
diff --git a/Demos/Device/RNDISEthernet/RNDISEthernet.c b/Demos/Device/RNDISEthernet/RNDISEthernet.c
index 5e14bb76a..d77cc457b 100644
--- a/Demos/Device/RNDISEthernet/RNDISEthernet.c
+++ b/Demos/Device/RNDISEthernet/RNDISEthernet.c
@@ -39,10 +39,10 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: Ethernet_Task , TaskStatus: TASK_STOP },
- { Task: TCP_Task , TaskStatus: TASK_STOP },
- { Task: RNDIS_Task , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = Ethernet_Task , .TaskStatus = TASK_STOP },
+ { .Task = TCP_Task , .TaskStatus = TASK_STOP },
+ { .Task = RNDIS_Task , .TaskStatus = TASK_STOP },
};
/** Main program entry point. This routine configures the hardware required by the application, then
@@ -245,11 +245,11 @@ TASK(RNDIS_Task)
{
USB_Notification_t Notification = (USB_Notification_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- bNotification: NOTIF_RESPONSE_AVAILABLE,
- wValue: 0,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bNotification = NOTIF_RESPONSE_AVAILABLE,
+ .wValue = 0,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Indicate that a message response is ready for the host */
diff --git a/Demos/Device/USBtoSerial/Descriptors.c b/Demos/Device/USBtoSerial/Descriptors.c
index 67fb4e910..1619f9d57 100644
--- a/Demos/Device/USBtoSerial/Descriptors.c
+++ b/Demos/Device/USBtoSerial/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x02,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x02,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2044,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2044,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,113 +71,113 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 2,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 2,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- CCI_Interface:
+ .CCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0,
- AlternateSetting: 0,
+ .InterfaceNumber = 0,
+ .AlternateSetting = 0,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x02,
- SubClass: 0x02,
- Protocol: 0x01,
+ .Class = 0x02,
+ .SubClass = 0x02,
+ .Protocol = 0x01,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- CDC_Functional_IntHeader:
+ .CDC_Functional_IntHeader =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x00,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x00,
- Data: {0x01, 0x10}
+ .Data = {0x01, 0x10}
},
- CDC_Functional_CallManagement:
+ .CDC_Functional_CallManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x01,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x01,
- Data: {0x03, 0x01}
+ .Data = {0x03, 0x01}
},
- CDC_Functional_AbstractControlManagement:
+ .CDC_Functional_AbstractControlManagement =
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), Type: 0x24},
- SubType: 0x02,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(1)), .Type = 0x24},
+ .SubType = 0x02,
- Data: {0x06}
+ .Data = {0x06}
},
- CDC_Functional_Union:
+ .CDC_Functional_Union=
{
- Header: {Size: sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), Type: 0x24},
- SubType: 0x06,
+ .Header = {.Size = sizeof(CDC_FUNCTIONAL_DESCRIPTOR(2)), .Type = 0x24},
+ .SubType = 0x06,
- Data: {0x00, 0x01}
+ .Data = {0x00, 0x01}
},
- ManagementEndpoint:
+ .ManagementEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: CDC_NOTIFICATION_EPSIZE,
- PollingIntervalMS: 0xFF
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = CDC_NOTIFICATION_EPSIZE,
+ .PollingIntervalMS = 0xFF
},
- DCI_Interface:
+ .DCI_Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 2,
+ .TotalEndpoints = 2,
- Class: 0x0A,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0x0A,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- DataOutEndpoint:
+ .DataOutEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS = 0x00
},
- DataInEndpoint:
+ .DataInEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
- Attributes: EP_TYPE_BULK,
- EndpointSize: CDC_TXRX_EPSIZE,
- PollingIntervalMS: 0x00
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
+ .Attributes = EP_TYPE_BULK,
+ .EndpointSize = CDC_TXRX_EPSIZE,
+ .PollingIntervalMS= 0x00
}
};
@@ -187,9 +187,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -198,9 +198,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -209,9 +209,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(19), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},
- UnicodeString: L"LUFA USB-RS232 Demo"
+ .UnicodeString = L"LUFA USB-RS232 Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -230,26 +230,26 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
switch (DescriptorType)
{
- case DTYPE_Device:
+ case DTYPE_Device:
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
diff --git a/Demos/Device/USBtoSerial/USBtoSerial.c b/Demos/Device/USBtoSerial/USBtoSerial.c
index 1d238aa11..6bd14ccbe 100644
--- a/Demos/Device/USBtoSerial/USBtoSerial.c
+++ b/Demos/Device/USBtoSerial/USBtoSerial.c
@@ -33,8 +33,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: CDC_Task , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = CDC_Task , .TaskStatus = TASK_STOP },
};
/* Globals: */
@@ -43,10 +43,10 @@ TASK_LIST
* These values are set by the host via a class-specific request, and the physical USART should be reconfigured to match the
* new settings each time they are changed by the host.
*/
-CDC_Line_Coding_t LineCoding = { BaudRateBPS: 9600,
- CharFormat: OneStopBit,
- ParityType: Parity_None,
- DataBits: 8 };
+CDC_Line_Coding_t LineCoding = { .BaudRateBPS = 9600,
+ .CharFormat = OneStopBit,
+ .ParityType = Parity_None,
+ .DataBits = 8 };
/** Ring (circular) buffer to hold the RX data - data from the host to the attached device on the serial port. */
RingBuff_t Rx_Buffer;
@@ -224,11 +224,11 @@ TASK(CDC_Task)
USB_Notification_Header_t Notification = (USB_Notification_Header_t)
{
- NotificationType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- Notification: NOTIF_SerialState,
- wValue: 0,
- wIndex: 0,
- wLength: sizeof(uint16_t),
+ .NotificationType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
+ .Notification = NOTIF_SerialState,
+ .wValue = 0,
+ .wIndex = 0,
+ .wLength = sizeof(uint16_t),
};
uint16_t LineStateMask;
@@ -244,6 +244,7 @@ TASK(CDC_Task)
/* Select the Serial Rx Endpoint */
Endpoint_SelectEndpoint(CDC_RX_EPNUM);
+ /* Check to see if a packet has been received from the host */
if (Endpoint_IsOUTReceived())
{
/* Read the bytes in from the endpoint into the buffer while space is available */
diff --git a/Demos/Host/CDCHost/CDCHost.c b/Demos/Host/CDCHost/CDCHost.c
index 80d993953..aa999645a 100644
--- a/Demos/Host/CDCHost/CDCHost.c
+++ b/Demos/Host/CDCHost/CDCHost.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_CDC_Host , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_CDC_Host , .TaskStatus = TASK_STOP },
};
@@ -183,11 +183,11 @@ TASK(USB_CDC_Host)
/* Standard request to set the device configuration to configuration 1 */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetConfiguration,
+ .wValue = 1,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/GenericHIDHost/GenericHIDHost.c b/Demos/Host/GenericHIDHost/GenericHIDHost.c
index b047841f6..f0d196768 100644
--- a/Demos/Host/GenericHIDHost/GenericHIDHost.c
+++ b/Demos/Host/GenericHIDHost/GenericHIDHost.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_HID_Host , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_HID_Host , .TaskStatus = TASK_STOP },
};
@@ -259,11 +259,11 @@ void WriteNextReport(uint8_t* ReportOUTData, uint8_t ReportIndex, uint8_t Report
/* Class specific request to send a HID report to the device */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
- bRequest: REQ_SetReport,
- wValue: ((ReportType << 8) | ReportIndex),
- wIndex: 0,
- wLength: ReportLength,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bRequest = REQ_SetReport,
+ .wValue = ((ReportType << 8) | ReportIndex),
+ .wIndex = 0,
+ .wLength = ReportLength,
};
/* Select the control pipe for the request transfer */
@@ -288,11 +288,11 @@ TASK(USB_HID_Host)
/* Standard request to set the device configuration to configuration 1 */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetConfiguration,
+ .wValue = 1,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/KeyboardHost/KeyboardHost.c b/Demos/Host/KeyboardHost/KeyboardHost.c
index 35055ca79..bc75bd3f3 100644
--- a/Demos/Host/KeyboardHost/KeyboardHost.c
+++ b/Demos/Host/KeyboardHost/KeyboardHost.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Keyboard_Host , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Keyboard_Host , .TaskStatus = TASK_STOP },
};
@@ -255,11 +255,11 @@ TASK(USB_Keyboard_Host)
/* Standard request to set the device configuration to configuration 1 */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetConfiguration,
+ .wValue = 1,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
@@ -305,11 +305,11 @@ TASK(USB_Keyboard_Host)
/* HID class request to set the keyboard protocol to the Boot Protocol */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
- bRequest: REQ_SetProtocol,
- wValue: 0,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bRequest = REQ_SetProtocol,
+ .wValue = 0,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/KeyboardHostWithParser/HIDReport.c b/Demos/Host/KeyboardHostWithParser/HIDReport.c
index b985a45fe..14b803840 100644
--- a/Demos/Host/KeyboardHostWithParser/HIDReport.c
+++ b/Demos/Host/KeyboardHostWithParser/HIDReport.c
@@ -49,11 +49,11 @@ uint8_t GetHIDReportData(void)
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),
- bRequest: REQ_GetDescriptor,
- wValue: (DTYPE_Report << 8),
- wIndex: 0,
- wLength: HIDReportSize,
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),
+ .bRequest = REQ_GetDescriptor,
+ .wValue = (DTYPE_Report << 8),
+ .wIndex = 0,
+ .wLength = HIDReportSize,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
index ff4ae75c8..76ad5f258 100644
--- a/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Keyboard_Host , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Keyboard_Host , .TaskStatus = TASK_STOP },
};
@@ -186,11 +186,11 @@ TASK(USB_Keyboard_Host)
/* Standard request to set the device configuration to configuration 1 */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetConfiguration,
+ .wValue = 1,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/MassStorageHost/MassStorageHost.c b/Demos/Host/MassStorageHost/MassStorageHost.c
index 1c56e6eed..9352562de 100644
--- a/Demos/Host/MassStorageHost/MassStorageHost.c
+++ b/Demos/Host/MassStorageHost/MassStorageHost.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_MassStore_Host , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_MassStore_Host , .TaskStatus = TASK_STOP },
};
/* Globals */
@@ -157,11 +157,11 @@ TASK(USB_MassStore_Host)
/* Standard request to set the device configuration to configuration 1 */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetConfiguration,
+ .wValue = 1,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/MassStorageHost/MassStoreCommands.c b/Demos/Host/MassStorageHost/MassStoreCommands.c
index 41c59dc43..864edf30c 100644
--- a/Demos/Host/MassStorageHost/MassStoreCommands.c
+++ b/Demos/Host/MassStorageHost/MassStoreCommands.c
@@ -252,11 +252,11 @@ uint8_t MassStore_ClearPipeStall(const uint8_t EndpointNum)
{
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),
- bRequest: REQ_ClearFeature,
- wValue: FEATURE_ENDPOINT_HALT,
- wIndex: EndpointNum,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),
+ .bRequest = REQ_ClearFeature,
+ .wValue = FEATURE_ENDPOINT_HALT,
+ .wIndex = EndpointNum,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
@@ -274,11 +274,11 @@ uint8_t MassStore_MassStorageReset(void)
{
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
- bRequest: REQ_MassStorageReset,
- wValue: 0,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bRequest = REQ_MassStorageReset,
+ .wValue = 0,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
@@ -300,11 +300,11 @@ uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex)
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- bRequest: REQ_GetMaxLUN,
- wValue: 0,
- wIndex: 0,
- wLength: 1,
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bRequest = REQ_GetMaxLUN,
+ .wValue = 0,
+ .wIndex = 0,
+ .wLength = 1,
};
/* Select the control pipe for the request transfer */
@@ -337,17 +337,17 @@ uint8_t MassStore_RequestSense(const uint8_t LUNIndex, const SCSI_Request_Sense_
/* Create a CBW with a SCSI command to issue REQUEST SENSE command */
SCSICommandBlock = (CommandBlockWrapper_t)
{
- Header:
+ .Header =
{
- Signature: CBW_SIGNATURE,
- Tag: MassStore_Tag,
- DataTransferLength: sizeof(SCSI_Request_Sense_Response_t),
- Flags: COMMAND_DIRECTION_DATA_IN,
- LUN: LUNIndex,
- SCSICommandLength: 6
+ .Signature = CBW_SIGNATURE,
+ .Tag = MassStore_Tag,
+ .DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),
+ .Flags = COMMAND_DIRECTION_DATA_IN,
+ .LUN = LUNIndex,
+ .SCSICommandLength = 6
},
- SCSICommandData:
+ .SCSICommandData =
{
SCSI_CMD_REQUEST_SENSE,
0x00, // Reserved
@@ -404,17 +404,17 @@ uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAd
/* Create a CBW with a SCSI command to read in the given blocks from the device */
SCSICommandBlock = (CommandBlockWrapper_t)
{
- Header:
+ .Header =
{
- Signature: CBW_SIGNATURE,
- Tag: MassStore_Tag,
- DataTransferLength: ((uint32_t)Blocks * BlockSize),
- Flags: COMMAND_DIRECTION_DATA_IN,
- LUN: LUNIndex,
- SCSICommandLength: 10
+ .Signature = CBW_SIGNATURE,
+ .Tag = MassStore_Tag,
+ .DataTransferLength = ((uint32_t)Blocks * BlockSize),
+ .Flags = COMMAND_DIRECTION_DATA_IN,
+ .LUN = LUNIndex,
+ .SCSICommandLength = 10
},
- SCSICommandData:
+ .SCSICommandData =
{
SCSI_CMD_READ_10,
0x00, // Unused (control bits, all off)
@@ -475,17 +475,17 @@ uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockA
/* Create a CBW with a SCSI command to write the given blocks to the device */
SCSICommandBlock = (CommandBlockWrapper_t)
{
- Header:
+ .Header =
{
- Signature: CBW_SIGNATURE,
- Tag: MassStore_Tag,
- DataTransferLength: ((uint32_t)Blocks * BlockSize),
- Flags: COMMAND_DIRECTION_DATA_OUT,
- LUN: LUNIndex,
- SCSICommandLength: 10
+ .Signature = CBW_SIGNATURE,
+ .Tag = MassStore_Tag,
+ .DataTransferLength = ((uint32_t)Blocks * BlockSize),
+ .Flags = COMMAND_DIRECTION_DATA_OUT,
+ .LUN = LUNIndex,
+ .SCSICommandLength = 10
},
- SCSICommandData:
+ .SCSICommandData =
{
SCSI_CMD_WRITE_10,
0x00, // Unused (control bits, all off)
@@ -534,17 +534,17 @@ uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)
/* Create a CBW with a SCSI command to issue TEST UNIT READY command */
SCSICommandBlock = (CommandBlockWrapper_t)
{
- Header:
+ .Header =
{
- Signature: CBW_SIGNATURE,
- Tag: MassStore_Tag,
- DataTransferLength: 0,
- Flags: COMMAND_DIRECTION_DATA_IN,
- LUN: LUNIndex,
- SCSICommandLength: 6
+ .Signature = CBW_SIGNATURE,
+ .Tag = MassStore_Tag,
+ .DataTransferLength = 0,
+ .Flags = COMMAND_DIRECTION_DATA_IN,
+ .LUN = LUNIndex,
+ .SCSICommandLength = 6
},
- SCSICommandData:
+ .SCSICommandData =
{
SCSI_CMD_TEST_UNIT_READY,
0x00, // Reserved
@@ -583,17 +583,17 @@ uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const Ca
/* Create a CBW with a SCSI command to issue READ CAPACITY command */
SCSICommandBlock = (CommandBlockWrapper_t)
{
- Header:
+ .Header =
{
- Signature: CBW_SIGNATURE,
- Tag: MassStore_Tag,
- DataTransferLength: 8,
- Flags: COMMAND_DIRECTION_DATA_IN,
- LUN: LUNIndex,
- SCSICommandLength: 10
+ .Signature = CBW_SIGNATURE,
+ .Tag = MassStore_Tag,
+ .DataTransferLength = 8,
+ .Flags = COMMAND_DIRECTION_DATA_IN,
+ .LUN = LUNIndex,
+ .SCSICommandLength = 10
},
- SCSICommandData:
+ .SCSICommandData =
{
SCSI_CMD_READ_CAPACITY_10,
0x00, // Reserved
@@ -655,17 +655,17 @@ uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, const bool P
/* Create a CBW with a SCSI command to issue PREVENT ALLOW MEDIUM REMOVAL command */
SCSICommandBlock = (CommandBlockWrapper_t)
{
- Header:
+ .Header =
{
- Signature: CBW_SIGNATURE,
- Tag: MassStore_Tag,
- DataTransferLength: 0,
- Flags: COMMAND_DIRECTION_DATA_OUT,
- LUN: LUNIndex,
- SCSICommandLength: 6
+ .Signature = CBW_SIGNATURE,
+ .Tag = MassStore_Tag,
+ .DataTransferLength = 0,
+ .Flags = COMMAND_DIRECTION_DATA_OUT,
+ .LUN = LUNIndex,
+ .SCSICommandLength = 6
},
- SCSICommandData:
+ .SCSICommandData =
{
SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL,
0x00, // Reserved
diff --git a/Demos/Host/MouseHost/MouseHost.c b/Demos/Host/MouseHost/MouseHost.c
index 6a59b4d59..a11ecc86b 100644
--- a/Demos/Host/MouseHost/MouseHost.c
+++ b/Demos/Host/MouseHost/MouseHost.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Mouse_Host , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Mouse_Host , .TaskStatus = TASK_STOP },
};
@@ -250,11 +250,11 @@ TASK(USB_Mouse_Host)
/* Standard request to set the device configuration to configuration 1 */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetConfiguration,
+ .wValue = 1,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
@@ -300,11 +300,11 @@ TASK(USB_Mouse_Host)
/* HID class request to set the mouse protocol to the Boot Protocol */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
- bRequest: REQ_SetProtocol,
- wValue: 0,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
+ .bRequest = REQ_SetProtocol,
+ .wValue = 0,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/MouseHostWithParser/HIDReport.c b/Demos/Host/MouseHostWithParser/HIDReport.c
index 176f18cf6..68d6580f4 100644
--- a/Demos/Host/MouseHostWithParser/HIDReport.c
+++ b/Demos/Host/MouseHostWithParser/HIDReport.c
@@ -49,11 +49,11 @@ uint8_t GetHIDReportData(void)
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),
- bRequest: REQ_GetDescriptor,
- wValue: (DTYPE_Report << 8),
- wIndex: 0,
- wLength: HIDReportSize,
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_INTERFACE),
+ .bRequest = REQ_GetDescriptor,
+ .wValue = (DTYPE_Report << 8),
+ .wIndex = 0,
+ .wLength = HIDReportSize,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/MouseHostWithParser/MouseHostWithParser.c
index 44c68eea7..df063dab3 100644
--- a/Demos/Host/MouseHostWithParser/MouseHostWithParser.c
+++ b/Demos/Host/MouseHostWithParser/MouseHostWithParser.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Mouse_Host , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Mouse_Host , .TaskStatus = TASK_STOP },
};
@@ -187,11 +187,11 @@ TASK(USB_Mouse_Host)
/* Standard request to set the device configuration to configuration 1 */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetConfiguration,
+ .wValue = 1,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/StillImageHost/StillImageCommands.c b/Demos/Host/StillImageHost/StillImageCommands.c
index a12785743..233e5b116 100644
--- a/Demos/Host/StillImageHost/StillImageCommands.c
+++ b/Demos/Host/StillImageHost/StillImageCommands.c
@@ -265,11 +265,11 @@ uint8_t SImage_ClearPipeStall(const uint8_t EndpointNum)
{
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),
- bRequest: REQ_ClearFeature,
- wValue: FEATURE_ENDPOINT_HALT,
- wIndex: EndpointNum,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),
+ .bRequest = REQ_ClearFeature,
+ .wValue = FEATURE_ENDPOINT_HALT,
+ .wIndex = EndpointNum,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
diff --git a/Demos/Host/StillImageHost/StillImageHost.c b/Demos/Host/StillImageHost/StillImageHost.c
index 3e5bf6a78..4b196c3ed 100644
--- a/Demos/Host/StillImageHost/StillImageHost.c
+++ b/Demos/Host/StillImageHost/StillImageHost.c
@@ -39,8 +39,8 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_SImage_Host , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_SImage_Host , .TaskStatus = TASK_STOP },
};
@@ -153,11 +153,11 @@ TASK(USB_SImage_Host)
/* Standard request to set the device configuration to configuration 1 */
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetConfiguration,
+ .wValue = 1,
+ .wIndex = 0,
+ .wLength = 0,
};
/* Select the control pipe for the request transfer */
@@ -211,11 +211,11 @@ TASK(USB_SImage_Host)
PIMA_SendBlock = (PIMA_Container_t)
{
- DataLength: PIMA_COMMAND_SIZE(0),
- Type: CType_CommandBlock,
- Code: PIMA_OPERATION_GETDEVICEINFO,
- TransactionID: 0x00000000,
- Params: {},
+ .DataLength = PIMA_COMMAND_SIZE(0),
+ .Type = CType_CommandBlock,
+ .Code = PIMA_OPERATION_GETDEVICEINFO,
+ .TransactionID = 0x00000000,
+ .Params = {},
};
/* Send the GETDEVICEINFO block */
@@ -290,11 +290,11 @@ TASK(USB_SImage_Host)
PIMA_SendBlock = (PIMA_Container_t)
{
- DataLength: PIMA_COMMAND_SIZE(1),
- Type: CType_CommandBlock,
- Code: PIMA_OPERATION_OPENSESSION,
- TransactionID: 0x00000000,
- Params: {0x00000001},
+ .DataLength = PIMA_COMMAND_SIZE(1),
+ .Type = CType_CommandBlock,
+ .Code = PIMA_OPERATION_OPENSESSION,
+ .TransactionID = 0x00000000,
+ .Params = {0x00000001},
};
/* Send the OPENSESSION block, open a session with an ID of 0x0001 */
@@ -318,11 +318,11 @@ TASK(USB_SImage_Host)
PIMA_SendBlock = (PIMA_Container_t)
{
- DataLength: PIMA_COMMAND_SIZE(1),
- Type: CType_CommandBlock,
- Code: PIMA_OPERATION_CLOSESESSION,
- TransactionID: 0x00000001,
- Params: {0x00000001},
+ .DataLength = PIMA_COMMAND_SIZE(1),
+ .Type = CType_CommandBlock,
+ .Code = PIMA_OPERATION_CLOSESESSION,
+ .TransactionID = 0x00000001,
+ .Params = {0x00000001},
};
/* Send the CLOSESESSION block, close the session with an ID of 0x0001 */
diff --git a/Demos/OTG/TestApp/Descriptors.c b/Demos/OTG/TestApp/Descriptors.c
index d5155678b..caf6c9107 100644
--- a/Demos/OTG/TestApp/Descriptors.c
+++ b/Demos/OTG/TestApp/Descriptors.c
@@ -44,24 +44,24 @@
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2040,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2040,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -71,37 +71,37 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: ( sizeof(USB_Descriptor_Configuration_Header_t)
- + sizeof(USB_Descriptor_Interface_t) ),
+ .TotalConfigurationSize = ( sizeof(USB_Descriptor_Configuration_Header_t)
+ + sizeof(USB_Descriptor_Interface_t) ),
- TotalInterfaces: 1,
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- Interface:
+ .Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 1,
- AlternateSetting: 0,
+ .InterfaceNumber = 1,
+ .AlternateSetting = 0,
- TotalEndpoints: 0,
+ .TotalEndpoints = 0,
- Class: 0xFF,
- SubClass: 0x00,
- Protocol: 0x00,
+ .Class = 0xFF,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
};
@@ -111,9 +111,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
*/
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -122,9 +122,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(11), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera"
+ .UnicodeString = L"Dean Camera"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -133,9 +133,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(9), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(9), .Type = DTYPE_String},
- UnicodeString: L"LUFA Demo"
+ .UnicodeString = L"LUFA Demo"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
@@ -158,22 +158,22 @@ uint16_t USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** c
Address = DESCRIPTOR_ADDRESS(DeviceDescriptor);
Size = sizeof(USB_Descriptor_Device_t);
break;
- case DTYPE_Configuration:
+ case DTYPE_Configuration:
Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
Size = sizeof(USB_Descriptor_Configuration_t);
break;
- case DTYPE_String:
+ case DTYPE_String:
switch (DescriptorNumber)
{
- case 0x00:
+ case 0x00:
Address = DESCRIPTOR_ADDRESS(LanguageString);
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
+ case 0x01:
Address = DESCRIPTOR_ADDRESS(ManufacturerString);
Size = pgm_read_byte(&ManufacturerString.Header.Size);
break;
- case 0x02:
+ case 0x02:
Address = DESCRIPTOR_ADDRESS(ProductString);
Size = pgm_read_byte(&ProductString.Header.Size);
break;
diff --git a/Demos/OTG/TestApp/TestApp.c b/Demos/OTG/TestApp/TestApp.c
index d5a752322..8c8a23ffc 100644
--- a/Demos/OTG/TestApp/TestApp.c
+++ b/Demos/OTG/TestApp/TestApp.c
@@ -39,10 +39,10 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: TestApp_CheckJoystick, TaskStatus: TASK_RUN },
- { Task: TestApp_CheckHWB , TaskStatus: TASK_RUN },
- { Task: TestApp_CheckTemp , TaskStatus: TASK_RUN },
- { Task: USB_USBTask , TaskStatus: TASK_RUN },
+ { .Task = TestApp_CheckJoystick, .TaskStatus = TASK_RUN },
+ { .Task = TestApp_CheckHWB , .TaskStatus = TASK_RUN },
+ { .Task = TestApp_CheckTemp , .TaskStatus = TASK_RUN },
+ { .Task = USB_USBTask , .TaskStatus = TASK_RUN },
};
/** Main program entry point. This routine configures the hardware required by the application, then
diff --git a/LUFA/ChangeLog.txt b/LUFA/ChangeLog.txt
index d2f7fcb5e..38b666b49 100644
--- a/LUFA/ChangeLog.txt
+++ b/LUFA/ChangeLog.txt
@@ -55,6 +55,7 @@
* - Fixed incorrect HID interface class and subclass values in the Mouse and KeyboardMouse demos (thanks to Brian Dickman)
* - Capitalised the "Descriptor_Search" and "Descriptor_Search_Comp" prefixes of the values in the DSearch_Return_ErrorCodes_t and
* DSearch_Comp_Return_ErrorCodes_t enums
+ * - Changed over all deprecated GCC structure tag initializers to the standardized C99 format (thanks to Mike Alexander)
*
*
* \section Sec_ChangeLog090401 Version 090401
diff --git a/LUFA/Drivers/USB/Class/ConfigDescriptor.c b/LUFA/Drivers/USB/Class/ConfigDescriptor.c
index c9f8c3cbb..dd782c81d 100644
--- a/LUFA/Drivers/USB/Class/ConfigDescriptor.c
+++ b/LUFA/Drivers/USB/Class/ConfigDescriptor.c
@@ -37,11 +37,11 @@ uint8_t USB_GetDeviceConfigDescriptor(uint16_t* const ConfigSizePtr, void* Buffe
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_GetDescriptor,
- wValue: (DTYPE_Configuration << 8),
- wIndex: 0,
- wLength: sizeof(USB_Descriptor_Configuration_Header_t),
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_GetDescriptor,
+ .wValue = (DTYPE_Configuration << 8),
+ .wIndex = 0,
+ .wLength = sizeof(USB_Descriptor_Configuration_Header_t),
};
Pipe_SelectPipe(PIPE_CONTROLPIPE);
diff --git a/LUFA/Drivers/USB/HighLevel/USBTask.c b/LUFA/Drivers/USB/HighLevel/USBTask.c
index 80731ac19..e1c065905 100644
--- a/LUFA/Drivers/USB/HighLevel/USBTask.c
+++ b/LUFA/Drivers/USB/HighLevel/USBTask.c
@@ -171,11 +171,11 @@ static void USB_HostTask(void)
case HOST_STATE_Default:
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_GetDescriptor,
- wValue: (DTYPE_Device << 8),
- wIndex: 0,
- wLength: PIPE_CONTROLPIPE_DEFAULT_SIZE,
+ .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_GetDescriptor,
+ .wValue = (DTYPE_Device << 8),
+ .wIndex = 0,
+ .wLength = PIPE_CONTROLPIPE_DEFAULT_SIZE,
};
uint8_t DataBuffer[PIPE_CONTROLPIPE_DEFAULT_SIZE];
@@ -216,11 +216,11 @@ static void USB_HostTask(void)
USB_HostRequest = (USB_Host_Request_Header_t)
{
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetAddress,
- wValue: USB_HOST_DEVICEADDRESS,
- wIndex: 0,
- wLength: 0,
+ .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
+ .bRequest = REQ_SetAddress,
+ .wValue = USB_HOST_DEVICEADDRESS,
+ .wIndex = 0,
+ .wLength = 0,
};
if ((SubErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h
index 4e2ffec5a..c4a58b471 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.h
@@ -805,8 +805,8 @@
*
* \ingroup Group_PipeRW
*/
- static inline void Pipe_Ignore_DWord(void) ATTR_ALWAYS_INLINE;
- static inline void Pipe_Ignore_DWord(void)
+ static inline void Pipe_Discard_DWord(void) ATTR_ALWAYS_INLINE;
+ static inline void Pipe_Discard_DWord(void)
{
uint8_t Dummy;
@@ -854,8 +854,6 @@
/** Spinloops until the currently selected non-control pipe is ready for the next packed of data
* to be read or written to it.
*
- * \note This routine should not be called on CONTROL type pipes.
- *
* \ingroup Group_PipeRW
*
* \return A value from the Pipe_WaitUntilReady_ErrorCodes_t enum.
diff --git a/LUFA/MemoryAllocator/DynAlloc.c b/LUFA/MemoryAllocator/DynAlloc.c
index a91e0f35e..4f1c82241 100644
--- a/LUFA/MemoryAllocator/DynAlloc.c
+++ b/LUFA/MemoryAllocator/DynAlloc.c
@@ -38,8 +38,8 @@ struct
uint8_t Mem_Block_Flags[(NUM_BLOCKS / 4) + ((NUM_BLOCKS % 4) ? 1 : 0)];
uint8_t FlagMaskLookupMask[4];
uint8_t FlagMaskLookupNum[4];
-} Mem_MemData = {FlagMaskLookupMask: {(3 << 0), (3 << 2), (3 << 4), (3 << 6)},
- FlagMaskLookupNum: { 0, 2, 4, 6}};
+} Mem_MemData = {.FlagMaskLookupMask = {(3 << 0), (3 << 2), (3 << 4), (3 << 6)},
+ .FlagMaskLookupNum = { 0, 2, 4, 6}};
static uint8_t Mem_GetBlockFlags(const Block_Number_t BlockNum)
{
diff --git a/LUFA/MigrationInformation.txt b/LUFA/MigrationInformation.txt
index beb0cb6ed..104f0984b 100644
--- a/LUFA/MigrationInformation.txt
+++ b/LUFA/MigrationInformation.txt
@@ -54,7 +54,8 @@
* - All pipe read/write/discard aliases which did not have an explicitly endianness specifier (such as Pipe_Read_Word()) have
* been removed for clarity. Existing projects should use the "_LE" suffix on such calls to use the explicit Little Endian versions.
* - The Host_IsResetBusDone() macro has been renamed to Host_IsBusResetComplete().
- * - The Pipe_Ignore_Word() function has been renamed to Pipe_Discard_Word() to remain consistent with the rest of the pipe API.
+ * - The Pipe_Ignore_Word() and Pipe_Ignore_DWord() functions have been renamed to Pipe_Discard_Word() and Pipe_Discard_DWord() to remain
+ * consistent with the rest of the pipe API.
* - It is no longer needed to manually include the headers from LUFA/Drivers/USB/Class, as they are now included along with the rest
* of the USB headers when LUFA/Drivers/USB/USB.h is included.
* - Functions in the ConfigDescriptor.h header file no longer have "Host_" as part of their names.
diff --git a/LUFA/Scheduler/Scheduler.h b/LUFA/Scheduler/Scheduler.h
index 1ef477cad..0da80bb27 100644
--- a/LUFA/Scheduler/Scheduler.h
+++ b/LUFA/Scheduler/Scheduler.h
@@ -55,8 +55,8 @@
*
* TASK_LIST
* {
- * { Task: MyTask1, TaskStatus: TASK_RUN, GroupID: 1 },
- * { Task: MyTask2, TaskStatus: TASK_RUN, GroupID: 1 },
+ * { .Task = MyTask1, .TaskStatus = TASK_RUN, .GroupID = 1 },
+ * { .Task = MyTask2, .TaskStatus = TASK_RUN, .GroupID = 1 },
* }
*
* int main(void)
@@ -115,7 +115,7 @@
* \code
* TASK_LIST
* {
- * { Task: MyTask1, TaskStatus: TASK_RUN, GroupID: 1 },
+ * { .Task = MyTask1, .TaskStatus = TASK_RUN, .GroupID = 1 },
* // More task entries here
* }
* \endcode
diff --git a/Projects/Magstripe/Descriptors.c b/Projects/Magstripe/Descriptors.c
index d5bbeb34d..819b48892 100644
--- a/Projects/Magstripe/Descriptors.c
+++ b/Projects/Magstripe/Descriptors.c
@@ -78,24 +78,24 @@ USB_Descriptor_HIDReport_Datatype_t PROGMEM KeyboardReport[] =
*/
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
- Header: {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
+ .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
- USBSpecification: VERSION_BCD(01.10),
- Class: 0x00,
- SubClass: 0x00,
- Protocol: 0x00,
+ .USBSpecification = VERSION_BCD(01.10),
+ .Class = 0x00,
+ .SubClass = 0x00,
+ .Protocol = 0x00,
- Endpoint0Size: 8,
+ .Endpoint0Size = 8,
- VendorID: 0x03EB,
- ProductID: 0x2042,
- ReleaseNumber: 0x0000,
+ .VendorID = 0x03EB,
+ .ProductID = 0x2042,
+ .ReleaseNumber = 0x0000,
- ManufacturerStrIndex: 0x01,
- ProductStrIndex: 0x02,
- SerialNumStrIndex: NO_DESCRIPTOR,
+ .ManufacturerStrIndex = 0x01,
+ .ProductStrIndex = 0x02,
+ .SerialNumStrIndex = NO_DESCRIPTOR,
- NumberOfConfigurations: 1
+ .NumberOfConfigurations = 1
};
/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage
@@ -105,56 +105,56 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
*/
USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
- Config:
+ .Config =
{
- Header: {Size: sizeof(USB_Descriptor_Configuration_Header_t), Type: DTYPE_Configuration},
+ .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},
- TotalConfigurationSize: sizeof(USB_Descriptor_Configuration_t),
- TotalInterfaces: 1,
+ .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
+ .TotalInterfaces = 1,
- ConfigurationNumber: 1,
- ConfigurationStrIndex: NO_DESCRIPTOR,
+ .ConfigurationNumber = 1,
+ .ConfigurationStrIndex = NO_DESCRIPTOR,
- ConfigAttributes: (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
+ .ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
- MaxPowerConsumption: USB_CONFIG_POWER_MA(100)
+ .MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
},
- Interface:
+ .Interface =
{
- Header: {Size: sizeof(USB_Descriptor_Interface_t), Type: DTYPE_Interface},
+ .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface},
- InterfaceNumber: 0x00,
- AlternateSetting: 0x00,
+ .InterfaceNumber = 0x00,
+ .AlternateSetting = 0x00,
- TotalEndpoints: 1,
+ .TotalEndpoints = 1,
- Class: 0x03,
- SubClass: 0x01,
- Protocol: 0x01,
+ .Class = 0x03,
+ .SubClass = 0x01,
+ .Protocol = 0x01,
- InterfaceStrIndex: NO_DESCRIPTOR
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
- KeyboardHID:
+ .KeyboardHID =
{
- Header: {Size: sizeof(USB_Descriptor_HID_t), Type: DTYPE_HID},
+ .Header = {.Size = sizeof(USB_Descriptor_HID_t), .Type = DTYPE_HID},
- HIDSpec: VERSION_BCD(01.11),
- CountryCode: 0x00,
- TotalHIDReports: 0x01,
- HIDReportType: DTYPE_Report,
- HIDReportLength: sizeof(KeyboardReport)
+ .HIDSpec = VERSION_BCD(01.11),
+ .CountryCode = 0x00,
+ .TotalHIDReports = 0x01,
+ .HIDReportType = DTYPE_Report,
+ .HIDReportLength = sizeof(KeyboardReport)
},
- KeyboardEndpoint:
+ .KeyboardEndpoint =
{
- Header: {Size: sizeof(USB_Descriptor_Endpoint_t), Type: DTYPE_Endpoint},
+ .Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- EndpointAddress: (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM),
- Attributes: EP_TYPE_INTERRUPT,
- EndpointSize: KEYBOARD_EPSIZE,
- PollingIntervalMS: 0x04
+ .EndpointAddress = (ENDPOINT_DESCRIPTOR_DIR_IN | KEYBOARD_EPNUM),
+ .Attributes = EP_TYPE_INTERRUPT,
+ .EndpointSize = KEYBOARD_EPSIZE,
+ .PollingIntervalMS = 0x04
},
};
@@ -163,9 +163,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
* via the language ID table available at USB.org what languages the device supports for its string descriptors. */
USB_Descriptor_String_t PROGMEM LanguageString =
{
- Header: {Size: USB_STRING_LEN(1), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
- UnicodeString: {LANGUAGE_ID_ENG}
+ .UnicodeString = {LANGUAGE_ID_ENG}
};
/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
@@ -174,9 +174,9 @@ USB_Descriptor_String_t PROGMEM LanguageString =
*/
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
- Header: {Size: USB_STRING_LEN(32), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(32), .Type = DTYPE_String},
- UnicodeString: L"Dean Camera and Denver Gingerich"
+ .UnicodeString = L"Dean Camera and Denver Gingerich"
};
/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
@@ -185,9 +185,9 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
USB_Descriptor_String_t PROGMEM ProductString =
{
- Header: {Size: USB_STRING_LEN(20), Type: DTYPE_String},
+ .Header = {.Size = USB_STRING_LEN(20), .Type = DTYPE_String},
- UnicodeString: L"Magnetic Card Reader"
+ .UnicodeString = L"Magnetic Card Reader"
};
/** This function is called by the library when in device mode, and must be overridden (see StdDescriptors.h
diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c
index 9132a80de..4511b1c54 100644
--- a/Projects/Magstripe/Magstripe.c
+++ b/Projects/Magstripe/Magstripe.c
@@ -40,9 +40,9 @@
/* Scheduler Task List */
TASK_LIST
{
- { Task: USB_USBTask , TaskStatus: TASK_STOP },
- { Task: USB_Keyboard_Report , TaskStatus: TASK_STOP },
- { Task: Magstripe_Read , TaskStatus: TASK_STOP },
+ { .Task = USB_USBTask , .TaskStatus = TASK_STOP },
+ { .Task = USB_Keyboard_Report , .TaskStatus = TASK_STOP },
+ { .Task = Magstripe_Read , .TaskStatus = TASK_STOP },
};
/* Global Variables */