fix missing api in precursor target from previous PR

also fixup some warnings from the new rustc.
This commit is contained in:
bunnie 2025-09-21 23:33:37 +08:00
parent 902bb23b20
commit ff6ff8841a
4 changed files with 18 additions and 4 deletions

View file

@ -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_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
#[cfg(feature = "platform-tests")]
pub fn platform_tests() {

View file

@ -1,9 +1,5 @@
#![cfg_attr(rustfmt, rustfmt_skip)]
// 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 gam::{MenuItem, MenuPayload};
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> {
match index {
0 => {
gam.switch_to_app(gam::APP_NAME_VAULT, token).expect("couldn't raise app");
Ok(())
},
_ => Err(AppDispatchError::IndexNotFound(index)),
}
}
pub(crate) fn app_index_to_name(index: usize) -> Result<&'static str, AppDispatchError> {
match index {
0 => Ok(t!("appmenu.vault", locales::LANG)),
_ => Err(AppDispatchError::IndexNotFound(index)),
}
}
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,
});
}

View file

@ -38,6 +38,7 @@ pub struct TrngErrors {
}
#[derive(Debug, flatipc::Ipc)]
#[allow(dead_code)]
/// Note that this structure is mirrored in imports/getrandom/src/xous.rs
#[repr(C)]
pub struct TrngBuf {

View file

@ -17,6 +17,7 @@ struct AppManifest {
submenu: Option<u8>,
}
#[derive(Deserialize, Serialize, Debug)]
#[allow(dead_code)]
struct Locales {
locales: HashMap<String, HashMap<String, String>>,
}