Mikroelektronika MIKROE-350 Datenbogen
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
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
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
...
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
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.
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)