Mikroelektronika MIKROE-724 データシート
290
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
Cf_Fat_Write
Cf_Fat_Set_File_Date
Prototype
sub procedure Cf_Fat_Write(dim byref fdata as byte[512], dim data_len as
word)
Description Writes requested number of bytes to currently assigned file opened for writing.
Parameters -
Parameters -
fdata
: data to be written.
-
data_len
: number of bytes to be written.
Returns
Nothing.
Requires
CF card and CF library must be initialized for file operations. See Cf_Fat_Init.
File must be previously assigned. See Cf_Fat_Assign.
File must be open for writing. See Cf_Fat_Rewrite or Cf_Fat_Append.
Example
dim file_contents as array[42]
...
Cf_Fat_Write(file_contents, 42) ‘ write data to the assigned file
Notes
None.
Prototype
sub procedure Cf_Fat_Set_File_Date(dim year as word, dim month as byte, dim
day as byte, dim hours as byte, dim mins as byte, dim seconds as byte)
Description Sets the date/time stamp. Any subsequent file writing operation will write this stamp to currently
assigned file’s time/date attributes.
Parameters -
year
: year attribute. Valid values: 1980-2107
-
month
: month attribute. Valid values: 1-12
-
day
: day attribute. Valid values: 1-31
-
hours
: hours attribute. Valid values: 0-23
-
mins
: minutes attribute. Valid values: 0-59
-
seconds
: seconds attribute. Valid values: 0-59
Returns
Nothing.
Requires
CF card and CF library must be initialized for file operations. See Cf_Fat_Init.
File must be previously assigned. See Cf_Fat_Assign.
File must be open for writing. See Cf_Fat_Rewrite or Cf_Fat_Append.
Example
Cf_Fat_Set_File_Date(2005,9,30,17,41,0)
Notes
None.