We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d435c89 + 7bd800e commit 4915e9bCopy full SHA for 4915e9b
examples/aarch64/src/logger.rs
@@ -17,7 +17,10 @@ struct Logger {
17
pub fn init(max_level: LevelFilter) -> Result<(), SetLoggerError> {
18
// Safe because BASE_ADDRESS is the base of the MMIO region for a UART and is mapped as device
19
// memory.
20
- let uart = unsafe { Uart::new(UART_BASE_ADDRESS) };
+ #[cfg_attr(platform = "crosvm", allow(unused_mut))]
21
+ let mut uart = unsafe { Uart::new(UART_BASE_ADDRESS) };
22
+ #[cfg(platform = "qemu")]
23
+ uart.init(50000000, 115200);
24
LOGGER.uart.lock().replace(uart);
25
26
log::set_logger(&LOGGER)?;
0 commit comments