-\r
/** @file\r
- Serial I/O Port library functions with no library constructor/destructor\r
+ Serial I/O Port library functions definition.\r
\r
- Copyright (c) 2006, Intel Corporation\r
+ Copyright (c) 2006 - 2008, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
);\r
\r
/**\r
- Write data to serial device. \r
+ Write data from buffer to serial device. \r
\r
- If the buffer is NULL, then return 0; \r
+ If the Buffer is NULL, then return 0; \r
if NumberOfBytes is zero, then return 0. \r
\r
@param Buffer Point of data buffer which need to be writed.\r
@param NumberOfBytes Number of output bytes which are cached in Buffer.\r
\r
- @retval 0 Write data failed.\r
+ @retval 0 Write data failed, or No data is to be written.\r
@retval !0 Actual number of bytes writed to serial device.\r
\r
**/\r
/**\r
Read data from serial device and save the datas in buffer.\r
\r
- If the buffer is NULL, then return zero;\r
+ If the Buffer is NULL, then return zero;\r
if NumberOfBytes is zero, then return zero.\r
\r
- @param Buffer Point of data buffer which need to be writed.\r
- @param NumberOfBytes Number of output bytes which are cached in Buffer.\r
+ @param Buffer Point of data buffer, which contains the data \r
+ returned from the serial device.\r
+ @param NumberOfBytes Number of bytes which will be read.\r
\r
- @retval 0 Read data failed.\r
+ @retval 0 Read data failed, No data is to be read.\r
@retval !0 Aactual number of bytes read from serial device.\r
\r
**/\r
IN UINTN NumberOfBytes\r
);\r
\r
+/**\r
+ Poll the serial device to see if there is any data waiting.\r
+\r
+ If there is data waiting to be read from the serial port, then return\r
+ TRUE. If there is no data waiting to be read from the serial port, then \r
+ return FALSE.\r
+\r
+ @retval TRUE Data is waiting to be read.\r
+ @retval FALSE There is no data waiting to be read.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+SerialPortPoll (\r
+ VOID\r
+ );\r
\r
#endif\r