diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-28 10:56:12 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-28 10:56:12 +0000 |
commit | 7d49ced0cf64fbb3abf6b4d97dac4806bd1d9ee6 (patch) | |
tree | 3854e3307400ba2046bc4fa8f0337ea5a0bd729f /Omap35xxPkg | |
parent | 21de944e0355f706fbbfc8c612b103a3b55dc3cb (diff) | |
download | edk2-platforms-7d49ced0cf64fbb3abf6b4d97dac4806bd1d9ee6.tar.xz |
EmbeddedPkg: Introduced 'SerialPortExtLib.h'
EmbeddedPkg/SerialDxe was not allowing to set/get the control of the
Serial connection because the needed functions were not exposed in
SerialPortLib.h.
This commit introduces an additional library to extend the SerialPort
features.
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13773 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Omap35xxPkg')
-rw-r--r-- | Omap35xxPkg/Library/SerialPortLib/SerialPortLib.c | 55 | ||||
-rw-r--r-- | Omap35xxPkg/Library/SerialPortLib/SerialPortLib.inf | 1 |
2 files changed, 56 insertions, 0 deletions
diff --git a/Omap35xxPkg/Library/SerialPortLib/SerialPortLib.c b/Omap35xxPkg/Library/SerialPortLib/SerialPortLib.c index 2f93140e4c..9a70593dbf 100644 --- a/Omap35xxPkg/Library/SerialPortLib/SerialPortLib.c +++ b/Omap35xxPkg/Library/SerialPortLib/SerialPortLib.c @@ -17,6 +17,7 @@ #include <Base.h>
#include <Library/DebugLib.h>
#include <Library/SerialPortLib.h>
+#include <Library/SerialPortExtLib.h>
#include <Library/PcdLib.h>
#include <Library/IoLib.h>
#include <Library/OmapLib.h>
@@ -122,3 +123,57 @@ SerialPortPoll ( }
}
+/**
+ Set the serial device control bits.
+
+ @return Always return EFI_UNSUPPORTED.
+
+**/
+RETURN_STATUS
+EFIAPI
+SerialPortSetControl (
+ IN UINT32 Control
+ )
+{
+ return RETURN_SUCCESS;
+}
+
+/**
+ 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
+ )
+{
+ return RETURN_SUCCESS;
+}
+
+
+/**
+ Set the serial device attributes.
+
+ @return Always return EFI_UNSUPPORTED.
+
+**/
+RETURN_STATUS
+EFIAPI
+SerialPortSetAttributes (
+ IN UINT64 BaudRate,
+ IN UINT32 ReceiveFifoDepth,
+ IN UINT32 Timeout,
+ IN EFI_PARITY_TYPE Parity,
+ IN UINT8 DataBits,
+ IN EFI_STOP_BITS_TYPE StopBits
+ )
+{
+ return RETURN_SUCCESS;
+}
+
diff --git a/Omap35xxPkg/Library/SerialPortLib/SerialPortLib.inf b/Omap35xxPkg/Library/SerialPortLib/SerialPortLib.inf index c595777efe..a7d4fadcef 100644 --- a/Omap35xxPkg/Library/SerialPortLib/SerialPortLib.inf +++ b/Omap35xxPkg/Library/SerialPortLib/SerialPortLib.inf @@ -35,6 +35,7 @@ OmapLib
[Packages]
+ EmbeddedPkg/EmbeddedPkg.dec
MdePkg/MdePkg.dec
Omap35xxPkg/Omap35xxPkg.dec
|