]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c
Code scrub for the Debug library, PostCode library, Print library, and ExtractGuidedS...
[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
eceb3a4c
LG
59 @param Buffer Point of data buffer, which contains the data \r
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