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