sel4_microkit/
printing.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Copyright 2024, Colias Group, LLC
//
// SPDX-License-Identifier: BSD-2-Clause
//

use sel4::sel4_cfg_if;

sel4_cfg_if! {
    if #[sel4_cfg(PRINTING)] {
        use sel4::debug_put_char;

        pub use sel4_panicking_env::{debug_print, debug_println};
    } else {
        fn debug_put_char(_: u8) {}

        /// No-op for this configuration
        #[macro_export]
        macro_rules! debug_print {
            ($($arg:tt)*) => {};
        }

        /// No-op for this configuration
        #[macro_export]
        macro_rules! debug_println {
            ($($arg:tt)*) => {};
        }
    }
}

sel4_panicking_env::register_debug_put_char!(debug_put_char);