From 94c0c70c1db78ecbd8de629bf78991ae144a1dc6 Mon Sep 17 00:00:00 2001 From: bernie Date: Mon, 18 Feb 2008 15:20:27 +0000 Subject: [PATCH] Restore lost support for hosted serial port. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1122 38d2e660-2303-0410-9eaa-f027e97ec537 --- drv/ser.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drv/ser.h b/drv/ser.h index 06930cb4..b7158055 100644 --- a/drv/ser.h +++ b/drv/ser.h @@ -44,7 +44,31 @@ #include #include -#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 -- 2.25.1