X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Fafsk.c;h=a87754416d25872346baef3acac6e90581183639;hb=d1a6dcfe9a94f17f30cd681658b08a9531983197;hp=5efce302ab08a7be4677a8331c79e25da4eebbc5;hpb=84970fa56eb2168c2d564ac17b1fa21b9e4daef4;p=bertos.git diff --git a/bertos/net/afsk.c b/bertos/net/afsk.c index 5efce302..a8775441 100644 --- a/bertos/net/afsk.c +++ b/bertos/net/afsk.c @@ -209,7 +209,7 @@ static bool hdlc_parse(Hdlc *hdlc, bool bit, FIFOBuffer *fifo) * ADC ISR callback. * This function has to be called by the ADC ISR when a sample of the configured * channel is available. - * \param af Afsk context to operate one (\see Afsk). + * \param af Afsk context to operate on. * \param curr_sample current sample from the ADC. */ void afsk_adc_isr(Afsk *af, int8_t curr_sample) @@ -340,12 +340,14 @@ static void afsk_txStart(Afsk *af) * This function has to be called by the DAC ISR when a sample of the configured * channel has been converted out. * - * \param af Afsk context to operate one (\see Afsk). + * \param af Afsk context to operate on. * * \return The next DAC output sample. */ uint8_t afsk_dac_isr(Afsk *af) { + AFSK_STROBE_ON(); + /* Check if we are at a start of a sample cycle */ if (af->sample_count == 0) { @@ -356,6 +358,7 @@ uint8_t afsk_dac_isr(Afsk *af) { AFSK_DAC_IRQ_STOP(af->dac_ch); af->sending = false; + AFSK_STROBE_OFF(); return 0; } else @@ -395,6 +398,7 @@ uint8_t afsk_dac_isr(Afsk *af) { AFSK_DAC_IRQ_STOP(af->dac_ch); af->sending = false; + AFSK_STROBE_OFF(); return 0; } else @@ -453,6 +457,7 @@ uint8_t afsk_dac_isr(Afsk *af) af->phase_acc %= SIN_LEN; af->sample_count--; + AFSK_STROBE_OFF(); return sin_sample(af->phase_acc); } @@ -530,7 +535,7 @@ static void afsk_clearerr(KFile *fd) /** * Initialize an AFSK1200 modem. - * \param af Afsk context to operate one (\see Afsk). + * \param af Afsk context to operate on. * \param adc_ch ADC channel used by the demodulator. * \param dac_ch DAC channel used by the modulator. */