Download ABL electronic PIC18 User's Manual
Transcript
mikroC
making it simple...
mikroC - C Compiler for Microchip PIC microcontrollers
Mmc_Fat_Read
Prototype
void Mmc_Fat_Read(unsigned short *data);
Description
Function reads the byte at which the file pointer points to and stores data into parameter
data. The file pointer automatically increments with each call of Mmc_Fat_Read.
Requires
File pointer must be initialized; see Mmc_Fat_Reset.
Example
Mmc_Fat_Read(&mydata);
Mmc_Fat_Write
Prototype
void Mmc_Fat_Write(char *fdata, unsigned data_len);
Description
Function writes a chunk of data_len bytes (fdata) to the currently assigned file, at
the position of the file pointer.
Requires
File pointer must be initialized; see Mmc_Fat_Append or Mmc_Fat_Rewrite.
Example
Mmc_Fat_Write(txt, 21);
Mmc_Fat_Write("Hello\nworld", 1);
Mmc_Set_File_Date
Prototype
void Mmc_Set_File_Date(unsigned year, char month, char day,
char hours, char min, char sec);
Description
Writes system timestamp to a file. Use this routine before each writing to the file; otherwise, file will be appended a random timestamp.
Requires
File pointer must be initialized; see Mmc_Fat_Append or Mmc_Fat_Rewrite.
Example
// April 1st 2005, 18:07:00
Mmc_Set_File_Date(2005, 4, 1, 18, 7, 0);
page
MikroElektronika: Development tools - Books - Compilers
229