]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/SerialPortLib.h
Update Hob Instance to remove the unused InternalHobLib.h file.
[mirror_edk2.git] / MdePkg / Include / Library / SerialPortLib.h
index 73a89389e437f9c7597d3112dbba1caa00752359..59c5c27e3f764b813e85ab6cab6605a61acdf59a 100644 (file)
@@ -1,8 +1,7 @@
-\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
@@ -11,8 +10,6 @@
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  SerialPortLib.h\r
-\r
 **/\r
 \r
 #ifndef __SERIAL_PORT_LIB__\r
@@ -32,15 +29,15 @@ SerialPortInitialize (
   );\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
@@ -55,13 +52,14 @@ SerialPortWrite (
 /**\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
@@ -72,5 +70,21 @@ SerialPortRead (
   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