*/
#include "afsk.h"
+#include <net/ax25.h>
+
#include "cfg/cfg_afsk.h"
#include "hw/hw_afsk.h"
{
if ((hdlc_currchar == HDLC_FLAG
|| hdlc_currchar == HDLC_RESET
- || hdlc_currchar == AFSK_ESC)
+ || hdlc_currchar == AX25_ESC)
&& !fifo_isfull_locked(&rx_fifo))
- fifo_push(&rx_fifo, AFSK_ESC);
+ fifo_push(&rx_fifo, AX25_ESC);
else
hdlc_rxstart = false;
hdlc_parse(!EDGE_FOUND(found_bits));
}
+
AFSK_STROBE_OFF();
+ AFSK_ADC_IRQ_END();
}
/* True while modem sends data */
{
AFSK_DAC_IRQ_STOP();
sending = false;
+ AFSK_DAC_IRQ_END();
return;
}
else
curr_out = fifo_pop(&tx_fifo);
/* Handle char escape */
- if (curr_out == AFSK_ESC)
+ if (curr_out == AX25_ESC)
{
if (fifo_isempty(&tx_fifo))
{
AFSK_DAC_IRQ_STOP();
sending = false;
+ AFSK_DAC_IRQ_END();
return;
}
else
AFSK_SET_DAC(sin_sample(phase_acc));
sample_count--;
+ AFSK_DAC_IRQ_END();
}
fifo_init(&tx_fifo, tx_buf, sizeof(tx_buf));
AFSK_ADC_INIT();
+ AFSK_STROBE_INIT();
kprintf("MARK_INC %d, SPACE_INC %d\n", MARK_INC, SPACE_INC);
memset(af, 0, sizeof(*af));
*
* \version $Id$
* \author Francesco Sacchi <asterix@develer.com>
- *
+ *
* $WIZ$ module_name = "afsk"
* $WIZ$ module_configuration = "bertos/cfg/cfg_afsk.h"
* $WIZ$ module_depends = "timer", "kfile"
void afsk_init(Afsk *af);
-#define HDLC_FLAG 0x7E
-#define HDLC_RESET 0x7F
-#define AFSK_ESC 0x1B
-
#endif