From f9344771c58957fe73566e97cffcab3c8acafacc Mon Sep 17 00:00:00 2001 From: asterix Date: Fri, 16 Sep 2011 14:01:15 +0000 Subject: [PATCH] Remove unneded functions. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5059 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/dmac_sam3.c | 33 +++------------------------- bertos/cpu/cortex-m3/drv/dmac_sam3.h | 6 +---- 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/bertos/cpu/cortex-m3/drv/dmac_sam3.c b/bertos/cpu/cortex-m3/drv/dmac_sam3.c index 621dc848..764bb866 100644 --- a/bertos/cpu/cortex-m3/drv/dmac_sam3.c +++ b/bertos/cpu/cortex-m3/drv/dmac_sam3.c @@ -56,7 +56,7 @@ struct DmacCh reg32_t *ctrlb; }; -#define DMAC_CHANNEL_CNT 5 +#define DMAC_CHANNEL_CNT 6 struct DmacCh dmac_ch[] = { { @@ -163,37 +163,10 @@ int dmac_start(int ch) return 0; } -int dmac_stop(int ch) +void dmac_stop(int ch) { DMAC_CHDR = BV(ch); - return 0; -} - -bool dmac_isLLIDone(int ch) -{ - return (DMAC_EBCIMR |= (BV(ch) << DMAC_EBCISR_CBTC0)); -} - -bool dmac_waitLLIDone(int ch) -{ - while(!(DMAC_EBCIMR |= (BV(ch) << DMAC_EBCISR_CBTC0))) - cpu_relax(); - - DMAC_CHDR = BV(ch); - return true; -} - -bool dmac_isDone(int ch) -{ - //event_wait(&data_ready); - return (*dmac_ch[ch].ctrla & BV(31));//(DMAC_CHSR |= (BV(dmac->ch) << DMAC_CHSR_EMPT0)); -} - -bool dmac_waitDone(int ch) -{ - event_wait(&data_ready); - DMAC_CHDR = BV(ch); - return true; + dmac_ch_enabled &= ~BV(ch); } int dmac_error(int ch) diff --git a/bertos/cpu/cortex-m3/drv/dmac_sam3.h b/bertos/cpu/cortex-m3/drv/dmac_sam3.h index 0f7a08ae..8650ac7f 100644 --- a/bertos/cpu/cortex-m3/drv/dmac_sam3.h +++ b/bertos/cpu/cortex-m3/drv/dmac_sam3.h @@ -80,15 +80,11 @@ INLINE void dmac_setSourcesLLI(int ch, DmacDesc *lli, uint32_t src, uint32_t dst void dmac_configureDmaCfgLLI(int ch, DmacDesc *lli, uint32_t cfg); void dmac_setSourcesLLI(int ch, DmacDesc *lli, uint32_t src, uint32_t dst, uint32_t desc); void dmac_configureDmacLLI(int ch, DmacDesc *lli, size_t transfer_size, uint32_t cfg, uint32_t ctrla, uint32_t ctrlb); -bool dmac_isLLIDone(int ch); -bool dmac_waitLLIDone(int ch); void dmac_setSources(int ch, uint32_t src, uint32_t dst); void dmac_configureDmac(int ch, size_t transfer_size, uint32_t cfg, uint32_t ctrla, uint32_t ctrlb); int dmac_start(int ch); -int dmac_stop(int ch); -bool dmac_isDone(int ch); -bool dmac_waitDone(int ch); +void dmac_stop(int ch); int dmac_error(int ch); bool dmac_enableCh(int ch, dmac_handler_t handler); void dmac_init(void); -- 2.25.1