mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-24 09:40:52 +00:00
As part of this refactor, make `terminate_process()` a divergent call. Signed-off-by: Sean Cross <sean@xobs.io>
22 lines
660 B
Rust
22 lines
660 B
Rust
#![cfg_attr(target_os = "none", no_std)]
|
|
#![cfg_attr(target_os = "none", no_main)]
|
|
|
|
use xous::StringBuffer;
|
|
use core::fmt::Write;
|
|
|
|
#[xous::xous_main]
|
|
fn test_main() -> ! {
|
|
let connection = xous::connect(xous::SID::from_bytes(b"xous-log-server ").unwrap()).unwrap();
|
|
|
|
let mut log_string= StringBuffer::new();
|
|
for i in 0.. {
|
|
log_string.clear();
|
|
writeln!(log_string, "Hello, world! Loop {}", i).unwrap();
|
|
log_string.lend(connection, 1).unwrap();
|
|
|
|
log_string.lend_mut(connection, 1).unwrap();
|
|
log_string.lend(connection, 1).unwrap();
|
|
xous::yield_slice();
|
|
}
|
|
panic!("Finished an infinite loop");
|
|
}
|