]> git.proxmox.com Git - mirror_edk2.git/commitdiff
add SerialPortLib.h
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 29 Jun 2007 03:27:02 +0000 (03:27 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 29 Jun 2007 03:27:02 +0000 (03:27 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2874 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/SerialPortLib.h [new file with mode: 0644]

diff --git a/MdePkg/Include/Library/SerialPortLib.h b/MdePkg/Include/Library/SerialPortLib.h
new file mode 100644 (file)
index 0000000..153e38c
--- /dev/null
@@ -0,0 +1,76 @@
+\r
+/** @file\r
+  Serial I/O Port library functions with no library constructor/destructor\r
+\r
+  Copyright (c) 2006, 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
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  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
+#define __SERIAL_PORT_LIB__\r
+\r
+/**\r
+\r
+  Programmed hardware of Serial port.\r
+\r
+  @return  Status of Serial Port Device initialization.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SerialPortInitialize (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Write data to serial device. \r
\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               Actual number of bytes writed to serial device.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+SerialPortWrite (\r
+  IN UINT8        *Buffer,\r
+  IN UINTN        NumberOfBytes\r
+);\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 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
+\r
+  @retval 0                Read data failed.\r
+  @retval !0               Aactual number of bytes read from serial device.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+SerialPortRead (\r
+  OUT UINT8    *Buffer,\r
+  IN  UINTN    NumberOfBytes\r
+);\r
+\r
+\r
+#endif\r