From: asterix Date: Fri, 10 Sep 2010 15:45:24 +0000 (+0000) Subject: Remove unneeded assert. X-Git-Tag: 2.6.0~171 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=af6f92fdde767ddb88623acead8a59a468c1ae15;p=bertos.git Remove unneeded assert. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4230 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/arm/drv/flash_at91.c b/bertos/cpu/arm/drv/flash_at91.c index adeb558f..d501102a 100644 --- a/bertos/cpu/arm/drv/flash_at91.c +++ b/bertos/cpu/arm/drv/flash_at91.c @@ -139,9 +139,6 @@ static bool flash_getStatus(struct KBlock *blk) static size_t at91_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size) { - ASSERT(offset == 0); - ASSERT(size == blk->blk_size); - memcpy(buf, (void *)(idx * blk->blk_size + FLASH_BASE), size); return size; } diff --git a/bertos/cpu/arm/drv/flash_lpc2.c b/bertos/cpu/arm/drv/flash_lpc2.c index 6a8cc69b..f25e7b92 100644 --- a/bertos/cpu/arm/drv/flash_lpc2.c +++ b/bertos/cpu/arm/drv/flash_lpc2.c @@ -179,9 +179,6 @@ static uint32_t addr_to_sector(size_t addr) static size_t lpc2_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size) { - ASSERT(offset == 0); - ASSERT(size == blk->blk_size); - memcpy(buf, (void *)(idx * blk->blk_size), size); return size; } diff --git a/bertos/cpu/avr/drv/flash_avr.c b/bertos/cpu/avr/drv/flash_avr.c index 50e2a6cf..231e01eb 100644 --- a/bertos/cpu/avr/drv/flash_avr.c +++ b/bertos/cpu/avr/drv/flash_avr.c @@ -71,9 +71,6 @@ struct FlashHardware; static size_t avr_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size) { - ASSERT(offset == 0); - ASSERT(size == blk->blk_size); - memcpy_P(buf, (const void *)(uint16_t)(idx * blk->blk_size), size); return blk->blk_size; } diff --git a/bertos/cpu/cortex-m3/drv/flash_lm3s.c b/bertos/cpu/cortex-m3/drv/flash_lm3s.c index 730fbaf4..df478b61 100644 --- a/bertos/cpu/cortex-m3/drv/flash_lm3s.c +++ b/bertos/cpu/cortex-m3/drv/flash_lm3s.c @@ -111,9 +111,6 @@ static int lm3s_writeWord(struct KBlock *blk, uint32_t addr, uint32_t data) static size_t lm3s_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size) { - ASSERT(offset == 0); - ASSERT(size == blk->blk_size); - memcpy(buf, (void *)(idx * blk->blk_size), size); return size; } diff --git a/bertos/cpu/cortex-m3/drv/flash_stm32.c b/bertos/cpu/cortex-m3/drv/flash_stm32.c index 3b3dd79d..a11777b7 100644 --- a/bertos/cpu/cortex-m3/drv/flash_stm32.c +++ b/bertos/cpu/cortex-m3/drv/flash_stm32.c @@ -139,9 +139,6 @@ static void stm32_flash_clearerror(struct KBlock *blk) static size_t stm32_flash_readDirect(struct KBlock *blk, block_idx_t idx, void *buf, size_t offset, size_t size) { - ASSERT(offset == 0); - ASSERT(size == blk->blk_size); - memcpy(buf, (void *)(idx * blk->blk_size), size); return size; }