]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Library/EdkSerialPortLibNull/SerialPortLibNull.c
Follow up EDKT236.
[mirror_edk2.git] / EdkModulePkg / Library / EdkSerialPortLibNull / SerialPortLibNull.c
CommitLineData
56836fe9 1/** @file\r
2 Serial I/O Port library functions with no library constructor/destructor\r
3\r
4 Copyright (c) 2006, Intel Corporation\r
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
13 Module Name: SerialPortLibNull.c\r
14\r
15**/\r
16\r
e86976ff 17/*\r
56836fe9 18\r
19 Programmed hardware of Serial port.\r
20\r
e86976ff 21 @return Always return EFI_UNSUPPORTED.\r
22\r
56836fe9 23**/\r
24EFI_STATUS\r
25EFIAPI\r
26SerialPortInitialize (\r
27 VOID\r
28 )\r
29{\r
30 return EFI_UNSUPPORTED;\r
31}\r
32\r
33/**\r
34 Write data to serial device. \r
35 \r
36 If the buffer is NULL, then ASSERT(); \r
37 if NumberOfBytes is zero, then ASSERT(). \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
42 @retval 0 Write data failed.\r
43 @retval !0 Actual number of bytes writed to serial device.\r
44\r
45**/\r
46UINTN\r
47EFIAPI\r
48SerialPortWrite (\r
49 IN UINT8 *Buffer,\r
50 IN UINTN NumberOfBytes\r
51)\r
52{\r
53 return 0;\r
54}\r
55\r
56\r
57/**\r
58 Read data from serial device and save the datas in buffer.\r
59 \r
60 If the buffer is NULL, then ASSERT(); \r
61 if NumberOfBytes is zero, then ASSERT(). \r
62\r
63 @param Buffer Point of data buffer which need to be writed.\r
64 @param NumberOfBytes Number of output bytes which are cached in Buffer.\r
65\r
66 @retval 0 Read data failed.\r
67 @retval !0 Aactual number of bytes read from serial device.\r
68\r
69**/\r
70UINTN\r
71EFIAPI\r
72SerialPortRead (\r
73 OUT UINT8 *Buffer,\r
74 IN UINTN NumberOfBytes\r
75)\r
76{\r
77 return 0;\r
78}\r
79\r