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