mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 21:01:31 +00:00
Make the VirtualFAT firmware file read from device flash when opened by the host in the incomplete Mass Storage class bootloader.
This commit is contained in:
parent
d5d9ff73e5
commit
63e1fc6e6c
@ -138,8 +138,10 @@ static void ReadBlock(const uint16_t BlockNumber)
|
|||||||
default:
|
default:
|
||||||
if ((BlockNumber >= 4) && (BlockNumber < (4 + (FIRMWARE_FILE_SIZE / SECTOR_SIZE_BYTES))))
|
if ((BlockNumber >= 4) && (BlockNumber < (4 + (FIRMWARE_FILE_SIZE / SECTOR_SIZE_BYTES))))
|
||||||
{
|
{
|
||||||
for (uint16_t i = 0; i < 512; i++)
|
uint32_t ReadFlashAddress = (uint32_t)(BlockNumber - 4) * SECTOR_SIZE_BYTES;
|
||||||
BlockBuffer[i] = 'A' + (i % 26);
|
|
||||||
|
for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i++)
|
||||||
|
BlockBuffer[i] = pgm_read_byte_far(ReadFlashAddress++);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user