Mikroelektronika MIKROE-724 データシート

ページ / 726
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
399
Mmc_Fat_Write
Mmc_Fat_Set_File_Date
Prototype
sub procedure Mmc_Fat_Write(dim byref fdata as byte[512], dim data_len as 
word)
Description Writes requested number of bytes to the currently assigned file opened for writing.
Parameters 
fdata
: data to be written. 
data_len
: number of bytes to be written. 
Returns
Nothing.
Requires
MMC/SD card and MMC library must be initialized for file operations. See Mmc_Fat_Init.
The file must be previously assigned. See Mmc_Fat_Assign.
The file must be opened for writing. See Mmc_Fat_Rewrite or Mmc_Fat_Append.
Example
dim file_contents as byte[42]
...
Mmc_Fat_Write(file_contents, 42) ‘ write data to the assigned file
Notes
None.
Prototype
sub procedure Mmc_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 write operation will write this stamp to the 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
MMC/SD card and MMC library must be initialized for file operations. See Mmc_Fat_Init.
The file must be previously assigned. See Mmc_Fat_Assign.
The file must be opened for writing. See Mmc_Fat_Rewrite or Mmc_Fat_Append.
Example
Mmc_Fat_Set_File_Date(2005,9,30,17,41,0)
Notes
None.