diff --git a/src/main.rs b/src/main.rs index 608e87d..4d2cfea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,13 +62,11 @@ use monotron_synth::*; use tm4c123x_hal::interrupt; use cortex_m_rt::{entry, exception}; -const VERSION: &'static str = env!("CARGO_PKG_VERSION"); -const GIT_DESCRIBE: &'static str = env!("GIT_DESCRIBE"); const ISR_LATENCY: u32 = 94; -// Must come first static mut APPLICATION_RAM: [u8; 24 * 1024] = [0u8; 24 * 1024]; - +static VERSION: &'static str = env!("CARGO_PKG_VERSION"); +static GIT_DESCRIBE: &'static str = env!("GIT_DESCRIBE"); static mut G_SYNTH: Synth = Synth::new(80_000_000 / 2112); static mut FRAMEBUFFER: fb::FrameBuffer = fb::FrameBuffer::new(); diff --git a/src/rust_logo.rs b/src/rust_logo.rs index 31abfca..46de71d 100644 --- a/src/rust_logo.rs +++ b/src/rust_logo.rs @@ -1,4 +1,4 @@ -pub const RUST_LOGO_DATA: [u8; 384 * 288 / 8] = [ +pub static RUST_LOGO_DATA: [u8; 384 * 288 / 8] = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/src/ui.rs b/src/ui.rs index 865dc48..8365679 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -7,62 +7,62 @@ use menu; pub(crate) type Menu<'a> = menu::Menu<'a, Context>; pub(crate) type Item<'a> = menu::Item<'a, Context>; -const ITEM_CLEAR: Item = Item { +static ITEM_CLEAR: Item = Item { item_type: menu::ItemType::Callback(item_clear), command: "clear", help: Some("Resets the display."), }; -const ITEM_PEEK: Item = Item { +static ITEM_PEEK: Item = Item { item_type: menu::ItemType::Callback(item_peek), command: "peek", help: Some(" - Read a register."), }; -const ITEM_POKE: Item = Item { +static ITEM_POKE: Item = Item { item_type: menu::ItemType::Callback(item_poke), command: "poke", help: Some(" - Write a register."), }; -const ITEM_DUMP: Item = Item { +static ITEM_DUMP: Item = Item { item_type: menu::ItemType::Callback(item_dump), command: "dump", help: Some(" - Dump RAM/ROM."), }; -const ITEM_LOAD: Item = Item { +static ITEM_LOAD: Item = Item { item_type: menu::ItemType::Callback(item_load_file), command: "load", help: Some(" - Load program from UART."), }; -const ITEM_DEBUG: Item = Item { +static ITEM_DEBUG: Item = Item { item_type: menu::ItemType::Callback(item_debug_info), command: "debug", help: Some("Show some debug info."), }; -const ITEM_RUN: Item = Item { +static ITEM_RUN: Item = Item { item_type: menu::ItemType::Callback(item_run_program), command: "run", help: Some("Run loaded program."), }; -const ITEM_BEEP: Item = Item { +static ITEM_BEEP: Item = Item { item_type: menu::ItemType::Callback(item_beep), command: "beep", help: Some("Make a beep."), }; -const ITEM_DEMOS: Item = Item { +static ITEM_DEMOS: Item = Item { item_type: menu::ItemType::Menu(&demos::DEMO_MENU), command: "demos", help: Some("Enter demo menu."), }; -pub(crate) const ROOT_MENU: Menu = Menu { +pub(crate) static ROOT_MENU: Menu = Menu { label: "root", items: &[ &ITEM_CLEAR,