- void afsk_dac_isr(void);
- #define DEFINE_AFSK_DAC_ISR() void afsk_dac_isr(void)
- #define AFSK_DAC_IRQ_END() do { /* Implement me */ } while (0)
- #define AFSK_DAC_IRQ_START() do { /* Implement me */ } while (0)
- #define AFSK_DAC_IRQ_STOP() do { /* Implement me */ } while (0)
- #define AFSK_SET_DAC(val) do { (void)val; } while (0)
-#else /* (ARCH & ARCH_UNITTEST) */
-
- #include <stdio.h>
- #include <cfg/compiler.h>
-
- /* For test */
- extern uint32_t data_written;
- extern FILE *fp_dac;
- extern bool afsk_tx_test;
-
- #define AFSK_ADC_INIT() do { } while (0)
+/**
+ * Initialize the specified channel of the ADC for AFSK needs.
+ * The adc should be configured to have a continuos stream of convertions.
+ * For every convertion there must be an ISR that read the sample
+ * and call afsk_adc_isr(), passing the context and the sample.
+ *
+ * \param ch channel to be used for AFSK demodulation.
+ * \param ctx AFSK context (\see Afsk). This parameter must be saved and
+ * passed back to afsk_adc_isr() for every convertion.
+ */
+#define AFSK_ADC_INIT(ch, ctx) do { (void)ch, (void)ctx; } while (0)