Add dual-license information.
[bertos.git] / drv / ser.h
index 9d584a8091d93f703d1809693abbf2690e4b7e89..80ffb15ef3a824686d0915d1279f41cd039d5523 100755 (executable)
--- a/drv/ser.h
+++ b/drv/ser.h
@@ -3,7 +3,7 @@
  * <!--
  * Copyright 2003,2004 Develer S.r.l. (http://www.develer.com/)
  * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
- * All Rights Reserved.
+ * This file is part of DevLib - See devlib/README for information.
  * -->
  *
  * \brief High level serial I/O API
 
 /*
  * $Log$
+ * Revision 1.4  2004/06/03 11:27:09  bernie
+ * Add dual-license information.
+ *
+ * Revision 1.3  2004/06/02 21:35:24  aleph
+ * Serial enhancements: interruptible receive handler and 8 bit serial status for AVR; remove volatile attribute to FIFOBuffer, useless for new fifobuf routens
+ *
  * Revision 1.2  2004/05/23 18:21:53  bernie
  * Trim CVS logs and cleanup header info.
  *
@@ -36,6 +42,8 @@
  */
 /*\{*/
 #if defined(__AVR__)
+       typedef uint8_t serstatus_t;
+
        /* Software errors */
        #define SERRF_RXFIFOOVERRUN  BV(0)  /*!< Rx FIFO buffer overrun */
        #define SERRF_RXTIMEOUT      BV(5)  /*!< Receive timeout */
@@ -46,6 +54,8 @@
        #define SERRF_FRAMEERROR     BV(4)  /*!< Stop bit missing */
        #define SERRF_PARITYERROR    BV(7)  /*!< Parity error */
 #elif defined(__m56800__)
+       typedef uint16_t serstatus_t;
+
        /* Software errors */
        #define SERRF_RXFIFOOVERRUN  BV(0)  /*!< Rx FIFO buffer overrun */
        #define SERRF_RXTIMEOUT      BV(1)  /*!< Receive timeout */
@@ -117,8 +127,8 @@ struct Serial
         *
         * \{
         */
-       volatile FIFOBuffer txfifo;
-       volatile FIFOBuffer     rxfifo;
+       FIFOBuffer txfifo;
+       FIFOBuffer rxfifo;
        unsigned char txbuffer[CONFIG_SER_TXBUFSIZE];
        unsigned char rxbuffer[CONFIG_SER_RXBUFSIZE];
        /* \} */
@@ -131,8 +141,8 @@ struct Serial
 #endif
 
        /*! Holds the flags defined above.  Will be 0 when no errors have occurred. */
-       REGISTER uint16_t status;
-
+       serstatus_t status;
+       
        /*! Low-level interface to hardware. */
        struct SerialHardware* hw;
 };