]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c
edk2/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c:
[mirror_edk2.git] / MdePkg / Library / SerialPortLibNull / SerialPortLibNull.c
1 /** @file
2 Null Serial Port library instance with empty functions.
3
4 Copyright (c) 2006 - 2008, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15
16 #include <Base.h>
17
18
19 #include <Library/SerialPortLib.h>
20
21 /**
22 Programmed hardware of Serial port.
23
24 @return Always return RETURN_UNSUPPORTED.
25
26 **/
27 RETURN_STATUS
28 EFIAPI
29 SerialPortInitialize (
30 VOID
31 )
32 {
33 return RETURN_UNSUPPORTED;
34 }
35
36 /**
37 Write data to serial device.
38
39 @param Buffer Point of data buffer which need to be writed.
40 @param NumberOfBytes Number of output bytes which are cached in Buffer.
41
42 @retval 0 No data is to be written.
43
44 **/
45 UINTN
46 EFIAPI
47 SerialPortWrite (
48 IN UINT8 *Buffer,
49 IN UINTN NumberOfBytes
50 )
51 {
52 return 0;
53 }
54
55
56 /**
57 Read data from serial device and save the datas in buffer.
58
59 @param Buffer Point of data buffer, which contains the data
60 returned from the serial device.
61 @param NumberOfBytes Number of bytes which will be read.
62
63 @retval 0 No data is to be read.
64
65 **/
66 UINTN
67 EFIAPI
68 SerialPortRead (
69 OUT UINT8 *Buffer,
70 IN UINTN NumberOfBytes
71 )
72 {
73 return 0;
74 }
75
76 /**
77 Poll the serial device to see if there is any data waiting.
78
79 If there is data waiting to be read from the serial port, then return
80 TRUE. If there is no data waiting to be read from the serial port, then
81 return FALSE.
82
83 @retval FALSE There is no data waiting to be read.
84
85 **/
86 BOOLEAN
87 EFIAPI
88 SerialPortPoll (
89 VOID
90 )
91 {
92 return FALSE;
93 }
94