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`]
127///module
128#[doc(alias = "CTRL")]
129pub type Ctrl = crate::Reg<ctrl::CTRLrs>;
130///Control Register
131pub mod ctrl;
132///CMD (w) register accessor: Command Register
133///
134///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).
135///
136///For information about available fields see [`mod@cmd`]
137///module
138#[doc(alias = "CMD")]
139pub type Cmd = crate::Reg<cmd::CMDrs>;
140///Command Register
141pub mod cmd;
142///STATE (r) register accessor: State Register
143///
144///You can [`read`](crate::Reg::read) this register and get [`state::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
145///
146///For information about available fields see [`mod@state`]
147///module
148#[doc(alias = "STATE")]
149pub type State = crate::Reg<state::STATErs>;
150///State Register
151pub mod state;
152///STATUS (r) register accessor: Status Register
153///
154///You can [`read`](crate::Reg::read) this register and get [`status::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
155///
156///For information about available fields see [`mod@status`]
157///module
158#[doc(alias = "STATUS")]
159pub type Status = crate::Reg<status::STATUSrs>;
160///Status Register
161pub mod status;
162///CLKDIV (rw) register accessor: Clock Division Register
163///
164///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).
165///
166///For information about available fields see [`mod@clkdiv`]
167///module
168#[doc(alias = "CLKDIV")]
169pub type Clkdiv = crate::Reg<clkdiv::CLKDIVrs>;
170///Clock Division Register
171pub mod clkdiv;
172///SADDR (rw) register accessor: Slave Address Register
173///
174///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).
175///
176///For information about available fields see [`mod@saddr`]
177///module
178#[doc(alias = "SADDR")]
179pub type Saddr = crate::Reg<saddr::SADDRrs>;
180///Slave Address Register
181pub mod saddr;
182///SADDRMASK (rw) register accessor: Slave Address Mask Register
183///
184///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).
185///
186///For information about available fields see [`mod@saddrmask`]
187///module
188#[doc(alias = "SADDRMASK")]
189pub type Saddrmask = crate::Reg<saddrmask::SADDRMASKrs>;
190///Slave Address Mask Register
191pub mod saddrmask;
192///RXDATA (r) register accessor: Receive Buffer Data Register
193///
194///You can [`read`](crate::Reg::read) this register and get [`rxdata::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
195///
196///<div class="warning">One or more dependent resources other than the current register are immediately affected by a read operation.</div>
197///
198///For information about available fields see [`mod@rxdata`]
199///module
200#[doc(alias = "RXDATA")]
201pub type Rxdata = crate::Reg<rxdata::RXDATArs>;
202///Receive Buffer Data Register
203pub mod rxdata;
204///RXDOUBLE (r) register accessor: Receive Buffer Double Data Register
205///
206///You can [`read`](crate::Reg::read) this register and get [`rxdouble::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
207///
208///<div class="warning">One or more dependent resources other than the current register are immediately affected by a read operation.</div>
209///
210///For information about available fields see [`mod@rxdouble`]
211///module
212#[doc(alias = "RXDOUBLE")]
213pub type Rxdouble = crate::Reg<rxdouble::RXDOUBLErs>;
214///Receive Buffer Double Data Register
215pub mod rxdouble;
216///RXDATAP (r) register accessor: Receive Buffer Data Peek Register
217///
218///You can [`read`](crate::Reg::read) this register and get [`rxdatap::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
219///
220///For information about available fields see [`mod@rxdatap`]
221///module
222#[doc(alias = "RXDATAP")]
223pub type Rxdatap = crate::Reg<rxdatap::RXDATAPrs>;
224///Receive Buffer Data Peek Register
225pub mod rxdatap;
226///RXDOUBLEP (r) register accessor: Receive Buffer Double Data Peek Register
227///
228///You can [`read`](crate::Reg::read) this register and get [`rxdoublep::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
229///
230///For information about available fields see [`mod@rxdoublep`]
231///module
232#[doc(alias = "RXDOUBLEP")]
233pub type Rxdoublep = crate::Reg<rxdoublep::RXDOUBLEPrs>;
234///Receive Buffer Double Data Peek Register
235pub mod rxdoublep;
236///TXDATA (rw) register accessor: Transmit Buffer Data Register
237///
238///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).
239///
240///For information about available fields see [`mod@txdata`]
241///module
242#[doc(alias = "TXDATA")]
243pub type Txdata = crate::Reg<txdata::TXDATArs>;
244///Transmit Buffer Data Register
245pub mod txdata;
246///TXDOUBLE (rw) register accessor: Transmit Buffer Double Data Register
247///
248///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).
249///
250///For information about available fields see [`mod@txdouble`]
251///module
252#[doc(alias = "TXDOUBLE")]
253pub type Txdouble = crate::Reg<txdouble::TXDOUBLErs>;
254///Transmit Buffer Double Data Register
255pub mod txdouble;
256///IF (r) register accessor: Interrupt Flag Register
257///
258///You can [`read`](crate::Reg::read) this register and get [`if_::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
259///
260///For information about available fields see [`mod@if_`]
261///module
262#[doc(alias = "IF")]
263pub type If = crate::Reg<if_::IFrs>;
264///Interrupt Flag Register
265pub mod if_;
266///IFS (w) register accessor: Interrupt Flag Set Register
267///
268///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).
269///
270///For information about available fields see [`mod@ifs`]
271///module
272#[doc(alias = "IFS")]
273pub type Ifs = crate::Reg<ifs::IFSrs>;
274///Interrupt Flag Set Register
275pub mod ifs;
276///IFC (w) register accessor: Interrupt Flag Clear Register
277///
278///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).
279///
280///For information about available fields see [`mod@ifc`]
281///module
282#[doc(alias = "IFC")]
283pub type Ifc = crate::Reg<ifc::IFCrs>;
284///Interrupt Flag Clear Register
285pub mod ifc;
286///IEN (rw) register accessor: Interrupt Enable Register
287///
288///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).
289///
290///For information about available fields see [`mod@ien`]
291///module
292#[doc(alias = "IEN")]
293pub type Ien = crate::Reg<ien::IENrs>;
294///Interrupt Enable Register
295pub mod ien;
296///ROUTEPEN (rw) register accessor: I/O Routing Pin Enable Register
297///
298///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).
299///
300///For information about available fields see [`mod@routepen`]
301///module
302#[doc(alias = "ROUTEPEN")]
303pub type Routepen = crate::Reg<routepen::ROUTEPENrs>;
304///I/O Routing Pin Enable Register
305pub mod routepen;
306///ROUTELOC0 (rw) register accessor: I/O Routing Location Register
307///
308///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).
309///
310///For information about available fields see [`mod@routeloc0`]
311///module
312#[doc(alias = "ROUTELOC0")]
313pub type Routeloc0 = crate::Reg<routeloc0::ROUTELOC0rs>;
314///I/O Routing Location Register
315pub mod routeloc0;