]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/SerialPortLibNull/SerialPortLibNull.c
4782a9c2f86f7dd0012f9c4300bcf39449ef9afe
[mirror_edk2.git] / MdePkg / Library / SerialPortLibNull / SerialPortLibNull.c
1 /** @file
2 Serial I/O Port library functions with no library constructor/destructor
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: SerialPortLibNull.c
14
15 **/
16
17 //
18 // The package level header files this module uses
19 //
20 #include <FrameworkPei.h>
21 //
22 // The protocols, PPI and GUID defintions for this module
23 //
24 //
25 // The Library classes this module consumes
26 //
27 #include <Library/SerialPortLib.h>
28
29 /*
30
31 Programmed hardware of Serial port.
32
33 @return Always return EFI_UNSUPPORTED.
34
35 **/
36 EFI_STATUS
37 EFIAPI
38 SerialPortInitialize (
39 VOID
40 )
41 {
42 return EFI_UNSUPPORTED;
43 }
44
45 /**
46 Write data to serial device.
47
48 @param Buffer Point of data buffer which need to be writed.
49 @param NumberOfBytes Number of output bytes which are cached in Buffer.
50
51 @retval 0 Write data failed.
52 @retval !0 Actual number of bytes writed to serial device.
53
54 **/
55 UINTN
56 EFIAPI
57 SerialPortWrite (
58 IN UINT8 *Buffer,
59 IN UINTN NumberOfBytes
60 )
61 {
62 return 0;
63 }
64
65
66 /**
67 Read data from serial device and save the datas in buffer.
68
69 @param Buffer Point of data buffer which need to be writed.
70 @param NumberOfBytes Number of output bytes which are cached in Buffer.
71
72 @retval 0 Read data failed.
73 @retval !0 Aactual number of bytes read from serial device.
74
75 **/
76 UINTN
77 EFIAPI
78 SerialPortRead (
79 OUT UINT8 *Buffer,
80 IN UINTN NumberOfBytes
81 )
82 {
83 return 0;
84 }
85