]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Include/Library/SerialPortLib.h
Clean up codes which are related with status code.
[mirror_edk2.git] / EdkModulePkg / Include / Library / SerialPortLib.h
CommitLineData
56836fe9 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
14 Module Name: SerialPortLib.h\r
15\r
16**/\r
17\r
18#ifndef __SERIAL_PORT_LIB__\r
19#define __SERIAL_PORT_LIB__\r
20\r
21/**\r
22\r
23 Programmed hardware of Serial port.\r
24\r
25**/\r
26EFI_STATUS\r
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 ASSERT(); \r
36 if NumberOfBytes is zero, then ASSERT(). \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
50);\r
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 ASSERT(); \r
57 if NumberOfBytes is zero, then ASSERT(). \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
71);\r
72\r
73\r
74#endif\r