X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Fflash_lm3s.c;fp=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Fflash_lm3s.c;h=83f153f13d83695b05f4d5fa9697ba0f9425260c;hb=6b88c2593ab913484e8b8f88fd65a23831acf4fe;hp=563b222906fad1c4b745aa9160cc130d247fcc5d;hpb=6782cd93ae622b7e2a603ce069ceb84c5eb448b9;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/flash_lm3s.c b/bertos/cpu/cortex-m3/drv/flash_lm3s.c index 563b2229..83f153f1 100644 --- a/bertos/cpu/cortex-m3/drv/flash_lm3s.c +++ b/bertos/cpu/cortex-m3/drv/flash_lm3s.c @@ -178,16 +178,8 @@ static const KBlockVTable flash_lm3s_unbuffered_vt = .clearerr = lm3s_flash_clearerror, }; -/* Flash memory mapping */ -#if CPU_CM3_LM3S1968 - #define EMB_FLASH_SIZE 0x40000 //< 256KiB - #define EMB_FLASH_PAGE_SIZE 0x400 //< 1KiB -#else - #error Unknown CPU -#endif - static struct FlashHardware flash_lm3s_hw; -static uint8_t flash_buf[EMB_FLASH_PAGE_SIZE]; +static uint8_t flash_buf[FLASH_PAGE_SIZE]; static void common_init(Flash *fls) { @@ -198,8 +190,8 @@ static void common_init(Flash *fls) fls->hw = &flash_lm3s_hw; - fls->blk.blk_size = EMB_FLASH_PAGE_SIZE; - fls->blk.blk_cnt = EMB_FLASH_SIZE / EMB_FLASH_PAGE_SIZE; + fls->blk.blk_size = FLASH_PAGE_SIZE; + fls->blk.blk_cnt = FLASH_SIZE / FLASH_PAGE_SIZE; }