VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/EmbeddedPkg/Include/Library/GdbSerialLib.h@ 85788

Last change on this file since 85788 was 85718, checked in by vboxsync, 4 years ago

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette