]>
Commit | Line | Data |
---|---|---|
1e57a462 | 1 | /** @file\r |
c6a72cd7 | 2 | Basic serial IO abstraction for GDB\r |
1e57a462 | 3 | \r |
4 | Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r | |
5 | \r | |
878b807a | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1e57a462 | 7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef __GDB_SERIAL_LIB_H__\r | |
11 | #define __GDB_SERIAL_LIB_H__\r | |
12 | \r | |
13 | \r | |
14 | \r | |
15 | /**\r | |
c6a72cd7 | 16 | Sets the baud rate, receive FIFO depth, transmit/receive time out, parity,\r |
1e57a462 | 17 | data buts, and stop bits on a serial device. This call is optional as the serial\r |
18 | port will be set up with defaults base on PCD values.\r | |
19 | \r | |
20 | @param BaudRate The requested baud rate. A BaudRate value of 0 will use the the\r | |
21 | device's default interface speed.\r | |
22 | @param Parity The type of parity to use on this serial device. A Parity value of\r | |
23 | DefaultParity will use the device's default parity value.\r | |
24 | @param DataBits The number of data bits to use on the serial device. A DataBits\r | |
c6a72cd7 | 25 | value of 0 will use the device's default data bit setting.\r |
1e57a462 | 26 | @param StopBits The number of stop bits to use on this serial device. A StopBits\r |
27 | value of DefaultStopBits will use the device's default number of\r | |
28 | stop bits.\r | |
29 | \r | |
30 | @retval EFI_SUCCESS The device was configured.\r | |
c6a72cd7 | 31 | @retval EFI_DEVICE_ERROR The serial device could not be configured.\r |
1e57a462 | 32 | \r |
33 | **/\r | |
34 | RETURN_STATUS\r | |
35 | EFIAPI\r | |
36 | GdbSerialInit (\r | |
3402aac7 RC |
37 | IN UINT64 BaudRate,\r |
38 | IN UINT8 Parity,\r | |
39 | IN UINT8 DataBits,\r | |
40 | IN UINT8 StopBits\r | |
41 | );\r | |
1e57a462 | 42 | \r |
43 | \r | |
44 | /**\r | |
45 | Check to see if a character is available from GDB. Do not read the character as that is\r | |
46 | done via GdbGetChar().\r | |
47 | \r | |
4f0624e8 GL |
48 | @return TRUE - Character available\r |
49 | @return FALSE - Character not available\r | |
3402aac7 | 50 | \r |
1e57a462 | 51 | **/\r |
52 | BOOLEAN\r | |
53 | EFIAPI\r | |
54 | GdbIsCharAvailable (\r | |
55 | VOID\r | |
56 | );\r | |
57 | \r | |
58 | /**\r | |
59 | Get a character from GDB. This function must be able to run in interrupt context.\r | |
60 | \r | |
61 | @return A character from GDB\r | |
3402aac7 | 62 | \r |
1e57a462 | 63 | **/\r |
64 | CHAR8\r | |
65 | EFIAPI\r | |
66 | GdbGetChar (\r | |
67 | VOID\r | |
68 | );\r | |
69 | \r | |
70 | \r | |
71 | /**\r | |
72 | Send a character to GDB. This function must be able to run in interrupt context.\r | |
73 | \r | |
74 | \r | |
75 | @param Char Send a character to GDB\r | |
76 | \r | |
77 | **/\r | |
78 | \r | |
79 | VOID\r | |
80 | EFIAPI\r | |
81 | GdbPutChar (\r | |
82 | IN CHAR8 Char\r | |
83 | );\r | |
84 | \r | |
85 | \r | |
86 | /**\r | |
87 | Send an ASCII string to GDB. This function must be able to run in interrupt context.\r | |
88 | \r | |
89 | \r | |
90 | @param String Send a string to GDB\r | |
91 | \r | |
92 | **/\r | |
93 | \r | |
94 | VOID\r | |
95 | GdbPutString (\r | |
96 | IN CHAR8 *String\r | |
97 | );\r | |
98 | \r | |
99 | \r | |
100 | #endif\r | |
101 | \r |