cleans up lifetimes and ownership
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user