EmbeddedPkg: Introduced a separate SerialPortExtLib library
Formerly only the header was defined and it was expecting the SerialPortExtLib interface to be implemented by SerialPortLib if supported. This behaviour was not conform to the EDK2 framework. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14173 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
|
||||
|
||||
#include <Library/SerialPortLib.h>
|
||||
#include <Library/SerialPortExtLib.h>
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,65 +35,6 @@ SerialPortInitialize (
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Set the serial device control bits.
|
||||
|
||||
@return Always return EFI_UNSUPPORTED.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
SerialPortSetControl (
|
||||
IN UINT32 Control
|
||||
)
|
||||
{
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Get the serial device control bits.
|
||||
|
||||
@param Control Control signals read from the serial device.
|
||||
|
||||
@retval EFI_SUCCESS The control bits were read from the serial device.
|
||||
@retval EFI_DEVICE_ERROR The serial device is not functioning correctly.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
SerialPortGetControl (
|
||||
OUT UINT32 *Control
|
||||
)
|
||||
{
|
||||
if (SerialPortPoll ()) {
|
||||
// If a character is pending don't set EFI_SERIAL_INPUT_BUFFER_EMPTY
|
||||
*Control = EFI_SERIAL_OUTPUT_BUFFER_EMPTY;
|
||||
} else {
|
||||
*Control = EFI_SERIAL_INPUT_BUFFER_EMPTY | EFI_SERIAL_OUTPUT_BUFFER_EMPTY;
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
Set the serial device attributes.
|
||||
|
||||
@return Always return EFI_UNSUPPORTED.
|
||||
|
||||
**/
|
||||
RETURN_STATUS
|
||||
EFIAPI
|
||||
SerialPortSetAttributes (
|
||||
IN OUT UINT64 *BaudRate,
|
||||
IN OUT UINT32 *ReceiveFifoDepth,
|
||||
IN OUT UINT32 *Timeout,
|
||||
IN OUT EFI_PARITY_TYPE *Parity,
|
||||
IN OUT UINT8 *DataBits,
|
||||
IN OUT EFI_STOP_BITS_TYPE *StopBits
|
||||
)
|
||||
{
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Write data to serial device.
|
||||
|
||||
|
Reference in New Issue
Block a user