X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Fao_adc_stm.c;h=505addfac7a64b810660497478be53eaabcdaeb1;hb=db8f3426ac1cf756a2e4974ca61a5ae9048c80ce;hp=48fc4262f7cb822f298168e7f55d5a9478c757b9;hpb=7f664da148ae15d46d179d8ecede6fc0bc710ffb;p=fw%2Faltos diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c index 48fc4262..505addfa 100644 --- a/src/stm/ao_adc_stm.c +++ b/src/stm/ao_adc_stm.c @@ -109,15 +109,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[] = {