1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) 2024 Jake Swensen
// SPDX-License-Identifier: MPL-2.0
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
use super::RegisterAddress;
use emc230x_macros::RegisterAddress;
bitfield::bitfield! {
/// The Fan Status register indicates that the fan driver has stalled, failed, or
/// the Watchdog Timer has expired.
#[derive(Clone, Copy, RegisterAddress)]
#[register(address = 0x24, default = 0x00)]
pub struct FanStatus(u8);
impl Debug;
/// Watchdog Timer Status
///
/// When the bit is set, each fan is driven to 100% duty cycle until they are
/// programmed. The bit is cleared when it is read.
///
/// 0: Watchdog Timer has not expired.
///
/// 1: Watchdog Timer has expired.
pub watch, _: 7;
/// Drive Fail Status
///
/// Indicates that one or more fan drivers cannot meet the programmed fan speed at
/// maximum duty cycle.
///
/// 0: All bits in Fan Drive Fail Status register are clear.
///
/// 1: Any bit in the Fan Drive Fail Status register is set.
pub dvfail, _: 2;
/// Fan Spin Status
///
/// Indicates that one or more fan drivers cannot spin up.
///
/// 0: All bits in the Fan Spin Status register are clear.
///
/// 1: Any bit in the Fan Spin Status register is set.
pub fnspin, _: 1;
/// Fan Stall Status
///
/// Indicates that one or more fan drivers are stalled.
///
/// 0: All bits in the Fan Stall Status register are clear.
///
/// 1: Any bit in the Fan Stall Status register is set.
pub fnstl, _: 0;
}