mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
chase down some bugs
noted there is a heisenbug on the ticktimer, it only manifests when the log level is at info. go figure!
This commit is contained in:
parent
174b88f13d
commit
087bb39ea7
5 changed files with 8 additions and 5 deletions
|
|
@ -156,7 +156,7 @@ fn map_qwerty(code: RowCol) -> ScanCode {
|
||||||
(6, 4) => ScanCode{key: Some('↑'), shift: Some('↑'), hold: None, alt: Some('↑')},
|
(6, 4) => ScanCode{key: Some('↑'), shift: Some('↑'), hold: None, alt: Some('↑')},
|
||||||
(8, 2) => ScanCode{key: Some('↓'), shift: Some('↓'), hold: None, alt: Some('↓')},
|
(8, 2) => ScanCode{key: Some('↓'), shift: Some('↓'), hold: None, alt: Some('↓')},
|
||||||
// this one is OK
|
// this one is OK
|
||||||
(5, 2) => ScanCode{key: Some('∴'), shift: Some('∴'), hold: None, alt: Some('∴')},
|
(3, 6) => ScanCode{key: Some('∴'), shift: Some('∴'), hold: None, alt: Some('∴')},
|
||||||
|
|
||||||
_ => ScanCode {key: None, shift: None, hold: None, alt: None}
|
_ => ScanCode {key: None, shift: None, hold: None, alt: None}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,12 @@ fn rkyv_test_client() -> ! {
|
||||||
log::info!("Sending a string \"{}\"", sent_str);
|
log::info!("Sending a string \"{}\"", sent_str);
|
||||||
rkyv_test_server::log_message("prefix", sent_str);
|
rkyv_test_server::log_message("prefix", sent_str);
|
||||||
|
|
||||||
com.req_batt_stats().unwrap();
|
if (idx %2) == 0 {
|
||||||
|
com.req_batt_stats().unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
// let the loop run a bit, then try a suspend
|
// let the loop run a bit, then try a suspend
|
||||||
if idx == 0 {
|
if idx == 3 {
|
||||||
// TODO: add a self-wakeup RTC alarm once we're beyond the touch-and-go phase
|
// TODO: add a self-wakeup RTC alarm once we're beyond the touch-and-go phase
|
||||||
susres.initiate_suspend().unwrap();
|
susres.initiate_suspend().unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ fn suspend_cb_server(sid0: usize, sid1: usize, sid2: usize, sid3: usize) {
|
||||||
match FromPrimitive::from_usize(msg.body.id()) {
|
match FromPrimitive::from_usize(msg.body.id()) {
|
||||||
Some(SuspendEventCallback::Event) => msg_scalar_unpack!(msg, cid, id, token, _, {
|
Some(SuspendEventCallback::Event) => msg_scalar_unpack!(msg, cid, id, token, _, {
|
||||||
// directly pass the scalar message onto the CID with the ID memorized in the original hook
|
// directly pass the scalar message onto the CID with the ID memorized in the original hook
|
||||||
|
log::info!("PID {} has s/r token {}", xous::current_pid().unwrap().get(), token);
|
||||||
send_message(cid as u32,
|
send_message(cid as u32,
|
||||||
Message::new_scalar(id, token, 0, 0, 0)
|
Message::new_scalar(id, token, 0, 0, 0)
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ mod implementation {
|
||||||
|
|
||||||
if sr.csr.rf(utra::susres::STATE_RESUME) == 0 {
|
if sr.csr.rf(utra::susres::STATE_RESUME) == 0 {
|
||||||
println!("going into suspend");
|
println!("going into suspend");
|
||||||
if true { // this is just for testing
|
if true { // this is just for testing, doing a quick full-soc boot instead of a power down
|
||||||
let mut reboot_csr = CSR::new(REBOOT_CSR.load(Ordering::Relaxed) as *mut u32);
|
let mut reboot_csr = CSR::new(REBOOT_CSR.load(Ordering::Relaxed) as *mut u32);
|
||||||
reboot_csr.wfo(utra::reboot::SOC_RESET_SOC_RESET, 0xAC);
|
reboot_csr.wfo(utra::reboot::SOC_RESET_SOC_RESET, 0xAC);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -493,7 +493,7 @@ fn xmain() -> ! {
|
||||||
let mut sleep_heap: BinaryHeap<SleepRequest, U32, Min> = BinaryHeap::new();
|
let mut sleep_heap: BinaryHeap<SleepRequest, U32, Min> = BinaryHeap::new();
|
||||||
|
|
||||||
log_server::init_wait().unwrap();
|
log_server::init_wait().unwrap();
|
||||||
log::set_max_level(log::LevelFilter::Info);
|
log::set_max_level(log::LevelFilter::Trace);
|
||||||
info!("my PID is {}", xous::process::id());
|
info!("my PID is {}", xous::process::id());
|
||||||
|
|
||||||
let ticktimer_server = xous::create_server_with_address(b"ticktimer-server")
|
let ticktimer_server = xous::create_server_with_address(b"ticktimer-server")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue