Skip to content

Commit 8ab4774

Browse files
committed
Manual merge?
Pickup a couple changes that don't seem to be propagating? Possible that there's some git merge I missed, but it's simple enough to fix manually.
1 parent 1b54f04 commit 8ab4774

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/usb/uf2/ghostfat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void read_block(uint32_t block_no, uint8_t *data) {
210210
if (sectionIdx >= SECTORS_PER_FAT)
211211
sectionIdx -= SECTORS_PER_FAT; // second FAT is same as the first...
212212
if (sectionIdx == 0) {
213-
data[0] = 0xf0;
213+
data[0] = 0xf8; // first FAT entry must match BPB MediaDescriptor
214214
// WARNING -- code presumes only one NULL .content for .UF2 file
215215
// and all non-NULL .content fit in one sector
216216
// and requires it be the last element of the array
@@ -223,7 +223,7 @@ void read_block(uint32_t block_no, uint8_t *data) {
223223
if (UF2_FIRST_SECTOR <= v && v <= UF2_LAST_SECTOR)
224224
((uint16_t *)(void *)data)[i] = v == UF2_LAST_SECTOR ? 0xffff : v + 1;
225225
}
226-
} else if (block_no < START_CLUSTERS) {
226+
} else if (block_no < START_CLUSTERS) { // Requested root directory sector
227227

228228
sectionIdx -= START_ROOTDIR;
229229

0 commit comments

Comments
 (0)