]>
Commit | Line | Data |
---|---|---|
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 | |
17 | //\r | |
18 | // The package level header files this module uses\r | |
19 | //\r | |
20 | #include <FrameworkPei.h>\r | |
21 | //\r | |
22 | // The protocols, PPI and GUID defintions for this module\r | |
23 | //\r | |
24 | //\r | |
25 | // The Library classes this module consumes\r | |
26 | //\r | |
27 | #include <Library/SerialPortLib.h>\r | |
28 | \r | |
29 | /*\r | |
30 | \r | |
31 | Programmed hardware of Serial port.\r | |
32 | \r | |
33 | @return Always return EFI_UNSUPPORTED.\r | |
34 | \r | |
35 | **/\r | |
36 | EFI_STATUS\r | |
37 | EFIAPI\r | |
38 | SerialPortInitialize (\r | |
39 | VOID\r | |
40 | )\r | |
41 | {\r | |
42 | return EFI_UNSUPPORTED;\r | |
43 | }\r | |
44 | \r | |
45 | /**\r | |
46 | Write data to serial device.\r | |
47 | \r | |
48 | @param Buffer Point of data buffer which need to be writed.\r | |
49 | @param NumberOfBytes Number of output bytes which are cached in Buffer.\r | |
50 | \r | |
51 | @retval 0 Write data failed.\r | |
52 | @retval !0 Actual number of bytes writed to serial device.\r | |
53 | \r | |
54 | **/\r | |
55 | UINTN\r | |
56 | EFIAPI\r | |
57 | SerialPortWrite (\r | |
58 | IN UINT8 *Buffer,\r | |
59 | IN UINTN NumberOfBytes\r | |
60 | )\r | |
61 | {\r | |
62 | return 0;\r | |
63 | }\r | |
64 | \r | |
65 | \r | |
66 | /**\r | |
67 | Read data from serial device and save the datas in buffer.\r | |
68 | \r | |
69 | @param Buffer Point of data buffer which need to be writed.\r | |
70 | @param NumberOfBytes Number of output bytes which are cached in Buffer.\r | |
71 | \r | |
72 | @retval 0 Read data failed.\r | |
73 | @retval !0 Aactual number of bytes read from serial device.\r | |
74 | \r | |
75 | **/\r | |
76 | UINTN\r | |
77 | EFIAPI\r | |
78 | SerialPortRead (\r | |
79 | OUT UINT8 *Buffer,\r | |
80 | IN UINTN NumberOfBytes\r | |
81 | )\r | |
82 | {\r | |
83 | return 0;\r | |
84 | }\r | |
85 | \r |