atsam3n4c/
twi1.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    cr: Cr,
5    mmr: Mmr,
6    smr: Smr,
7    iadr: Iadr,
8    cwgr: Cwgr,
9    _reserved5: [u8; 0x0c],
10    sr: Sr,
11    ier: Ier,
12    idr: Idr,
13    imr: Imr,
14    rhr: Rhr,
15    thr: Thr,
16}
17impl RegisterBlock {
18    #[doc = "0x00 - Control Register"]
19    #[inline(always)]
20    pub const fn cr(&self) -> &Cr {
21        &self.cr
22    }
23    #[doc = "0x04 - Master Mode Register"]
24    #[inline(always)]
25    pub const fn mmr(&self) -> &Mmr {
26        &self.mmr
27    }
28    #[doc = "0x08 - Slave Mode Register"]
29    #[inline(always)]
30    pub const fn smr(&self) -> &Smr {
31        &self.smr
32    }
33    #[doc = "0x0c - Internal Address Register"]
34    #[inline(always)]
35    pub const fn iadr(&self) -> &Iadr {
36        &self.iadr
37    }
38    #[doc = "0x10 - Clock Waveform Generator Register"]
39    #[inline(always)]
40    pub const fn cwgr(&self) -> &Cwgr {
41        &self.cwgr
42    }
43    #[doc = "0x20 - Status Register"]
44    #[inline(always)]
45    pub const fn sr(&self) -> &Sr {
46        &self.sr
47    }
48    #[doc = "0x24 - Interrupt Enable Register"]
49    #[inline(always)]
50    pub const fn ier(&self) -> &Ier {
51        &self.ier
52    }
53    #[doc = "0x28 - Interrupt Disable Register"]
54    #[inline(always)]
55    pub const fn idr(&self) -> &Idr {
56        &self.idr
57    }
58    #[doc = "0x2c - Interrupt Mask Register"]
59    #[inline(always)]
60    pub const fn imr(&self) -> &Imr {
61        &self.imr
62    }
63    #[doc = "0x30 - Receive Holding Register"]
64    #[inline(always)]
65    pub const fn rhr(&self) -> &Rhr {
66        &self.rhr
67    }
68    #[doc = "0x34 - Transmit Holding Register"]
69    #[inline(always)]
70    pub const fn thr(&self) -> &Thr {
71        &self.thr
72    }
73}
74#[doc = "CR (w) register accessor: Control Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@cr`]
75module"]
76#[doc(alias = "CR")]
77pub type Cr = crate::Reg<cr::CrSpec>;
78#[doc = "Control Register"]
79pub mod cr;
80#[doc = "MMR (rw) register accessor: Master Mode Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`mmr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`mmr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@mmr`]
81module"]
82#[doc(alias = "MMR")]
83pub type Mmr = crate::Reg<mmr::MmrSpec>;
84#[doc = "Master Mode Register"]
85pub mod mmr;
86#[doc = "SMR (rw) register accessor: Slave Mode Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`smr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`smr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@smr`]
87module"]
88#[doc(alias = "SMR")]
89pub type Smr = crate::Reg<smr::SmrSpec>;
90#[doc = "Slave Mode Register"]
91pub mod smr;
92#[doc = "IADR (rw) register accessor: Internal Address Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`iadr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`iadr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@iadr`]
93module"]
94#[doc(alias = "IADR")]
95pub type Iadr = crate::Reg<iadr::IadrSpec>;
96#[doc = "Internal Address Register"]
97pub mod iadr;
98#[doc = "CWGR (rw) register accessor: Clock Waveform Generator Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cwgr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cwgr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@cwgr`]
99module"]
100#[doc(alias = "CWGR")]
101pub type Cwgr = crate::Reg<cwgr::CwgrSpec>;
102#[doc = "Clock Waveform Generator Register"]
103pub mod cwgr;
104#[doc = "SR (r) register accessor: Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`sr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sr`]
105module"]
106#[doc(alias = "SR")]
107pub type Sr = crate::Reg<sr::SrSpec>;
108#[doc = "Status Register"]
109pub mod sr;
110#[doc = "IER (w) register accessor: Interrupt Enable Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ier::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ier`]
111module"]
112#[doc(alias = "IER")]
113pub type Ier = crate::Reg<ier::IerSpec>;
114#[doc = "Interrupt Enable Register"]
115pub mod ier;
116#[doc = "IDR (w) register accessor: Interrupt Disable Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`idr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@idr`]
117module"]
118#[doc(alias = "IDR")]
119pub type Idr = crate::Reg<idr::IdrSpec>;
120#[doc = "Interrupt Disable Register"]
121pub mod idr;
122#[doc = "IMR (r) register accessor: Interrupt Mask Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`imr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@imr`]
123module"]
124#[doc(alias = "IMR")]
125pub type Imr = crate::Reg<imr::ImrSpec>;
126#[doc = "Interrupt Mask Register"]
127pub mod imr;
128#[doc = "RHR (r) register accessor: Receive Holding Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rhr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rhr`]
129module"]
130#[doc(alias = "RHR")]
131pub type Rhr = crate::Reg<rhr::RhrSpec>;
132#[doc = "Receive Holding Register"]
133pub mod rhr;
134#[doc = "THR (w) register accessor: Transmit Holding Register\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`thr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@thr`]
135module"]
136#[doc(alias = "THR")]
137pub type Thr = crate::Reg<thr::ThrSpec>;
138#[doc = "Transmit Holding Register"]
139pub mod thr;