use thiserror for protocol error type

This commit is contained in:
2026-01-05 17:26:05 +01:00
parent bb9e232005
commit d2c35dc601
3 changed files with 5 additions and 0 deletions
+3
View File
@@ -1,6 +1,7 @@
#![no_std]
use embedded_hal::i2c::{I2c, Operation, SevenBitAddress};
use thiserror::Error;
pub const BMS_I2C_ADDRESS: u8 = 0x55;
@@ -17,7 +18,9 @@ pub trait BmsWriteable {
I: I2c<SevenBitAddress>;
}
#[derive(Debug, Error)]
pub enum BmsProtocolError {
#[error("i2c communication failed")]
I2cCommunicationError,
}