ArmPlatformPkg: Fix various typos
[mirror_edk2.git] / EmbeddedPkg / Include / Library / GdbSerialLib.h
CommitLineData
1e57a462 1/** @file\r
2 Basic serial IO abstaction for GDB\r
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
3402aac7 16 Sets the baud rate, receive FIFO depth, transmit/receice 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
25 vaule of 0 will use the device's default data bit setting.\r
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
31 @retval EFI_DEVICE_ERROR The serial device could not be coonfigured.\r
32\r
33**/\r
34RETURN_STATUS\r
35EFIAPI\r
36GdbSerialInit (\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
52BOOLEAN\r
53EFIAPI\r
54GdbIsCharAvailable (\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
64CHAR8\r
65EFIAPI\r
66GdbGetChar (\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
79VOID\r
80EFIAPI\r
81GdbPutChar (\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
94VOID\r
95GdbPutString (\r
96 IN CHAR8 *String\r
97 );\r
98\r
99\r
100#endif\r
101\r