X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Fao_adc_stm.c;h=53d4b8c3f64ece0d2e0126cbd37846de6d8fe071;hb=677fcafd3816b6d8d86b2dc41b840d97b5ccbf07;hp=48fc4262f7cb822f298168e7f55d5a9478c757b9;hpb=5a55501660ebab3b858a48483c5df1cfb4e858e4;p=fw%2Faltos diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c index 48fc4262..53d4b8c3 100644 --- a/src/stm/ao_adc_stm.c +++ b/src/stm/ao_adc_stm.c @@ -41,6 +41,7 @@ static uint8_t ao_adc_ready; */ static void ao_adc_done(int index) { + (void) index; AO_DATA_PRESENT(AO_DATA_ADC); ao_dma_done_transfer(STM_DMA_INDEX(STM_DMA_CHANNEL_ADC1)); if (ao_data_present == AO_DATA_ALL) { @@ -109,15 +110,21 @@ static void ao_adc_dump(void) __reentrant { struct ao_data packet; - int16_t *d; +#ifndef AO_ADC_DUMP uint8_t i; + int16_t *d; +#endif ao_data_get(&packet); +#ifdef AO_ADC_DUMP + AO_ADC_DUMP(&packet); +#else printf("tick: %5u", packet.tick); d = (int16_t *) (&packet.adc); for (i = 0; i < AO_NUM_ADC; i++) printf (" %2d: %5d", i, d[i]); printf("\n"); +#endif } __code struct ao_cmds ao_adc_cmds[] = {