-#include <cpu/types.h>
-#include <kern/kfile.h>
-
-/* Flash memory mapping */
-#define FLASH_MEM_SIZE 0x40000 //< 256KiB
-#define FLASH_PAGE_SIZE_BYTES 0x400 //< 1KiB
-
-/**
- * FlashLM3S KFile context structure.
- */
-typedef struct FlashLM3S
-{
- /**
- * File descriptor.
- */
- KFile fd;
-
- /**
- * Flag for checking if current page is modified.
- */
- bool page_dirty;
-
- /**
- * Current buffered page.
- */
- uint32_t *curr_page;
-
- /**
- * Temporary buffer cointaing data block to
- * write on flash.
- */
- uint32_t page_buf[FLASH_PAGE_SIZE_BYTES / sizeof(uint32_t)];
-} FlashLM3S;
-
-/**
- * ID for FlashLM3S
- */
-#define KFT_FLASHLM3S MAKE_ID('F', 'L', '3', 'S')
-
-/**
- * Convert + ASSERT from generic KFile to FlashLM3S structure.
- */
-INLINE FlashLM3S * FLASHLM3S_CAST(KFile *fd)
-{
- ASSERT(fd->_type == KFT_FLASHLM3S);
- return (FlashLM3S *)fd;
-}
-
-void flash_lm3sInit(FlashLM3S *fd);
-