projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Move ao_adc_single.h API header to kernel/
[fw/altos]
/
src
/
stmf0
/
ao_dma_stm.c
diff --git
a/src/stmf0/ao_dma_stm.c
b/src/stmf0/ao_dma_stm.c
index e90c6bf838b11f4cca1e77df85560f7fe4c344e8..ef551786d62b8d9073a517065a30a81370099f80 100644
(file)
--- 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
*
* 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
*
* 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)));
}
ch_mask(STM_DMA_INDEX(3)));
}
-void stm_dma
1
_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)) |
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)
{
void
ao_dma_done_transfer(uint8_t index)
{
- stm_dma.channel[index].ccr &= ~(1 << STM_DMA_CCR_EN);
+ stm_dma.channel[index].ccr &= ~(1
UL
<< STM_DMA_CCR_EN);
ao_arch_critical(
if (--ao_dma_active == 0)
ao_arch_critical(
if (--ao_dma_active == 0)
- stm_rcc.ahbenr &= ~(1 << STM_RCC_AHBENR_DMAEN);
+ stm_rcc.ahbenr &= ~(1
UL
<< STM_RCC_AHBENR_DMAEN);
);
if (ao_dma_allocated[index])
ao_dma_mutex[index] = 0;
);
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)
{
void
ao_dma_abort(uint8_t index)
{
- stm_dma.channel[index].ccr &= ~(1 << STM_DMA_CCR_EN);
+ stm_dma.channel[index].ccr &= ~(1
UL
<< STM_DMA_CCR_EN);
ao_wakeup(&ao_dma_done[index]);
}
ao_wakeup(&ao_dma_done[index]);
}