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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#[doc = "Register `ISTAT` reader"]
pub type R = crate::R<IstatSpec>;
#[doc = "Port input data 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Istat0 {
    #[doc = "0: Input is logic low"]
    Low = 0,
    #[doc = "1: Input is logic high"]
    High = 1,
}
impl From<Istat0> for bool {
    #[inline(always)]
    fn from(variant: Istat0) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `ISTAT0` reader - Port input data 0"]
pub type Istat0R = crate::BitReader<Istat0>;
impl Istat0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Istat0 {
        match self.bits {
            false => Istat0::Low,
            true => Istat0::High,
        }
    }
    #[doc = "Input is logic low"]
    #[inline(always)]
    pub fn is_low(&self) -> bool {
        *self == Istat0::Low
    }
    #[doc = "Input is logic high"]
    #[inline(always)]
    pub fn is_high(&self) -> bool {
        *self == Istat0::High
    }
}
#[doc = "Field `ISTAT1` reader - Port input data 1"]
pub use Istat0R as Istat1R;
#[doc = "Field `ISTAT2` reader - Port input data 2"]
pub use Istat0R as Istat2R;
#[doc = "Field `ISTAT3` reader - Port input data 3"]
pub use Istat0R as Istat3R;
#[doc = "Field `ISTAT4` reader - Port input data 4"]
pub use Istat0R as Istat4R;
#[doc = "Field `ISTAT5` reader - Port input data 5"]
pub use Istat0R as Istat5R;
#[doc = "Field `ISTAT6` reader - Port input data 6"]
pub use Istat0R as Istat6R;
#[doc = "Field `ISTAT7` reader - Port input data 7"]
pub use Istat0R as Istat7R;
#[doc = "Field `ISTAT8` reader - Port input data 8"]
pub use Istat0R as Istat8R;
#[doc = "Field `ISTAT9` reader - Port input data 9"]
pub use Istat0R as Istat9R;
#[doc = "Field `ISTAT10` reader - Port input data 10"]
pub use Istat0R as Istat10R;
#[doc = "Field `ISTAT11` reader - Port input data 11"]
pub use Istat0R as Istat11R;
#[doc = "Field `ISTAT12` reader - Port input data 12"]
pub use Istat0R as Istat12R;
#[doc = "Field `ISTAT13` reader - Port input data 13"]
pub use Istat0R as Istat13R;
#[doc = "Field `ISTAT14` reader - Port input data 14"]
pub use Istat0R as Istat14R;
#[doc = "Field `ISTAT15` reader - Port input data 14"]
pub use Istat0R as Istat15R;
impl R {
    #[doc = "Bit 0 - Port input data 0"]
    #[inline(always)]
    pub fn istat0(&self) -> Istat0R {
        Istat0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Port input data 1"]
    #[inline(always)]
    pub fn istat1(&self) -> Istat1R {
        Istat1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Port input data 2"]
    #[inline(always)]
    pub fn istat2(&self) -> Istat2R {
        Istat2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Port input data 3"]
    #[inline(always)]
    pub fn istat3(&self) -> Istat3R {
        Istat3R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Port input data 4"]
    #[inline(always)]
    pub fn istat4(&self) -> Istat4R {
        Istat4R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Port input data 5"]
    #[inline(always)]
    pub fn istat5(&self) -> Istat5R {
        Istat5R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Port input data 6"]
    #[inline(always)]
    pub fn istat6(&self) -> Istat6R {
        Istat6R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - Port input data 7"]
    #[inline(always)]
    pub fn istat7(&self) -> Istat7R {
        Istat7R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - Port input data 8"]
    #[inline(always)]
    pub fn istat8(&self) -> Istat8R {
        Istat8R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - Port input data 9"]
    #[inline(always)]
    pub fn istat9(&self) -> Istat9R {
        Istat9R::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - Port input data 10"]
    #[inline(always)]
    pub fn istat10(&self) -> Istat10R {
        Istat10R::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - Port input data 11"]
    #[inline(always)]
    pub fn istat11(&self) -> Istat11R {
        Istat11R::new(((self.bits >> 11) & 1) != 0)
    }
    #[doc = "Bit 12 - Port input data 12"]
    #[inline(always)]
    pub fn istat12(&self) -> Istat12R {
        Istat12R::new(((self.bits >> 12) & 1) != 0)
    }
    #[doc = "Bit 13 - Port input data 13"]
    #[inline(always)]
    pub fn istat13(&self) -> Istat13R {
        Istat13R::new(((self.bits >> 13) & 1) != 0)
    }
    #[doc = "Bit 14 - Port input data 14"]
    #[inline(always)]
    pub fn istat14(&self) -> Istat14R {
        Istat14R::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bit 15 - Port input data 14"]
    #[inline(always)]
    pub fn istat15(&self) -> Istat15R {
        Istat15R::new(((self.bits >> 15) & 1) != 0)
    }
}
#[doc = "GPIO port input data register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`istat::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct IstatSpec;
impl crate::RegisterSpec for IstatSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`istat::R`](R) reader structure"]
impl crate::Readable for IstatSpec {}
#[doc = "`reset()` method sets ISTAT to value 0"]
impl crate::Resettable for IstatSpec {
    const RESET_VALUE: u32 = 0;
}