X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=examples%2Flpc2378%2Fhw%2Fhw_afsk.h;fp=examples%2Flpc2378%2Fhw%2Fhw_afsk.h;h=a0a348d94d4a1971deb228a66eb4c0a4a6080d58;hb=ab067bd420a6e48b25d66444d97ee229b48bcb23;hp=0000000000000000000000000000000000000000;hpb=8284fb65c8c8f9fd233da33fd08f1f81b64cb94b;p=bertos.git diff --git a/examples/lpc2378/hw/hw_afsk.h b/examples/lpc2378/hw/hw_afsk.h new file mode 100644 index 00000000..a0a348d9 --- /dev/null +++ b/examples/lpc2378/hw/hw_afsk.h @@ -0,0 +1,87 @@ +/** + * \file + * + * + * \brief AFSK modem hardware-specific definitions. + * + * \version $Id: hw_afsk.h 3072 2009-10-10 13:01:56Z batt $ + * + * \author Francesco Sacchi + */ + +#ifndef HW_AFSK_H +#define HW_AFSK_H + +#include "cfg/cfg_arch.h" + +#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 (\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) + +#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 has 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 (\see Afsk). 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) + +#endif /* HW_AFSK_H */