Refactor code, "page_buf" moved into KFileFlashAvr struct
[bertos.git] / bertos / cpu / avr / drv / flash_avr.h
index bb7698aba42bb9072f9b1457d332edb7c5d60519..99abf9a1830583397d3b7e8b5b44e2468e058cc8 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <cfg/compiler.h>
 #include <kern/kfile.h>
+#include <avr/io.h>
 
 
 /**
@@ -68,7 +69,14 @@ typedef struct KFileFlashAvr
        /**
        * Flag for checking if current page is modified.
        */
-       bool page_modified;
+       bool page_dirty;
+
+       /**
+       * Temporary buffer cointaing data block to
+       * write on flash.
+       */
+       uint8_t page_buf[SPM_PAGESIZE];
+
 
 } KFileFlashAvr;