pub struct Configuration { /* private fields */ }Expand description
Configuration register of the tpm117
Implementations§
Source§impl Configuration
impl Configuration
pub fn new( reset: bool, dr_alert: AlertPinSelect, polarity: Polarity, trigger_mode: TriggerMode, average: Average, conversion: Conversion, mode: ConversionMode, eeprom_busy: bool, data_ready: bool, low_alert: bool, high_alert: bool, ) -> Self
Sourcepub fn reset(&self) -> bool
pub fn reset(&self) -> bool
Software reset. When enabled, cause a reset with a duration of 2ms. The bit will always read back 0
Sourcepub fn set_reset(&mut self, value: bool)
pub fn set_reset(&mut self, value: bool)
Software reset. When enabled, cause a reset with a duration of 2ms. The bit will always read back 0
Sourcepub fn dr_alert(&self) -> AlertPinSelect
pub fn dr_alert(&self) -> AlertPinSelect
Data ready or Alert pin select bit.
Sourcepub fn set_dr_alert(&mut self, value: AlertPinSelect)
pub fn set_dr_alert(&mut self, value: AlertPinSelect)
Data ready or Alert pin select bit.
Sourcepub fn set_polarity(&mut self, value: Polarity)
pub fn set_polarity(&mut self, value: Polarity)
Alert pin polarity.
Sourcepub fn trigger_mode(&self) -> TriggerMode
pub fn trigger_mode(&self) -> TriggerMode
Thermal/alert mode select
Sourcepub fn set_trigger_mode(&mut self, value: TriggerMode)
pub fn set_trigger_mode(&mut self, value: TriggerMode)
Thermal/alert mode select
Sourcepub fn set_average(&mut self, value: Average)
pub fn set_average(&mut self, value: Average)
Average used for the conversion
Sourcepub fn conversion(&self) -> Conversion
pub fn conversion(&self) -> Conversion
Conversion cycle
Sourcepub fn set_conversion(&mut self, value: Conversion)
pub fn set_conversion(&mut self, value: Conversion)
Conversion cycle
Sourcepub fn mode(&self) -> ConversionMode
pub fn mode(&self) -> ConversionMode
Conversion mode
Sourcepub fn set_mode(&mut self, value: ConversionMode)
pub fn set_mode(&mut self, value: ConversionMode)
Conversion mode
Sourcepub fn eeprom_busy(&self) -> bool
pub fn eeprom_busy(&self) -> bool
EEPROM busy flag, either caused by programming or power-up
Sourcepub fn set_eeprom_busy(&mut self, value: bool)
pub fn set_eeprom_busy(&mut self, value: bool)
EEPROM busy flag, either caused by programming or power-up
Sourcepub fn data_ready(&self) -> bool
pub fn data_ready(&self) -> bool
Data ready flag. This flag indicates that the conversion is complete and the temperature register can be read. Every time the temperature register or configuration register is read, this bit is cleared. This bit is set at the end of the conversion when the temperature register is updated. Data ready can be monitored on the ALERT pin by setting bit 2 of the configuration register.
Sourcepub fn set_data_ready(&mut self, value: bool)
pub fn set_data_ready(&mut self, value: bool)
Data ready flag. This flag indicates that the conversion is complete and the temperature register can be read. Every time the temperature register or configuration register is read, this bit is cleared. This bit is set at the end of the conversion when the temperature register is updated. Data ready can be monitored on the ALERT pin by setting bit 2 of the configuration register.
Sourcepub fn low_alert(&self) -> bool
pub fn low_alert(&self) -> bool
Alert mode: Set when the conversion result is lower than the low limit. Cleared when read. Thermal mode: Always 0 in Thermal mode.
Sourcepub fn set_low_alert(&mut self, value: bool)
pub fn set_low_alert(&mut self, value: bool)
Alert mode: Set when the conversion result is lower than the low limit. Cleared when read. Thermal mode: Always 0 in Thermal mode.
Sourcepub fn high_alert(&self) -> bool
pub fn high_alert(&self) -> bool
Alert mode: Set when the conversion result is higher than the high limit. Cleared when read. Thermal mode: Set when the conversion result is higher than the therm limit Cleared when the conversion result is lower than the hysteresis
Sourcepub fn set_high_alert(&mut self, value: bool)
pub fn set_high_alert(&mut self, value: bool)
Alert mode: Set when the conversion result is higher than the high limit. Cleared when read. Thermal mode: Set when the conversion result is higher than the therm limit Cleared when the conversion result is lower than the hysteresis
Trait Implementations§
Source§impl Bitsized for Configuration
impl Bitsized for Configuration
Source§impl Clone for Configuration
impl Clone for Configuration
Source§fn clone(&self) -> Configuration
fn clone(&self) -> Configuration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more