samd: audio_dma.c: Remove exceptions, just return early

These were most useful debugging, but because this code can be reached
"outside of the VM", it's not actually permitted to throw exceptions here.
This commit is contained in:
Jeff Epler 2019-08-07 20:20:36 -05:00
parent 39c64bf83c
commit 500d1bb168

View File

@ -52,13 +52,13 @@ uint8_t find_free_audio_dma_channel(void) {
void audio_dma_disable_channel(uint8_t channel) {
if (channel >= AUDIO_DMA_CHANNEL_COUNT)
mp_raise_RuntimeError(translate("Internal error: disable invalid dma channel"));
return;
dma_disable_channel(channel);
}
void audio_dma_enable_channel(uint8_t channel) {
if (channel >= AUDIO_DMA_CHANNEL_COUNT)
mp_raise_RuntimeError(translate("Internal error: enable invalid dma channel"));
return;
dma_enable_channel(channel);
}