summaryrefslogtreecommitdiff
path: root/src/stm/ao_adc_stm.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-05-18 20:13:05 -0700
committerKeith Packard <keithp@keithp.com>2012-05-18 20:19:18 -0700
commitc1ad8f443d5a9780a9897c79deda61241c0e34c2 (patch)
treed00b897c91fbccc54e249d2682ed9273cf8986ff /src/stm/ao_adc_stm.c
parent5d8b9d524d6424ff98dcc4155fe8b8bd892b6d8f (diff)
altos: Provide ISR-based code paths for SPIserial-at-interrupt
This allows SPI to be entirely interrupt driven, with callbacks for completion. It's not tested yet... Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_adc_stm.c')
-rw-r--r--src/stm/ao_adc_stm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c
index a2569908..93cf6b6d 100644
--- a/src/stm/ao_adc_stm.c
+++ b/src/stm/ao_adc_stm.c
@@ -41,7 +41,7 @@ static uint8_t ao_adc_ready;
*
* Mark time in ring, shut down DMA engine
*/
-static void ao_adc_done(int index)
+static void ao_adc_done(int arg)
{
ao_adc_ring[ao_adc_head].tick = ao_time();
ao_adc_head = ao_adc_ring_next(ao_adc_head);
@@ -72,7 +72,7 @@ ao_adc_poll(void)
(0 << STM_DMA_CCR_PINC) |
(0 << STM_DMA_CCR_CIRC) |
(STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR));
- ao_dma_set_isr(STM_DMA_INDEX(STM_DMA_CHANNEL_ADC1), ao_adc_done);
+ ao_dma_set_isr(STM_DMA_INDEX(STM_DMA_CHANNEL_ADC1), ao_adc_done, 0);
ao_dma_start(STM_DMA_INDEX(STM_DMA_CHANNEL_ADC1));
stm_adc.cr2 = AO_ADC_CR2_VAL | (1 << STM_ADC_CR2_SWSTART);