From 5254bfa9aa0e9dd3bca2a54ecbba23d2bb999300 Mon Sep 17 00:00:00 2001 From: batt Date: Sat, 10 Oct 2009 10:20:38 +0000 Subject: [PATCH] Add documentation. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3059 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/hw/hw_afsk.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/bertos/hw/hw_afsk.h b/bertos/hw/hw_afsk.h index 74ebfcd5..e02d9e50 100644 --- a/bertos/hw/hw_afsk.h +++ b/bertos/hw/hw_afsk.h @@ -45,15 +45,52 @@ #if !(ARCH & ARCH_UNITTEST) #warning TODO:This is an example implementation, you must implement it! + /** + * 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. 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) #define AFSK_STROBE_INIT() do { /* Implement me */ } while (0) #define AFSK_STROBE_ON() do { /* Implement me */ } while (0) #define AFSK_STROBE_OFF() do { /* Implement me */ } while (0) + /** + * Initialize the specified channel of the DAC for AFSK needs. + * The DAC have to be configured in order to call an ISR for every sample sent. + * The DAC doesn't have to start the IRQ immediatly but have to wait + * the AFSK driver to call AFSK_DAC_IRQ_START(). + * The ISR must then call afsk_dac_isr() passing the AFSK context. + * \param ch DAC channel to be used for AFSK modulation. + * \param ctx AFSK context. This parameter must be saved and + * passed back to afsk_dac_isr() for every convertion. + */ #define AFSK_DAC_INIT(ch, ctx) do { (void)ch, (void)ctx; } while (0) + + /** + * Start DAC convertions on channel \a ch. + * \param ch DAC channel. + */ #define AFSK_DAC_IRQ_START(ch) do { (void)ch; /* Implement me */ } while (0) + + /** + * Stop DAC convertions on channel \a ch. + * \param ch DAC channel. + */ #define AFSK_DAC_IRQ_STOP(ch) do { (void)ch; /* Implement me */ } while (0) + + /** + * Set the next DAC value for channel \a ch. + * This macro is called by afsk_dac_isr() to set the next DAC output value. + * \param ch DAC channel. + * \param val Next DAC output value for channel. + */ #define AFSK_DAC_SET(ch, val) do { (void)ch; (void)val; } while (0) #else /* (ARCH & ARCH_UNITTEST) */ -- 2.25.1