pub struct Alerts {
pub high: bool,
pub low: bool,
}Expand description
The two alert flags the part sets at the end of every conversion.
§Examples
use pamoja_sensors::tmp117::Alerts;
// Table 7-6: HIGH_Alert is bit 15 and LOW_Alert bit 14 of the configuration register.
let alerts = Alerts::from_bits(0x8220);
assert!(alerts.high);
assert!(!alerts.low);
assert_eq!(alerts | Alerts { high: false, low: true }, Alerts { high: true, low: true });Fields§
§high: boolA result was above the high limit.
low: boolA result was below the low limit.
Implementations§
Trait Implementations§
impl Copy for Alerts
impl Eq for Alerts
impl StructuralPartialEq for Alerts
Auto Trait Implementations§
impl Freeze for Alerts
impl RefUnwindSafe for Alerts
impl Send for Alerts
impl Sync for Alerts
impl Unpin for Alerts
impl UnsafeUnpin for Alerts
impl UnwindSafe for Alerts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more