Download User Manual - Brush Electronics
Transcript
Brush Electronics 2 Brush Court, Canning Vale, WA 6155, Australia Tel: +61 894676358 [email protected] ABN 50087977811 f_write() Prototype: Syntax Parameters Returns Function Example FRESULT f_write (FIL *fp, void *buff, WORD btw, WORD *bw); result = f_write(&fdata,buffer,btw,&bw); fp is a pointer to a FIL file control block (handle) buff is a pointer to a buffer for the data being written btw is the number of bytes to write to the file from the buffer bw is the actual number of bytes written. A bw value less than btw is an indication of an error. FRESULT return code Writes the specified amount of data from the buffer to the file FIL fdata; BYTE buff[64]; BYTE bw; FRESULT result; .. result = f_write(&fdata, buff, 64, &bw); if (result) printf(“File write error\r\n”); © Copyright 2004-2012 Andrew Smallridge Page 14 of 23