mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
Merge pull request #792 from betrusted-io/baosec-lite
merging so hardware ci can run. failure in ci seems to be a problem in docker image creation? or maybe in the ci spec. the crates.io consistency check is failing and this looks like something to do with inconsistent repo state.
This commit is contained in:
commit
ed76cfc5fa
60 changed files with 2400 additions and 213 deletions
78
Cargo.lock
generated
78
Cargo.lock
generated
|
|
@ -356,11 +356,13 @@ name = "bao-console"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"arbitrary-int",
|
||||
"bao1x-api",
|
||||
"bao1x-emu",
|
||||
"bao1x-hal",
|
||||
"bao1x-hal-service",
|
||||
"base45",
|
||||
"bio-lib",
|
||||
"bytemuck",
|
||||
"chrono",
|
||||
"keystore",
|
||||
|
|
@ -378,7 +380,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-swapper",
|
||||
"xous-usb-hid",
|
||||
|
|
@ -484,7 +486,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -542,7 +544,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -1168,7 +1170,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -1199,7 +1201,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-semver",
|
||||
|
|
@ -1990,7 +1992,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -2016,7 +2018,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -2376,7 +2378,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
]
|
||||
|
||||
|
|
@ -2674,7 +2676,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -2785,7 +2787,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -3320,7 +3322,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -3360,7 +3362,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -3556,7 +3558,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-semver",
|
||||
|
|
@ -3926,7 +3928,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-semver",
|
||||
|
|
@ -4384,7 +4386,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-swapper",
|
||||
|
|
@ -5219,7 +5221,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-semver",
|
||||
|
|
@ -5533,7 +5535,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.10.8"
|
||||
source = "git+https://github.com/betrusted-io/hashes.git?branch=sha2-v0.10.8-xous#ef15aee3576eda5429b361bdee51eae3379ba8ff"
|
||||
source = "git+https://github.com/betrusted-io/hashes.git?branch=sha2-v0.10.8-xous#c190327961172f8160db39f178ca6232fda8c8bf"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
|
|
@ -5548,7 +5550,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -5654,7 +5656,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -5799,7 +5801,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -5883,7 +5885,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-semver",
|
||||
|
|
@ -6062,7 +6064,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-swapper",
|
||||
]
|
||||
|
|
@ -6129,7 +6131,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -6402,7 +6404,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
|
@ -6614,7 +6616,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-semver",
|
||||
|
|
@ -6639,7 +6641,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-usb-hid",
|
||||
]
|
||||
|
|
@ -6868,7 +6870,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-usb-hid",
|
||||
|
|
@ -6885,6 +6887,7 @@ dependencies = [
|
|||
"bao1x-hal",
|
||||
"bao1x-hal-service",
|
||||
"base32",
|
||||
"base45",
|
||||
"blitstr2",
|
||||
"byteorder",
|
||||
"cbor-vault2",
|
||||
|
|
@ -7511,6 +7514,21 @@ dependencies = [
|
|||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xous-api-susres"
|
||||
version = "0.9.68"
|
||||
dependencies = [
|
||||
"log",
|
||||
"num-derive 0.4.2",
|
||||
"num-traits",
|
||||
"rkyv 0.8.8",
|
||||
"utralib 0.1.26",
|
||||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xous-api-susres"
|
||||
version = "0.9.68"
|
||||
|
|
@ -7541,7 +7559,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-semver",
|
||||
]
|
||||
|
|
@ -7693,7 +7711,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
|
@ -7732,7 +7750,7 @@ dependencies = [
|
|||
"xous 0.9.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-api-log",
|
||||
"xous-api-names",
|
||||
"xous-api-susres",
|
||||
"xous-api-susres 0.9.68",
|
||||
"xous-api-ticktimer",
|
||||
"xous-ipc 0.10.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xous-semver",
|
||||
|
|
|
|||
|
|
@ -217,8 +217,6 @@ path = "./svd2utra"
|
|||
# path = "./xous-ipc"
|
||||
# [patch.crates-io.xous-api-names]
|
||||
# path = "./api/xous-api-names"
|
||||
# [patch.crates-io.xous-api-susres]
|
||||
# path = "./api/xous-api-susres"
|
||||
# [patch.crates-io.xous-api-log]
|
||||
# path = "./api/xous-api-log"
|
||||
# [patch.crates-io.xous-api-ticktimer]
|
||||
|
|
@ -226,3 +224,5 @@ path = "./svd2utra"
|
|||
|
||||
# [patch.crates-io.xous-tts-backend]
|
||||
# path = "../tts-backend"
|
||||
# [patch.crates-io.xous-api-susres]
|
||||
# path = "./api/xous-api-susres"
|
||||
|
|
|
|||
|
|
@ -69,6 +69,10 @@ pub enum Opcode {
|
|||
|
||||
/// exit the server
|
||||
Quit,
|
||||
|
||||
/// Platform specific
|
||||
#[cfg(feature = "bao1x")]
|
||||
PlatformSpecific,
|
||||
}
|
||||
|
||||
#[derive(Debug, rkyv::Archive, rkyv::Serialize, rkyv::Deserialize, Copy, Clone)]
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ homepage = "https://betrusted.io/xous-book/"
|
|||
xous = "0.9.69"
|
||||
xous-ipc = "0.10.9"
|
||||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
log = "0.4.14"
|
||||
rkyv = { version = "0.8.8", default-features = false, features = [
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ sntpc = { version = "0.3.1" }
|
|||
# net = { path = "../../services/net" }
|
||||
# com_rs = { git = "https://github.com/betrusted-io/com_rs", rev = "891bdd3ca8e41f81510d112483e178aea3e3a921" }
|
||||
|
||||
# QR code encoding
|
||||
base45 = "3.1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
enum-iterator = "0.6.0"
|
||||
|
|
|
|||
|
|
@ -1444,6 +1444,10 @@ impl ActionManager {
|
|||
.ok();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let mut qr_str = String::from(t!("vault.error.qr", locales::LANG));
|
||||
qr_str.push_str(&format!(": {}", &qr_uri));
|
||||
self.modals.show_notification(&qr_str, None).ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -536,6 +536,19 @@ fn main() -> ! {
|
|||
)
|
||||
.ok();
|
||||
}
|
||||
Some(VaultOp::ShowQr) => {
|
||||
let previous = allow_totp_rendering.load(Ordering::SeqCst);
|
||||
allow_totp_rendering.store(false, Ordering::SeqCst);
|
||||
let mut test_data = [0u8; 40];
|
||||
#[cfg(feature = "hosted-baosec")]
|
||||
let mut trng = bao1x_emu::trng::Trng::new(&xns).unwrap();
|
||||
#[cfg(not(feature = "hosted-baosec"))]
|
||||
let mut trng = bao1x_hal_service::trng::Trng::new(&xns).unwrap();
|
||||
trng.fill_bytes_via_next(&mut test_data);
|
||||
let encoded = base45::encode(&test_data);
|
||||
modals.show_notification("", Some(&encoded)).ok();
|
||||
allow_totp_rendering.store(previous, Ordering::SeqCst);
|
||||
}
|
||||
_ => {
|
||||
log::error!("Got unknown message: {:?}", msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,13 @@ pub fn create_submenu(vault_conn: xous::CID, actions_conn: xous::CID, menu_mgr:
|
|||
action_payload: MenuPayload::Scalar([0, 0, 0, 0]),
|
||||
close_on_select: true,
|
||||
});
|
||||
menu_items.push(MenuItem {
|
||||
name: String::from("Test QR code"),
|
||||
action_conn: Some(vault_conn),
|
||||
action_opcode: VaultOp::ShowQr.to_u32().unwrap(),
|
||||
action_payload: MenuPayload::Scalar([0, 0, 0, 0]),
|
||||
close_on_select: true,
|
||||
});
|
||||
menu_items.push(MenuItem {
|
||||
name: String::from(t!("vault.menu_close", locales::LANG)),
|
||||
action_conn: Some(actions_conn),
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ pub(crate) enum VaultOp {
|
|||
MenuPwMode,
|
||||
|
||||
BasisChange,
|
||||
|
||||
ShowQr,
|
||||
}
|
||||
|
||||
pub fn atime_to_str(req_atime: u64) -> String {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ xous-usb-hid = { git = "https://github.com/betrusted-io/xous-usb-hid.git", branc
|
|||
pddb = { path = "../../services/pddb" }
|
||||
modals = { path = "../../services/modals" }
|
||||
trng = { path = "../../services/trng" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
ime-plugin-api = { path = "../../services/ime-plugin-api" }
|
||||
content-plugin-api = { path = "../../services/content-plugin-api" } # all content canvas providers must provide this API
|
||||
backup = { path = "libraries/backup" }
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ bao1x = [
|
|||
"bao1x-hal/loader-baosec",
|
||||
"bao1x-hal/security",
|
||||
# "bao1x-hal/debug-print-duart",
|
||||
# "bao1x-hal/debug-countermeasures",
|
||||
"bao1x-api",
|
||||
# needed for the boot logo
|
||||
"ux-api/loader-baosec",
|
||||
|
|
|
|||
|
|
@ -203,23 +203,23 @@ pub unsafe extern "C" fn rust_entry() -> ! {
|
|||
let se0_dabao = crate::platform::setup_dabao_se0_pin(&iox);
|
||||
iox.set_gpio_pin(se0_baosec.0, se0_baosec.1, bao1x_api::IoxValue::Low);
|
||||
iox.set_gpio_pin(se0_dabao.0, se0_dabao.1, bao1x_api::IoxValue::Low);
|
||||
delay(100);
|
||||
// use the USB disconnect time to initialize the display - at least 100ms is
|
||||
// needed after reset for the display to initialize
|
||||
if let Some(ref mut sh1107) = oled {
|
||||
// show the boot logo
|
||||
sh1107.init();
|
||||
sh1107.buffer_mut().fill(0xFFFF_FFFF);
|
||||
delay(100);
|
||||
sh1107.blit_screen(&ux_api::bitmaps::baochip128x128::BITMAP);
|
||||
sh1107.draw();
|
||||
delay(150);
|
||||
} else {
|
||||
delay(250);
|
||||
}
|
||||
delay(400);
|
||||
|
||||
delay(250);
|
||||
// setup the USB port
|
||||
let (mut last_usb_state, mut portsc) = glue::setup();
|
||||
|
||||
// remainder of the 1-second total wait target time for USB disconnect
|
||||
delay(500);
|
||||
delay(150);
|
||||
|
||||
// release SE0
|
||||
iox.set_gpio_pin(se0_baosec.0, se0_baosec.1, bao1x_api::IoxValue::High);
|
||||
|
|
|
|||
|
|
@ -151,6 +151,36 @@ pub fn early_init(mut board_type: bao1x_api::BoardTypeCoding) -> (bao1x_api::Boa
|
|||
// does, but we leave this commented out for non-debug situations because it's a weak guarantee.
|
||||
// crate::debug::USE_CONSOLE.store(true, core::sync::atomic::Ordering::SeqCst);
|
||||
|
||||
// ======= setup .data section ========
|
||||
// this has to happen "up top" before any IRQs happen because IRQs rely on static variables for
|
||||
// correctness. So:
|
||||
// - ASSUME: basic clocks are sane because boot0 set those up.
|
||||
// - ASSUME: SRAM trim wait states are set up correctly (sram0 has 1 wait state)
|
||||
|
||||
// Now that SRAM trims are setup, initialize all the statics by writing to memory.
|
||||
// For baremetal, the statics structure is just at the flash base.
|
||||
const STATICS_LOC: usize = bao1x_api::BOOT1_START + SIGBLOCK_LEN;
|
||||
|
||||
// safety: this data structure is pre-loaded by the image loader and is guaranteed to
|
||||
// only have representable, valid values that are aligned according to the repr(C) spec
|
||||
let statics_in_rom: &bao1x_api::StaticsInRom =
|
||||
unsafe { (STATICS_LOC as *const bao1x_api::StaticsInRom).as_ref().unwrap() };
|
||||
assert!(statics_in_rom.version == bao1x_api::STATICS_IN_ROM_VERSION, "Can't find valid statics table");
|
||||
|
||||
// Clear .data, .bss, .stack, .heap regions & setup .data values
|
||||
// Safety: only safe if the values computed by the loader are correct.
|
||||
unsafe {
|
||||
let data_ptr = statics_in_rom.data_origin as *mut u32;
|
||||
for i in 0..statics_in_rom.data_size_bytes as usize / size_of::<u32>() {
|
||||
data_ptr.add(i).write_volatile(0);
|
||||
}
|
||||
for &(offset, data) in &statics_in_rom.poke_table[..statics_in_rom.valid_pokes as usize] {
|
||||
let offset = u16::from_le_bytes(offset) as usize;
|
||||
let data = u32::from_le_bytes(data);
|
||||
data_ptr.add(offset / size_of::<u32>()).write_volatile(data);
|
||||
}
|
||||
}
|
||||
|
||||
irq_setup();
|
||||
// all sensors & IRQs setup already by boot0, but it doesn't hurt to re-write these registers
|
||||
// in case they were defeated somehow previously
|
||||
|
|
@ -208,17 +238,17 @@ pub fn early_init(mut board_type: bao1x_api::BoardTypeCoding) -> (bao1x_api::Boa
|
|||
iox.set_gpio_pin(se0_port, se0_pin, IoxValue::Low); // put the USB port into SE0 while we initialize things
|
||||
|
||||
// setup display - turn on its power, reset the framebuffer
|
||||
bao1x_hal::board::setup_display_pins(&iox);
|
||||
// power on
|
||||
let (oled_on_port, oled_on_pin) = bao1x_hal::board::setup_oled_power_pin(&iox);
|
||||
iox.set_gpio_pin_value(oled_on_port, oled_on_pin, IoxValue::High);
|
||||
|
||||
// reset enable - note inversion compared to baosec (at least as of this board rev of baosec)
|
||||
bao1x_hal::board::setup_periph_reset_pin(&iox);
|
||||
|
||||
bao1x_hal::board::assert_periph_reset(&iox, true);
|
||||
// delay for reset assert
|
||||
delay(1);
|
||||
// delay while reset assert - setup display pins at this time
|
||||
bao1x_hal::board::setup_display_pins(&iox);
|
||||
let (oled_on_port, oled_on_pin) = bao1x_hal::board::setup_oled_power_pin(&iox);
|
||||
bao1x_hal::board::assert_periph_reset(&iox, false);
|
||||
|
||||
// power on
|
||||
iox.set_gpio_pin_value(oled_on_port, oled_on_pin, IoxValue::High);
|
||||
}
|
||||
#[cfg(not(feature = "oem"))]
|
||||
BoardTypeCoding::Oem => {
|
||||
|
|
@ -353,49 +383,22 @@ pub fn early_init(mut board_type: bao1x_api::BoardTypeCoding) -> (bao1x_api::Boa
|
|||
iox.set_gpio_pin(se0_port, se0_pin, IoxValue::Low); // put the USB port into SE0 while we initialize things
|
||||
|
||||
// setup display - turn on its power, reset the framebuffer
|
||||
bao1x_hal::board::setup_display_pins(&iox);
|
||||
// power on
|
||||
let (oled_on_port, oled_on_pin) = bao1x_hal::board::setup_oled_power_pin(&iox);
|
||||
iox.set_gpio_pin_value(oled_on_port, oled_on_pin, IoxValue::High);
|
||||
// reset enable
|
||||
let (peri_rst_port, peri_reset_pin) = bao1x_hal::board::setup_periph_reset_pin(&iox);
|
||||
iox.set_gpio_pin_value(peri_rst_port, peri_reset_pin, IoxValue::Low);
|
||||
// delay for reset assert
|
||||
delay(1);
|
||||
// delay for reset assert - setup display pins during this time
|
||||
bao1x_hal::board::setup_display_pins(&iox);
|
||||
let (oled_on_port, oled_on_pin) = bao1x_hal::board::setup_oled_power_pin(&iox);
|
||||
iox.set_gpio_pin_value(peri_rst_port, peri_reset_pin, IoxValue::High);
|
||||
|
||||
// power on
|
||||
iox.set_gpio_pin_value(oled_on_port, oled_on_pin, IoxValue::High);
|
||||
|
||||
// keyboard can setup at keyboard read time
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ASSUME: basic clocks are sane because boot0 set those up.
|
||||
// ASSUME: SRAM trim wait states are set up correctly (sram0 has 1 wait state)
|
||||
|
||||
// Now that SRAM trims are setup, initialize all the statics by writing to memory.
|
||||
// For baremetal, the statics structure is just at the flash base.
|
||||
const STATICS_LOC: usize = bao1x_api::BOOT1_START + SIGBLOCK_LEN;
|
||||
|
||||
// safety: this data structure is pre-loaded by the image loader and is guaranteed to
|
||||
// only have representable, valid values that are aligned according to the repr(C) spec
|
||||
let statics_in_rom: &bao1x_api::StaticsInRom =
|
||||
unsafe { (STATICS_LOC as *const bao1x_api::StaticsInRom).as_ref().unwrap() };
|
||||
assert!(statics_in_rom.version == bao1x_api::STATICS_IN_ROM_VERSION, "Can't find valid statics table");
|
||||
|
||||
// Clear .data, .bss, .stack, .heap regions & setup .data values
|
||||
// Safety: only safe if the values computed by the loader are correct.
|
||||
unsafe {
|
||||
let data_ptr = statics_in_rom.data_origin as *mut u32;
|
||||
for i in 0..statics_in_rom.data_size_bytes as usize / size_of::<u32>() {
|
||||
data_ptr.add(i).write_volatile(0);
|
||||
}
|
||||
for &(offset, data) in &statics_in_rom.poke_table[..statics_in_rom.valid_pokes as usize] {
|
||||
let offset = u16::from_le_bytes(offset) as usize;
|
||||
let data = u32::from_le_bytes(data);
|
||||
data_ptr.add(offset / size_of::<u32>()).write_volatile(data);
|
||||
}
|
||||
}
|
||||
|
||||
// set the clock
|
||||
let fclk_freq = match board_type {
|
||||
BoardTypeCoding::Baosec => bao1x_api::offsets::baosec::DEFAULT_FCLK_FREQUENCY,
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ impl Drop for IoxHal {
|
|||
// connection.
|
||||
if REFCOUNT.fetch_sub(1, Ordering::Relaxed) == 1 {
|
||||
unsafe {
|
||||
xous::disconnect(self.conn).unwrap();
|
||||
xous::disconnect(self.conn).ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ bytemuck = "1.24.0"
|
|||
camera-ov2640 = []
|
||||
camera-gc2145 = []
|
||||
display-sh1107 = []
|
||||
sensor-lis2dh12 = []
|
||||
axp2101 = []
|
||||
bmp180 = []
|
||||
sigcheck = ["ed25519-dalek", "sha2-bao1x", "digest", "linked_list_allocator"]
|
||||
|
|
@ -72,7 +73,7 @@ board-baosec = [
|
|||
"ux-api/std",
|
||||
] # USB form factor token
|
||||
# "lite" variant of baosec. Shares the same basic flags but some things remapped when this is added.
|
||||
oem-baosec-lite = []
|
||||
oem-baosec-lite = ["sensor-lis2dh12"]
|
||||
|
||||
loader-baosec = [
|
||||
"utralib/bao1x",
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ use bao1x_api::{IoxHal, IoxPort};
|
|||
use bitbybit::bitfield;
|
||||
use utralib::*;
|
||||
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
use crate::axp2101::Axp2101;
|
||||
#[cfg(all(feature = "std", feature = "board-baosec"))]
|
||||
#[cfg(all(feature = "std", feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
use crate::i2c::I2c;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
|
|
@ -17,6 +17,10 @@ const MHZ: u32 = 1_000_000;
|
|||
/// perclk is returned by the clock setting routines.
|
||||
pub const PERCLK_HZ: u32 = 100_000_000;
|
||||
|
||||
pub const HCLK_HZ: u32 = 200_000_000;
|
||||
pub const ICLK_HZ: u32 = 100_000_000;
|
||||
pub const PCLK_HZ: u32 = 50_000_000;
|
||||
|
||||
#[bitfield(u32)]
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
pub struct PmuControl {
|
||||
|
|
@ -243,8 +247,31 @@ fn check_pll_std(cgu: &mut CSR<u32>) {
|
|||
}
|
||||
}
|
||||
|
||||
/// maximum value representable in the fd counter
|
||||
const FD_MAX: u32 = 256;
|
||||
|
||||
pub fn fd_from_frequency(desired_freq_hz: u32, in_freq_hz: u32) -> u32 {
|
||||
// Shift by 1_000 to prevent overflow
|
||||
let desired_freq_khz = desired_freq_hz / 1_000;
|
||||
let in_freq_khz = in_freq_hz / 1_000;
|
||||
|
||||
// Calculate (fd + 1) with rounding for accuracy
|
||||
let fd_plus_1 = (desired_freq_khz * FD_MAX + in_freq_khz / 2) / in_freq_khz;
|
||||
|
||||
// Subtract 1 to get fd, handling underflow and clamping to valid range
|
||||
if fd_plus_1 == 0 { 0 } else { (fd_plus_1 - 1).min(FD_MAX - 1) }
|
||||
}
|
||||
|
||||
pub fn divide_by_fd(fd: u32, in_freq_hz: u32) -> u32 {
|
||||
// shift by 1_000 to prevent overflow
|
||||
let in_freq_khz = in_freq_hz / 1_000;
|
||||
let out_freq_khz = (in_freq_khz * (fd + 1)) / FD_MAX;
|
||||
// restore to Hz
|
||||
out_freq_khz * 1_000
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
pub struct ClockManager {
|
||||
pub struct ClockManagerImpl {
|
||||
pub vco_freq: u32,
|
||||
pub fclk: u32,
|
||||
pub aclk: u32,
|
||||
|
|
@ -256,22 +283,20 @@ pub struct ClockManager {
|
|||
// this is a clone of what's in the kpc_aoint
|
||||
ao_sysctrl: CSR<u32>,
|
||||
susres: CSR<u32>,
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
i2c: I2c,
|
||||
#[cfg(feature = "board-baosec")]
|
||||
iox: IoxHal,
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
dcdc2_io: (IoxPort, u8),
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", feature = "oem-baosec-lite"))]
|
||||
core_on: (IoxPort, u8),
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
pmic: Axp2101,
|
||||
}
|
||||
|
||||
/// maximum value representable in the fd counter
|
||||
#[cfg(feature = "std")]
|
||||
const FD_MAX: u32 = 256;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl ClockManager {
|
||||
impl ClockManagerImpl {
|
||||
pub fn new() -> Result<Self, xous::Error> {
|
||||
let sysctrl_mem = xous::map_memory(
|
||||
xous::MemoryAddress::new(utra::sysctrl::HW_SYSCTRL_BASE),
|
||||
|
|
@ -310,16 +335,16 @@ impl ClockManager {
|
|||
let iclk_fd = sysctrl.r(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_3) & 0xFF;
|
||||
let pclk_fd = sysctrl.r(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_4) & 0xFF;
|
||||
|
||||
let fclk = ClockManager::divide_by_fd(fclk_fd, pll0_freq);
|
||||
let aclk = ClockManager::divide_by_fd(aclk_fd, pll0_freq);
|
||||
let hclk = ClockManager::divide_by_fd(hclk_fd, pll0_freq);
|
||||
let iclk = ClockManager::divide_by_fd(iclk_fd, pll0_freq);
|
||||
let pclk = ClockManager::divide_by_fd(pclk_fd, pll0_freq);
|
||||
let fclk = divide_by_fd(fclk_fd, pll0_freq);
|
||||
let aclk = divide_by_fd(aclk_fd, pll0_freq);
|
||||
let hclk = divide_by_fd(hclk_fd, pll0_freq);
|
||||
let iclk = divide_by_fd(iclk_fd, pll0_freq);
|
||||
let pclk = divide_by_fd(pclk_fd, pll0_freq);
|
||||
log::info!("fracen: {:?}", fracen);
|
||||
// perclk has an extra /2 applied to it
|
||||
log::info!("perclk: {:x}, pll0_freq {}", sysctrl.r(utra::sysctrl::SFR_CGUFDPER), pll0_freq);
|
||||
let perclk_fd = sysctrl.r(utra::sysctrl::SFR_CGUFDPER) & 0xFF;
|
||||
let perclk = ClockManager::divide_by_fd(perclk_fd, pll0_freq) / 2;
|
||||
let perclk = divide_by_fd(perclk_fd, pll0_freq) / 2;
|
||||
|
||||
/*
|
||||
log::info!("m: {} n: {} q1: {} q0: {} frac: {}, fracen: {:?}", m, n, q1, q0, frac, fracen);
|
||||
|
|
@ -328,13 +353,15 @@ impl ClockManager {
|
|||
}
|
||||
*/
|
||||
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec"))]
|
||||
let iox = IoxHal::new();
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
let (port, pin) = crate::board::setup_dcdc2_pin(&iox);
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", feature = "oem-baosec-lite"))]
|
||||
let (port, pin) = crate::board::get_power_off_pin();
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
let mut i2c = I2c::new();
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
let pmic = crate::axp2101::Axp2101::new(&mut i2c).unwrap();
|
||||
|
||||
Ok(Self {
|
||||
|
|
@ -348,13 +375,15 @@ impl ClockManager {
|
|||
sysctrl,
|
||||
ao_sysctrl: CSR::new(ao_mem.as_ptr() as *mut u32),
|
||||
susres: CSR::new(susres.as_ptr() as *mut u32),
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
i2c,
|
||||
#[cfg(feature = "board-baosec")]
|
||||
iox,
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
dcdc2_io: (port, pin),
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", feature = "oem-baosec-lite"))]
|
||||
core_on: (port, pin),
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
pmic,
|
||||
})
|
||||
}
|
||||
|
|
@ -364,14 +393,6 @@ impl ClockManager {
|
|||
/// using the susres block.
|
||||
pub unsafe fn susres_base(&self) -> usize { self.susres.base() as usize }
|
||||
|
||||
pub fn divide_by_fd(fd: u32, in_freq_hz: u32) -> u32 {
|
||||
// shift by 1_000 to prevent overflow
|
||||
let in_freq_khz = in_freq_hz / 1_000;
|
||||
let out_freq_khz = (in_freq_khz * (fd + 1)) / FD_MAX;
|
||||
// restore to Hz
|
||||
out_freq_khz * 1_000
|
||||
}
|
||||
|
||||
pub fn measured_freqs(&self) -> Vec<(String, u32)> {
|
||||
let mut readings = Vec::new();
|
||||
let clk_desc: [(&'static str, u32, usize); 8] = [
|
||||
|
|
@ -410,7 +431,7 @@ impl ClockManager {
|
|||
|ms: usize, freq_hz: u32| {
|
||||
let freq_khz = (freq_hz / 1_000).max(1);
|
||||
let aclk_fd = self.sysctrl.r(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_1) & 0xFF;
|
||||
let aclk_khz = ClockManager::divide_by_fd(aclk_fd, freq_hz) / 1_000;
|
||||
let aclk_khz = divide_by_fd(aclk_fd, freq_hz) / 1_000;
|
||||
|
||||
fn get_hw_time(hw: &CSR<u32>) -> u64 {
|
||||
hw.r(utra::susres::TIME0) as u64 | ((hw.r(utra::susres::TIME1) as u64) << 32)
|
||||
|
|
@ -456,7 +477,7 @@ impl ClockManager {
|
|||
self.sysctrl.wo(utra::sysctrl::SFR_CGUSET, 0x32);
|
||||
wfi_debug("internal osc");
|
||||
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
{
|
||||
wfi_debug("disconnect dcdc2");
|
||||
self.iox.set_gpio_pin_value(self.dcdc2_io.0, self.dcdc2_io.1, bao1x_api::IoxValue::High);
|
||||
|
|
@ -476,6 +497,10 @@ impl ClockManager {
|
|||
// wfi_debug("DCDC4 off");
|
||||
}
|
||||
|
||||
// set CoreOff to high
|
||||
#[cfg(all(feature = "board-baosec", feature = "oem-baosec-lite"))]
|
||||
self.iox.set_gpio_pin_value(self.core_on.0, self.core_on.1, bao1x_api::IoxValue::High);
|
||||
|
||||
// enter PD mode - cuts VDDCORE power - requires full reset to come out of this
|
||||
// only RTC & backup regsiters are kept. ~1.2mA @ 4.2V consumption in this mode.
|
||||
|
||||
|
|
@ -492,7 +517,7 @@ impl ClockManager {
|
|||
pub fn wfi(&mut self) {
|
||||
wfi_debug("entering wfi");
|
||||
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
{
|
||||
self.pmic.set_dcdc(&mut self.i2c, Some((0.7, true)), crate::axp2101::WhichDcDc::Dcdc2).unwrap();
|
||||
wfi_debug("DCDC2 to low voltage");
|
||||
|
|
@ -578,7 +603,7 @@ impl ClockManager {
|
|||
|
||||
// high disconnects DCDC2 from the chip - the idea is to prevent DCDC2 shutdown due to VLDO going
|
||||
// above DCDC2 value
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
{
|
||||
wfi_debug("disconnect dcdc2");
|
||||
self.iox.set_gpio_pin_value(self.dcdc2_io.0, self.dcdc2_io.1, bao1x_api::IoxValue::High);
|
||||
|
|
@ -591,7 +616,7 @@ impl ClockManager {
|
|||
.ok();
|
||||
wfi_debug("back to 350MHz");
|
||||
|
||||
#[cfg(feature = "board-baosec")]
|
||||
#[cfg(all(feature = "board-baosec", not(feature = "oem-baosec-lite")))]
|
||||
{
|
||||
wfi_debug("setting DCDC");
|
||||
|
||||
|
|
|
|||
|
|
@ -143,18 +143,10 @@ impl Gc2145 {
|
|||
}
|
||||
|
||||
fn set_resolution(&self, i2c: &mut dyn I2cApi, w: u16, h: u16) {
|
||||
// TODO: figure out what this parameter even means in the context of an...unconstrained variable
|
||||
// resolution? Maybe? It's not even clear to me that was the original intent from the C driver.
|
||||
|
||||
// 160x120 base scaling
|
||||
// let c_ratio = 4u16;
|
||||
// let r_ratio = 4u16;
|
||||
// 320x240 base scaling
|
||||
let c_ratio = 3u16;
|
||||
let r_ratio = 3u16;
|
||||
// 640x480 base scaling
|
||||
// let c_ratio = 2u16;
|
||||
// let r_ratio = 2u16;
|
||||
// these define the scaling of the image. If "digital zoom" is required, increase
|
||||
// these numbers to get a higher magnification.
|
||||
let c_ratio = 2u16;
|
||||
let r_ratio = 2u16;
|
||||
|
||||
/* Calculates the window boundaries to obtain the desired resolution */
|
||||
let win_w = w * c_ratio;
|
||||
|
|
@ -172,20 +164,18 @@ impl Gc2145 {
|
|||
|
||||
/* Enable crop */
|
||||
self.poke(i2c, GC2145_REG_CROP_ENABLE, GC2145_CROP_SET_ENABLE);
|
||||
// self.poke(i2c, GC2145_REG_CROP_ENABLE, 0);
|
||||
|
||||
/* Set Sub-sampling ratio and mode */
|
||||
self.poke(i2c, GC2145_REG_SUBSAMPLE, ((r_ratio << 4) | c_ratio) as u8);
|
||||
|
||||
self.poke(i2c, GC2145_REG_SUBSAMPLE_MODE, GC2145_SUBSAMPLE_MODE_SMOOTH);
|
||||
// set to nearest-neighbor averaging plus "use" mode
|
||||
self.poke(i2c, GC2145_REG_SUBSAMPLE_MODE, 0x32);
|
||||
|
||||
self.delay(30);
|
||||
|
||||
// divide the clock down, so that the system can keep up.
|
||||
// self.poke(i2c, 0xFA, 0x32); // this offers a higher frame rate, but a greater bus congestion -
|
||||
// maybe available on bao1x
|
||||
// self.poke(i2c, 0xFA, 0x63); // this is necessary for MPW due to SPI backpressure bug
|
||||
self.poke(i2c, 0xFA, 0x52); // this is necessary for MPW due to SPI backpressure bug
|
||||
// faster clock enables a faster frame rate
|
||||
// now at 35Hz frame rate
|
||||
self.poke(i2c, 0xFA, 0x19);
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ pub const WIPE_THRESHOLD: u32 = 127;
|
|||
/// This number is empirically tuned. The main issue is we don't want to notch up the
|
||||
/// counter during "slow shutdowns" where the power supply falls gradually enough that
|
||||
/// the glitch detector can fire.
|
||||
const DISTURB_THRESHOLD: u32 = 2;
|
||||
/// Empirically, during a shutdown, this reaches a value of around 10 on some boards.
|
||||
/// Margin it up to 16, to avoid false alarms.
|
||||
const DISTURB_THRESHOLD: u32 = 16;
|
||||
|
||||
/// This is the range of delays we will pick from whenever we attempt a random delay,
|
||||
/// expressed as a number of bits.
|
||||
|
|
@ -434,7 +436,7 @@ pub fn glitch_handler(attacks_since_boot: u32) {
|
|||
// even output something on the DUART - this could be used as a trigger to prevent shutdown
|
||||
// but at this point diagnostics are useful for seeing why the system shut down unexpectedly.
|
||||
#[cfg(feature = "debug-countermeasures")]
|
||||
crate::println!("Attack thresh");
|
||||
crate::println!("Attack thresh trip: {}", attacks_since_boot);
|
||||
crate::sigcheck::die_no_std();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ pub mod hardening;
|
|||
pub mod i2c;
|
||||
#[cfg(all(not(feature = "hosted-baosec"), feature = "std"))]
|
||||
pub mod kpc_aoint;
|
||||
#[cfg(all(feature = "sensor-lis2dh12", feature = "std"))]
|
||||
pub mod lis2dh12;
|
||||
#[cfg(not(feature = "hosted-baosec"))]
|
||||
pub mod mbox;
|
||||
#[cfg(not(feature = "hosted-baosec"))]
|
||||
|
|
|
|||
1781
libs/bao1x-hal/src/lis2dh12.rs
Normal file
1781
libs/bao1x-hal/src/lis2dh12.rs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -465,7 +465,7 @@ impl<'a> Oled128x128<'a> {
|
|||
SetDCDCSettings(0x0),
|
||||
SetStartLine(0),
|
||||
SetDisplayOffset(0),
|
||||
SetContrastControl(0x2f), // was 0x4f, was a bit too bright
|
||||
SetContrastControl(0x3f), // was 0x4f, was a bit too bright
|
||||
SetAddressMode(AddressMode::Column),
|
||||
SetSegmentReMap(false),
|
||||
SetCOMScanDirection(Direction::Inverted),
|
||||
|
|
@ -476,13 +476,21 @@ impl<'a> Oled128x128<'a> {
|
|||
SetPageAddress(0),
|
||||
ForceEntireDisplay(false),
|
||||
SetDisplayMode(DisplayMode::WhiteOnBlack),
|
||||
DisplayOnOff(DisplayState::On),
|
||||
];
|
||||
|
||||
for command in init_sequence {
|
||||
let bytes = command.encode();
|
||||
self.send_command(bytes);
|
||||
}
|
||||
// clear the frame buffer
|
||||
self.buffer_mut().fill(0xFFFF_FFFF);
|
||||
self.draw();
|
||||
|
||||
let display_on = [DisplayOnOff(DisplayState::On)];
|
||||
for command in display_on {
|
||||
let bytes = command.encode();
|
||||
self.send_command(bytes);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn powerdown(&mut self) {
|
||||
|
|
@ -556,6 +564,18 @@ impl<'a> FrameBuffer for Oled128x128<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
unsafe fn put_pixel_unchecked(&mut self, p: Point, on: ColorNative) {
|
||||
let bitnum = (p.x + p.y * COLUMN) as usize;
|
||||
let word_idx = bitnum >> 5; // bitnum / 32
|
||||
let bit_idx = bitnum & 0x1F; // bitnum % 32
|
||||
if on.0 != 0 {
|
||||
self.buffer[word_idx] |= 1 << bit_idx;
|
||||
} else {
|
||||
self.buffer[word_idx] &= !(1 << bit_idx);
|
||||
}
|
||||
}
|
||||
|
||||
fn dimensions(&self) -> Point { Point::new(COLUMN, ROW) }
|
||||
|
||||
fn get_pixel(&self, p: Point) -> Option<ColorNative> {
|
||||
|
|
|
|||
|
|
@ -441,9 +441,11 @@ pub fn render_qr<T: FrameBuffer>(
|
|||
op::rectangle(display, r, screen_clip.into(), false);
|
||||
|
||||
// now raster in the modules
|
||||
// TODO: on dense codes, the dark colors are over-sized by a pixel. Figure this out.
|
||||
// TODO: on smaller than optimal codes, align the QR code into the center of the screen.
|
||||
let mut line_top_left =
|
||||
Point::new(left_edge + module_width * QUIET_MODULES, tl.y + module_width * QUIET_MODULES);
|
||||
let dark = DrawStyle::new(PixelColor::Dark, PixelColor::Dark, 1);
|
||||
let dark = DrawStyle::new(PixelColor::Dark, PixelColor::Dark, 0);
|
||||
for line in qr_render.modules.chunks(qr_render.width) {
|
||||
for (i, &module) in line.iter().enumerate() {
|
||||
if module {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ use crate::platform;
|
|||
pub trait FrameBuffer {
|
||||
/// Puts a pixel of ColorNative at x, y. (0, 0) is defined as the lower left corner.
|
||||
fn put_pixel(&mut self, p: Point, color: ColorNative);
|
||||
/// For higher-performance loops that have guaranteed bounds checking in the point location.
|
||||
unsafe fn put_pixel_unchecked(&mut self, p: Point, on: ColorNative);
|
||||
/// Retrieves a pixel value from the frame buffer; returns None if the point is out of bounds.
|
||||
fn get_pixel(&self, p: Point) -> Option<ColorNative>;
|
||||
/// XORs a pixel to what is in the existing frame buffer. The exact definition of "XOR" is somewhat
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ CRATES = [
|
|||
["xous-ipc", "xous-ipc"],
|
||||
["xous-api-log", "api/xous-api-log"],
|
||||
["xous-api-names", "api/xous-api-names"],
|
||||
["xous-api-susres", "api/xous-api-susres"],
|
||||
# ["xous-api-susres", "api/xous-api-susres"],
|
||||
["xous-api-ticktimer", "api/xous-api-ticktimer"],
|
||||
# ["xous-log", "services/xous-log"], # implementations, no longer published
|
||||
# ["xous-names", "services/xous-names"],
|
||||
|
|
|
|||
|
|
@ -24,9 +24,12 @@ ux-api = { path = "../../libs/ux-api", optional = true }
|
|||
pddb = { path = "../pddb", optional = true }
|
||||
xous-swapper = { path = "../xous-swapper", optional = true }
|
||||
bytemuck = "1.24.0"
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
keystore = { path = "../keystore" }
|
||||
|
||||
bio-lib = { path = "../../libs/bio-lib", optional = true }
|
||||
arbitrary-int = "1.2"
|
||||
|
||||
# pddb testing
|
||||
rand = { version = "0.8.5", features = ["getrandom"], optional = true }
|
||||
rand_chacha = { version = "0.3.1", optional = true }
|
||||
|
|
@ -56,7 +59,9 @@ board-baosec = [
|
|||
"pddb/board-baosec",
|
||||
"xous-swapper",
|
||||
"ux-api/board-baosec",
|
||||
"bio-lib",
|
||||
]
|
||||
oem-baosec-lite = ["bao1x-hal/sensor-lis2dh12"]
|
||||
hosted-baosec = [
|
||||
"modals/hosted-baosec",
|
||||
"usb-bao1x/hosted-baosec",
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ impl<'a> ShellCmdApi<'a> for Test {
|
|||
match xous::send_message(
|
||||
conn,
|
||||
xous::Message::new_blocking_scalar(
|
||||
susres::api::Opcode::SuspendRequest.to_usize().unwrap(),
|
||||
1, // this is a monkeypatch
|
||||
susres::api::Opcode::PlatformSpecific.to_usize().unwrap(),
|
||||
bao1x_hal_service::api::ClockOp::DeepSleep.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
|
@ -250,6 +250,82 @@ impl<'a> ShellCmdApi<'a> for Test {
|
|||
}
|
||||
}
|
||||
}
|
||||
#[cfg(not(feature = "hosted-baosec"))]
|
||||
"cam" => {
|
||||
use bao1x_api::I2cApi;
|
||||
let mut i2c = bao1x_hal::i2c::I2c::new();
|
||||
if args.len() < 1 {
|
||||
write!(ret, "cam [poke adr data]").ok();
|
||||
return Ok(Some(ret));
|
||||
}
|
||||
if args[0] == "poke" {
|
||||
if args.len() != 3 {
|
||||
write!(ret, "cam poke adr(hex) data(hex)").ok();
|
||||
return Ok(Some(ret));
|
||||
}
|
||||
let adr = u8::from_str_radix(&args[1], 16).map_err(|_| xous::Error::InvalidArgument)?;
|
||||
let data = u8::from_str_radix(&args[2], 16).map_err(|_| xous::Error::InvalidArgument)?;
|
||||
i2c.i2c_write(0x3C, adr, &[data]).expect("write failed");
|
||||
write!(ret, "Wrote {:x} into {:x}", data, adr).ok();
|
||||
}
|
||||
}
|
||||
#[cfg(all(not(feature = "hosted-baosec"), feature = "oem-baosec-lite"))]
|
||||
"accel" => {
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use bao1x_hal::i2c::I2c;
|
||||
use bao1x_hal::lis2dh12::{Lis2dh12, Orientation};
|
||||
|
||||
let mut i2c = I2c::new();
|
||||
// Initialize
|
||||
let mut accel = Lis2dh12::new(&mut i2c).unwrap();
|
||||
|
||||
// Check orientation
|
||||
let duration = Duration::from_secs(2);
|
||||
let start_time = Instant::now();
|
||||
while Instant::now().duration_since(start_time).lt(&duration) {
|
||||
let orientation = accel.get_orientation(&mut i2c).unwrap();
|
||||
match orientation {
|
||||
Orientation::FaceUp => println!("Face up"),
|
||||
Orientation::FaceDown => println!("Face down"),
|
||||
Orientation::Unknown => println!("Tilted/transitioning"),
|
||||
}
|
||||
let raw_data = accel.read_accel_mg(&mut i2c).unwrap();
|
||||
log::info!("mg data: {:?}", raw_data);
|
||||
_env.ticktimer.sleep_ms(50).ok();
|
||||
}
|
||||
|
||||
// Set up motion interrupt (200mg threshold, 5 samples duration)
|
||||
// accel.set_int1_latch(&mut i2c, true)?;
|
||||
// accel.setup_motion_interrupt(&mut i2c, 100, 2)?;
|
||||
log::info!("result: {:?}", accel.debug_test_int1_simple(&mut i2c)?);
|
||||
|
||||
let debug = accel.debug_dump_int_config(&mut i2c)?;
|
||||
debug.interpret();
|
||||
log::info!("debug: {:?}", debug);
|
||||
|
||||
// Later, when INT1 fires, read and clear the interrupt source
|
||||
let duration = Duration::from_secs(30);
|
||||
let start_time = Instant::now();
|
||||
while Instant::now().duration_since(start_time).lt(&duration) {
|
||||
let source = accel.read_int1_source(&mut i2c)?;
|
||||
if source.active {
|
||||
log::info!(
|
||||
"Motion detected! {:?} {:?}",
|
||||
source,
|
||||
accel.read_accel_mg(&mut i2c).unwrap()
|
||||
);
|
||||
accel.reset_highpass(&mut i2c)?;
|
||||
}
|
||||
_env.ticktimer.sleep_ms(150).ok();
|
||||
/*
|
||||
if accel.poll_int1_active(&mut i2c)? {
|
||||
log::info!("int active");
|
||||
let raw_data = accel.read_accel_mg(&mut i2c).unwrap();
|
||||
log::info!("mg data: {:?}", raw_data);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
/* // leave this around in case we have more swap bugs to debug
|
||||
// needs to have `swaptest1`` & `swaptest2` added to the image for this to work.
|
||||
"swap" => {
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ fn encode_base64(input: &[u8]) -> String { general_purpose::STANDARD.encode(inpu
|
|||
|
||||
/// This converts a frame of `[u8]` grayscale pixels that may be larger than the native
|
||||
/// frame buffer resolution into a black and white bitmap.
|
||||
#[cfg(not(feature = "oem-baosec-lite"))]
|
||||
pub fn blit_to_display(display: &mut Oled128x128, frame: &[u8], display_cleared: bool, bw_thresh: &mut u8) {
|
||||
let mut sum: u32 = 0;
|
||||
let mut count: u32 = 0;
|
||||
|
|
@ -122,6 +123,52 @@ pub fn blit_to_display(display: &mut Oled128x128, frame: &[u8], display_cleared:
|
|||
*bw_thresh = (sum / count) as u8;
|
||||
}
|
||||
|
||||
#[cfg(feature = "oem-baosec-lite")]
|
||||
pub fn blit_to_display(display: &mut Oled128x128, frame: &[u8], display_cleared: bool, bw_thresh: &mut u8) {
|
||||
let mut sum: u32 = 0;
|
||||
let mut count: u32 = 0;
|
||||
let frame_height = frame.len() / IMAGE_WIDTH;
|
||||
let thresh = *bw_thresh; // Dereference once
|
||||
|
||||
let max_display_x = display.dimensions().x as isize;
|
||||
let max_display_y = display.dimensions().y as isize - (gfx::CHAR_HEIGHT as isize + 1);
|
||||
|
||||
for y in (0..frame_height).step_by(2) {
|
||||
// Skip every other line directly
|
||||
let row = &frame[y * IMAGE_WIDTH..(y + 1) * IMAGE_WIDTH];
|
||||
let display_y = (frame_height - y - 1) as isize / 2;
|
||||
|
||||
if display_y < 0 || display_y >= max_display_y {
|
||||
continue;
|
||||
}
|
||||
|
||||
for x in (0..IMAGE_WIDTH).step_by(2) {
|
||||
// Skip every other pixel directly
|
||||
let display_x = x as isize / 2;
|
||||
|
||||
if display_x >= max_display_x {
|
||||
break;
|
||||
}
|
||||
|
||||
let luminance = row[x] & 0xff;
|
||||
sum += luminance as u32;
|
||||
count += 1;
|
||||
|
||||
if luminance > thresh {
|
||||
unsafe {
|
||||
display.put_pixel_unchecked(Point::new(display_x, display_y), Mono::White.into());
|
||||
}
|
||||
} else if !display_cleared {
|
||||
unsafe {
|
||||
display.put_pixel_unchecked(Point::new(display_x, display_y), Mono::Black.into());
|
||||
}
|
||||
}
|
||||
// else: display already cleared, skip writing black pixels
|
||||
}
|
||||
}
|
||||
*bw_thresh = (sum / count) as u8;
|
||||
}
|
||||
|
||||
#[repr(align(32))]
|
||||
#[cfg(not(feature = "hosted-baosec"))]
|
||||
struct CamIrq {
|
||||
|
|
@ -219,7 +266,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
|||
|
||||
udma_global.udma_clock_config(PeriphId::Cam, true);
|
||||
// ---- camera initialization
|
||||
#[cfg(not(feature = "oem-baosec-lite"))]
|
||||
#[cfg(all(not(feature = "oem-baosec-lite"), not(feature = "hosted-baosec")))]
|
||||
let cam_clk = (IoxPort::PA, 0);
|
||||
#[cfg(feature = "oem-baosec-lite")]
|
||||
let cam_clk = (IoxPort::PA, 3);
|
||||
|
|
@ -230,6 +277,7 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
|||
tt.sleep_ms(1000).ok();
|
||||
|
||||
// setup camera power
|
||||
#[cfg(not(feature = "oem-baosec-lite"))]
|
||||
match bao1x_hal::axp2101::Axp2101::new(&mut i2c) {
|
||||
Ok(mut pmic) => {
|
||||
pmic.set_dcdc(&mut i2c, Some((1.8, false)), bao1x_hal::axp2101::WhichDcDc::Dcdc5).unwrap();
|
||||
|
|
@ -493,6 +541,26 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
|||
}
|
||||
}
|
||||
GfxOpcode::CamIrq => {
|
||||
// copy the camera data to our FB
|
||||
let fb: &[u32] = cam.rx_buf();
|
||||
// fb is an array of IMAGE_WIDTH x IMAGE_HEIGHT x u16
|
||||
// frame is an array of IMAGE_WIDTH x IMAGE_HEIGHT x u8
|
||||
// Take only the "Y" channel out of the fb array and write it to frame, but do it
|
||||
// such that we are fetching a u32 each read from fb as this matches the native
|
||||
// width of the bus (because fb is non-cacheable reading u16 ends up fetching the
|
||||
// same word twice, then masking it at the CPU side in hardware). Also, the fb
|
||||
// is slow to access relative to main memory.
|
||||
//
|
||||
// Also, commit the data to `frame` in inverse line order, e.g. flip the image
|
||||
// vertically.
|
||||
for (y_src, line) in fb.chunks(IMAGE_WIDTH / 2).enumerate() {
|
||||
for (x_src, &u32src) in line.iter().enumerate() {
|
||||
frame[y_src * IMAGE_WIDTH + 2 * x_src] = ((u32src >> 8) & 0xff) as u8;
|
||||
frame[y_src * IMAGE_WIDTH + 2 * x_src + 1] = ((u32src >> 24) & 0xff) as u8;
|
||||
}
|
||||
}
|
||||
frames += 1;
|
||||
|
||||
if qr_request.is_some() {
|
||||
cam.capture_async();
|
||||
} else {
|
||||
|
|
@ -518,26 +586,6 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
|
|||
}
|
||||
}
|
||||
|
||||
// copy the camera data to our FB
|
||||
let fb: &[u32] = cam.rx_buf();
|
||||
// fb is an array of IMAGE_WIDTH x IMAGE_HEIGHT x u16
|
||||
// frame is an array of IMAGE_WIDTH x IMAGE_HEIGHT x u8
|
||||
// Take only the "Y" channel out of the fb array and write it to frame, but do it
|
||||
// such that we are fetching a u32 each read from fb as this matches the native
|
||||
// width of the bus (because fb is non-cacheable reading u16 ends up fetching the
|
||||
// same word twice, then masking it at the CPU side in hardware). Also, the fb
|
||||
// is slow to access relative to main memory.
|
||||
//
|
||||
// Also, commit the data to `frame` in inverse line order, e.g. flip the image
|
||||
// vertically.
|
||||
for (y_src, line) in fb.chunks(IMAGE_WIDTH / 2).enumerate() {
|
||||
for (x_src, &u32src) in line.iter().enumerate() {
|
||||
frame[y_src * IMAGE_WIDTH + 2 * x_src] = ((u32src >> 8) & 0xff) as u8;
|
||||
frame[y_src * IMAGE_WIDTH + 2 * x_src + 1] = ((u32src >> 24) & 0xff) as u8;
|
||||
}
|
||||
}
|
||||
frames += 1;
|
||||
|
||||
let mut candidates = Vec::<Point>::new();
|
||||
log::debug!("------------- SEARCH {} -----------", frames);
|
||||
let _finder_width =
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ rkyv = { version = "0.8.8", default-features = false, features = [
|
|||
"alloc",
|
||||
] }
|
||||
bao1x-api = { path = "../../libs/bao1x-api", features = ["derive-rkyv", "std"] }
|
||||
xous-api-susres = "0.9.68"
|
||||
xous-api-susres = { path = "../../api/xous-api-susres" }
|
||||
|
||||
[target.'cfg(any(windows,unix))'.dependencies]
|
||||
minifb = "0.26.0"
|
||||
|
|
|
|||
|
|
@ -172,6 +172,15 @@ impl FrameBuffer for Oled128x128 {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe fn put_pixel_unchecked(&mut self, p: Point, on: ColorNative) {
|
||||
let bitnum = (p.x + p.y * COLUMN) as usize;
|
||||
if on.0 != 0 {
|
||||
self.buffer[bitnum / 32] |= 1 << (bitnum % 32);
|
||||
} else {
|
||||
self.buffer[bitnum / 32] &= !(1 << (bitnum % 32));
|
||||
}
|
||||
}
|
||||
|
||||
fn dimensions(&self) -> Point { Point::new(COLUMN, ROW) }
|
||||
|
||||
fn get_pixel(&self, p: Point) -> Option<ColorNative> {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ xous = { version = "0.9.69", features = ["raw-trng"] }
|
|||
xous-ipc = "0.10.9"
|
||||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
log = "0.4.14"
|
||||
xous-api-susres = "0.9.68"
|
||||
xous-api-susres = { path = "../../api/xous-api-susres", features = ["bao1x"] }
|
||||
bao1x-hal = { path = "../../libs/bao1x-hal", default-features = false }
|
||||
bao1x-api = { path = "../../libs/bao1x-api", features = ["derive-rkyv", "std"] }
|
||||
bio-lib = { path = "../../libs/bio-lib" }
|
||||
|
|
@ -48,7 +48,7 @@ swap = []
|
|||
mpw = ["bao1x-hal/mpw"]
|
||||
bmp180 = ["bao1x-hal/bmp180"]
|
||||
board-baosec = ["bao1x-hal/board-baosec"]
|
||||
oem-baosec-lite = []
|
||||
oem-baosec-lite = ["bao1x-hal/oem-baosec-lite"]
|
||||
board-baosor = ["bao1x-hal/board-baosor"]
|
||||
board-dabao = ["bao1x-hal/board-dabao"]
|
||||
|
||||
|
|
|
|||
|
|
@ -20,3 +20,15 @@ pub enum TimeOp {
|
|||
/// Serialize the internal state for storage across reboots
|
||||
GetState = 1024,
|
||||
}
|
||||
|
||||
#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive)]
|
||||
pub enum ClockOp {
|
||||
GetVco,
|
||||
GetFclk,
|
||||
GetAclk,
|
||||
GetHclk,
|
||||
GetIclk,
|
||||
GetPclk,
|
||||
GetPer,
|
||||
DeepSleep,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@ use core::sync::atomic::{AtomicU32, Ordering};
|
|||
|
||||
use bao1x_api::*;
|
||||
use num_traits::*;
|
||||
use xous::{Message, send_message};
|
||||
use xous_api_susres::api::Opcode as SusresOp;
|
||||
|
||||
use crate::api::ClockOp;
|
||||
static REFCOUNT: AtomicU32 = AtomicU32::new(0);
|
||||
|
||||
pub struct UdmaGlobal {
|
||||
|
|
@ -128,3 +132,128 @@ impl UdmaGlobalConfig for UdmaGlobal {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ClockManager {
|
||||
conn: xous::CID,
|
||||
}
|
||||
impl ClockManager {
|
||||
pub fn new() -> Self {
|
||||
let xns = xous_names::XousNames::new().unwrap();
|
||||
let conn = xns
|
||||
.request_connection_blocking(xous_api_susres::api::SERVER_NAME_SUSRES)
|
||||
.expect("Couldn't connect to susres server");
|
||||
ClockManager { conn }
|
||||
}
|
||||
|
||||
pub fn get_fclk(&self) -> u32 {
|
||||
match send_message(
|
||||
self.conn,
|
||||
Message::new_blocking_scalar(
|
||||
SusresOp::PlatformSpecific.to_usize().unwrap(),
|
||||
ClockOp::GetFclk.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
) {
|
||||
Ok(xous::Result::Scalar1(clk)) => clk as u32,
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_aclk(&self) -> u32 {
|
||||
match send_message(
|
||||
self.conn,
|
||||
Message::new_blocking_scalar(
|
||||
SusresOp::PlatformSpecific.to_usize().unwrap(),
|
||||
ClockOp::GetAclk.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
) {
|
||||
Ok(xous::Result::Scalar1(clk)) => clk as u32,
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_hclk(&self) -> u32 {
|
||||
match send_message(
|
||||
self.conn,
|
||||
Message::new_blocking_scalar(
|
||||
SusresOp::PlatformSpecific.to_usize().unwrap(),
|
||||
ClockOp::GetHclk.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
) {
|
||||
Ok(xous::Result::Scalar1(clk)) => clk as u32,
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_iclk(&self) -> u32 {
|
||||
match send_message(
|
||||
self.conn,
|
||||
Message::new_blocking_scalar(
|
||||
SusresOp::PlatformSpecific.to_usize().unwrap(),
|
||||
ClockOp::GetIclk.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
) {
|
||||
Ok(xous::Result::Scalar1(clk)) => clk as u32,
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_pclk(&self) -> u32 {
|
||||
match send_message(
|
||||
self.conn,
|
||||
Message::new_blocking_scalar(
|
||||
SusresOp::PlatformSpecific.to_usize().unwrap(),
|
||||
ClockOp::GetPclk.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
) {
|
||||
Ok(xous::Result::Scalar1(clk)) => clk as u32,
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_per(&self) -> u32 {
|
||||
match send_message(
|
||||
self.conn,
|
||||
Message::new_blocking_scalar(
|
||||
SusresOp::PlatformSpecific.to_usize().unwrap(),
|
||||
ClockOp::GetPer.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
) {
|
||||
Ok(xous::Result::Scalar1(clk)) => clk as u32,
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_vco(&self) -> u32 {
|
||||
match send_message(
|
||||
self.conn,
|
||||
Message::new_blocking_scalar(
|
||||
SusresOp::PlatformSpecific.to_usize().unwrap(),
|
||||
ClockOp::GetVco.to_usize().unwrap(),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
) {
|
||||
Ok(xous::Result::Scalar1(clk)) => clk as u32,
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,8 +273,8 @@ fn main() {
|
|||
|
||||
servers::susres::start_susres_service();
|
||||
|
||||
// TODO: implement a method to fetch the clock setting from susres and put it into here!
|
||||
servers::bio::start_bio_service(bao1x_hal::board::DEFAULT_FCLK_FREQUENCY);
|
||||
let clk_mgr = bao1x_hal_service::ClockManager::new();
|
||||
servers::bio::start_bio_service(clk_mgr.get_fclk());
|
||||
|
||||
// claim BIO, based on the platform
|
||||
servers::trng::start_trng_service();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ use xous::{CID, Message, msg_blocking_scalar_unpack, msg_scalar_unpack, send_mes
|
|||
use xous_api_susres::*;
|
||||
use xous_ipc::Buffer;
|
||||
|
||||
use crate::api::ClockOp;
|
||||
|
||||
static TIMEOUT_TIME: AtomicU32 = AtomicU32::new(5000);
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
|
@ -31,7 +33,7 @@ fn susres_service() {
|
|||
let susres_sid = xns.register_name(api::SERVER_NAME_SUSRES, None).expect("can't register server");
|
||||
let susres_conn = xous::connect(susres_sid).unwrap();
|
||||
|
||||
let mut clk_mgr = bao1x_hal::clocks::ClockManager::new().unwrap();
|
||||
let mut clk_mgr = bao1x_hal::clocks::ClockManagerImpl::new().unwrap();
|
||||
let measured = clk_mgr.measured_freqs();
|
||||
log::info!("computed frequencies:");
|
||||
log::info!(" vco: {}", clk_mgr.vco_freq);
|
||||
|
|
@ -219,14 +221,7 @@ fn susres_service() {
|
|||
log::trace!("still waiting on callbacks, returning to main loop");
|
||||
}
|
||||
}),
|
||||
Some(Opcode::SuspendRequest) => msg_blocking_scalar_unpack!(msg, deepsleep, 0, 0, 0, {
|
||||
// catch the case of deepsleep request
|
||||
if deepsleep == 1 {
|
||||
log::info!("entering deep sleep");
|
||||
clk_mgr.deep_sleep();
|
||||
xous::return_scalar(msg.sender, 1).ok();
|
||||
// system is shut down after this point, no code runs
|
||||
}
|
||||
Some(Opcode::SuspendRequest) => msg_blocking_scalar_unpack!(msg, _, _, _, _, {
|
||||
log::info!("registered suspend listeners:");
|
||||
for sub in suspend_subscribers.iter() {
|
||||
log::info!("{:?}", sub);
|
||||
|
|
@ -340,6 +335,41 @@ fn susres_service() {
|
|||
}
|
||||
}),
|
||||
Some(Opcode::Quit) => break,
|
||||
Some(Opcode::PlatformSpecific) => {
|
||||
msg_blocking_scalar_unpack!(msg, op, _arg2, _arg3, _arg4, {
|
||||
let platform_op = FromPrimitive::from_usize(op);
|
||||
match platform_op {
|
||||
Some(ClockOp::GetVco) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.vco_freq as usize).unwrap()
|
||||
}
|
||||
Some(ClockOp::GetFclk) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.fclk as usize).unwrap()
|
||||
}
|
||||
Some(ClockOp::GetAclk) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.aclk as usize).unwrap()
|
||||
}
|
||||
Some(ClockOp::GetHclk) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.hclk as usize).unwrap()
|
||||
}
|
||||
Some(ClockOp::GetIclk) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.iclk as usize).unwrap()
|
||||
}
|
||||
Some(ClockOp::GetPclk) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.pclk as usize).unwrap()
|
||||
}
|
||||
Some(ClockOp::GetPer) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.perclk as usize).unwrap()
|
||||
}
|
||||
Some(ClockOp::DeepSleep) => {
|
||||
log::info!("entering deep sleep");
|
||||
clk_mgr.deep_sleep();
|
||||
xous::return_scalar(msg.sender, 1).ok();
|
||||
// system is shut down after this point, no code runs
|
||||
}
|
||||
_ => panic!("Incorrect PlatformOp"),
|
||||
}
|
||||
})
|
||||
}
|
||||
None => {
|
||||
log::error!("couldn't convert opcode");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ log-server = { package = "xous-api-log", version = "0.1.68" }
|
|||
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.68" }
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
log = "0.4.14"
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
llio = { path = "../llio" }
|
||||
trng = { path = "../trng" }
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ com_rs = { git = "https://github.com/betrusted-io/com_rs", rev = "891bdd3ca8e41f
|
|||
log = "0.4.14"
|
||||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.68" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
typenum = "1.12"
|
||||
xous = "0.9.69"
|
||||
xous-ipc = "0.10.9"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ chrono = { version = "0.4.33", default-features = false, features = ["std"] }
|
|||
sntpc = { version = "0.3.1" } #, features = ["log"]
|
||||
locales = { path = "../../locales" }
|
||||
gam = { path = "../gam" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
userprefs = { path = "../../libs/userprefs" }
|
||||
modals = { path = "../modals" }
|
||||
precursor-hal = { path = "../../libs/precursor-hal" }
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.68" }
|
|||
xous = "0.9.69"
|
||||
xous-ipc = "0.10.9"
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
spinor = { path = "../../services/spinor" }
|
||||
precursor-hal = { path = "../../libs/precursor-hal" }
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ xous-names = { package = "xous-api-names", version = "0.9.70" }
|
|||
log = "0.4.14"
|
||||
num-derive = { version = "0.4.2", default-features = false }
|
||||
num-traits = { version = "0.2.14", default-features = false }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
ffi-sys = { path = "sys" }
|
||||
keyboard = { path = "../keyboard" }
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ rkyv = { version = "0.8.8", default-features = false, features = [
|
|||
"alloc",
|
||||
] }
|
||||
|
||||
susres = { package = "xous-api-susres", version = "0.9.68", optional = true } # used for the sleep now menu item
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres", optional = true } # used for the sleep now menu item
|
||||
bao1x-hal-service = { path = "../bao1x-hal-service", optional = true, default-features = false }
|
||||
|
||||
enum_dispatch = "0.3.7" # used for trait-based dispatch off of multiple layout objects.
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ keyboard = { path = "../keyboard" }
|
|||
log = "0.4.14"
|
||||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
xous = "0.9.69"
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.68" }
|
||||
locales = { path = "../../locales" }
|
||||
blitstr2 = { path = "../../libs/blitstr2" }
|
||||
|
|
@ -39,12 +39,7 @@ bao1x-hal = { path = "../../libs/bao1x-hal", optional = true, features = [
|
|||
minifb = "0.26.0"
|
||||
|
||||
[features]
|
||||
bao1x = [
|
||||
"utralib/bao1x",
|
||||
"bao1x-hal-service",
|
||||
"bao1x-hal",
|
||||
"bao1x-hal/std",
|
||||
]
|
||||
bao1x = ["utralib/bao1x", "bao1x-hal-service", "bao1x-hal", "bao1x-hal/std"]
|
||||
board-baosor = ["bao1x-hal/board-baosor", "blitstr2/board-baosor"]
|
||||
|
||||
precursor = [
|
||||
|
|
|
|||
|
|
@ -310,6 +310,11 @@ impl FrameBuffer for XousDisplay {
|
|||
fb[clip_y * LCD_WORDS_PER_LINE + (LCD_WORDS_PER_LINE - 1)] |= 0x1_0000;
|
||||
}
|
||||
|
||||
unsafe fn put_pixel_unchecked(&mut self, p: Point, color: ColorNative) {
|
||||
// compatibility shim for other builds
|
||||
self.put_pixel(p, color);
|
||||
}
|
||||
|
||||
/// Retrieves a pixel value from the frame buffer; returns None if the point is out of bounds.
|
||||
///
|
||||
/// Note: this has not be carefully tested as this API is not used by the legacy code base.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ xous-names = { package = "xous-api-names", version = "0.9.70" }
|
|||
log = "0.4.14"
|
||||
num-derive = { version = "0.4.2", default-features = false }
|
||||
num-traits = { version = "0.2.14", default-features = false }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
|
||||
xous-ipc = "0.10.9"
|
||||
rkyv = { version = "0.8.8", default-features = false, features = [
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ xous = "0.9.69"
|
|||
xous-ipc = "0.10.9"
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
llio = { path = "../llio" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
spinor = { path = "../spinor" }
|
||||
|
||||
num-derive = { version = "0.4.2", default-features = false }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.68" }
|
|||
xous = "0.9.69"
|
||||
xous-ipc = "0.10.9"
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
|
||||
# RTC dependencies
|
||||
bitflags = "1.2.1"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ xous-names = { package = "xous-api-names", version = "0.9.70" }
|
|||
log = "0.4.14"
|
||||
num-derive = { version = "0.4.2", default-features = false }
|
||||
num-traits = { version = "0.2.14", default-features = false }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
rkyv = { version = "0.8.8", default-features = false, features = [
|
||||
"std",
|
||||
"alloc",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ xous-ipc = "0.10.9"
|
|||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.68" }
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68", optional = true }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres", optional = true }
|
||||
log = "0.4.14"
|
||||
num-derive = { version = "0.4.2", default-features = false }
|
||||
num-traits = { version = "0.2.14", default-features = false }
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ log-server = { package = "xous-api-log", version = "0.1.68" }
|
|||
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.68" }
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
log = "0.4.14"
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
trng = { path = "../trng" }
|
||||
spinor = { path = "../spinor" }
|
||||
llio = { path = "../llio" }
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ xous = "0.9.69"
|
|||
xous-ipc = "0.10.9"
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
keyboard = { path = "../keyboard" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
codec = { path = "../codec" }
|
||||
sha2 = { version = "0.10.8" }
|
||||
digest = "0.10.7"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ xous-names = { package = "xous-api-names", version = "0.9.70" }
|
|||
log = "0.4.14"
|
||||
num-derive = { version = "0.4.2", default-features = false }
|
||||
num-traits = { version = "0.2.14", default-features = false }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
|
||||
utralib = { version = "0.1.26", optional = true, default-features = false }
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ log-server = { package = "xous-api-log", version = "0.1.68" }
|
|||
ticktimer-server = { package = "xous-api-ticktimer", version = "0.9.68" }
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
log = "0.4.14"
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
trng = { path = "../trng" }
|
||||
com = { path = "../com" }
|
||||
llio = { path = "../llio" }
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ xous-names = { package = "xous-api-names", version = "0.9.70" }
|
|||
ux-api = { path = "../../libs/ux-api" }
|
||||
gam = { path = "../gam" }
|
||||
locales = { path = "../../locales" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
root-keys = { path = "../root-keys" }
|
||||
keystore-api = { path = "../../libs/keystore-api", features = ["gen1"] }
|
||||
modals = { path = "../modals" }
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ homepage = "https://betrusted.io/xous-book/"
|
|||
|
||||
# Dependency versions enforced by Cargo.lock.
|
||||
[dependencies]
|
||||
xous-api-susres = "0.9.68"
|
||||
xous-api-susres = { path = "../../api/xous-api-susres" }
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
xous = "0.9.69"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ version = "0.1.0"
|
|||
xous = "0.9.69"
|
||||
log = "0.4.14"
|
||||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68", optional = true }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres", optional = true }
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70", optional = true }
|
||||
|
||||
[features]
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ xous-names = { package = "xous-api-names", version = "0.9.70" }
|
|||
log = "0.4.14"
|
||||
num-derive = { version = "0.4.1", default-features = false }
|
||||
num-traits = { version = "0.2.14", default-features = false }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
rkyv = { version = "0.8.8", default-features = false, features = [
|
||||
"std",
|
||||
"alloc",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ rkyv = { version = "0.8.8", default-features = false, features = [
|
|||
"std",
|
||||
"alloc",
|
||||
] }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
modals = { path = "../modals", optional = true }
|
||||
keyboard = { path = "../keyboard", features = ["inject-api"], optional = true }
|
||||
bitfield = "0.13.2"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ xous-names = { package = "xous-api-names", version = "0.9.70" }
|
|||
log = "0.4.14"
|
||||
num-derive = { version = "0.4.2", default-features = false }
|
||||
num-traits = { version = "0.2.14", default-features = false }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
keyboard = { path = "../keyboard" }
|
||||
bitfield = "0.13.2"
|
||||
vcell = "0.1.3"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ homepage = "https://betrusted.io/xous-book/"
|
|||
|
||||
# Dependency versions enforced by Cargo.lock.
|
||||
[dependencies]
|
||||
xous-api-susres = "0.9.68"
|
||||
xous-api-susres = { path = "../../api/xous-api-susres" }
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
xous = "0.9.69"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ xous = "0.9.69"
|
|||
xous-ipc = "0.10.9"
|
||||
xous-names = { package = "xous-api-names", version = "0.9.70" }
|
||||
log-server = { package = "xous-api-log", version = "0.1.68" }
|
||||
susres = { package = "xous-api-susres", version = "0.9.68" }
|
||||
susres = { path = "../../api/xous-api-susres", package = "xous-api-susres" }
|
||||
log = "0.4.14"
|
||||
rkyv = { version = "0.8.8", default-features = false, features = [
|
||||
"std",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ pub fn check_project_consistency() -> Result<(), DynError> {
|
|||
"xous-ipc^0.10.9",
|
||||
"xous-api-log^0.1.68",
|
||||
"xous-api-names^0.9.70",
|
||||
"xous-api-susres^0.9.68",
|
||||
// "xous-api-susres^0.9.68",
|
||||
"xous-api-ticktimer^0.9.68",
|
||||
];
|
||||
// utra/svd2utra changes are downgraded to warnings because these now prefer to pull
|
||||
|
|
|
|||
Loading…
Reference in a new issue