X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Fflash_stm32.c;h=816cdd58f94096f459a240f6a18f386cdc665328;hb=540b160dbedfdb12ce29f9b107be860ba22cd6cb;hp=62e448f3ab35dd9d201ba78756c89b3655247d9f;hpb=f63c15a680d9ac10027fd76c0aa2530ab34a5aee;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/flash_stm32.c b/bertos/cpu/cortex-m3/drv/flash_stm32.c index 62e448f3..816cdd58 100644 --- a/bertos/cpu/cortex-m3/drv/flash_stm32.c +++ b/bertos/cpu/cortex-m3/drv/flash_stm32.c @@ -112,6 +112,8 @@ static bool stm32_erasePage(struct KBlock *blk, uint32_t page_add) return true; } +#if 0 +// not used for now static bool stm32_eraseAll(struct KBlock *blk) { EMB_FLASH->CR |= CR_MER_SET; @@ -124,6 +126,7 @@ static bool stm32_eraseAll(struct KBlock *blk) return true; } +#endif static int stm32_flash_error(struct KBlock *blk) { @@ -231,11 +234,11 @@ static void common_init(Flash *fls) } -void flash_hw_init(Flash *fls, int flags) +void flash_hw_init(Flash *fls, UNUSED_ARG(int, flags)) { common_init(fls); fls->blk.priv.vt = &flash_stm32_buffered_vt; - fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE | flags; + fls->blk.priv.flags |= KB_BUFFERED | KB_PARTIAL_WRITE; fls->blk.priv.buf = flash_buf; /* Load the first block in the cache */ @@ -243,9 +246,8 @@ void flash_hw_init(Flash *fls, int flags) memcpy(fls->blk.priv.buf, flash_start, fls->blk.blk_size); } -void flash_hw_initUnbuffered(Flash *fls, int flags) +void flash_hw_initUnbuffered(Flash *fls, UNUSED_ARG(int, flags)) { common_init(fls); fls->blk.priv.vt = &flash_stm32_unbuffered_vt; - fls->blk.priv.flags |= flags; }