]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Include/Library/SerialPortLib.h
Add enumeration type for EfiProcessorFamilyIntelPentiumM, EfiProcessorFamilyIntelCele...
[mirror_edk2.git] / EdkModulePkg / Include / Library / SerialPortLib.h
1
2 /** @file
3 Serial I/O Port library functions with no library constructor/destructor
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 Module Name: SerialPortLib.h
15
16 **/
17
18 #ifndef __SERIAL_PORT_LIB__
19 #define __SERIAL_PORT_LIB__
20
21 /**
22
23 Programmed hardware of Serial port.
24
25 @return Status of Serial Port Device initialization.
26
27 **/
28 EFI_STATUS
29 EFIAPI
30 SerialPortInitialize (
31 VOID
32 );
33
34 /**
35 Write data to serial device.
36
37 If the buffer is NULL, then return 0;
38 if NumberOfBytes is zero, then return 0.
39
40 @param Buffer Point of data buffer which need to be writed.
41 @param NumberOfBytes Number of output bytes which are cached in Buffer.
42
43 @retval 0 Write data failed.
44 @retval !0 Actual number of bytes writed to serial device.
45
46 **/
47 UINTN
48 EFIAPI
49 SerialPortWrite (
50 IN UINT8 *Buffer,
51 IN UINTN NumberOfBytes
52 );
53
54
55 /**
56 Read data from serial device and save the datas in buffer.
57
58 If the buffer is NULL, then return zero;
59 if NumberOfBytes is zero, then return zero.
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
76 #endif