Trait ltc681x::monitor::DeviceTypes
source · pub trait DeviceTypes: Send + Sync + Sized + 'static {
type CellSelection: ToCommandBitmap + ToCommandTiming + RegisterLocator<Self> + Copy + Clone + Send + Sync;
type GPIOSelection: ToCommandBitmap + ToCommandTiming + RegisterLocator<Self> + Copy + Clone + Send + Sync;
type Register: ToFullCommand + GroupedRegisterIndex + Copy + Clone + Send + Sync;
type Channel: ChannelIndex + Into<ChannelType> + Copy + Clone + Send + Sync;
const CELL_COUNT: usize;
const GPIO_COUNT: usize;
const OVERLAP_TEST_REG_1: Option<Self::Register>;
const OVERLAP_TEST_REG_2: Option<Self::Register>;
const REG_STATUS_A: Self::Register;
const REG_STATUS_B: Self::Register;
const REG_CONF_A: Self::Register;
const REG_CONF_B: Option<Self::Register>;
}
Expand description
Device specific types
Required Associated Types§
sourcetype CellSelection: ToCommandBitmap + ToCommandTiming + RegisterLocator<Self> + Copy + Clone + Send + Sync
type CellSelection: ToCommandBitmap + ToCommandTiming + RegisterLocator<Self> + Copy + Clone + Send + Sync
Argument for the identification of cell groups, which depends on the exact device type.
sourcetype GPIOSelection: ToCommandBitmap + ToCommandTiming + RegisterLocator<Self> + Copy + Clone + Send + Sync
type GPIOSelection: ToCommandBitmap + ToCommandTiming + RegisterLocator<Self> + Copy + Clone + Send + Sync
Argument for the identification of GPIO groups, which depends on the exact device type.
sourcetype Register: ToFullCommand + GroupedRegisterIndex + Copy + Clone + Send + Sync
type Register: ToFullCommand + GroupedRegisterIndex + Copy + Clone + Send + Sync
Argument for register selection. The available registers depend on the device.
sourcetype Channel: ChannelIndex + Into<ChannelType> + Copy + Clone + Send + Sync
type Channel: ChannelIndex + Into<ChannelType> + Copy + Clone + Send + Sync
Available cells and GPIOs
Required Associated Constants§
sourceconst CELL_COUNT: usize
const CELL_COUNT: usize
Number of battery cells supported by the device
sourceconst GPIO_COUNT: usize
const GPIO_COUNT: usize
Number of GPIO channels
sourceconst OVERLAP_TEST_REG_1: Option<Self::Register>
const OVERLAP_TEST_REG_1: Option<Self::Register>
Defines the first register storing the results of overlap measurement. None in case overlap test is not supported.
sourceconst OVERLAP_TEST_REG_2: Option<Self::Register>
const OVERLAP_TEST_REG_2: Option<Self::Register>
Defines the second register storing the results of overlap measurement. None in case just one cell is ued for overlap test or if test is no supported at all.
sourceconst REG_STATUS_A: Self::Register
const REG_STATUS_A: Self::Register
Status group A register
sourceconst REG_STATUS_B: Self::Register
const REG_STATUS_B: Self::Register
Status group b register
sourceconst REG_CONF_A: Self::Register
const REG_CONF_A: Self::Register
Configuration register A
sourceconst REG_CONF_B: Option<Self::Register>
const REG_CONF_B: Option<Self::Register>
Configuration register B, None in case device type has no second configuration register