X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fnet%2Fafsk.h;h=bd82e66012d72eb9d5d5163f00dfcb3bfdc0d195;hb=84970fa56eb2168c2d564ac17b1fa21b9e4daef4;hp=020b2f9618a5f0f02f7bf89a0166f67d0f108a58;hpb=3e7de48cbdf0a6c043a0836de2fcc41af5265dce;p=bertos.git diff --git a/bertos/net/afsk.h b/bertos/net/afsk.h index 020b2f96..bd82e660 100644 --- a/bertos/net/afsk.h +++ b/bertos/net/afsk.h @@ -81,6 +81,10 @@ typedef struct Hdlc bool rxstart; ///< True if an HDLC_FLAG char has been found in the bitstream. } Hdlc; +/** + * RX FIFO buffer full error. + */ +#define AFSK_RXFIFO_OVERRUN BV(0) /** * AFSK1200 modem context. @@ -165,6 +169,12 @@ typedef struct Afsk /** True while modem sends data */ volatile bool sending; + /** + * AFSK modem status. + * If 0 all is ok, otherwise errors are present. + */ + volatile int status; + /** Hdlc context */ Hdlc hdlc; @@ -195,7 +205,7 @@ INLINE Afsk *AFSK_CAST(KFile *fd) void afsk_adc_isr(Afsk *af, int8_t sample); -void afsk_dac_isr(Afsk *af); +uint8_t afsk_dac_isr(Afsk *af); void afsk_init(Afsk *af, int adc_ch, int dac_ch);