emc230x 0.3.0

An async driver for the EMC230x family of fan controllers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::RegisterOffset;
use emc230x_macros::RegisterOffset;

bitfield::bitfield! {
    #[derive(Clone, Copy, RegisterOffset)]
    #[register(offset = 0x09, default = 0xF5)]
    pub struct ValidTachCount(u8);
    impl Debug;

    /// Valid Tach Count
    pub fxvt, set_fxvt: 7, 0;
}

impl ValidTachCount {
    pub fn max_tach_count(&self) -> u16 {
        (self.0 as u16) << 5_u16
    }
}