tof_control/helper/
tcpc_type.rs

1#[derive(Debug)]
2pub struct TCPCTemp {
3    pub tcpc_temp: f32,
4}
5
6#[derive(Debug)]
7pub struct TCPCVcp {
8    pub tcpc_vcp: [f32; 3],
9}
10
11#[derive(Debug)]
12pub enum TCPCTempError {
13    /// I2C Error
14    I2C(i2cdev::linux::LinuxI2CError),
15}
16
17impl From<i2cdev::linux::LinuxI2CError> for TCPCTempError {
18    fn from(e: i2cdev::linux::LinuxI2CError) -> Self {
19        TCPCTempError::I2C(e)
20    }
21}
22
23#[derive(Debug)]
24pub enum TCPCVcpError {
25    /// I2C Error
26    I2C(i2cdev::linux::LinuxI2CError),
27}
28
29impl From<i2cdev::linux::LinuxI2CError> for TCPCVcpError {
30    fn from(e: i2cdev::linux::LinuxI2CError) -> Self {
31        TCPCVcpError::I2C(e)
32    }
33}