User manual

Table Of Contents
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 le 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 le operations. See Mmc_Fat_Init.
The le must be previously assigned. See Mmc_Fat_Assign.
The le must be opened for writing. See Mmc_Fat_Rewrite or Mmc_Fat_Append.
Example
char le_contents[42];
...
Mmc_Fat_Write(le_contents, 42); // write data to the assigned le
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 le write operation will write this stamp to the currently
assigned le’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 le operations. See Mmc_Fat_Init.
The le must be previously assigned. See Mmc_Fat_Assign.
The le 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.