Handle rx fifo overflow error.
[bertos.git] / bertos / net / afsk.h
index 020b2f9618a5f0f02f7bf89a0166f67d0f108a58..5f75b3e38d2b8d046c9a76324722bc2aa53df712 100644 (file)
@@ -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;