Skip to content

Commit

Permalink
Merge pull request #539 from betrusted-io/issue-538
Browse files Browse the repository at this point in the history
patches for #538
  • Loading branch information
bunnie authored May 12, 2024
2 parents fe7ee95 + 65caa55 commit 4f30067
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
17 changes: 4 additions & 13 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions kernel/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
// SPDX-License-Identifier: Apache-2.0

/// A trait for serial like drivers which are byte-oriented sinks.
#[allow(dead_code)]
pub trait SerialWrite {
/// Write a single byte.
fn putc(&mut self, b: u8);
}

/// A trait for serial like drivers which allows reading from a source.
#[allow(dead_code)]
pub trait SerialRead {
/// Read a single byte.
fn getc(&mut self) -> Option<u8>;
Expand Down
2 changes: 1 addition & 1 deletion services/graphics-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cramium-hal = { path = "../../libs/cramium-hal", optional = true, features = [
] }

[target.'cfg(any(windows,unix))'.dependencies]
minifb = "0.23.0"
minifb = "0.26.0"

[features]
cramium-soc = [
Expand Down
4 changes: 2 additions & 2 deletions services/graphics-server/src/backend/minifb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub const FB_WIDTH_PIXELS: usize = WIDTH as usize;
pub const FB_LINES: usize = HEIGHT as usize;
pub const FB_SIZE: usize = WIDTH_WORDS * HEIGHT as usize; // 44 bytes by 536 lines

const MAX_FPS: u64 = 60;
const MAX_FPS: usize = 60;
const DARK_COLOUR: u32 = 0xB5B5AD;
const LIGHT_COLOUR: u32 = 0x1B1B19;

Expand Down Expand Up @@ -166,7 +166,7 @@ impl MinifbThread {
});

// Limit the maximum update rate
window.limit_update_rate(Some(std::time::Duration::from_micros(1000 * 1000 / MAX_FPS)));
window.set_target_fps(MAX_FPS);

let xns = xous_names::XousNames::new().unwrap();
let kbd = keyboard::Keyboard::new(&xns).expect("GFX|hosted can't connect to KBD for emulation");
Expand Down
3 changes: 1 addition & 2 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// security
"root-keys",
"trng",
"sha2@0.10.8",
"sha2",
// "engine-25519",
"jtag",
// GUI front end
Expand Down Expand Up @@ -305,7 +305,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.add_services(&user_pkgs)
.add_feature("pddbtest")
.add_feature("ditherpunk")
.add_feature("tracking-alloc")
.add_feature("tls")
// .add_feature("test-rekey")
.add_apps(&get_cratespecs());
Expand Down

0 comments on commit 4f30067

Please sign in to comment.