2007-06-29 07:37:38 +02:00
|
|
|
/** @file
|
2008-07-15 13:12:43 +02:00
|
|
|
Null Serial Port library instance with empty functions.
|
2007-06-29 07:37:38 +02:00
|
|
|
|
2008-07-15 13:12:43 +02:00
|
|
|
Copyright (c) 2006 - 2008, Intel Corporation
|
2007-06-29 07:37:38 +02:00
|
|
|
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.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
2007-07-20 08:28:14 +02:00
|
|
|
|
2007-06-29 22:51:40 +02:00
|
|
|
#include <Base.h>
|
2007-07-20 08:28:14 +02:00
|
|
|
|
|
|
|
|
2007-06-29 07:37:38 +02:00
|
|
|
#include <Library/SerialPortLib.h>
|
|
|
|
|
2008-07-15 13:12:43 +02:00
|
|
|
/**
|
2007-06-29 07:37:38 +02:00
|
|
|
Programmed hardware of Serial port.
|
|
|
|
|
2008-07-15 13:12:43 +02:00
|
|
|
@return Always return RETURN_UNSUPPORTED.
|
2007-06-29 07:37:38 +02:00
|
|
|
|
|
|
|
**/
|
2007-06-29 22:51:40 +02:00
|
|
|
RETURN_STATUS
|
2007-06-29 07:37:38 +02:00
|
|
|
EFIAPI
|
|
|
|
SerialPortInitialize (
|
|
|
|
VOID
|
|
|
|
)
|
|
|
|
{
|
2007-06-29 22:51:40 +02:00
|
|
|
return RETURN_UNSUPPORTED;
|
2007-06-29 07:37:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
Write data to serial device.
|
|
|
|
|
|
|
|
@param Buffer Point of data buffer which need to be writed.
|
|
|
|
@param NumberOfBytes Number of output bytes which are cached in Buffer.
|
|
|
|
|
2008-07-15 13:12:43 +02:00
|
|
|
@retval 0 No data is to be written.
|
2007-06-29 07:37:38 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
UINTN
|
|
|
|
EFIAPI
|
|
|
|
SerialPortWrite (
|
|
|
|
IN UINT8 *Buffer,
|
|
|
|
IN UINTN NumberOfBytes
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
Read data from serial device and save the datas in buffer.
|
|
|
|
|
2008-08-13 23:02:24 +02:00
|
|
|
@param Buffer Point of data buffer, which contains the data
|
2008-07-15 13:12:43 +02:00
|
|
|
returned from the serial device.
|
|
|
|
@param NumberOfBytes Number of bytes which will be read.
|
2007-06-29 07:37:38 +02:00
|
|
|
|
2008-07-15 13:12:43 +02:00
|
|
|
@retval 0 No data is to be read.
|
2007-06-29 07:37:38 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
UINTN
|
|
|
|
EFIAPI
|
|
|
|
SerialPortRead (
|
|
|
|
OUT UINT8 *Buffer,
|
|
|
|
IN UINTN NumberOfBytes
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-08-10 07:39:21 +02:00
|
|
|
/**
|
|
|
|
Poll the serial device to see if there is any data waiting.
|
|
|
|
|
|
|
|
If there is data waiting to be read from the serial port, then return
|
2008-08-13 23:02:24 +02:00
|
|
|
TRUE. If there is no data waiting to be read from the serial port, then
|
2008-08-10 07:39:21 +02:00
|
|
|
return FALSE.
|
|
|
|
|
|
|
|
@retval FALSE There is no data waiting to be read.
|
|
|
|
|
|
|
|
**/
|
|
|
|
BOOLEAN
|
|
|
|
EFIAPI
|
|
|
|
SerialPortPoll (
|
|
|
|
VOID
|
|
|
|
)
|
|
|
|
{
|
2008-08-13 23:02:24 +02:00
|
|
|
return FALSE;
|
|
|
|
}
|
2008-08-10 07:39:21 +02:00
|
|
|
|