.ProductID = 0x2045,
.ReleaseNumber = VERSION_BCD(00.01),
- .ManufacturerStrIndex = 0x01,
- .ProductStrIndex = 0x02,
+ .ManufacturerStrIndex = NO_DESCRIPTOR,
+ .ProductStrIndex = NO_DESCRIPTOR,
.SerialNumStrIndex = USE_INTERNAL_SERIAL,
.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
.UnicodeString = {LANGUAGE_ID_ENG}
};
-/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
- * 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 ManufacturerString =
-{
- .Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
-
- .UnicodeString = L"Dean Camera"
-};
-
-/** Product descriptor string. This is a Unicode string containing the product's details in human readable 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 ProductString =
-{
- .Header = {.Size = USB_STRING_LEN(15), .Type = DTYPE_String},
-
- .UnicodeString = L"LUFA Bootloader"
-};
-
/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors"
* documentation) by the application code so that the address and size of a requested descriptor can be given
* to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function
Address = &LanguageString;
Size = pgm_read_byte(&LanguageString.Header.Size);
break;
- case 0x01:
- Address = &ManufacturerString;
- Size = pgm_read_byte(&ManufacturerString.Header.Size);
- break;
- case 0x02:
- Address = &ProductString;
- Size = pgm_read_byte(&ProductString.Header.Size);
- break;
}
break;
*/
static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
{
- /* Send an empty header response with the Write Protect flag status */
- Endpoint_Write_8(0x00);
- Endpoint_Write_8(0x00);
- Endpoint_Write_8(0x00);
- Endpoint_Write_8(0x00);
+ /* Send an empty header response indicating Write Protect flag is off */
+ Endpoint_Write_32_LE(0);
Endpoint_ClearIN();
/* Update the bytes transferred counter and succeed the command */
.VolumeSerialNumber = 0x12345678,
.VolumeLabel = "LUFA BOOT ",
.FilesystemIdentifier = "FAT12 ",
- .BootstrapProgram = {0},
- .MagicSignature = 0xAA55,
};
static FATDirectoryEntry_t FirmwareFileEntry =
{
case 0: /* Block 0: Boot block sector */
memcpy(BlockBuffer, &BootBlock, sizeof(FATBootBlock_t));
+
+ /* Add the magic signature to the end of the block */
+ BlockBuffer[SECTOR_SIZE_BYTES - 2] = 0x55;
+ BlockBuffer[SECTOR_SIZE_BYTES - 1] = 0xAA;
break;
case 1: /* Block 1: First FAT12 cluster chain copy */
F_USB = $(F_CPU)\r
OPTIMIZATION = s\r
TARGET = BootloaderMassStorage\r
-SRC = $(TARGET).c Descriptors.c Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)\r
+SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)\r
LUFA_PATH = ../../../LUFA\r
CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)\r
LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)\r