]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BaseSerialPortLibNull / BaseSerialPortLibNull.c
CommitLineData
316172ba 1/** @file\r
eceb3a4c 2 Null Serial Port library instance with empty functions.\r
316172ba 3\r
19388d29
HT
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
316172ba 6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
316172ba 13**/\r
14\r
c892d846 15\r
7f1c3191 16#include <Base.h>\r
c892d846 17\r
18\r
316172ba 19#include <Library/SerialPortLib.h>\r
20\r
eceb3a4c 21/**\r
d69107aa 22 Initialize the serial device hardware.\r
23 \r
24 If no initialization is required, then return RETURN_SUCCESS.\r
28d3e14f 25 If the serial device was successfully initialized, then return RETURN_SUCCESS.\r
d69107aa 26 If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.\r
27 \r
28 @retval RETURN_SUCCESS The serial device was initialized.\r
28d3e14f 29 @retval RETURN_DEVICE_ERROR The serial device could not be initialized.\r
316172ba 30\r
31**/\r
7f1c3191 32RETURN_STATUS\r
316172ba 33EFIAPI\r
34SerialPortInitialize (\r
35 VOID\r
36 )\r
37{\r
7f1c3191 38 return RETURN_UNSUPPORTED;\r
316172ba 39}\r
40\r
41/**\r
d69107aa 42 Write data from buffer to serial device. \r
43 \r
44 Writes NumberOfBytes data bytes from Buffer to the serial device. \r
45 The number of bytes actually written to the serial device is returned.\r
46 If the return value is less than NumberOfBytes, then the write operation failed.\r
d69107aa 47 If Buffer is NULL, then ASSERT(). \r
d69107aa 48 If NumberOfBytes is zero, then return 0.\r
316172ba 49\r
d69107aa 50 @param Buffer Pointer to the data buffer to be written.\r
51 @param NumberOfBytes Number of bytes to written to the serial device.\r
316172ba 52\r
d69107aa 53 @retval 0 NumberOfBytes is 0.\r
54 @retval >0 The number of bytes written to the serial device. \r
55 If this value is less than NumberOfBytes, then the read operation failed.\r
316172ba 56\r
57**/\r
58UINTN\r
59EFIAPI\r
60SerialPortWrite (\r
61 IN UINT8 *Buffer,\r
62 IN UINTN NumberOfBytes\r
63)\r
64{\r
65 return 0;\r
66}\r
67\r
68\r
69/**\r
71871514 70 Read data from serial device and save the datas in buffer.\r
71 \r
72 Reads NumberOfBytes data bytes from a serial device into the buffer\r
73 specified by Buffer. The number of bytes actually read is returned. \r
74 If the return value is less than NumberOfBytes, then the rest operation failed.\r
75 If Buffer is NULL, then ASSERT(). \r
76 If NumberOfBytes is zero, then return 0.\r
316172ba 77\r
d69107aa 78 @param Buffer Pointer to the data buffer to store the data read from the serial device.\r
71871514 79 @param NumberOfBytes Number of bytes which will be read.\r
316172ba 80\r
71871514 81 @retval 0 Read data failed, No data is to be read.\r
82 @retval >0 Aactual number of bytes read from serial device.\r
316172ba 83\r
84**/\r
85UINTN\r
86EFIAPI\r
87SerialPortRead (\r
88 OUT UINT8 *Buffer,\r
89 IN UINTN NumberOfBytes\r
90)\r
91{\r
92 return 0;\r
93}\r
94\r
a2ddd00b 95/**\r
07974e78 96 Polls a serial device to see if there is any data waiting to be read.\r
a2ddd00b 97\r
28d3e14f 98 Polls a serial device to see if there is any data waiting to be read.\r
07974e78 99 If there is data waiting to be read from the serial device, then TRUE is returned.\r
100 If there is no data waiting to be read from the serial device, then FALSE is returned.\r
a2ddd00b 101\r
07974e78 102 @retval TRUE Data is waiting to be read from the serial device.\r
103 @retval FALSE There is no data waiting to be read from the serial device.\r
a2ddd00b
LG
104\r
105**/\r
106BOOLEAN\r
107EFIAPI\r
108SerialPortPoll (\r
109 VOID\r
110 )\r
111{\r
6f5cf759 112 return FALSE;\r
113}\r
a2ddd00b 114\r