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

ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c

Go to the documentation of this file.
00001 
00017 #include <Include/Uefi.h>
00018 
00019 #include <Library/IoLib.h>
00020 #include <Library/PcdLib.h>
00021 #include <Library/SerialPortLib.h>
00022 
00023 #include <Drivers/PL011Uart.h>
00024 
00025 
00026 /*
00027 
00028   Programmed hardware of Serial port.
00029 
00030   @return    Always return EFI_UNSUPPORTED.
00031 
00032 **/
00033 RETURN_STATUS
00034 EFIAPI
00035 SerialPortInitialize (
00036   VOID
00037   )
00038 {
00039   // No parity, 1 stop, no fifo, 8 data bits
00040   return PL011UartInitialize (
00041       (UINTN)PcdGet64 (PcdSerialRegisterBase),
00042       (UINTN)PcdGet64 (PcdUartDefaultBaudRate),
00043       PL011_UARTLCR_H_WLEN_8);
00044 }
00045 
00056 UINTN
00057 EFIAPI
00058 SerialPortWrite (
00059   IN UINT8     *Buffer,
00060   IN UINTN     NumberOfBytes
00061   )
00062 {
00063   return PL011UartWrite ((UINTN)PcdGet64 (PcdSerialRegisterBase), Buffer, NumberOfBytes);
00064 }
00065 
00076 UINTN
00077 EFIAPI
00078 SerialPortRead (
00079   OUT UINT8     *Buffer,
00080   IN  UINTN     NumberOfBytes
00081 )
00082 {
00083   return PL011UartRead ((UINTN)PcdGet64 (PcdSerialRegisterBase), Buffer, NumberOfBytes);
00084 }
00085 
00094 BOOLEAN
00095 EFIAPI
00096 SerialPortPoll (
00097   VOID
00098   )
00099 {
00100   return PL011UartPoll ((UINTN)PcdGet64 (PcdSerialRegisterBase));
00101 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines