]>
git.proxmox.com Git - mirror_edk2.git/blob - EmbeddedPkg/Library/TemplateSerialPortLib/TemplateSerialPortLib.c
2 Serial I/O Port library functions with no library constructor/destructor
4 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
5 Copyright (c) 2012, ARM Ltd. All rights reserved.
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 #include <Library/SerialPortLib.h>
24 Programmed hardware of Serial port.
26 @return Always return EFI_UNSUPPORTED.
31 SerialPortInitialize (
35 return RETURN_UNSUPPORTED
;
39 Write data to serial device.
41 @param Buffer Point of data buffer which need to be written.
42 @param NumberOfBytes Number of output bytes which are cached in Buffer.
44 @retval 0 Write data failed.
45 @retval !0 Actual number of bytes written to serial device.
52 IN UINTN NumberOfBytes
60 Read data from serial device and save the data in buffer.
62 @param Buffer Point of data buffer which need to be written.
63 @param NumberOfBytes Number of output bytes which are cached in Buffer.
65 @retval 0 Read data failed.
66 @retval !0 Actual number of bytes read from serial device.
73 IN UINTN NumberOfBytes
82 Poll the serial device to see if there is any data waiting.
84 If there is data waiting to be read from the serial port, then return
85 TRUE. If there is no data waiting to be read from the serial port, then
88 @retval TRUE Data is waiting to be read.
89 @retval FALSE There is no data waiting to be read.