pub struct BattboxEfuse(/* private fields */);Implementations§
Source§impl BattboxEfuse
impl BattboxEfuse
Sourcepub const fn with_ADC_checked(self, value: u16) -> Result<Self, ()>
pub const fn with_ADC_checked(self, value: u16) -> Result<Self, ()>
Raw ADC Value.
Ranges from 0 to 4095.
Bits: 0..16
Sourcepub const fn with_ADC(self, value: u16) -> Self
pub const fn with_ADC(self, value: u16) -> Self
Raw ADC Value.
Ranges from 0 to 4095.
Bits: 0..16
Sourcepub const fn set_ADC_checked(&mut self, value: u16) -> Result<(), ()>
pub const fn set_ADC_checked(&mut self, value: u16) -> Result<(), ()>
Raw ADC Value.
Ranges from 0 to 4095.
Bits: 0..16
Sourcepub const fn with_voltage_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_voltage_checked(self, value: f32) -> Result<Self, ()>
Battbox eFuse Voltage
Units: V
Bits: 16..32
Sourcepub const fn with_voltage(self, value: f32) -> Self
pub const fn with_voltage(self, value: f32) -> Self
Battbox eFuse Voltage
Units: V
Bits: 16..32
Sourcepub const fn set_voltage(&mut self, value: f32)
pub const fn set_voltage(&mut self, value: f32)
Battbox eFuse Voltage
Units: V
Bits: 16..32
Sourcepub const fn set_voltage_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_voltage_checked(&mut self, value: f32) -> Result<(), ()>
Battbox eFuse Voltage
Units: V
Bits: 16..32
Sourcepub const fn with_current_checked(self, value: f32) -> Result<Self, ()>
pub const fn with_current_checked(self, value: f32) -> Result<Self, ()>
Battbox eFuse Current.
Units: A
Bits: 32..48
Sourcepub const fn with_current(self, value: f32) -> Self
pub const fn with_current(self, value: f32) -> Self
Battbox eFuse Current.
Units: A
Bits: 32..48
Sourcepub const fn set_current(&mut self, value: f32)
pub const fn set_current(&mut self, value: f32)
Battbox eFuse Current.
Units: A
Bits: 32..48
Sourcepub const fn set_current_checked(&mut self, value: f32) -> Result<(), ()>
pub const fn set_current_checked(&mut self, value: f32) -> Result<(), ()>
Battbox eFuse Current.
Units: A
Bits: 32..48
Sourcepub const fn is_faulted(&self) -> u8
pub const fn is_faulted(&self) -> u8
The state of the Battbox eFuse’s fault pin.
Bits: 48..52
Sourcepub const fn with_is_faulted_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_is_faulted_checked(self, value: u8) -> Result<Self, ()>
The state of the Battbox eFuse’s fault pin.
Bits: 48..52
Sourcepub const fn with_is_faulted(self, value: u8) -> Self
pub const fn with_is_faulted(self, value: u8) -> Self
The state of the Battbox eFuse’s fault pin.
Bits: 48..52
Sourcepub const fn set_is_faulted(&mut self, value: u8)
pub const fn set_is_faulted(&mut self, value: u8)
The state of the Battbox eFuse’s fault pin.
Bits: 48..52
Sourcepub const fn set_is_faulted_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_is_faulted_checked(&mut self, value: u8) -> Result<(), ()>
The state of the Battbox eFuse’s fault pin.
Bits: 48..52
Sourcepub const fn is_enabled(&self) -> u8
pub const fn is_enabled(&self) -> u8
The state of the Battbox eFuse’s Enable pin.
Bits: 52..56
Sourcepub const fn with_is_enabled_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_is_enabled_checked(self, value: u8) -> Result<Self, ()>
The state of the Battbox eFuse’s Enable pin.
Bits: 52..56
Sourcepub const fn with_is_enabled(self, value: u8) -> Self
pub const fn with_is_enabled(self, value: u8) -> Self
The state of the Battbox eFuse’s Enable pin.
Bits: 52..56
Sourcepub const fn set_is_enabled(&mut self, value: u8)
pub const fn set_is_enabled(&mut self, value: u8)
The state of the Battbox eFuse’s Enable pin.
Bits: 52..56
Sourcepub const fn set_is_enabled_checked(&mut self, value: u8) -> Result<(), ()>
pub const fn set_is_enabled_checked(&mut self, value: u8) -> Result<(), ()>
The state of the Battbox eFuse’s Enable pin.
Bits: 52..56
Sourcepub const fn control_state(&self) -> u8
pub const fn control_state(&self) -> u8
The eFuse’s control state.
This is a car command originating from Calypso, but tracked by VCU. 0=ON, 1=AUTO, 2=OFF.
Bits: 56..64
Sourcepub const fn with_control_state_checked(self, value: u8) -> Result<Self, ()>
pub const fn with_control_state_checked(self, value: u8) -> Result<Self, ()>
The eFuse’s control state.
This is a car command originating from Calypso, but tracked by VCU. 0=ON, 1=AUTO, 2=OFF.
Bits: 56..64
Sourcepub const fn with_control_state(self, value: u8) -> Self
pub const fn with_control_state(self, value: u8) -> Self
The eFuse’s control state.
This is a car command originating from Calypso, but tracked by VCU. 0=ON, 1=AUTO, 2=OFF.
Bits: 56..64
Sourcepub const fn set_control_state(&mut self, value: u8)
pub const fn set_control_state(&mut self, value: u8)
The eFuse’s control state.
This is a car command originating from Calypso, but tracked by VCU. 0=ON, 1=AUTO, 2=OFF.
Bits: 56..64
Source§impl BattboxEfuse
impl BattboxEfuse
Sourcepub fn try_with_voltage(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_voltage(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_voltage but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_voltage(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_voltage(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_voltage but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_with_current(self, v: f32) -> Result<Self, OutOfRange>
pub fn try_with_current(self, v: f32) -> Result<Self, OutOfRange>
Like Self::with_current but returns
OutOfRange instead of saturating an unrepresentable value.
Sourcepub fn try_set_current(&mut self, v: f32) -> Result<(), OutOfRange>
pub fn try_set_current(&mut self, v: f32) -> Result<(), OutOfRange>
Like Self::set_current but returns
OutOfRange instead of saturating an unrepresentable value.
Trait Implementations§
Source§impl Clone for BattboxEfuse
impl Clone for BattboxEfuse
Source§fn clone(&self) -> BattboxEfuse
fn clone(&self) -> BattboxEfuse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more