mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
Merge pull request #685 from betrusted-io/fixups
fix missing api in precursor target from previous PR
This commit is contained in:
commit
eb53319773
4 changed files with 18 additions and 4 deletions
|
|
@ -11,6 +11,9 @@ pub const RAM_SIZE: usize = utralib::generated::HW_SRAM_EXT_MEM_LEN;
|
||||||
pub const RAM_SIZE: usize = 2 * 1024 * 1024;
|
pub const RAM_SIZE: usize = 2 * 1024 * 1024;
|
||||||
pub const RAM_BASE: usize = utralib::generated::HW_SRAM_EXT_MEM;
|
pub const RAM_BASE: usize = utralib::generated::HW_SRAM_EXT_MEM;
|
||||||
|
|
||||||
|
// placeholder for compatibility with other targets
|
||||||
|
pub fn early_init() -> u32 { 0 }
|
||||||
|
|
||||||
/// Note that this memory test is "destructive" -- supend/resume will fail if it is enabled
|
/// Note that this memory test is "destructive" -- supend/resume will fail if it is enabled
|
||||||
#[cfg(feature = "platform-tests")]
|
#[cfg(feature = "platform-tests")]
|
||||||
pub fn platform_tests() {
|
pub fn platform_tests() {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
// This file is auto-generated by xtask/main.rs generate_app_menus()
|
// This file is auto-generated by xtask/main.rs generate_app_menus()
|
||||||
// NO APPS SELECTED: suppressing warning messages!
|
|
||||||
#![allow(dead_code)]
|
|
||||||
#![allow(unused_imports)]
|
|
||||||
#![allow(unused_variables)]
|
|
||||||
use crate::StatusOpcode;
|
use crate::StatusOpcode;
|
||||||
use gam::{MenuItem, MenuPayload};
|
use gam::{MenuItem, MenuPayload};
|
||||||
use locales::t;
|
use locales::t;
|
||||||
|
|
@ -27,16 +23,29 @@ impl fmt::Display for AppDispatchError {
|
||||||
|
|
||||||
pub(crate) fn app_dispatch(gam: &gam::Gam, token: [u32; 4], index: usize) -> Result<(), AppDispatchError> {
|
pub(crate) fn app_dispatch(gam: &gam::Gam, token: [u32; 4], index: usize) -> Result<(), AppDispatchError> {
|
||||||
match index {
|
match index {
|
||||||
|
0 => {
|
||||||
|
gam.switch_to_app(gam::APP_NAME_VAULT, token).expect("couldn't raise app");
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
_ => Err(AppDispatchError::IndexNotFound(index)),
|
_ => Err(AppDispatchError::IndexNotFound(index)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn app_index_to_name(index: usize) -> Result<&'static str, AppDispatchError> {
|
pub(crate) fn app_index_to_name(index: usize) -> Result<&'static str, AppDispatchError> {
|
||||||
match index {
|
match index {
|
||||||
|
0 => Ok(t!("appmenu.vault", locales::LANG)),
|
||||||
_ => Err(AppDispatchError::IndexNotFound(index)),
|
_ => Err(AppDispatchError::IndexNotFound(index)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn app_menu_items(menu_items: &mut Vec::<MenuItem>, status_conn: u32) {
|
pub(crate) fn app_menu_items(menu_items: &mut Vec::<MenuItem>, status_conn: u32) {
|
||||||
|
|
||||||
|
menu_items.push(MenuItem {
|
||||||
|
name: String::from(t!("appmenu.vault", locales::LANG)),
|
||||||
|
action_conn: Some(status_conn),
|
||||||
|
action_opcode: StatusOpcode::SwitchToApp.to_u32().unwrap(),
|
||||||
|
action_payload: MenuPayload::Scalar([0, 0, 0, 0]),
|
||||||
|
close_on_select: true,
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ pub struct TrngErrors {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, flatipc::Ipc)]
|
#[derive(Debug, flatipc::Ipc)]
|
||||||
|
#[allow(dead_code)]
|
||||||
/// Note that this structure is mirrored in imports/getrandom/src/xous.rs
|
/// Note that this structure is mirrored in imports/getrandom/src/xous.rs
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct TrngBuf {
|
pub struct TrngBuf {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ struct AppManifest {
|
||||||
submenu: Option<u8>,
|
submenu: Option<u8>,
|
||||||
}
|
}
|
||||||
#[derive(Deserialize, Serialize, Debug)]
|
#[derive(Deserialize, Serialize, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
struct Locales {
|
struct Locales {
|
||||||
locales: HashMap<String, HashMap<String, String>>,
|
locales: HashMap<String, HashMap<String, String>>,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue