]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/SerialPortLib.h
2 Serial I/O Port library functions definition.
4 Copyright (c) 2006 - 2008, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __SERIAL_PORT_LIB__
16 #define __SERIAL_PORT_LIB__
20 Programmed hardware of Serial port.
22 @return Status of Serial Port Device initialization.
27 SerialPortInitialize (
32 Write data from buffer to serial device.
34 If the Buffer is NULL, then return 0;
35 if NumberOfBytes is zero, then return 0.
37 @param Buffer Point of data buffer which need to be writed.
38 @param NumberOfBytes Number of output bytes which are cached in Buffer.
40 @retval 0 Write data failed, or No data is to be written.
41 @retval !0 Actual number of bytes writed to serial device.
48 IN UINTN NumberOfBytes
53 Read data from serial device and save the datas in buffer.
55 If the Buffer is NULL, then return zero;
56 if NumberOfBytes is zero, then return zero.
58 @param Buffer Point of data buffer, which contains the data
59 returned from the serial device.
60 @param NumberOfBytes Number of bytes which will be read.
62 @retval 0 Read data failed, No data is to be read.
63 @retval !0 Aactual number of bytes read from serial device.
70 IN UINTN NumberOfBytes
74 Poll the serial device to see if there is any data waiting.
76 If there is data waiting to be read from the serial port, then return
77 TRUE. If there is no data waiting to be read from the serial port, then
80 @retval TRUE Data is waiting to be read.
81 @retval FALSE There is no data waiting to be read.