MMC.write

Name
MMC.write

Description
It writes on the opened file. Therefore you must before open it.

Syntax
FRESULT pf_write (const void* buff, u16 btw, u16* bw) /* buff = Pointer to the data to be written */ /* btw = Number of bytes to write (0:Finalize the current write operation) */ /* bw = Pointer to number of bytes written */

Return FRESULT : see MMC.read

Example
void loop { u8 bufname[13]= "mysdfile.txt"; FRESULT FResult; u8 data_buffer[12]= "my texte ..."; u16 len; u16 bw; ... FResult = MMC.open(bufname); ... FResult = MMC.write(data_buffer, 12, &bw); ... MMC.write(0, 0, &bw);//to finalize neatly the file ... } <== Bugs ==