8.03.2007

Value definition in FATFS

SDMMC\Driver\sdmmc.def 宣告了 SDMMC.DLL 公開的介面。
這幾個公開的介面,都實在 system.c 中。

結果:
決定 SDMMC card mount 行為的registry key:
HKEY_LOCAL_MACHINE\System\StorageManager\FATFS
中的
Flags
的各bit 定義在: COREOS\FSD\FATFS\fatfs.h。在MSDN 的FAT Filesystem registry Setting 這一篇也有說明:
FATFS_UPDATE_ACCESS         0x00000001  // update access times if set
FATFS_DISABLE_LOG 0x00000002 // disable event logging if set
FATFS_DISABLE_AUTOSCAN 0x00000004 // disable automatic ScanVolume()
FATFS_VERIFY_WRITES 0x00000008 // verify all writes (as opposed to a handful)
FATFS_ENABLE_BACKUP_FAT 0x00000010 // add a backup FAT to all formats
FATFS_FORCE_WRITETHROUGH 0x00000020 // Force fat to be always writethrough
FATFS_DISABLE_AUTOFORMAT 0x00000040 // disable automatic formatting of unformatted volumes

FATFS_WFWS_NOWRITETHRU 0x00010000 // disable writethrough on WriteFileWithSeek API, improve
// memory-mapped file performance
FATFS_DISABLE_FORMAT 0x00020000 // disable format
FATFS_TRANS_DATA 0x00040000 // transact data on a write (i.e. clone cluster on every write)
FATFS_TFAT_NONATOMIC_SECTOR 0x00080000 // Use cluster 1 entry in FAT table for TFAT transaction,
// since sector writes are non-atomic.
// By default, TFAT uses the NOF field of the boot sector
FATFS_DISABLE_TFAT_REDIR 0x00100000 // Indicates to disable redirect the root directory to
// another hidden director for FAT12 or 16, since root dir
// isn't transacted in those cases
FATFS_TFAT_ALWAYS 0x00200000 // Always mark transaction status, even only one sector in
// FAT is changed
FATFS_FORCE_TFAT 0x00400000 // Force TFAT transactioning even if volume isn't formatted
// as TFAT
FATFS_LFN_EXTENDED 0x00800000 // Generate LFN entries for extended characters always
FATFS_TFAT_DISABLE_MOVEDIR 0x01000000 // Disable MoveFile on a directory for TFAT because it isn't
// transaction-safe
所以要disable SD card 的 autoformat功能,就要設定 FATFS_DISABLE_AUTOFORMAT :
0x40

這個filesystem 好像會和nandflash 的filesystem 共用。所以大概會影響到nandflash filesystem..

沒有留言: