X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/5366852335044c1e68a5c32548d3051cc943552f..5013b94fb43ed4e86efb5d1d72350537cd1a3f8f:/fatfs/doc/ja/expand.html diff --git a/fatfs/doc/ja/expand.html b/fatfs/doc/ja/expand.html new file mode 100644 index 0000000..98667d1 --- /dev/null +++ b/fatfs/doc/ja/expand.html @@ -0,0 +1,116 @@ + + +
+ + + + + +ãã¡ã¤ã«ã«é£ç¶ãããã¼ã¿é åãå²ãå½ã¦ã¾ãã
+ ++FRESULT f_expand ( + FIL* fp, /* [IN] ãã¡ã¤ã« ãªãã¸ã§ã¯ãæ§é ä½ã¸ã®ãã¤ã³ã¿ */ + FSIZE_t fsz, /* [IN] å²ãå½ã¦ãµã¤ãº */ + BYTE opt /* [IN] åä½ãªãã·ã§ã³ */ +); ++
+FR_OK, +FR_DISK_ERR, +FR_INT_ERR, +FR_INVALID_OBJECT, +FR_DENIED, +FR_TIMEOUT +
+optã«1ãæå®ããã¨ããã¡ã¤ã«ã«é£ç¶ãããã¼ã¿é åãå²ãå½ã¦ã¾ããf_lseekã«ãããµã¤ãºæ¡å¼µã¨ã¯ç°ãªãã対象ãã¡ã¤ã«ã®ãµã¤ãºã¯0(ã¤ã¾ããã¼ã¿é åæªå²ãå½ã¦)ã§ãªããã°ãªãã¾ãããã¾ãããªã¼ã/ã©ã¤ã ãã¤ã³ã¿ã¯ããã¡ã¤ã«å é ã«çã¾ãã¾ãããã®é¢æ°ã«ããå²ãå½ã¦ããããã¡ã¤ã«ã®å 容ã¯æªå®ç¾©ãªã®ã§ãããã«å¯¾ãã¦ä½ã®åæãæã¤ã¹ãã§ã¯ããã¾ããããã®é¢æ°ã¯ã次ã®çç±ã«ããFR_DENIEDã§å¤±æãããã¨ãããã¾ãã
+optã«0ãæå®ããã¨ãã¯ãé£ç¶ãããã¼ã¿é åãæ¢ãã®ã¿ã§ããã®æç¹ã§ã¯ãã¡ã¤ã«ã¸ã®å²ãå½ã¦ãè¡ããã代ããã«ãããæ¤ç´¢éå§ãã¤ã³ãã¨ãã¦ãã¡ã¤ã« ã·ã¹ãã ãªãã¸ã§ã¯ãã«ã»ãããã¾ããããã«ããããã®ããªã¥ã¼ã ä¸ã§å¥ã®æä½(FATå¤æ´ãä¼´ã)ãè¡ãããªãéããæ¸ãè¾¼ã¾ãããã¡ã¤ã«ã¯å°ãªãã¨ããã®ãµã¤ãºã¾ã§ã¯é£ç¶æ§ãä¿è¨¼ãããé 延ç¡ãæ¸ãè¾¼ãããã¨ã«ãªãã¾ãã
+æéçå¶ç´ã®ãããã¡ã¤ã«èªã¿æ¸ãæä½ã«ããã¦ãé£ç¶ãã¼ã¿é åãå²ãå½ã¦ããããã¡ã¤ã«ã¯æå©ã¨ãªãã¾ããããã¯ãåå²ããããã¡ã¤ã«ã«ããããããããç¡ç¨ãªã©ã³ãã ã¢ã¯ã»ã¹ãæ¸ããã¨ã«ããããã¡ã¤ã« ã·ã¹ãã ãã¹ãã¬ã¼ã¸ ããã¤ã¹ã®å¦çã®ãªã¼ãã¼ããããåæ¸ãããããã§ããç¹ã«exFATããªã¥ã¼ã ä¸ã®é£ç¶ãã¡ã¤ã«ã§ã¯ä¸åã®FATã¢ã¯ã»ã¹ãçºçãããå¹ççãªã·ã¼ã±ã³ã·ã£ã« ã¢ã¯ã»ã¹ãè¡ãã¾ãã
+é£ç¶ãã¡ã¤ã«ã«å¯¾ãã¦ä½ã¬ãã«I/Oã使ç¨ããããã«å¹ççãªç´æ¥ã¢ã¯ã»ã¹ã容æã«è¡ãã¾ãããããã¯å°æ¥ã®äºææ§ã®ç¹ã§æ¨å¥¨ã¯ããã¾ããã
+_USE_EXPAND == 1ã§ããã¤_FS_READONLY == 0ã®ã¨ã使ç¨å¯è½ã§ãã
++ /* é£ç¶ãã¡ã¤ã«ã®ä½æ */ + + /* æ°ãããã¡ã¤ã«ã®ä½æ */ + res = f_open(fp = malloc(sizeof (FIL)), "file.dat", FA_WRITE|FA_CREATE_ALWAYS); + if (res) { /* ãã¡ã¤ã«ãéãããããã§ã㯠*/ + free(fp); + ... + } + + /* 100 MiB ã®é£ç¶é åãå²ãå½ã¦ã */ + res = f_expand(fp, 104857600, 1); + if (res) { /* å²ãå½ã¦ãããããã§ã㯠*/ + ... + free(fp); + ... + } + /* é£ç¶ãã¡ã¤ã«ä½ææå fp ã§ã¢ã¯ã»ã¹å¯è½ */ + ++
+ /* ãã¡ã¤ã« ã·ã¹ãã ãä»ããç´æ¥ã¢ã¯ã»ã¹ããä¾ */ + + /* ãã¡ã¤ã« ãã¼ã¿ã®ç©ççä½ç½®ãåå¾ */ + drv = fp->obj.fs->drv; + sect = fp->obj.fs->database + fp->obj.fs->csize * (fp->obj.sclust - 2); + + /* ãã¡ã¤ã«å é ãã2048ã»ã¯ã¿ãæ¸ã込㿠*/ + res = disk_write(drv, buffer, sect, 2048); + ++