X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fser.h;h=80ffb15ef3a824686d0915d1279f41cd039d5523;hb=3ddfa890ceeff1a89e7a978517e30466935c0698;hp=9d584a8091d93f703d1809693abbf2690e4b7e89;hpb=7ee3b3c3da60b181d18336e892d8d0920166f5ae;p=bertos.git diff --git a/drv/ser.h b/drv/ser.h index 9d584a80..80ffb15e 100755 --- a/drv/ser.h +++ b/drv/ser.h @@ -3,7 +3,7 @@ * * * \brief High level serial I/O API @@ -14,6 +14,12 @@ /* * $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; };