X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstmf0%2Fao_dma_stm.c;h=ef551786d62b8d9073a517065a30a81370099f80;hb=abfa580ad700415f5ea240450a1621f9de35de82;hp=e90c6bf838b11f4cca1e77df85560f7fe4c344e8;hpb=9f9d77b6d025d8285e362e53a8f728ec47adb234;p=fw%2Faltos diff --git a/src/stmf0/ao_dma_stm.c b/src/stmf0/ao_dma_stm.c index e90c6bf8..ef551786 100644 --- a/src/stmf0/ao_dma_stm.c +++ b/src/stmf0/ao_dma_stm.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -63,7 +64,7 @@ void stm_dma_ch2_3_isr(void) { ch_mask(STM_DMA_INDEX(3))); } -void stm_dma1_ch4_5_6_isr(void) { +void stm_dma_ch4_5_6_isr(void) { ao_dma_isr(STM_DMA_INDEX(4), STM_DMA_INDEX(6), ch_mask(STM_DMA_INDEX(4)) | ch_mask(STM_DMA_INDEX(5)) | @@ -110,10 +111,10 @@ ao_dma_start(uint8_t index) void ao_dma_done_transfer(uint8_t index) { - stm_dma.channel[index].ccr &= ~(1 << STM_DMA_CCR_EN); + stm_dma.channel[index].ccr &= ~(1UL << STM_DMA_CCR_EN); ao_arch_critical( if (--ao_dma_active == 0) - stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_DMAEN); + stm_rcc.ahbenr &= ~(1UL << STM_RCC_AHBENR_DMAEN); ); if (ao_dma_allocated[index]) ao_dma_mutex[index] = 0; @@ -124,7 +125,7 @@ ao_dma_done_transfer(uint8_t index) void ao_dma_abort(uint8_t index) { - stm_dma.channel[index].ccr &= ~(1 << STM_DMA_CCR_EN); + stm_dma.channel[index].ccr &= ~(1UL << STM_DMA_CCR_EN); ao_wakeup(&ao_dma_done[index]); }