From: bernie Date: Mon, 18 Feb 2008 15:20:27 +0000 (+0000) Subject: Restore lost support for hosted serial port. X-Git-Tag: 1.0.0~130 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=94c0c70c1db78ecbd8de629bf78991ae144a1dc6;p=bertos.git Restore lost support for hosted serial port. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1122 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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