xref: /aosp_15_r20/external/coreboot/src/include/console/streams.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _CONSOLE_STREAMS_H_
4 #define _CONSOLE_STREAMS_H_
5 
6 #include <stddef.h>
7 #include <stdint.h>
8 
9 void console_hw_init(void);
10 void console_tx_byte(unsigned char byte);
11 void console_tx_flush(void);
12 
13 /* Interactive consoles that are usually displayed in real time on a terminal. */
14 void console_interactive_tx_byte(unsigned char byte, void *data_unused);
15 /* Consoles that store logs on some medium for later retrieval. */
16 void console_stored_tx_byte(unsigned char byte, void *data_unused);
17 
18 /*
19  * Write number_of_bytes data bytes from buffer to the serial device.
20  * If number_of_bytes is zero, wait until all serial data is output.
21  */
22 void console_write_line(uint8_t *buffer, size_t number_of_bytes);
23 
24 /* For remote GDB debugging. */
25 void gdb_hw_init(void);
26 void gdb_tx_byte(unsigned char byte);
27 void gdb_tx_flush(void);
28 unsigned char gdb_rx_byte(void);
29 
30 #endif /* _CONSOLE_STREAMS_H_ */
31