atsamd51g/
eic.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    ctrla: Ctrla,
5    nmictrl: Nmictrl,
6    nmiflag: Nmiflag,
7    syncbusy: Syncbusy,
8    evctrl: Evctrl,
9    intenclr: Intenclr,
10    intenset: Intenset,
11    intflag: Intflag,
12    asynch: Asynch,
13    config: [Config; 2],
14    _reserved10: [u8; 0x0c],
15    debouncen: Debouncen,
16    dprescaler: Dprescaler,
17    pinstate: Pinstate,
18}
19impl RegisterBlock {
20    #[doc = "0x00 - Control A"]
21    #[inline(always)]
22    pub const fn ctrla(&self) -> &Ctrla {
23        &self.ctrla
24    }
25    #[doc = "0x01 - Non-Maskable Interrupt Control"]
26    #[inline(always)]
27    pub const fn nmictrl(&self) -> &Nmictrl {
28        &self.nmictrl
29    }
30    #[doc = "0x02 - Non-Maskable Interrupt Flag Status and Clear"]
31    #[inline(always)]
32    pub const fn nmiflag(&self) -> &Nmiflag {
33        &self.nmiflag
34    }
35    #[doc = "0x04 - Synchronization Busy"]
36    #[inline(always)]
37    pub const fn syncbusy(&self) -> &Syncbusy {
38        &self.syncbusy
39    }
40    #[doc = "0x08 - Event Control"]
41    #[inline(always)]
42    pub const fn evctrl(&self) -> &Evctrl {
43        &self.evctrl
44    }
45    #[doc = "0x0c - Interrupt Enable Clear"]
46    #[inline(always)]
47    pub const fn intenclr(&self) -> &Intenclr {
48        &self.intenclr
49    }
50    #[doc = "0x10 - Interrupt Enable Set"]
51    #[inline(always)]
52    pub const fn intenset(&self) -> &Intenset {
53        &self.intenset
54    }
55    #[doc = "0x14 - Interrupt Flag Status and Clear"]
56    #[inline(always)]
57    pub const fn intflag(&self) -> &Intflag {
58        &self.intflag
59    }
60    #[doc = "0x18 - External Interrupt Asynchronous Mode"]
61    #[inline(always)]
62    pub const fn asynch(&self) -> &Asynch {
63        &self.asynch
64    }
65    #[doc = "0x1c..0x24 - External Interrupt Sense Configuration"]
66    #[inline(always)]
67    pub const fn config(&self, n: usize) -> &Config {
68        &self.config[n]
69    }
70    #[doc = "Iterator for array of:"]
71    #[doc = "0x1c..0x24 - External Interrupt Sense Configuration"]
72    #[inline(always)]
73    pub fn config_iter(&self) -> impl Iterator<Item = &Config> {
74        self.config.iter()
75    }
76    #[doc = "0x30 - Debouncer Enable"]
77    #[inline(always)]
78    pub const fn debouncen(&self) -> &Debouncen {
79        &self.debouncen
80    }
81    #[doc = "0x34 - Debouncer Prescaler"]
82    #[inline(always)]
83    pub const fn dprescaler(&self) -> &Dprescaler {
84        &self.dprescaler
85    }
86    #[doc = "0x38 - Pin State"]
87    #[inline(always)]
88    pub const fn pinstate(&self) -> &Pinstate {
89        &self.pinstate
90    }
91}
92#[doc = "CTRLA (rw) register accessor: 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 = "Control A"]
97pub mod ctrla;
98#[doc = "NMICTRL (rw) register accessor: Non-Maskable Interrupt Control\n\nYou can [`read`](crate::Reg::read) this register and get [`nmictrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`nmictrl::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@nmictrl`]
99module"]
100#[doc(alias = "NMICTRL")]
101pub type Nmictrl = crate::Reg<nmictrl::NmictrlSpec>;
102#[doc = "Non-Maskable Interrupt Control"]
103pub mod nmictrl;
104#[doc = "NMIFLAG (rw) register accessor: Non-Maskable Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`nmiflag::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`nmiflag::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@nmiflag`]
105module"]
106#[doc(alias = "NMIFLAG")]
107pub type Nmiflag = crate::Reg<nmiflag::NmiflagSpec>;
108#[doc = "Non-Maskable Interrupt Flag Status and Clear"]
109pub mod nmiflag;
110#[doc = "SYNCBUSY (r) register accessor: 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`]
111module"]
112#[doc(alias = "SYNCBUSY")]
113pub type Syncbusy = crate::Reg<syncbusy::SyncbusySpec>;
114#[doc = "Synchronization Busy"]
115pub mod syncbusy;
116#[doc = "EVCTRL (rw) register accessor: Event Control\n\nYou can [`read`](crate::Reg::read) this register and get [`evctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`evctrl::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@evctrl`]
117module"]
118#[doc(alias = "EVCTRL")]
119pub type Evctrl = crate::Reg<evctrl::EvctrlSpec>;
120#[doc = "Event Control"]
121pub mod evctrl;
122#[doc = "INTENCLR (rw) register accessor: 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`]
123module"]
124#[doc(alias = "INTENCLR")]
125pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
126#[doc = "Interrupt Enable Clear"]
127pub mod intenclr;
128#[doc = "INTENSET (rw) register accessor: 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`]
129module"]
130#[doc(alias = "INTENSET")]
131pub type Intenset = crate::Reg<intenset::IntensetSpec>;
132#[doc = "Interrupt Enable Set"]
133pub mod intenset;
134#[doc = "INTFLAG (rw) register accessor: 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`]
135module"]
136#[doc(alias = "INTFLAG")]
137pub type Intflag = crate::Reg<intflag::IntflagSpec>;
138#[doc = "Interrupt Flag Status and Clear"]
139pub mod intflag;
140#[doc = "ASYNCH (rw) register accessor: External Interrupt Asynchronous Mode\n\nYou can [`read`](crate::Reg::read) this register and get [`asynch::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`asynch::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@asynch`]
141module"]
142#[doc(alias = "ASYNCH")]
143pub type Asynch = crate::Reg<asynch::AsynchSpec>;
144#[doc = "External Interrupt Asynchronous Mode"]
145pub mod asynch;
146#[doc = "CONFIG (rw) register accessor: External Interrupt Sense Configuration\n\nYou can [`read`](crate::Reg::read) this register and get [`config::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`config::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@config`]
147module"]
148#[doc(alias = "CONFIG")]
149pub type Config = crate::Reg<config::ConfigSpec>;
150#[doc = "External Interrupt Sense Configuration"]
151pub mod config;
152#[doc = "DEBOUNCEN (rw) register accessor: Debouncer Enable\n\nYou can [`read`](crate::Reg::read) this register and get [`debouncen::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`debouncen::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@debouncen`]
153module"]
154#[doc(alias = "DEBOUNCEN")]
155pub type Debouncen = crate::Reg<debouncen::DebouncenSpec>;
156#[doc = "Debouncer Enable"]
157pub mod debouncen;
158#[doc = "DPRESCALER (rw) register accessor: Debouncer Prescaler\n\nYou can [`read`](crate::Reg::read) this register and get [`dprescaler::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dprescaler::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@dprescaler`]
159module"]
160#[doc(alias = "DPRESCALER")]
161pub type Dprescaler = crate::Reg<dprescaler::DprescalerSpec>;
162#[doc = "Debouncer Prescaler"]
163pub mod dprescaler;
164#[doc = "PINSTATE (r) register accessor: Pin State\n\nYou can [`read`](crate::Reg::read) this register and get [`pinstate::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@pinstate`]
165module"]
166#[doc(alias = "PINSTATE")]
167pub type Pinstate = crate::Reg<pinstate::PinstateSpec>;
168#[doc = "Pin State"]
169pub mod pinstate;