📄 file.html
字号:
<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return:</PRE></TD></TABLE><HR><A NAME="fat_dgetc"></A><H3> fat_dgetc </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>Byte <A HREF="#fat_dgetc">fat_dgetc</A> ( void ) </PRE></TD></TABLE><P>Return the directory data byte at the current position<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return:</PRE></TD></TABLE><HR><A NAME="fat_dseek"></A><H3> fat_dseek </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_dseek">fat_dseek</A> ( Int16 offset ) </PRE></TD></TABLE><P>Seek from the current position to a new offset computing relativepoisition +/- scan size limited to a 16 bit offset<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> offset: offset to current position in signed word value*return:</PRE></TD></TABLE><H4> Note </H4><P>We consider here that the seek size is minor to the cluster size !!!if you want to do a more than a cluster seek, issue two successivedseek commands<HR><A NAME="fat_dseek"></A><H3> fat_dseek </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_dseek">fat_dseek</A> ( Int16 offset ) </PRE></TD></TABLE><P>Seek from the current position to a new offset computing relativepoisition +/- scan size limited to a 16 bit offset<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> offset: offset to current position in signed word value*return:</PRE></TD></TABLE><H4> Note </H4><P>We consider here that the seek size is minor to the cluster size !!!if you want to do a more than a cluster seek, issue two successivedseek commands<HR><A NAME="fat_fclose"></A><H3> fat_fclose </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>void <A HREF="#fat_fclose">fat_fclose</A> ( void ) </PRE></TD></TABLE><P>Close opened file<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return:</PRE></TD></TABLE><HR><A NAME="fat_fclose"></A><H3> fat_fclose </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>void <A HREF="#fat_fclose">fat_fclose</A> ( void ) </PRE></TD></TABLE><P>Close opened file<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return:</PRE></TD></TABLE><HR><A NAME="fat_fcreate"></A><H3> fat_fcreate </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_fcreate">fat_fcreate</A> ( char * file_name , Byte attribute ) </PRE></TD></TABLE><P>Prepare creation of a wav file in the root directory<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> return:</PRE></TD></TABLE><H4> Note </H4><P>This function creates first the free cluster chain from fat1 and thencreates an entry in root directory<HR><A NAME="fat_fcreate"></A><H3> fat_fcreate </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_fcreate">fat_fcreate</A> ( char * file_name , Byte attribute ) </PRE></TD></TABLE><P>Prepare creation of a wav file in the root directory<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> return:</PRE></TD></TABLE><H4> Note </H4><P>This function creates first the free cluster chain from fat1 and thencreates an entry in root directory<HR><A NAME="fat_fdelete"></A><H3> fat_fdelete </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>Byte <A HREF="#fat_fdelete">fat_fdelete</A> ( void ) </PRE></TD></TABLE><P>Delete a selected file<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> return:</PRE></TD></TABLE><H4> Note </H4><P>This function works only on a root directory entry<HR><A NAME="fat_fdelete"></A><H3> fat_fdelete </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>Byte <A HREF="#fat_fdelete">fat_fdelete</A> ( void ) </PRE></TD></TABLE><P>Delete a selected file<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> return:</PRE></TD></TABLE><H4> Note </H4><P>This function works only on a root directory entry<HR><A NAME="fat_feob"></A><H3> fat_feob </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_feob">fat_feob</A> ( void ) </PRE></TD></TABLE><P>Determine if B position have been reached in mode repeat A/B<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return: - TRUE : B position have been reached - FALSE : B position have not benn reached</PRE></TD></TABLE><HR><A NAME="fat_feob"></A><H3> fat_feob </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_feob">fat_feob</A> ( void ) </PRE></TD></TABLE><P>Determine if B position have been reached in mode repeat A/B<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return: - TRUE : B position have been reached - FALSE : B position have not benn reached</PRE></TD></TABLE><HR><A NAME="fat_feof"></A><H3> fat_feof </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_feof">fat_feof</A> ( void ) </PRE></TD></TABLE><P>Return the file end flag<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return:</PRE></TD></TABLE><HR><A NAME="fat_feof"></A><H3> fat_feof </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_feof">fat_feof</A> ( void ) </PRE></TD></TABLE><P>Return the file end flag<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return:</PRE></TD></TABLE><HR><A NAME="fat_fetch_file_info"></A><H3> fat_fetch_file_info </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>void <A HREF="#fat_fetch_file_info">fat_fetch_file_info</A> ( <A HREF="#fat_st_dir_entry">fat_st_dir_entry</A> xdata * entry , bit direction ) </PRE></TD></TABLE><P>Get information about a directory or file entry<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> entry: directory entry structure*return:</PRE></TD></TABLE><H4> Note </H4><P><P><HR><A NAME="fat_fgetc"></A><H3> fat_fgetc </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>Byte <A HREF="#fat_fgetc">fat_fgetc</A> ( void ) </PRE></TD></TABLE><P>Read one byte from file<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return: byte read</PRE></TD></TABLE><H4> Note </H4><P>As this function is called very often it must be short and optimizedin execution time<HR><A NAME="fat_fgetc"></A><H3> fat_fgetc </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>Byte <A HREF="#fat_fgetc">fat_fgetc</A> ( void ) </PRE></TD></TABLE><P>Read one byte from file<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return: byte read</PRE></TD></TABLE><H4> Note </H4><P>As this function is called very often it must be short and optimizedin execution time<HR><A NAME="fat_file_get_pos"></A><H3> fat_file_get_pos </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>Uint32 <A HREF="#fat_file_get_pos">fat_file_get_pos</A> ( void ) </PRE></TD></TABLE><P>Calculate the current file position<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return: current file position in bytes</PRE></TD></TABLE><HR><A NAME="fat_file_get_pos"></A><H3> fat_file_get_pos </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>Uint32 <A HREF="#fat_file_get_pos">fat_file_get_pos</A> ( void ) </PRE></TD></TABLE><P>Calculate the current file position<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return: current file position in bytes</PRE></TD></TABLE><HR><A NAME="fat_fopen"></A><H3> fat_fopen </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_fopen">fat_fopen</A> ( bit mode ) </PRE></TD></TABLE><P>Open the file in read or write mode<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> mode: READ: open file for read WRITE: open file for write*return: - OK: file opened - KO: file not opened: - file is empty - low level read error</PRE></TD></TABLE><HR><A NAME="fat_fopen"></A><H3> fat_fopen </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>bit <A HREF="#fat_fopen">fat_fopen</A> ( bit mode ) </PRE></TD></TABLE><P>Open the file in read or write mode<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE> mode: READ: open file for read WRITE: open file for write*return: - OK: file opened - KO: file not opened: - file is empty - low level read error</PRE></TD></TABLE><HR><A NAME="fat_format"></A><H3> fat_format </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>void <A HREF="#fat_format">fat_format</A> ( void ) </PRE></TD></TABLE><P>Create single FAT12 or FAT16 partition and format the selected memory<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return:</PRE></TD></TABLE><H4> Note </H4><P>- Single partition- Cluster size is 4 or 8 Kbytes- Sector size is 512 bytes- 2 fats management- 512 entries in the root directory<HR><A NAME="fat_format"></A><H3> fat_format </H3><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#D6E8FF" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>void <A HREF="#fat_format">fat_format</A> ( void ) </PRE></TD></TABLE><P>Create single FAT12 or FAT16 partition and format the selected memory<P><TABLE BORDER="0" WIDTH="100 %" BGCOLOR="#FFD0D0" CELLPADDING="6"><TR> <TD VALIGN=MIDDLE><PRE>*return:</PRE></TD></TABLE><H4> Note </H4><P>- Single partition- Cluster size is 4 or 8 Kbytes
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -