diff --git a/inc/ram_disk.h b/inc/ram_disk.h index e789b62..2bfba97 100644 --- a/inc/ram_disk.h +++ b/inc/ram_disk.h @@ -6,7 +6,7 @@ #define VOLUME_LABEL "Pico MC" -#define DISK_BLOCK_NUM 353 // results in 128KB ram disk (some blocks are lost due to FAT12 overhead) +#define DISK_BLOCK_NUM 357 // results in ~128KB ram disk (some blocks are lost to FAT overhead, some due to Windows Storage Service) #define DISK_BLOCK_SIZE 512 #define SECTOR_NUM DISK_BLOCK_NUM #define SECTOR_SIZE DISK_BLOCK_SIZE diff --git a/src/main.c b/src/main.c index 9b2b68d..71afbd9 100644 --- a/src/main.c +++ b/src/main.c @@ -42,7 +42,7 @@ int main(void) { tud_task(); // tinyusb device task cdc_task(); - if(to_ms_since_boot(get_absolute_time()) > TUD_MOUNT_TIMEOUT && !tud_mount_status ) + if(to_ms_since_boot(get_absolute_time()) > TUD_MOUNT_TIMEOUT && !tud_mount_status) break; } diff --git a/src/ram_disk.c b/src/ram_disk.c index b957d8a..ab7656f 100644 --- a/src/ram_disk.c +++ b/src/ram_disk.c @@ -97,7 +97,7 @@ uint32_t RAM_disk_import_lfs_memcard() { 1, // number of FAT copies 1, // data alignment (in sectors) 0, // number of root dir entires (default 512) - 0 // cluster size (default, use whatever disk uses) + 0 // cluster size (let FatFS decide) }; if(FR_OK == f_mkfs("", &opt, working_buffer, WORK_BUFF_SIZE)) {