Add some missign register defines. Reformat.
[bertos.git] / bertos / cpu / cortex-m3 / drv / flash_lm3s.h
index 1830b9968f37970497b6ea5972baa566b85b31de..8c8852fd775a1088a3c9cebaf215bd1cd71974f4 100644 (file)
 #ifndef FLASH_LM3S_H
 #define FLASH_LM3S_H
 
-#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);
-
 #endif /* FLASH_LM3S_H */