#include <kern/kfile.h>
+/**
+ * Definition of type for avr flash module.
+ */
+typedef uint16_t avr_page_t;
+
+
/**
* FlashAvr KFile context structure.
*/
typedef struct KFileFlashAvr
{
- KFile fd; ///< File descriptor.
+ /**
+ * File descriptor.
+ */
+ KFile fd;
+
+ /**
+ * Current buffered page.
+ */
+ avr_page_t curr_page;
+
+ /**
+ * Flag for checking if current page is modified.
+ */
+ bool page_modified;
+
} KFileFlashAvr;
}
-void flash_avr_init(struct KFile *fd);
+void flash_avr_init(struct KFileFlashAvr *fd);