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