pub fn check_channel_busy(&self, channel_num: dma_channel) -> bool {
        use dma_channel::*;
        match channel_num {
            CHANNEL0 => self.dmac.chen.read().ch1_en().bit(),
            CHANNEL1 => self.dmac.chen.read().ch2_en().bit(),
            CHANNEL2 => self.dmac.chen.read().ch3_en().bit(),
            CHANNEL3 => self.dmac.chen.read().ch4_en().bit(),
            CHANNEL4 => self.dmac.chen.read().ch5_en().bit(),
            CHANNEL5 => self.dmac.chen.read().ch6_en().bit(),
        }
        // Note: Kendryte SDK writes back the value after reading it,
        // is this necessary? It seems not.
    }
/** Check if a DMA channel is busy. */
Check if a DMA channel is busy.
Check if a DMA channel is busy .
pub fn check_channel_busy(&self, channel_num: dma_channel) -> bool {
        use dma_channel::*;
        match channel_num {
            CHANNEL0 => self.dmac.chen.read().ch1_en().bit(),
            CHANNEL1 => self.dmac.chen.read().ch2_en().bit(),
            CHANNEL2 => self.dmac.chen.read().ch3_en().bit(),
            CHANNEL3 => self.dmac.chen.read().ch4_en().bit(),
            CHANNEL4 => self.dmac.chen.read().ch5_en().bit(),
            CHANNEL5 => self.dmac.chen.read().ch6_en().bit(),
        }
        // Note: Kendryte SDK writes back the value after reading it,
        // is this necessary? It seems not.
    }
pub fn check_channel_busy ( & self , channel_num : dma_channel ) -> bool { use dma_channel :: * ; match channel_num { CHANNEL0 => self . dmac . chen . read ( ) . ch1_en ( ) . bit ( ) , CHANNEL1 => self . dmac . chen . read ( ) . ch2_en ( ) . bit ( ) , CHANNEL2 => self . dmac . chen . read ( ) . ch3_en ( ) . bit ( ) , CHANNEL3 => self . dmac . chen . read ( ) . ch4_en ( ) . bit ( ) , CHANNEL4 => self . dmac . chen . read ( ) . ch5_en ( ) . bit ( ) , CHANNEL5 => self . dmac . chen . read ( ) . ch6_en ( ) . bit ( ) , } // Note: Kendryte SDK writes back the value after reading it, // is this necessary? It seems not. }
Check if a DMA channel is busy.
Check if a DMA channel is busy .
&self
channel_num
dma_channel
&self
channel_num
dma_channel