initial work on bno085

This commit is contained in:
2025-09-14 09:05:04 -07:00
parent e59b3f3a5f
commit 23e8fdb575
16 changed files with 1143 additions and 59 deletions

View File

@@ -0,0 +1,36 @@
use crate::hardware::Hardware;
use anyhow::Result;
use log::info;
use rppal::gpio::Gpio;
use rppal::spi::SimpleHalSpiDevice;
const CLOCK_3MHZ: u32 = 3_000_000;
pub struct RaspiHardware {
gpio: Gpio,
}
impl RaspiHardware {
pub fn new() -> Result<Self> {
let device = rppal::system::DeviceInfo::new()?;
info!(
"Running on Raspberry Pi Emulated Hardware Model {} with {}",
device.model(),
device.soc()
);
Ok(Self {
gpio: Gpio::new()?,
// spi_bno085: Spi::new(
// Bus::Spi1,
// SlaveSelect::Ss0,
// CLOCK_3MHZ,
// Mode::Mode3,
// )?
})
}
}
impl Hardware for RaspiHardware {
}