]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Library/EdkSerialPortLibNull/SerialPortLibNull.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1452 6f19259b...
[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
53408952 49 IN UINT8 *Buffer,\r
50 IN UINTN NumberOfBytes\r
56836fe9 51)\r
52{\r
97fc032b 53 ASSERT (NULL != Buffer);\r
54 ASSERT (0 != NumberOfBytes);\r
55\r
56836fe9 56 return 0;\r
57}\r
58\r
59\r
60/**\r
61 Read data from serial device and save the datas in buffer.\r
62 \r
63 If the buffer is NULL, then ASSERT(); \r
64 if NumberOfBytes is zero, then ASSERT(). \r
65\r
66 @param Buffer Point of data buffer which need to be writed.\r
67 @param NumberOfBytes Number of output bytes which are cached in Buffer.\r
68\r
69 @retval 0 Read data failed.\r
70 @retval !0 Aactual number of bytes read from serial device.\r
71\r
72**/\r
73UINTN\r
74EFIAPI\r
75SerialPortRead (\r
53408952 76 OUT UINT8 *Buffer,\r
77 IN UINTN NumberOfBytes\r
56836fe9 78)\r
79{\r
97fc032b 80 ASSERT (NULL != Buffer);\r
81 ASSERT (0 != NumberOfBytes);\r
82\r
56836fe9 83 return 0;\r
84}\r
85\r