]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Library/EdkSerialPortLibNull/SerialPortLibNull.c
af9b95705f5a934db6293fcf4405affacc718154
[mirror_edk2.git] / EdkModulePkg / Library / EdkSerialPortLibNull / 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
19 Programmed hardware of Serial port.
20
21 **/
22 EFI_STATUS
23 EFIAPI
24 SerialPortInitialize (
25 VOID
26 )
27 {
28 return EFI_UNSUPPORTED;
29 }
30
31 /**
32 Write data to serial device.
33
34 If the buffer is NULL, then ASSERT();
35 if NumberOfBytes is zero, then ASSERT().
36
37 @param Buffer Point of data buffer which need to be writed.
38 @param NumberOfBytes Number of output bytes which are cached in Buffer.
39
40 @retval 0 Write data failed.
41 @retval !0 Actual number of bytes writed to serial device.
42
43 **/
44 UINTN
45 EFIAPI
46 SerialPortWrite (
47 IN UINT8 *Buffer,
48 IN UINTN NumberOfBytes
49 )
50 {
51 return 0;
52 }
53
54
55 /**
56 Read data from serial device and save the datas in buffer.
57
58 If the buffer is NULL, then ASSERT();
59 if NumberOfBytes is zero, then ASSERT().
60
61 @param Buffer Point of data buffer which need to be writed.
62 @param NumberOfBytes Number of output bytes which are cached in Buffer.
63
64 @retval 0 Read data failed.
65 @retval !0 Aactual number of bytes read from serial device.
66
67 **/
68 UINTN
69 EFIAPI
70 SerialPortRead (
71 OUT UINT8 *Buffer,
72 IN UINTN NumberOfBytes
73 )
74 {
75 return 0;
76 }
77