1 -- SPDX-License-Identifier: GPL-2.0-only
5 use type Interfaces
.C
.int
;
7 package body HW
.Debug_Sink
is
9 function console_log_level
10 (msg_level
: Interfaces
.C
.int
)
11 return Interfaces
.C
.int
;
12 pragma Import
(C
, console_log_level
, "console_log_level");
14 Msg_Level_BIOS_DEBUG
: constant := 7;
16 procedure console_tx_byte
(chr
: Interfaces
.C
.char
);
17 pragma Import
(C
, console_tx_byte
, "console_tx_byte");
19 procedure Put
(Item
: String) is
21 if console_log_level
(Msg_Level_BIOS_DEBUG
) /= 0 then
22 for Idx
in Item
'Range loop
23 console_tx_byte
(Interfaces
.C
.To_C
(Item
(Idx
)));
28 procedure Put_Char
(Item
: Character) is
30 if console_log_level
(Msg_Level_BIOS_DEBUG
) /= 0 then
31 console_tx_byte
(Interfaces
.C
.To_C
(Item
));
37 Put_Char
(Character'Val (16#
0a#
));