Remove unneded functions.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 16 Sep 2011 14:01:15 +0000 (14:01 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 16 Sep 2011 14:01:15 +0000 (14:01 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@5059 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/cortex-m3/drv/dmac_sam3.c
bertos/cpu/cortex-m3/drv/dmac_sam3.h

index 621dc8487142c33376f26a3c8dad0e4a06740309..764bb8660484f1469da498f4f63d521f95fb040b 100644 (file)
@@ -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)
index 0f7a08aeead6fdac98bda72ab51cb760f79280a6..8650ac7f9d9e6ab861549e55fdd9c5ab56b53760 100644 (file)
@@ -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);