FL-78 Microsd test application (#230)
* variable cluster size, label info functions for targets * app record * init, mount, get label, get sn, get space * enable exfat * more stack for the stack god * remove c app and add cpp app * remove MULTI_PARTITION * fix 4gb bug * update app to new template lib, add animated waiting * tiny buffer configuration * write speed benchmark * fnv1a hash library * make DEFAULT_STACK_SIZE and MAX_TASK_COUNT defined per target * fully functional sd card app * build sd test app to release firmware * cpp, not c * light up red led if error * flags for c++ * linking with g++ * suppres snprintf warning * move format work area to heap Co-authored-by: coreglitch <mail@s3f.ru>
This commit is contained in:
		| @@ -72,7 +72,7 @@ | ||||
| /* This option switches attribute manipulation functions, f_chmod() and f_utime(). | ||||
| /  (0:Disable or 1:Enable) Also _FS_READONLY needs to be 0 to enable this option. */ | ||||
|  | ||||
| #define _USE_LABEL           0 | ||||
| #define _USE_LABEL           1 | ||||
| /* This option switches volume label functions, f_getlabel() and f_setlabel(). | ||||
| /  (0:Disable or 1:Enable) */ | ||||
|  | ||||
| @@ -177,7 +177,7 @@ | ||||
| /  arbitrary physical drive and partition listed in the VolToPart[]. Also f_fdisk() | ||||
| /  funciton will be available. */ | ||||
| #define _MIN_SS    512  /* 512, 1024, 2048 or 4096 */ | ||||
| #define _MAX_SS    512  /* 512, 1024, 2048 or 4096 */ | ||||
| #define _MAX_SS    4096  /* 512, 1024, 2048 or 4096 */ | ||||
| /* These options configure the range of sector size to be supported. (512, 1024, | ||||
| /  2048 or 4096) Always set both 512 for most systems, all type of memory cards and | ||||
| /  harddisk. But a larger value may be required for on-board flash memory and some | ||||
| @@ -205,13 +205,13 @@ | ||||
| / System Configurations | ||||
| /----------------------------------------------------------------------------*/ | ||||
|  | ||||
| #define _FS_TINY    0      /* 0:Normal or 1:Tiny */ | ||||
| #define _FS_TINY    1      /* 0:Normal or 1:Tiny */ | ||||
| /* This option switches tiny buffer configuration. (0:Normal or 1:Tiny) | ||||
| /  At the tiny configuration, size of file object (FIL) is reduced _MAX_SS bytes. | ||||
| /  Instead of private sector buffer eliminated from the file object, common sector | ||||
| /  buffer in the file system object (FATFS) is used for the file data transfer. */ | ||||
|  | ||||
| #define _FS_EXFAT	0 | ||||
| #define _FS_EXFAT	1 | ||||
| /* This option switches support of exFAT file system. (0:Disable or 1:Enable) | ||||
| /  When enable exFAT, also LFN needs to be enabled. (_USE_LFN >= 1) | ||||
| /  Note that enabling exFAT discards C89 compatibility. */ | ||||
|   | ||||
| @@ -324,7 +324,7 @@ uint8_t BSP_SD_GetCardInfo(SD_CardInfo* pCardInfo) { | ||||
|         pCardInfo->LogBlockSize = 512; | ||||
|         pCardInfo->CardBlockSize = 512; | ||||
|         pCardInfo->CardCapacity = | ||||
|             (pCardInfo->Csd.version.v2.DeviceSize + 1) * 1024 * pCardInfo->LogBlockSize; | ||||
|             ((uint64_t)pCardInfo->Csd.version.v2.DeviceSize + 1UL) * 1024UL * (uint64_t)pCardInfo->LogBlockSize; | ||||
|         pCardInfo->LogBlockNbr = (pCardInfo->CardCapacity) / (pCardInfo->LogBlockSize); | ||||
|     } else { | ||||
|         pCardInfo->CardCapacity = (pCardInfo->Csd.version.v1.DeviceSize + 1); | ||||
|   | ||||
| @@ -161,7 +161,7 @@ typedef struct | ||||
| { | ||||
|   SD_CSD Csd; | ||||
|   SD_CID Cid; | ||||
|   uint32_t CardCapacity;              /*!< Card Capacity */ | ||||
|   uint64_t CardCapacity;              /*!< Card Capacity */ | ||||
|   uint32_t CardBlockSize;             /*!< Card Block Size */ | ||||
|   uint32_t LogBlockNbr;               /*!< Specifies the Card logical Capacity in blocks   */ | ||||
|   uint32_t LogBlockSize;              /*!< Specifies logical block size in bytes           */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user