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