tof_control/helper/cpc_type.rs
1#[derive(Debug)]
2pub struct CPCTemp {
3 pub cpc_temp: f32,
4}
5
6#[derive(Debug)]
7pub enum CPCTempError {
8 /// I2C Error
9 I2C(i2cdev::linux::LinuxI2CError),
10}
11
12impl From<i2cdev::linux::LinuxI2CError> for CPCTempError {
13 fn from(e: i2cdev::linux::LinuxI2CError) -> Self {
14 CPCTempError::I2C(e)
15 }
16}