mimxrt685s_pac/
sema42.rs

1#[repr(C)]
2#[cfg_attr(feature = "debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    gate: [Gate; 16],
6    _reserved1: [u8; 0x32],
7    _reserved_1_rstgt: [u8; 0x02],
8}
9impl RegisterBlock {
10    #[doc = "0x00..0x10 - Semphores2 Gate n"]
11    #[doc = ""]
12    #[doc = "<div class=\"warning\">`n` is the index of register in the array. `n == 0` corresponds to `GATE3` register.</div>"]
13    #[inline(always)]
14    pub const fn gate(&self, n: usize) -> &Gate {
15        &self.gate[n]
16    }
17    #[doc = "Iterator for array of:"]
18    #[doc = "0x00..0x10 - Semphores2 Gate n"]
19    #[inline(always)]
20    pub fn gate_iter(&self) -> impl Iterator<Item = &Gate> {
21        self.gate.iter()
22    }
23    #[doc = "0x00 - Semphores2 Gate n"]
24    #[inline(always)]
25    pub const fn gate3(&self) -> &Gate {
26        self.gate(0)
27    }
28    #[doc = "0x01 - Semphores2 Gate n"]
29    #[inline(always)]
30    pub const fn gate2(&self) -> &Gate {
31        self.gate(1)
32    }
33    #[doc = "0x02 - Semphores2 Gate n"]
34    #[inline(always)]
35    pub const fn gate1(&self) -> &Gate {
36        self.gate(2)
37    }
38    #[doc = "0x03 - Semphores2 Gate n"]
39    #[inline(always)]
40    pub const fn gate0(&self) -> &Gate {
41        self.gate(3)
42    }
43    #[doc = "0x04 - Semphores2 Gate n"]
44    #[inline(always)]
45    pub const fn gate7(&self) -> &Gate {
46        self.gate(4)
47    }
48    #[doc = "0x05 - Semphores2 Gate n"]
49    #[inline(always)]
50    pub const fn gate6(&self) -> &Gate {
51        self.gate(5)
52    }
53    #[doc = "0x06 - Semphores2 Gate n"]
54    #[inline(always)]
55    pub const fn gate5(&self) -> &Gate {
56        self.gate(6)
57    }
58    #[doc = "0x07 - Semphores2 Gate n"]
59    #[inline(always)]
60    pub const fn gate4(&self) -> &Gate {
61        self.gate(7)
62    }
63    #[doc = "0x08 - Semphores2 Gate n"]
64    #[inline(always)]
65    pub const fn gate11(&self) -> &Gate {
66        self.gate(8)
67    }
68    #[doc = "0x09 - Semphores2 Gate n"]
69    #[inline(always)]
70    pub const fn gate10(&self) -> &Gate {
71        self.gate(9)
72    }
73    #[doc = "0x0a - Semphores2 Gate n"]
74    #[inline(always)]
75    pub const fn gate9(&self) -> &Gate {
76        self.gate(10)
77    }
78    #[doc = "0x0b - Semphores2 Gate n"]
79    #[inline(always)]
80    pub const fn gate8(&self) -> &Gate {
81        self.gate(11)
82    }
83    #[doc = "0x0c - Semphores2 Gate n"]
84    #[inline(always)]
85    pub const fn gate15(&self) -> &Gate {
86        self.gate(12)
87    }
88    #[doc = "0x0d - Semphores2 Gate n"]
89    #[inline(always)]
90    pub const fn gate14(&self) -> &Gate {
91        self.gate(13)
92    }
93    #[doc = "0x0e - Semphores2 Gate n"]
94    #[inline(always)]
95    pub const fn gate13(&self) -> &Gate {
96        self.gate(14)
97    }
98    #[doc = "0x0f - Semphores2 Gate n"]
99    #[inline(always)]
100    pub const fn gate12(&self) -> &Gate {
101        self.gate(15)
102    }
103    #[doc = "0x42 - Reset Gate Write"]
104    #[inline(always)]
105    pub const fn rstgt_w(&self) -> &RstgtW {
106        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(66).cast() }
107    }
108    #[doc = "0x42 - Reset Gate Read"]
109    #[inline(always)]
110    pub const fn rstgt_r(&self) -> &RstgtR {
111        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(66).cast() }
112    }
113}
114#[doc = "GATE (rw) register accessor: Semphores2 Gate n\n\nYou can [`read`](crate::Reg::read) this register and get [`gate::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gate::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@gate`]
115module"]
116#[doc(alias = "GATE")]
117pub type Gate = crate::Reg<gate::GateSpec>;
118#[doc = "Semphores2 Gate n"]
119pub mod gate;
120#[doc = "RSTGT_R (r) register accessor: Reset Gate Read\n\nYou can [`read`](crate::Reg::read) this register and get [`rstgt_r::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rstgt_r`]
121module"]
122#[doc(alias = "RSTGT_R")]
123pub type RstgtR = crate::Reg<rstgt_r::RstgtRSpec>;
124#[doc = "Reset Gate Read"]
125pub mod rstgt_r;
126#[doc = "RSTGT_W (w) register accessor: Reset Gate Write\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rstgt_w::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rstgt_w`]
127module"]
128#[doc(alias = "RSTGT_W")]
129pub type RstgtW = crate::Reg<rstgt_w::RstgtWSpec>;
130#[doc = "Reset Gate Write"]
131pub mod rstgt_w;