Skip to content

Commit 3ae415e

Browse files
Decodes HID events into key presses and runs a simple menu.
Also tried to remove some of the unsafe static mut.
1 parent 80141eb commit 3ae415e

File tree

9 files changed

+1036
-351
lines changed

9 files changed

+1036
-351
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ neotron-common-bios = "0.7"
4141
r0 = "1.0"
4242
postcard = "0.5"
4343
serde = { version = "1.0", default-features = false }
44+
menu = "0.3"

build.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
use std::env;
22
fn main() {
3-
match env::var("CARGO_CFG_TARGET_OS").as_deref() {
4-
Ok("none") => {
5-
println!("cargo:rustc-link-arg-bin=flash1002=-Tneotron-flash-1002.ld");
6-
println!("cargo:rustc-link-arg-bin=flash0802=-Tneotron-flash-0802.ld");
7-
println!("cargo:rustc-link-arg-bin=flash0002=-Tneotron-flash-0002.ld");
8-
}
9-
_ => {
10-
// No args
11-
}
3+
if let Ok("none") = env::var("CARGO_CFG_TARGET_OS").as_deref() {
4+
println!("cargo:rustc-link-arg-bin=flash1002=-Tneotron-flash-1002.ld");
5+
println!("cargo:rustc-link-arg-bin=flash0802=-Tneotron-flash-0802.ld");
6+
println!("cargo:rustc-link-arg-bin=flash0002=-Tneotron-flash-0002.ld");
127
}
138

149
if let Ok(cmd_output) = std::process::Command::new("git")

src/bin/flash0002.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
/// of our portion of Flash.
1414
#[link_section = ".entry_point"]
1515
#[used]
16-
pub static ENTRY_POINT_ADDR: extern "C" fn(&'static neotron_common_bios::Api) -> ! =
17-
neotron_os::main;
16+
pub static ENTRY_POINT_ADDR: extern "C" fn(*const neotron_common_bios::Api) -> ! = neotron_os::main;

src/bin/flash0802.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
/// of our portion of Flash.
1414
#[link_section = ".entry_point"]
1515
#[used]
16-
pub static ENTRY_POINT_ADDR: extern "C" fn(&'static neotron_common_bios::Api) -> ! =
17-
neotron_os::main;
16+
pub static ENTRY_POINT_ADDR: extern "C" fn(*const neotron_common_bios::Api) -> ! = neotron_os::main;

src/bin/flash1002.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
/// of our portion of Flash.
1414
#[link_section = ".entry_point"]
1515
#[used]
16-
pub static ENTRY_POINT_ADDR: extern "C" fn(&'static neotron_common_bios::Api) -> ! =
17-
neotron_os::main;
16+
pub static ENTRY_POINT_ADDR: extern "C" fn(*const neotron_common_bios::Api) -> ! = neotron_os::main;

0 commit comments

Comments
 (0)