EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions

ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c File Reference

#include <Include/Uefi.h>
#include <Library/IoLib.h>
#include <Library/PcdLib.h>
#include <Library/SerialPortLib.h>
#include <Drivers/PL011Uart.h>

Go to the source code of this file.

Functions

RETURN_STATUS EFIAPI SerialPortInitialize (VOID)
UINTN EFIAPI SerialPortWrite (IN UINT8 *Buffer, IN UINTN NumberOfBytes)
UINTN EFIAPI SerialPortRead (OUT UINT8 *Buffer, IN UINTN NumberOfBytes)
BOOLEAN EFIAPI SerialPortPoll (VOID)

Detailed Description

Serial I/O Port library functions with no library constructor/destructor

Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file PL011SerialPortLib.c.


Function Documentation

RETURN_STATUS EFIAPI SerialPortInitialize ( VOID  )

Initialize the serial device hardware.

If no initialization is required, then return RETURN_SUCCESS. If the serial device was successfully initialized, then return RETURN_SUCCESS. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.

Return values:
RETURN_SUCCESSThe serial device was initialized.
RETURN_DEVICE_ERRORThe serial device could not be initialized.

Definition at line 35 of file PL011SerialPortLib.c.

BOOLEAN EFIAPI SerialPortPoll ( VOID  )

Check to see if any data is avaiable to be read from the debug device.

Return values:
EFI_SUCCESSAt least one byte of data is avaiable to be read
EFI_NOT_READYNo data is avaiable to be read
EFI_DEVICE_ERRORThe serial device is not functioning properly

Definition at line 96 of file PL011SerialPortLib.c.

UINTN EFIAPI SerialPortRead ( OUT UINT8 Buffer,
IN UINTN  NumberOfBytes 
)

Read data from serial device and save the datas in buffer.

Parameters:
BufferPoint of data buffer which need to be writed.
NumberOfBytesNumber of output bytes which are cached in Buffer.
Return values:
0Read data failed.
!0Aactual number of bytes read from serial device.

Definition at line 78 of file PL011SerialPortLib.c.

UINTN EFIAPI SerialPortWrite ( IN UINT8 Buffer,
IN UINTN  NumberOfBytes 
)

Write data to serial device.

Parameters:
BufferPoint of data buffer which need to be writed.
NumberOfBytesNumber of output bytes which are cached in Buffer.
Return values:
0Write data failed.
!0Actual number of bytes writed to serial device.

Definition at line 58 of file PL011SerialPortLib.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines