Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Demos/Device/ClassDriver/AudioInput/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x2047,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x2047),
.ReleaseNumber = VERSION_BCD(0,0,2),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -75,7 +75,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 2,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -222,7 +222,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = AUDIO_STREAM_EPADDR,
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AUDIO_STREAM_EPSIZE,
.EndpointSize = CPU_TO_LE16(AUDIO_STREAM_EPSIZE),
.PollingIntervalMS = 0x01
},

Expand Down
8 changes: 4 additions & 4 deletions Demos/Device/ClassDriver/AudioOutput/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x2046,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x2046),
.ReleaseNumber = VERSION_BCD(0,0,2),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -75,7 +75,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 2,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -222,7 +222,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = AUDIO_STREAM_EPADDR,
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AUDIO_STREAM_EPSIZE,
.EndpointSize = CPU_TO_LE16(AUDIO_STREAM_EPSIZE),
.PollingIntervalMS = 0x01
},

Expand Down
18 changes: 9 additions & 9 deletions Demos/Device/ClassDriver/DualVirtualSerial/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x204E,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x204E),
.ReleaseNumber = VERSION_BCD(0,0,1),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -76,7 +76,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 4,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -148,7 +148,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = CDC1_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.EndpointSize = CPU_TO_LE16(CDC_NOTIFICATION_EPSIZE),
.PollingIntervalMS = 0xFF
},

Expand All @@ -174,7 +174,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = CDC1_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.EndpointSize = CPU_TO_LE16(CDC_TXRX_EPSIZE),
.PollingIntervalMS = 0x05
},

Expand All @@ -184,7 +184,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = CDC1_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.EndpointSize = CPU_TO_LE16(CDC_TXRX_EPSIZE),
.PollingIntervalMS = 0x05
},

Expand Down Expand Up @@ -249,7 +249,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = CDC2_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.EndpointSize = CPU_TO_LE16(CDC_NOTIFICATION_EPSIZE),
.PollingIntervalMS = 0xFF
},

Expand All @@ -275,7 +275,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = CDC2_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.EndpointSize = CPU_TO_LE16(CDC_TXRX_EPSIZE),
.PollingIntervalMS = 0x05
},

Expand All @@ -285,7 +285,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = CDC2_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.EndpointSize = CPU_TO_LE16(CDC_TXRX_EPSIZE),
.PollingIntervalMS = 0x05
}
};
Expand Down
10 changes: 5 additions & 5 deletions Demos/Device/ClassDriver/GenericHID/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x204F,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x204F),
.ReleaseNumber = VERSION_BCD(0,0,1),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -93,7 +93,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 1,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -128,7 +128,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(GenericReport)
.HIDReportLength = CPU_TO_LE16(sizeof(GenericReport))
},

.HID_ReportINEndpoint =
Expand All @@ -137,7 +137,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = GENERIC_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = GENERIC_EPSIZE,
.EndpointSize = CPU_TO_LE16(GENERIC_EPSIZE),
.PollingIntervalMS = 0x05
},
};
Expand Down
10 changes: 5 additions & 5 deletions Demos/Device/ClassDriver/Joystick/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x2043,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x2043),
.ReleaseNumber = VERSION_BCD(0,0,1),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -93,7 +93,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 1,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -128,7 +128,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(JoystickReport)
.HIDReportLength = CPU_TO_LE16(sizeof(JoystickReport))
},

.HID_ReportINEndpoint =
Expand All @@ -137,7 +137,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = JOYSTICK_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = JOYSTICK_EPSIZE,
.EndpointSize = CPU_TO_LE16(JOYSTICK_EPSIZE),
.PollingIntervalMS = 0x05
}
};
Expand Down
10 changes: 5 additions & 5 deletions Demos/Device/ClassDriver/Keyboard/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x2042,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x2042),
.ReleaseNumber = VERSION_BCD(0,0,1),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -89,7 +89,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 1,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -124,7 +124,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(KeyboardReport)
.HIDReportLength = CPU_TO_LE16(sizeof(KeyboardReport))
},

.HID_ReportINEndpoint =
Expand All @@ -133,7 +133,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = KEYBOARD_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = KEYBOARD_EPSIZE,
.EndpointSize = CPU_TO_LE16(KEYBOARD_EPSIZE),
.PollingIntervalMS = 0x05
},
};
Expand Down
14 changes: 7 additions & 7 deletions Demos/Device/ClassDriver/KeyboardMouse/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x204D,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x204D),
.ReleaseNumber = VERSION_BCD(0,0,1),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -105,7 +105,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 2,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -140,7 +140,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(KeyboardReport)
.HIDReportLength = CPU_TO_LE16(sizeof(KeyboardReport))
},

.HID1_ReportINEndpoint =
Expand All @@ -149,7 +149,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = KEYBOARD_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
.EndpointSize = CPU_TO_LE16(HID_EPSIZE),
.PollingIntervalMS = 0x05
},

Expand Down Expand Up @@ -177,7 +177,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(MouseReport)
.HIDReportLength = CPU_TO_LE16(sizeof(MouseReport))
},

.HID2_ReportINEndpoint =
Expand All @@ -186,7 +186,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = MOUSE_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
.EndpointSize = CPU_TO_LE16(HID_EPSIZE),
.PollingIntervalMS = 0x05
}
};
Expand Down
10 changes: 5 additions & 5 deletions Demos/Device/ClassDriver/KeyboardMouseMultiReport/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x2066,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x2066),
.ReleaseNumber = VERSION_BCD(0,0,1),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -152,7 +152,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 1,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -187,7 +187,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.CountryCode = 0x00,
.TotalReportDescriptors = 1,
.HIDReportType = HID_DTYPE_Report,
.HIDReportLength = sizeof(HIDReport)
.HIDReportLength = CPU_TO_LE16(sizeof(HIDReport))
},

.HID_ReportINEndpoint =
Expand All @@ -196,7 +196,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = HID_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = HID_EPSIZE,
.EndpointSize = CPU_TO_LE16(HID_EPSIZE),
.PollingIntervalMS = 0x05
},
};
Expand Down
10 changes: 5 additions & 5 deletions Demos/Device/ClassDriver/MIDI/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =

.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,

.VendorID = 0x03EB,
.ProductID = 0x2048,
.VendorID = CPU_TO_LE16(0x03EB),
.ProductID = CPU_TO_LE16(0x2048),
.ReleaseNumber = VERSION_BCD(0,0,1),

.ManufacturerStrIndex = STRING_ID_Manufacturer,
Expand All @@ -75,7 +75,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration},

.TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t),
.TotalConfigurationSize = CPU_TO_LE16(sizeof(USB_Descriptor_Configuration_t)),
.TotalInterfaces = 2,

.ConfigurationNumber = 1,
Expand Down Expand Up @@ -201,7 +201,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = MIDI_STREAM_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
.EndpointSize = CPU_TO_LE16(MIDI_STREAM_EPSIZE),
.PollingIntervalMS = 0x05
},

Expand All @@ -226,7 +226,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =

.EndpointAddress = MIDI_STREAM_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
.EndpointSize = CPU_TO_LE16(MIDI_STREAM_EPSIZE),
.PollingIntervalMS = 0x05
},

Expand Down
Loading