Skip to content

Commit

Permalink
I2C device tree descriptions in TOML (#36)
Browse files Browse the repository at this point in the history
This is the Humility side of the Hubris I2C TOML work as described
in oxidecomputer/hubris#238.
  • Loading branch information
bcantrill committed Nov 5, 2021
1 parent 11a91a2 commit 06f10cf
Show file tree
Hide file tree
Showing 20 changed files with 1,646 additions and 651 deletions.
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
max_width = 80
use_small_heuristics = "max"
wrap_comments = true
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "humility"
version = "0.4.1"
version = "0.5.0"
authors = ["Bryan Cantrill <bryan@oxide.computer>"]
edition = "2018"

Expand Down Expand Up @@ -47,4 +47,4 @@ indicatif = "0.15"
colored = "2.0.0"
postcard = "0.7.0"
itertools = "0.10.1"
indexmap = "1.7"
indexmap = { version = "1.7", features = ["serde-1"] }
2 changes: 1 addition & 1 deletion pmbus
Submodule pmbus updated 3 files
+3 −3 build.rs
+1 −0 src/commands.ron
+23 −0 tests/core.rs
9 changes: 7 additions & 2 deletions src/cmd/diagnose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ fn diagnose(

println!("Snapshot taken, {} tasks in application.", tasks_0.len());

let narrow_generations = matches!(tasks_0[0].generation, GenOrRestartCount::Gen(_));
let narrow_generations =
matches!(tasks_0[0].generation, GenOrRestartCount::Gen(_));

if narrow_generations {
println!(
Expand Down Expand Up @@ -281,7 +282,11 @@ fn diagnose(
// Estimate restart rate.
if let Some(dt) = delta_ticks {
let f = f64::from(count) / dt as f64;
println!("- (this is {:.03} restarts/tick, or {:.03}/s)", f, 1000. * f);
println!(
"- (this is {:.03} restarts/tick, or {:.03}/s)",
f,
1000. * f
);
}

// Report previous or current faults.
Expand Down
10 changes: 5 additions & 5 deletions src/cmd/etm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ fn etmcmd_enable(
trace!("{:#x?}", TPIU_ACPR::read(core)?);

/*
* We are now ready to enable ETM. There are a bunch of steps involved in
* this, but we need to first write to the ETMCR to indicate that we are
* programming it. Once done writing to the ETM control registers, we
* need to write to ETMCR again to indicate that we are done programming
* it.
* We are now ready to enable ETM. There are a bunch of steps involved
* in this, but we need to first write to the ETMCR to indicate that
* we are programming it. Once done writing to the ETM control
* registers, we need to write to ETMCR again to indicate that we are
* done programming it.
*/
trace!("{:#x?}", ETMCR::read(core)?);
let mut etmcr = ETMCR::read(core)?;
Expand Down
Loading

0 comments on commit 06f10cf

Please sign in to comment.