fatfs v0.07c Jun 21, 2009:

- Fixed f_unlink() may return FR_OK on error.
- Fixed wrong cache control in f_lseek().
- Added relative path feature.
- Added f_chdir().
- Added f_chdrive().
- Added proper case conversion to extended char.
This commit is contained in:
savelij13 committed 2025-09-11 09:33:51 +03:00
1 parent 3bb1c09ac4
commit 25f499b847
57 files changed
+1888 -982

No files matched your search

+8 -8
View File
@@ -66,28 +66,28 @@ FRESULT f_lseek (
// ファイル・オフセット5000へ移動
res = f_lseek(&file, 5000);
// ファイル追記の準備 (ファイル終端へ移動)
res = f_lseek(&file, file.fsize);
// 3000バイト進める
res = f_lseek(&file, file.fptr + 3000);
// 2000バイト戻す (オーバーフローに注意)
res = f_lseek(&file, file.fptr - 2000);
// ファイル追記の準備 (ファイル終端へ移動)
res = f_lseek(&file, file.fsize);
</pre>
<pre>
// クラスタ先行割り当て (データ・オーバーランの防止)
// クラスタ先行割り当て (ストリーミング・ライト時のバッファ・オーバーラン防止)
res = f_open(&amp;file, "record.wav", FA_CREATE_NEW | FA_WRITE); // ファイル作成
res = f_lseek(&amp;file, MAX_SIZE); // 十分なクラスタの先行割り当て
res = f_lseek(&amp;file, MAX_SIZE); // 十分なクラスタの先行割り当て
if (res || file.fptr != PRE_SIZE) .... // 正しくファイルが拡張されたかチェック
res = f_lseek(&amp;file, DATA_START); // データ・ストリームの記録(アロケーションディレイ無し)
res = f_lseek(&amp;file, DATA_START); // データ・ストリームの記録(アロケーションディレイ無し)
...
res = f_truncate(&amp;file); // 不要領域の切り捨て
res = f_lseek(&amp;file, 0); // ヘッダの記録
res = f_truncate(&amp;file); // 不要領域の切り捨て
res = f_lseek(&amp;file, 0); // ヘッダの記録
...
res = f_close(&amp;file);