basic struct

This commit is contained in:
2025-08-04 21:13:50 +02:00
parent 2c43f714ac
commit 44f24c5ace
3 changed files with 19 additions and 0 deletions

View File

@@ -1,5 +1,16 @@
use embedded_hal::i2c::I2c;
const DEVICE_ADDRESS: u8 = 0b10100000;
const DEVICE_ADDRESS_CODE: u8 = 0b00000000;
const DEVICE_W: u8 = 0b00000000;
const DEVICE_R: u8 = 0b00000001;
struct MB85RC<T: I2c> {
i2c: T,
}
impl<T: I2c> MB85RC<T> {
pub fn new(i2c: T) -> Self {
MB85RC { i2c }
}
}