MikroElektronika: Development tools - Books - Compilers
167
page
mikroC - C Compiler for Microchip PIC microcontrollers
mikroC
making it simple...
Prototype
void
Cf_File_Write_Byte(
char
data);
Description
Adds one byte (
data
) to file. You can supply ASCII value as parameter, for example 48
for zero.
Requires
CF must be initialized for file write operation. See
Cf_File_Write_Init
.
Example
// Write 50,000 zeroes (bytes) to file:
for
(i = 0; i < 50000; i++) Cf_File_Write_Byte(48);
Cf_File_Write_Byte
Prototype
void
Cf_Read_Sector(
int
sector_number,
unsigned short
*buffer);
Description
Reads one sector (
sector_number
) into
buffer
.
Requires
CF must be initialized for file write operation. See
Cf_Init
.
Example
Cf_Read_Sector(22, data);
Cf_Read_Sector
Prototype
void
Cf_File_Write_Init(
void
);
Description
Initializes CF card for file writing operation (FAT16 only).
Requires
Ports must be initialized. See
Cf_Init
.
Example
Cf_File_Write_Init();
Cf_File_Write_Init