mirror of
https://github.com/dougg3/mac-rom-simm-programmer.git
synced 2024-08-31 12:29:38 +00:00
Move descriptors to RAM
This ensures they will work properly on the AT90USB128x, especially in the bootloader where they will be in the upper 64 KB.
This commit is contained in:
parent
3a8e006925
commit
b627ef9020
@ -37,7 +37,7 @@
|
||||
<listOptionValue builtIn="false" value="ORDERED_EP_CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="FIXED_CONTROL_ENDPOINT_SIZE=8"/>
|
||||
<listOptionValue builtIn="false" value="FIXED_NUM_CONFIGURATIONS=1"/>
|
||||
<listOptionValue builtIn="false" value="USE_FLASH_DESCRIPTORS"/>
|
||||
<listOptionValue builtIn="false" value="USE_RAM_DESCRIPTORS"/>
|
||||
<listOptionValue builtIn="false" value="USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_MANUAL_PLL)""/>
|
||||
</option>
|
||||
<option id="de.innot.avreclipse.compiler.option.otherflags.1513967861" name="Other flags" superClass="de.innot.avreclipse.compiler.option.otherflags" value="-ffunction-sections -fdata-sections" valueType="string"/>
|
||||
@ -112,7 +112,7 @@
|
||||
<listOptionValue builtIn="false" value="ORDERED_EP_CONFIG"/>
|
||||
<listOptionValue builtIn="false" value="FIXED_CONTROL_ENDPOINT_SIZE=8"/>
|
||||
<listOptionValue builtIn="false" value="FIXED_NUM_CONFIGURATIONS=1"/>
|
||||
<listOptionValue builtIn="false" value="USE_FLASH_DESCRIPTORS"/>
|
||||
<listOptionValue builtIn="false" value="USE_RAM_DESCRIPTORS"/>
|
||||
<listOptionValue builtIn="false" value="USE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_MANUAL_PLL)""/>
|
||||
</option>
|
||||
<option id="de.innot.avreclipse.compiler.option.otherflags.1566165436" name="Other flags" superClass="de.innot.avreclipse.compiler.option.otherflags" value="-ffunction-sections -fdata-sections" valueType="string"/>
|
||||
|
@ -54,7 +54,7 @@
|
||||
* number of device configurations. The descriptor is read out by the USB host when the enumeration
|
||||
* process begins.
|
||||
*/
|
||||
const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
|
||||
const USB_Descriptor_Device_t DeviceDescriptor =
|
||||
{
|
||||
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
|
||||
|
||||
@ -81,7 +81,7 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
|
||||
* and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
|
||||
* a configuration so that the host may correctly communicate with the USB device.
|
||||
*/
|
||||
const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||
const USB_Descriptor_Configuration_t ConfigurationDescriptor =
|
||||
{
|
||||
.Config =
|
||||
{
|
||||
@ -190,7 +190,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
||||
* the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate
|
||||
* via the language ID table available at USB.org what languages the device supports for its string descriptors.
|
||||
*/
|
||||
const USB_Descriptor_String_t PROGMEM LanguageString =
|
||||
const USB_Descriptor_String_t LanguageString =
|
||||
{
|
||||
.Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
|
||||
|
||||
@ -201,7 +201,7 @@ const USB_Descriptor_String_t PROGMEM LanguageString =
|
||||
* form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
|
||||
* Descriptor.
|
||||
*/
|
||||
const USB_Descriptor_String_t PROGMEM ManufacturerString =
|
||||
const USB_Descriptor_String_t ManufacturerString =
|
||||
{
|
||||
.Header = {.Size = USB_STRING_LEN(10), .Type = DTYPE_String},
|
||||
|
||||
@ -212,7 +212,7 @@ const USB_Descriptor_String_t PROGMEM ManufacturerString =
|
||||
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
|
||||
* Descriptor.
|
||||
*/
|
||||
const USB_Descriptor_String_t PROGMEM ProductString =
|
||||
const USB_Descriptor_String_t ProductString =
|
||||
{
|
||||
.Header = {.Size = USB_STRING_LEN(23), .Type = DTYPE_String},
|
||||
|
||||
@ -250,15 +250,15 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
||||
{
|
||||
case 0x00:
|
||||
Address = &LanguageString;
|
||||
Size = pgm_read_byte(&LanguageString.Header.Size);
|
||||
Size = LanguageString.Header.Size;
|
||||
break;
|
||||
case 0x01:
|
||||
Address = &ManufacturerString;
|
||||
Size = pgm_read_byte(&ManufacturerString.Header.Size);
|
||||
Size = ManufacturerString.Header.Size;
|
||||
break;
|
||||
case 0x02:
|
||||
Address = &ProductString;
|
||||
Size = pgm_read_byte(&ProductString.Header.Size);
|
||||
Size = ProductString.Header.Size;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user