efm32pg1b_pac/i2c0.rs
1#[repr(C)]
2#[derive(Debug)]
3///Register block
4pub struct RegisterBlock {
5 ctrl: Ctrl,
6 cmd: Cmd,
7 state: State,
8 status: Status,
9 clkdiv: Clkdiv,
10 saddr: Saddr,
11 saddrmask: Saddrmask,
12 rxdata: Rxdata,
13 rxdouble: Rxdouble,
14 rxdatap: Rxdatap,
15 rxdoublep: Rxdoublep,
16 txdata: Txdata,
17 txdouble: Txdouble,
18 if_: If,
19 ifs: Ifs,
20 ifc: Ifc,
21 ien: Ien,
22 routepen: Routepen,
23 routeloc0: Routeloc0,
24}
25impl RegisterBlock {
26 ///0x00 - Control Register
27 #[inline(always)]
28 pub const fn ctrl(&self) -> &Ctrl {
29 &self.ctrl
30 }
31 ///0x04 - Command Register
32 #[inline(always)]
33 pub const fn cmd(&self) -> &Cmd {
34 &self.cmd
35 }
36 ///0x08 - State Register
37 #[inline(always)]
38 pub const fn state(&self) -> &State {
39 &self.state
40 }
41 ///0x0c - Status Register
42 #[inline(always)]
43 pub const fn status(&self) -> &Status {
44 &self.status
45 }
46 ///0x10 - Clock Division Register
47 #[inline(always)]
48 pub const fn clkdiv(&self) -> &Clkdiv {
49 &self.clkdiv
50 }
51 ///0x14 - Slave Address Register
52 #[inline(always)]
53 pub const fn saddr(&self) -> &Saddr {
54 &self.saddr
55 }
56 ///0x18 - Slave Address Mask Register
57 #[inline(always)]
58 pub const fn saddrmask(&self) -> &Saddrmask {
59 &self.saddrmask
60 }
61 ///0x1c - Receive Buffer Data Register
62 #[inline(always)]
63 pub const fn rxdata(&self) -> &Rxdata {
64 &self.rxdata
65 }
66 ///0x20 - Receive Buffer Double Data Register
67 #[inline(always)]
68 pub const fn rxdouble(&self) -> &Rxdouble {
69 &self.rxdouble
70 }
71 ///0x24 - Receive Buffer Data Peek Register
72 #[inline(always)]
73 pub const fn rxdatap(&self) -> &Rxdatap {
74 &self.rxdatap
75 }
76 ///0x28 - Receive Buffer Double Data Peek Register
77 #[inline(always)]
78 pub const fn rxdoublep(&self) -> &Rxdoublep {
79 &self.rxdoublep
80 }
81 ///0x2c - Transmit Buffer Data Register
82 #[inline(always)]
83 pub const fn txdata(&self) -> &Txdata {
84 &self.txdata
85 }
86 ///0x30 - Transmit Buffer Double Data Register
87 #[inline(always)]
88 pub const fn txdouble(&self) -> &Txdouble {
89 &self.txdouble
90 }
91 ///0x34 - Interrupt Flag Register
92 #[inline(always)]
93 pub const fn if_(&self) -> &If {
94 &self.if_
95 }
96 ///0x38 - Interrupt Flag Set Register
97 #[inline(always)]
98 pub const fn ifs(&self) -> &Ifs {
99 &self.ifs
100 }
101 ///0x3c - Interrupt Flag Clear Register
102 #[inline(always)]
103 pub const fn ifc(&self) -> &Ifc {
104 &self.ifc
105 }
106 ///0x40 - Interrupt Enable Register
107 #[inline(always)]
108 pub const fn ien(&self) -> &Ien {
109 &self.ien
110 }
111 ///0x44 - I/O Routing Pin Enable Register
112 #[inline(always)]
113 pub const fn routepen(&self) -> &Routepen {
114 &self.routepen
115 }
116 ///0x48 - I/O Routing Location Register
117 #[inline(always)]
118 pub const fn routeloc0(&self) -> &Routeloc0 {
119 &self.routeloc0
120 }
121}
122///CTRL (rw) register accessor: Control Register
123///
124///You can [`read`](crate::Reg::read) this register and get [`ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
125///
126///For information about available fields see [`mod@ctrl`] module
127#[doc(alias = "CTRL")]
128pub type Ctrl = crate::Reg<ctrl::CTRLrs>;
129///Control Register
130pub mod ctrl;
131///CMD (w) register accessor: Command Register
132///
133///You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmd::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
134///
135///For information about available fields see [`mod@cmd`] module
136#[doc(alias = "CMD")]
137pub type Cmd = crate::Reg<cmd::CMDrs>;
138///Command Register
139pub mod cmd;
140///STATE (r) register accessor: State Register
141///
142///You can [`read`](crate::Reg::read) this register and get [`state::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
143///
144///For information about available fields see [`mod@state`] module
145#[doc(alias = "STATE")]
146pub type State = crate::Reg<state::STATErs>;
147///State Register
148pub mod state;
149///STATUS (r) register accessor: Status Register
150///
151///You can [`read`](crate::Reg::read) this register and get [`status::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
152///
153///For information about available fields see [`mod@status`] module
154#[doc(alias = "STATUS")]
155pub type Status = crate::Reg<status::STATUSrs>;
156///Status Register
157pub mod status;
158///CLKDIV (rw) register accessor: Clock Division Register
159///
160///You can [`read`](crate::Reg::read) this register and get [`clkdiv::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`clkdiv::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
161///
162///For information about available fields see [`mod@clkdiv`] module
163#[doc(alias = "CLKDIV")]
164pub type Clkdiv = crate::Reg<clkdiv::CLKDIVrs>;
165///Clock Division Register
166pub mod clkdiv;
167///SADDR (rw) register accessor: Slave Address Register
168///
169///You can [`read`](crate::Reg::read) this register and get [`saddr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`saddr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
170///
171///For information about available fields see [`mod@saddr`] module
172#[doc(alias = "SADDR")]
173pub type Saddr = crate::Reg<saddr::SADDRrs>;
174///Slave Address Register
175pub mod saddr;
176///SADDRMASK (rw) register accessor: Slave Address Mask Register
177///
178///You can [`read`](crate::Reg::read) this register and get [`saddrmask::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`saddrmask::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
179///
180///For information about available fields see [`mod@saddrmask`] module
181#[doc(alias = "SADDRMASK")]
182pub type Saddrmask = crate::Reg<saddrmask::SADDRMASKrs>;
183///Slave Address Mask Register
184pub mod saddrmask;
185///RXDATA (r) register accessor: Receive Buffer Data Register
186///
187///You can [`read`](crate::Reg::read) this register and get [`rxdata::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
188///
189///<div class="warning">One or more dependent resources other than the current register are immediately affected by a read operation.</div>
190///
191///For information about available fields see [`mod@rxdata`] module
192#[doc(alias = "RXDATA")]
193pub type Rxdata = crate::Reg<rxdata::RXDATArs>;
194///Receive Buffer Data Register
195pub mod rxdata;
196///RXDOUBLE (r) register accessor: Receive Buffer Double Data Register
197///
198///You can [`read`](crate::Reg::read) this register and get [`rxdouble::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
199///
200///<div class="warning">One or more dependent resources other than the current register are immediately affected by a read operation.</div>
201///
202///For information about available fields see [`mod@rxdouble`] module
203#[doc(alias = "RXDOUBLE")]
204pub type Rxdouble = crate::Reg<rxdouble::RXDOUBLErs>;
205///Receive Buffer Double Data Register
206pub mod rxdouble;
207///RXDATAP (r) register accessor: Receive Buffer Data Peek Register
208///
209///You can [`read`](crate::Reg::read) this register and get [`rxdatap::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
210///
211///For information about available fields see [`mod@rxdatap`] module
212#[doc(alias = "RXDATAP")]
213pub type Rxdatap = crate::Reg<rxdatap::RXDATAPrs>;
214///Receive Buffer Data Peek Register
215pub mod rxdatap;
216///RXDOUBLEP (r) register accessor: Receive Buffer Double Data Peek Register
217///
218///You can [`read`](crate::Reg::read) this register and get [`rxdoublep::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
219///
220///For information about available fields see [`mod@rxdoublep`] module
221#[doc(alias = "RXDOUBLEP")]
222pub type Rxdoublep = crate::Reg<rxdoublep::RXDOUBLEPrs>;
223///Receive Buffer Double Data Peek Register
224pub mod rxdoublep;
225///TXDATA (rw) register accessor: Transmit Buffer Data Register
226///
227///You can [`read`](crate::Reg::read) this register and get [`txdata::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`txdata::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
228///
229///For information about available fields see [`mod@txdata`] module
230#[doc(alias = "TXDATA")]
231pub type Txdata = crate::Reg<txdata::TXDATArs>;
232///Transmit Buffer Data Register
233pub mod txdata;
234///TXDOUBLE (rw) register accessor: Transmit Buffer Double Data Register
235///
236///You can [`read`](crate::Reg::read) this register and get [`txdouble::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`txdouble::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
237///
238///For information about available fields see [`mod@txdouble`] module
239#[doc(alias = "TXDOUBLE")]
240pub type Txdouble = crate::Reg<txdouble::TXDOUBLErs>;
241///Transmit Buffer Double Data Register
242pub mod txdouble;
243///IF (r) register accessor: Interrupt Flag Register
244///
245///You can [`read`](crate::Reg::read) this register and get [`if_::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
246///
247///For information about available fields see [`mod@if_`] module
248#[doc(alias = "IF")]
249pub type If = crate::Reg<if_::IFrs>;
250///Interrupt Flag Register
251pub mod if_;
252///IFS (w) register accessor: Interrupt Flag Set Register
253///
254///You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ifs::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
255///
256///For information about available fields see [`mod@ifs`] module
257#[doc(alias = "IFS")]
258pub type Ifs = crate::Reg<ifs::IFSrs>;
259///Interrupt Flag Set Register
260pub mod ifs;
261///IFC (w) register accessor: Interrupt Flag Clear Register
262///
263///You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ifc::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
264///
265///For information about available fields see [`mod@ifc`] module
266#[doc(alias = "IFC")]
267pub type Ifc = crate::Reg<ifc::IFCrs>;
268///Interrupt Flag Clear Register
269pub mod ifc;
270///IEN (rw) register accessor: Interrupt Enable Register
271///
272///You can [`read`](crate::Reg::read) this register and get [`ien::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ien::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
273///
274///For information about available fields see [`mod@ien`] module
275#[doc(alias = "IEN")]
276pub type Ien = crate::Reg<ien::IENrs>;
277///Interrupt Enable Register
278pub mod ien;
279///ROUTEPEN (rw) register accessor: I/O Routing Pin Enable Register
280///
281///You can [`read`](crate::Reg::read) this register and get [`routepen::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`routepen::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
282///
283///For information about available fields see [`mod@routepen`] module
284#[doc(alias = "ROUTEPEN")]
285pub type Routepen = crate::Reg<routepen::ROUTEPENrs>;
286///I/O Routing Pin Enable Register
287pub mod routepen;
288///ROUTELOC0 (rw) register accessor: I/O Routing Location Register
289///
290///You can [`read`](crate::Reg::read) this register and get [`routeloc0::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`routeloc0::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
291///
292///For information about available fields see [`mod@routeloc0`] module
293#[doc(alias = "ROUTELOC0")]
294pub type Routeloc0 = crate::Reg<routeloc0::ROUTELOC0rs>;
295///I/O Routing Location Register
296pub mod routeloc0;