atsamd51p/sercom0/
i2cs.rs

1#[repr(C)]
2#[doc = "I2C Slave Mode"]
3#[doc(alias = "I2CS")]
4pub struct I2cs {
5    ctrla: Ctrla,
6    ctrlb: Ctrlb,
7    ctrlc: Ctrlc,
8    _reserved3: [u8; 0x08],
9    intenclr: Intenclr,
10    _reserved4: [u8; 0x01],
11    intenset: Intenset,
12    _reserved5: [u8; 0x01],
13    intflag: Intflag,
14    _reserved6: [u8; 0x01],
15    status: Status,
16    syncbusy: Syncbusy,
17    _reserved8: [u8; 0x02],
18    length: Length,
19    addr: Addr,
20    data: Data,
21}
22impl I2cs {
23    #[doc = "0x00 - I2CS Control A"]
24    #[inline(always)]
25    pub const fn ctrla(&self) -> &Ctrla {
26        &self.ctrla
27    }
28    #[doc = "0x04 - I2CS Control B"]
29    #[inline(always)]
30    pub const fn ctrlb(&self) -> &Ctrlb {
31        &self.ctrlb
32    }
33    #[doc = "0x08 - I2CS Control C"]
34    #[inline(always)]
35    pub const fn ctrlc(&self) -> &Ctrlc {
36        &self.ctrlc
37    }
38    #[doc = "0x14 - I2CS Interrupt Enable Clear"]
39    #[inline(always)]
40    pub const fn intenclr(&self) -> &Intenclr {
41        &self.intenclr
42    }
43    #[doc = "0x16 - I2CS Interrupt Enable Set"]
44    #[inline(always)]
45    pub const fn intenset(&self) -> &Intenset {
46        &self.intenset
47    }
48    #[doc = "0x18 - I2CS Interrupt Flag Status and Clear"]
49    #[inline(always)]
50    pub const fn intflag(&self) -> &Intflag {
51        &self.intflag
52    }
53    #[doc = "0x1a - I2CS Status"]
54    #[inline(always)]
55    pub const fn status(&self) -> &Status {
56        &self.status
57    }
58    #[doc = "0x1c - I2CS Synchronization Busy"]
59    #[inline(always)]
60    pub const fn syncbusy(&self) -> &Syncbusy {
61        &self.syncbusy
62    }
63    #[doc = "0x22 - I2CS Length"]
64    #[inline(always)]
65    pub const fn length(&self) -> &Length {
66        &self.length
67    }
68    #[doc = "0x24 - I2CS Address"]
69    #[inline(always)]
70    pub const fn addr(&self) -> &Addr {
71        &self.addr
72    }
73    #[doc = "0x28 - I2CS Data"]
74    #[inline(always)]
75    pub const fn data(&self) -> &Data {
76        &self.data
77    }
78}
79#[doc = "CTRLA (rw) register accessor: I2CS Control A\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrla::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrla::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@ctrla`]
80module"]
81#[doc(alias = "CTRLA")]
82pub type Ctrla = crate::Reg<ctrla::CtrlaSpec>;
83#[doc = "I2CS Control A"]
84pub mod ctrla;
85#[doc = "CTRLB (rw) register accessor: I2CS Control B\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrlb::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlb::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@ctrlb`]
86module"]
87#[doc(alias = "CTRLB")]
88pub type Ctrlb = crate::Reg<ctrlb::CtrlbSpec>;
89#[doc = "I2CS Control B"]
90pub mod ctrlb;
91#[doc = "CTRLC (rw) register accessor: I2CS Control C\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrlc::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlc::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@ctrlc`]
92module"]
93#[doc(alias = "CTRLC")]
94pub type Ctrlc = crate::Reg<ctrlc::CtrlcSpec>;
95#[doc = "I2CS Control C"]
96pub mod ctrlc;
97#[doc = "INTENCLR (rw) register accessor: I2CS Interrupt Enable Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intenclr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenclr::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@intenclr`]
98module"]
99#[doc(alias = "INTENCLR")]
100pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
101#[doc = "I2CS Interrupt Enable Clear"]
102pub mod intenclr;
103#[doc = "INTENSET (rw) register accessor: I2CS Interrupt Enable Set\n\nYou can [`read`](crate::Reg::read) this register and get [`intenset::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenset::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@intenset`]
104module"]
105#[doc(alias = "INTENSET")]
106pub type Intenset = crate::Reg<intenset::IntensetSpec>;
107#[doc = "I2CS Interrupt Enable Set"]
108pub mod intenset;
109#[doc = "INTFLAG (rw) register accessor: I2CS Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intflag::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intflag::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@intflag`]
110module"]
111#[doc(alias = "INTFLAG")]
112pub type Intflag = crate::Reg<intflag::IntflagSpec>;
113#[doc = "I2CS Interrupt Flag Status and Clear"]
114pub mod intflag;
115#[doc = "STATUS (rw) register accessor: I2CS Status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`status::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@status`]
116module"]
117#[doc(alias = "STATUS")]
118pub type Status = crate::Reg<status::StatusSpec>;
119#[doc = "I2CS Status"]
120pub mod status;
121#[doc = "SYNCBUSY (r) register accessor: I2CS Synchronization Busy\n\nYou can [`read`](crate::Reg::read) this register and get [`syncbusy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@syncbusy`]
122module"]
123#[doc(alias = "SYNCBUSY")]
124pub type Syncbusy = crate::Reg<syncbusy::SyncbusySpec>;
125#[doc = "I2CS Synchronization Busy"]
126pub mod syncbusy;
127#[doc = "LENGTH (rw) register accessor: I2CS Length\n\nYou can [`read`](crate::Reg::read) this register and get [`length::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`length::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@length`]
128module"]
129#[doc(alias = "LENGTH")]
130pub type Length = crate::Reg<length::LengthSpec>;
131#[doc = "I2CS Length"]
132pub mod length;
133#[doc = "ADDR (rw) register accessor: I2CS Address\n\nYou can [`read`](crate::Reg::read) this register and get [`addr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`addr::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@addr`]
134module"]
135#[doc(alias = "ADDR")]
136pub type Addr = crate::Reg<addr::AddrSpec>;
137#[doc = "I2CS Address"]
138pub mod addr;
139#[doc = "DATA (rw) register accessor: I2CS Data\n\nYou can [`read`](crate::Reg::read) this register and get [`data::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`data::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@data`]
140module"]
141#[doc(alias = "DATA")]
142pub type Data = crate::Reg<data::DataSpec>;
143#[doc = "I2CS Data"]
144pub mod data;