Mikroelektronika MIKROE-738 Datenbogen
374
mikoC PRO for PIC32
MikroElektronika
Mmc_Fat_Write
Mmc_Fat_Set_File_Date
Prototype
void Mmc_Fat_Write(char *fdata, unsigned data_len);
Description Writes requested number of bytes to the currently assigned file opened for writing.
Parameters -
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
char file_contents[42];
...
Mmc_Fat_Write(file_contents, 42); // write data to the assigned file
Notes
None.
Prototype
void Mmc_Fat_Set_File_Date(unsigned int year, unsigned short day,unsigned
short hours, unsigned short mins, unsigned short seconds);
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
// April 1st 2005, 18:07:00
Mmc_Fat_Set_File_Date(2005, 4, 1, 18, 7, 0);
Notes
None.