| if (++ch >= DMA_NUM_CHANNELS) { | if (++ch >= DMA_NUM_CHANNELS) { | ||||
| __enable_irq(); | __enable_irq(); | ||||
| TCD = (TCD_t *)0; | TCD = (TCD_t *)0; | ||||
| channel = 16; | |||||
| channel = DMA_NUM_CHANNELS; | |||||
| return; // no more channels available | return; // no more channels available | ||||
| // attempts to use this object will hardfault | // attempts to use this object will hardfault | ||||
| } | } |