X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Fflash_lm3s.h;h=8c8852fd775a1088a3c9cebaf215bd1cd71974f4;hb=6b7bd43e5f6662de73ee185c65b4f4900bd3d816;hp=1830b9968f37970497b6ea5972baa566b85b31de;hpb=adf4a56dc7329b8add0891e0ff11fca3f5add6f6;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/flash_lm3s.h b/bertos/cpu/cortex-m3/drv/flash_lm3s.h index 1830b996..8c8852fd 100644 --- a/bertos/cpu/cortex-m3/drv/flash_lm3s.h +++ b/bertos/cpu/cortex-m3/drv/flash_lm3s.h @@ -38,54 +38,4 @@ #ifndef FLASH_LM3S_H #define FLASH_LM3S_H -#include -#include - -/* 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 */