1 | // SPDX-License-Identifier: GPL-3.0-or-later |
2 | |
3 | #pragma once |
4 | |
5 | #include "mos/device/console.h" |
6 | #include "mos/device/serial.h" |
7 | |
8 | #include <ansi_colors.h> |
9 | #include <stddef.h> |
10 | |
11 | typedef struct |
12 | { |
13 | console_t con; |
14 | serial_device_t device; |
15 | standard_color_t fg, bg; |
16 | } serial_console_t; |
17 | |
18 | MOS_STATIC_ASSERT(offsetof(serial_console_t, con) == 0, "console must be the first field in serial_console_t" ); |
19 | |
20 | bool serial_console_setup(console_t *console); |
21 | |
22 | bool serial_console_irq_handler(u32 irq, void *data); |
23 | |