]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/SerialPortLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / Library / SerialPortLib.h
index 965a2d964b02ffea5df0412c02db3c0b4bb8cc45..a752f6097da33adc62f84b3c798b2169df900996 100644 (file)
@@ -1,15 +1,9 @@
 /** @file\r
   This library class provides common serial I/O port functions.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 Copyright (c) 2012 - 2014, ARM Ltd. All rights reserved.\r
-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
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -21,11 +15,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 /**\r
   Initialize the serial device hardware.\r
-  \r
+\r
   If no initialization is required, then return RETURN_SUCCESS.\r
   If the serial device was successfully initialized, then return RETURN_SUCCESS.\r
   If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.\r
-  \r
+\r
   @retval RETURN_SUCCESS        The serial device was initialized.\r
   @retval RETURN_DEVICE_ERROR   The serial device could not be initialized.\r
 \r
@@ -37,37 +31,36 @@ SerialPortInitialize (
   );\r
 \r
 /**\r
-  Write data from buffer to serial device. \r
\r
-  Writes NumberOfBytes data bytes from Buffer to the serial device.  \r
+  Write data from buffer to serial device.\r
+\r
+  Writes NumberOfBytes data bytes from Buffer to the serial device.\r
   The number of bytes actually written to the serial device is returned.\r
   If the return value is less than NumberOfBytes, then the write operation failed.\r
-  If Buffer is NULL, then ASSERT(). \r
+  If Buffer is NULL, then ASSERT().\r
   If NumberOfBytes is zero, then return 0.\r
 \r
   @param  Buffer           Pointer to the data buffer to be written.\r
   @param  NumberOfBytes    Number of bytes to written to the serial device.\r
 \r
   @retval 0                NumberOfBytes is 0.\r
-  @retval >0               The number of bytes written to the serial device.  \r
+  @retval >0               The number of bytes written to the serial device.\r
                            If this value is less than NumberOfBytes, then the write operation failed.\r
 \r
 **/\r
 UINTN\r
 EFIAPI\r
 SerialPortWrite (\r
-  IN UINT8     *Buffer,\r
-  IN UINTN     NumberOfBytes\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
+\r
   Reads NumberOfBytes data bytes from a serial device into the buffer\r
-  specified by Buffer. The number of bytes actually read is returned. \r
+  specified by Buffer. The number of bytes actually read is returned.\r
   If the return value is less than NumberOfBytes, then the rest operation failed.\r
-  If Buffer is NULL, then ASSERT(). \r
+  If Buffer is NULL, then ASSERT().\r
   If NumberOfBytes is zero, then return 0.\r
 \r
   @param  Buffer           Pointer to the data buffer to store the data read from the serial device.\r
@@ -80,8 +73,8 @@ SerialPortWrite (
 UINTN\r
 EFIAPI\r
 SerialPortRead (\r
-  OUT UINT8   *Buffer,\r
-  IN  UINTN   NumberOfBytes\r
+  OUT UINT8  *Buffer,\r
+  IN  UINTN  NumberOfBytes\r
   );\r
 \r
 /**\r
@@ -114,7 +107,7 @@ SerialPortPoll (
 RETURN_STATUS\r
 EFIAPI\r
 SerialPortSetControl (\r
-  IN UINT32 Control\r
+  IN UINT32  Control\r
   );\r
 \r
 /**\r
@@ -130,7 +123,7 @@ SerialPortSetControl (
 RETURN_STATUS\r
 EFIAPI\r
 SerialPortGetControl (\r
-  OUT UINT32 *Control\r
+  OUT UINT32  *Control\r
   );\r
 \r
 /**\r
@@ -169,12 +162,12 @@ SerialPortGetControl (
 RETURN_STATUS\r
 EFIAPI\r
 SerialPortSetAttributes (\r
-  IN OUT UINT64             *BaudRate,\r
-  IN OUT UINT32             *ReceiveFifoDepth,\r
-  IN OUT UINT32             *Timeout,\r
-  IN OUT EFI_PARITY_TYPE    *Parity,\r
-  IN OUT UINT8              *DataBits,\r
-  IN OUT EFI_STOP_BITS_TYPE *StopBits\r
+  IN OUT UINT64              *BaudRate,\r
+  IN OUT UINT32              *ReceiveFifoDepth,\r
+  IN OUT UINT32              *Timeout,\r
+  IN OUT EFI_PARITY_TYPE     *Parity,\r
+  IN OUT UINT8               *DataBits,\r
+  IN OUT EFI_STOP_BITS_TYPE  *StopBits\r
   );\r
 \r
 #endif\r