FIL

FIL構造体は、1個で1ファイルの状態を保持し、アプリケーション側で確保・管理されます。アプリケーションから変更可能なメンバはbufferのみです。

FatFs

typedef struct _FIL {
    DWORD   fptr;           // File R/W pointer
    DWORD   fsize;          // File size
    DWORD   org_clust;      // File start cluster
    DWORD   curr_clust;     // Current cluster
    DWORD   curr_sect;      // Current sector
    DWORD   dir_sect;       // Sector# containing the directory entry
    BYTE*   dir_ptr;        // Ponter to the directory entry in the window
    BYTE*   buffer;         // Pointer to 512 byte file R/W buffer
    BYTE    flag;           // File status flags
    BYTE    sect_clust;     // Left sectors in current cluster
} FIL;

Tiny-FatFs

typedef struct _FIL {
    DWORD   fptr;           // File R/W pointer
    DWORD   fsize;          // File size
    WORD    org_clust;      // File start cluster
    WORD    curr_clust;     // Current cluster
    DWORD   curr_sect;      // Current sector
    DWORD   dir_sect;       // Sector# containing the directory entry
    BYTE*   dir_ptr;        // Ponter to the directory entry in the window
    BYTE    flag;           // File status flags
    BYTE    sect_clust;     // Left sectors in current cluster
} FIL;

戻る