From 56cf2b087f057f7a0a4a4c8042cfafd4ea5141fc Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 20 Jun 2018 14:04:04 +0700 Subject: [PATCH] change head,track to 1, cluster size from 8 to 1 --- src/usb/msc_flash.c | 8 ++++---- src/usb/msc_flash.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/usb/msc_flash.c b/src/usb/msc_flash.c index 0895252..30b0045 100644 --- a/src/usb/msc_flash.c +++ b/src/usb/msc_flash.c @@ -421,7 +421,7 @@ fat12_boot_sector_t const _boot_sect = .oem_name = "MSDOS5.0", .sector_sz = MSC_FLASH_BLOCK_SIZE, - .sector_per_cluster = MSC_FLASH_CLUSTER_SIZE/MSC_FLASH_BLOCK_SIZE, + .sector_per_cluster = 1, .reserved_sectors = 1, .fat_copies = 1, @@ -429,15 +429,15 @@ fat12_boot_sector_t const _boot_sect = .sector_count = MSC_FLASH_BLOCK_NUM, .media_type = 0xf8, // fixed disk .sector_per_fat = 7, - .sector_per_track = 63, - .head_num = 255, + .sector_per_track = 1, + .head_num = 1, .not_used1 = 0, .not_used2 = 0, .drive_number = 0, .not_used3 = 0, .ext_boot_signature = 0x29, - .volume_id = 0, // change later to typically date + time + .volume_id = 0x00420042, // change later to typically date + time .volume_label = MSC_FLASH_VOL_LABEL, .fs_type = "FAT12 " }; diff --git a/src/usb/msc_flash.h b/src/usb/msc_flash.h index 5c22e6e..3cff7ec 100644 --- a/src/usb/msc_flash.h +++ b/src/usb/msc_flash.h @@ -53,7 +53,6 @@ #define MSC_FLASH_BLOCK_SIZE 512 #define MSC_FLASH_BLOCK_NUM (MSC_FLASH_SIZE/MSC_FLASH_BLOCK_SIZE) -#define MSC_FLASH_CLUSTER_SIZE (8*MSC_FLASH_BLOCK_SIZE) VERIFY_STATIC( MSC_FLASH_ADDR_START+MSC_FLASH_SIZE == BOOTLOADER_REGION_START-DFU_APP_DATA_RESERVED, );