-Binary files petitfs_root/.DS_Store and petitfs_root_mod/.DS_Store differ
-diff -ENwbur petitfs_root/src/diskio.c petitfs_root_mod/src/diskio.c
+diff -ENwbur petitfs_root/src/diskio.c petitfs_root_patched/src/diskio.c
 --- petitfs_root/src/diskio.c	2014-06-10 00:24:26.000000000 +0200
-+++ petitfs_root_mod/src/diskio.c	2014-11-06 22:05:13.000000000 +0100
++++ petitfs_root_patched/src/diskio.c	2014-11-10 18:09:50.000000000 +0100
 @@ -2,6 +2,9 @@
  /* Low level disk I/O module skeleton for Petit FatFs (C)ChaN, 2014      */
  /*-----------------------------------------------------------------------*/

-
+			res = (sd_write_block(block_data, sector, SD_BLOCKSIZE) != 0) ?
+				RES_ERROR : RES_OK;
 		}
 	} else {
-
-		// Send data to the disk
-
+		// Write data
+		memcpy(block_ptr, buff, sc);
+		block_ptr += sc;
+		res = RES_OK;
 	}
 
 	return res;
diff -ENwbur petitfs_root/src/pffconf.h petitfs_root_mod/src/pffconf.h
--- petitfs_root/src/pffconf.h	2014-06-10 00:24:26.000000000 +0200
+++ petitfs_root_mod/src/pffconf.h	2014-11-06 22:19:24.000000000 +0100
@@ -10,13 +10,13 @@
 /---------------------------------------------------------------------------*/
 

 
+	static uint32_t sector;
+
+	static uint8_t block_data[SD_BLOCKSIZE];
+	static int16_t data_written = 0;
 
 	if (!buff) {
 		if (sc) {
