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