cleanup warnings

This commit is contained in:
bunnie 2025-02-20 20:51:04 +08:00
parent 8859f3eff5
commit 7bb50974ce
5 changed files with 4 additions and 11 deletions

View file

@ -77,7 +77,7 @@ impl Ov2640 {
// pub fn effect(&mut self, _i2c: &mut dyn I2cApi, _effect: Effect) {}
/// Returns (product ID, manufacturer ID) - hard coded to match OV2640 values
pub fn read_id(&self, i2c: &mut dyn I2cApi) -> (u16, u16) { (0x2641, 0x7fa2) }
pub fn read_id(&self, _i2c: &mut dyn I2cApi) -> (u16, u16) { (0x2641, 0x7fa2) }
pub fn delay(&self, quantum: usize) {
std::thread::sleep(std::time::Duration::from_millis(quantum as u64));

View file

@ -135,10 +135,6 @@ impl<'a> Oled128x128 {
}
}
fn set_data(&self) {}
fn set_command(&self) {}
pub fn buffer_swap(&mut self) { self.active_buffer = self.active_buffer.swap(); }
pub fn buffer_mut(&mut self) -> &mut [u32] { &mut self.buffers[self.active_buffer.as_index()] }

View file

@ -7,7 +7,7 @@ impl I2c {
/// This is used to pass a list of I2C transactions that must be completed atomically
/// No further I2C requests may happen while this is processing.
pub fn i2c_transactions(&self, list: I2cTransactions) -> Result<I2cTransactions, xous::Error> {
pub fn i2c_transactions(&self, _list: I2cTransactions) -> Result<I2cTransactions, xous::Error> {
Ok(I2cTransactions { transactions: vec![] })
}
}

View file

@ -9,7 +9,6 @@ fn main() {
let xns = xous_names::XousNames::new().unwrap();
let sid = xns.register_name(cramium_api::SERVER_NAME_CRAM_HAL, None).expect("can't register server");
let self_cid = xous::connect(sid).expect("couldn't create self-connection");
// start keyboard emulator service
keyboard::start_keyboard_service();
@ -26,7 +25,7 @@ fn main() {
HalOpcode::MapIfram => {
if let Some(scalar) = msg.body.scalar_message_mut() {
let requested_size = scalar.arg1; // requested size
let requested_bank = scalar.arg2; // Specifies bank 0, 1, or don't care (any number but 0 or 1)
let _requested_bank = scalar.arg2; // Specifies bank 0, 1, or don't care (any number but 0 or 1)
// return as if the mapping passed
scalar.arg1 = requested_size;
@ -34,7 +33,7 @@ fn main() {
}
}
HalOpcode::UnmapIfram => {
if let Some(scalar) = msg.body.scalar_message() {
if let Some(_scalar) = msg.body.scalar_message() {
// do nothing
}
}

View file

@ -5,8 +5,6 @@ pub struct Trng {}
impl Trng {
pub fn new(_xns: &xous_names::XousNames) -> Result<Self, xous::Error> { Ok(Trng {}) }
fn reseed(&self) {}
pub fn get_u32(&self) -> Result<u32, xous::Error> { Ok(rand::thread_rng().gen()) }
pub fn get_u64(&self) -> Result<u64, xous::Error> { Ok(rand::thread_rng().gen()) }