Closed kuldeepdhaka closed 7 years ago
https://github.com/insane-adding-machines/unicore-mx/blob/master/lib/usbd/class/usbd_msc.c#L790 this cause ms->block_count to have the "Last Logical Block Address" _mass_storage.block_count = block_count - 1;
_mass_storage.block_count = block_count - 1;
and https://github.com/insane-adding-machines/unicore-mx/blob/master/lib/usbd/class/usbd_msc.c#L345 send the "Last Logical Block Address" to host ("READ CAPACITY Command: 25h")
trans->msd_buf[0] = ms->block_count >> 24; trans->msd_buf[1] = 0xff & (ms->block_count >> 16); trans->msd_buf[2] = 0xff & (ms->block_count >> 8); trans->msd_buf[3] = 0xff & ms->block_count;
BUT, https://github.com/insane-adding-machines/unicore-mx/blob/master/lib/usbd/class/usbd_msc.c#L369 for (i = 0; i < ms->block_count; i++) { shouldn't that be <= ms->block_count ?
for (i = 0; i < ms->block_count; i++) {
<= ms->block_count
related? https://github.com/libopencm3/libopencm3-examples/issues/112
something, test IRCBot
closed: not relevant anymore.
https://github.com/insane-adding-machines/unicore-mx/blob/master/lib/usbd/class/usbd_msc.c#L790 this cause ms->block_count to have the "Last Logical Block Address"
_mass_storage.block_count = block_count - 1;
and https://github.com/insane-adding-machines/unicore-mx/blob/master/lib/usbd/class/usbd_msc.c#L345 send the "Last Logical Block Address" to host ("READ CAPACITY Command: 25h")
BUT, https://github.com/insane-adding-machines/unicore-mx/blob/master/lib/usbd/class/usbd_msc.c#L369
for (i = 0; i < ms->block_count; i++) {
shouldn't that be<= ms->block_count
?