Restore lost support for hosted serial port.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 18 Feb 2008 15:20:27 +0000 (15:20 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 18 Feb 2008 15:20:27 +0000 (15:20 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1122 38d2e660-2303-0410-9eaa-f027e97ec537

drv/ser.h

index 06930cb439ff4ea9f2dda2763cfd8b1e3f7e5625..b71580556c06c6679c3f545f04457db071f9ab03 100644 (file)
--- a/drv/ser.h
+++ b/drv/ser.h
 #include <mware/fifobuf.h>
 #include <cfg/compiler.h>
 
-#include CPU_HEADER(ser)
+#if OS_HOSTED
+       typedef uint16_t serstatus_t;
+
+       /* Software errors */
+       #define SERRF_RXFIFOOVERRUN  BV(0)  /**< Rx FIFO buffer overrun */
+       #define SERRF_RXTIMEOUT      BV(1)  /**< Receive timeout */
+       #define SERRF_TXTIMEOUT      BV(2)  /**< Transmit timeout */
+
+       /* Hardware errors */
+       #define SERRF_RXSROVERRUN    0      /**< Unsupported in emulated serial port. */
+       #define SERRF_FRAMEERROR     0      /**< Unsupported in emulated serial port. */
+       #define SERRF_PARITYERROR    0      /**< Unsupported in emulated serial port. */
+       #define SERRF_NOISEERROR     0      /**< Unsupported in emulated serial port. */
+
+       enum
+       {
+               SER_UART0,
+               SER_UART1,
+
+               SER_CNT  /**< Number of serial ports */
+       };
+
+#else
+       #include CPU_HEADER(ser)
+#endif
 
 #include <appconfig.h>