Datasheet

Cf_Fat_Write
Cf_Fat_Set_File_Date
201
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Cf_Fat_Write(dim byref fdata as byte[512], dim
data_len as word)
Returns Nothing.
Description
Writes requested number of bytes to currently assigned file opened for writing.
Parameters :
-
fdata: data to be written.
- data_len: number of bytes to be written.
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] of byte
...
Cf_Fat_Write(file_contents, 42) ' write data to the assigned file
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)
Returns Nothing.
Description
Sets the date/time stamp. Any subsequent file writing operation will write this
stamp to currently assigned file's time/date attributs.
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
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)