]>
Commit | Line | Data |
---|---|---|
d38c35f9 | 1 | /** @file\r |
2 | Extended Serial I/O Port library functions\r | |
3 | \r | |
4 | Copyright (c) 2012, ARM Ltd. All rights reserved.\r | |
3402aac7 | 5 | \r |
d38c35f9 | 6 | 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 | **/\r | |
15 | \r | |
16 | #include <Base.h>\r | |
17 | \r | |
18 | #include <Library/SerialPortLib.h>\r | |
19 | #include <Library/SerialPortExtLib.h>\r | |
20 | \r | |
21 | /**\r | |
22 | Set the serial device control bits.\r | |
23 | \r | |
24 | @return Always return RETURN_UNSUPPORTED.\r | |
25 | \r | |
26 | **/\r | |
27 | RETURN_STATUS\r | |
28 | EFIAPI\r | |
29 | SerialPortSetControl (\r | |
30 | IN UINT32 Control\r | |
31 | )\r | |
32 | {\r | |
33 | return RETURN_UNSUPPORTED;\r | |
34 | }\r | |
35 | \r | |
36 | /**\r | |
37 | Get the serial device control bits.\r | |
38 | \r | |
d2e7e385 | 39 | @param Control Control signals read from the serial device.\r |
d38c35f9 | 40 | \r |
41 | @retval EFI_SUCCESS The control bits were read from the serial device.\r | |
42 | @retval EFI_DEVICE_ERROR The serial device is not functioning correctly.\r | |
43 | \r | |
44 | **/\r | |
45 | RETURN_STATUS\r | |
46 | EFIAPI\r | |
47 | SerialPortGetControl (\r | |
d2e7e385 | 48 | OUT UINT32 *Control\r |
d38c35f9 | 49 | )\r |
50 | {\r | |
51 | if (SerialPortPoll ()) {\r | |
52 | // If a character is pending don't set EFI_SERIAL_INPUT_BUFFER_EMPTY\r | |
53 | *Control = EFI_SERIAL_OUTPUT_BUFFER_EMPTY;\r | |
54 | } else {\r | |
55 | *Control = EFI_SERIAL_INPUT_BUFFER_EMPTY | EFI_SERIAL_OUTPUT_BUFFER_EMPTY;\r | |
56 | }\r | |
d2e7e385 | 57 | return RETURN_SUCCESS;\r |
d38c35f9 | 58 | }\r |
59 | \r | |
60 | /**\r | |
61 | Set the serial device attributes.\r | |
62 | \r | |
63 | @return Always return RETURN_UNSUPPORTED.\r | |
64 | \r | |
65 | **/\r | |
66 | RETURN_STATUS\r | |
67 | EFIAPI\r | |
68 | SerialPortSetAttributes (\r | |
15e277d5 | 69 | IN OUT UINT64 *BaudRate,\r |
70 | IN OUT UINT32 *ReceiveFifoDepth,\r | |
71 | IN OUT UINT32 *Timeout,\r | |
72 | IN OUT EFI_PARITY_TYPE *Parity,\r | |
73 | IN OUT UINT8 *DataBits,\r | |
74 | IN OUT EFI_STOP_BITS_TYPE *StopBits\r | |
d38c35f9 | 75 | )\r |
76 | {\r | |
77 | return RETURN_UNSUPPORTED;\r | |
78 | }\r | |
79 | \r |