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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#[doc = "Register `EEP_CONF` reader"]
pub type R = crate::R<EEP_CONF_SPEC>;
#[doc = "EEPROM control is offered to PDI\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TO_PDI_A {
    #[doc = "0: No"]
    VALUE1 = 0,
    #[doc = "1: Yes (PDI has EEPROM control)"]
    VALUE2 = 1,
}
impl From<TO_PDI_A> for bool {
    #[inline(always)]
    fn from(variant: TO_PDI_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TO_PDI` reader - EEPROM control is offered to PDI"]
pub type TO_PDI_R = crate::BitReader<TO_PDI_A>;
impl TO_PDI_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> TO_PDI_A {
        match self.bits {
            false => TO_PDI_A::VALUE1,
            true => TO_PDI_A::VALUE2,
        }
    }
    #[doc = "No"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == TO_PDI_A::VALUE1
    }
    #[doc = "Yes (PDI has EEPROM control)"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == TO_PDI_A::VALUE2
    }
}
#[doc = "Force ECAT access\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FORCE_A {
    #[doc = "0: Do not change Bit 501.0"]
    VALUE1 = 0,
    #[doc = "1: Reset Bit 501.0 to 0"]
    VALUE2 = 1,
}
impl From<FORCE_A> for bool {
    #[inline(always)]
    fn from(variant: FORCE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `FORCE` reader - Force ECAT access"]
pub type FORCE_R = crate::BitReader<FORCE_A>;
impl FORCE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> FORCE_A {
        match self.bits {
            false => FORCE_A::VALUE1,
            true => FORCE_A::VALUE2,
        }
    }
    #[doc = "Do not change Bit 501.0"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == FORCE_A::VALUE1
    }
    #[doc = "Reset Bit 501.0 to 0"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == FORCE_A::VALUE2
    }
}
impl R {
    #[doc = "Bit 0 - EEPROM control is offered to PDI"]
    #[inline(always)]
    pub fn to_pdi(&self) -> TO_PDI_R {
        TO_PDI_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Force ECAT access"]
    #[inline(always)]
    pub fn force(&self) -> FORCE_R {
        FORCE_R::new(((self.bits >> 1) & 1) != 0)
    }
}
#[doc = "EEPROM Configuration\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`eep_conf::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct EEP_CONF_SPEC;
impl crate::RegisterSpec for EEP_CONF_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [`eep_conf::R`](R) reader structure"]
impl crate::Readable for EEP_CONF_SPEC {}
#[doc = "`reset()` method sets EEP_CONF to value 0"]
impl crate::Resettable for EEP_CONF_SPEC {
    const RESET_VALUE: u8 = 0;
}