-
-/**
- * Define data type to manage page and memory address.
- */
-typedef uint32_t arm_page_t;
-typedef uint32_t arm_page_addr_t;
-
-/**
- * FlashAt91 KFile context structure.
- */
-typedef struct FlashAt91
-{
- /**
- * File descriptor.
- */
- KFile fd;
-
- /**
- * Flag for checking if current page is modified.
- */
- bool page_dirty;
-
- /**
- * Current buffered page.
- */
- arm_page_t curr_page;
-
- /**
- * Temporary buffer cointaing data block to
- * write on flash.
- */
- uint8_t page_buf[FLASH_PAGE_SIZE_BYTES];
-
-
-} FlashAt91;
-
-/**
- * ID for FlashAt91
- */
-#define KFT_FLASHAT91 MAKE_ID('F', 'A', '9', '1')
-
-/**
- * Convert + ASSERT from generic KFile to FlashAt91.
- */
-INLINE FlashAt91 * FLASHAT91_CAST(KFile *fd)
-{
- ASSERT(fd->_type == KFT_FLASHAT91);
- return (FlashAt91 *)fd;
-}
-
-
-void flash_at91_init(FlashAt91 *fd);
-
-#endif