cleans up lifetimes and ownership

This commit is contained in:
2025-09-20 10:38:02 -07:00
parent 91c749f8fc
commit 8e6ed92eea
8 changed files with 134 additions and 44 deletions

View File

@@ -1,8 +1,11 @@
use crate::hardware::mcp23017::Mcp23017;
use anyhow::Result;
use embedded_hal::i2c::I2c;
pub trait Hardware {
fn set_mcp0_pin(&self, pin: u8, value: bool) -> Result<()>;
fn get_mcp23017_a(&self) -> impl Mcp23017;
fn get_mcp23017_b(&self) -> impl Mcp23017;
fn get_battery_voltage(&self) -> Result<f64>;
}
@@ -34,5 +37,5 @@ mod bno085;
mod imu;
mod error;
mod mcp23017;
pub mod mcp23017;
mod mcp3208;