atsamd51p/
icm.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    cfg: Cfg,
5    ctrl: Ctrl,
6    sr: Sr,
7    _reserved3: [u8; 0x04],
8    ier: Ier,
9    idr: Idr,
10    imr: Imr,
11    isr: Isr,
12    uasr: Uasr,
13    _reserved8: [u8; 0x0c],
14    dscr: Dscr,
15    hash: Hash,
16    uihval: [Uihval; 8],
17}
18impl RegisterBlock {
19    #[doc = "0x00 - Configuration"]
20    #[inline(always)]
21    pub const fn cfg(&self) -> &Cfg {
22        &self.cfg
23    }
24    #[doc = "0x04 - Control"]
25    #[inline(always)]
26    pub const fn ctrl(&self) -> &Ctrl {
27        &self.ctrl
28    }
29    #[doc = "0x08 - Status"]
30    #[inline(always)]
31    pub const fn sr(&self) -> &Sr {
32        &self.sr
33    }
34    #[doc = "0x10 - Interrupt Enable"]
35    #[inline(always)]
36    pub const fn ier(&self) -> &Ier {
37        &self.ier
38    }
39    #[doc = "0x14 - Interrupt Disable"]
40    #[inline(always)]
41    pub const fn idr(&self) -> &Idr {
42        &self.idr
43    }
44    #[doc = "0x18 - Interrupt Mask"]
45    #[inline(always)]
46    pub const fn imr(&self) -> &Imr {
47        &self.imr
48    }
49    #[doc = "0x1c - Interrupt Status"]
50    #[inline(always)]
51    pub const fn isr(&self) -> &Isr {
52        &self.isr
53    }
54    #[doc = "0x20 - Undefined Access Status"]
55    #[inline(always)]
56    pub const fn uasr(&self) -> &Uasr {
57        &self.uasr
58    }
59    #[doc = "0x30 - Region Descriptor Area Start Address"]
60    #[inline(always)]
61    pub const fn dscr(&self) -> &Dscr {
62        &self.dscr
63    }
64    #[doc = "0x34 - Region Hash Area Start Address"]
65    #[inline(always)]
66    pub const fn hash(&self) -> &Hash {
67        &self.hash
68    }
69    #[doc = "0x38..0x58 - User Initial Hash Value n"]
70    #[inline(always)]
71    pub const fn uihval(&self, n: usize) -> &Uihval {
72        &self.uihval[n]
73    }
74    #[doc = "Iterator for array of:"]
75    #[doc = "0x38..0x58 - User Initial Hash Value n"]
76    #[inline(always)]
77    pub fn uihval_iter(&self) -> impl Iterator<Item = &Uihval> {
78        self.uihval.iter()
79    }
80}
81#[doc = "CFG (rw) register accessor: Configuration\n\nYou can [`read`](crate::Reg::read) this register and get [`cfg::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cfg::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@cfg`]
82module"]
83#[doc(alias = "CFG")]
84pub type Cfg = crate::Reg<cfg::CfgSpec>;
85#[doc = "Configuration"]
86pub mod cfg;
87#[doc = "CTRL (w) register accessor: Control\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrl`]
88module"]
89#[doc(alias = "CTRL")]
90pub type Ctrl = crate::Reg<ctrl::CtrlSpec>;
91#[doc = "Control"]
92pub mod ctrl;
93#[doc = "SR (r) register accessor: Status\n\nYou can [`read`](crate::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`]
94module"]
95#[doc(alias = "SR")]
96pub type Sr = crate::Reg<sr::SrSpec>;
97#[doc = "Status"]
98pub mod sr;
99#[doc = "IER (w) register accessor: Interrupt Enable\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::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`]
100module"]
101#[doc(alias = "IER")]
102pub type Ier = crate::Reg<ier::IerSpec>;
103#[doc = "Interrupt Enable"]
104pub mod ier;
105#[doc = "IDR (w) register accessor: Interrupt Disable\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::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`]
106module"]
107#[doc(alias = "IDR")]
108pub type Idr = crate::Reg<idr::IdrSpec>;
109#[doc = "Interrupt Disable"]
110pub mod idr;
111#[doc = "IMR (r) register accessor: Interrupt Mask\n\nYou can [`read`](crate::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`]
112module"]
113#[doc(alias = "IMR")]
114pub type Imr = crate::Reg<imr::ImrSpec>;
115#[doc = "Interrupt Mask"]
116pub mod imr;
117#[doc = "ISR (r) register accessor: Interrupt Status\n\nYou can [`read`](crate::Reg::read) this register and get [`isr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@isr`]
118module"]
119#[doc(alias = "ISR")]
120pub type Isr = crate::Reg<isr::IsrSpec>;
121#[doc = "Interrupt Status"]
122pub mod isr;
123#[doc = "UASR (r) register accessor: Undefined Access Status\n\nYou can [`read`](crate::Reg::read) this register and get [`uasr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@uasr`]
124module"]
125#[doc(alias = "UASR")]
126pub type Uasr = crate::Reg<uasr::UasrSpec>;
127#[doc = "Undefined Access Status"]
128pub mod uasr;
129#[doc = "DSCR (rw) register accessor: Region Descriptor Area Start Address\n\nYou can [`read`](crate::Reg::read) this register and get [`dscr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dscr::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@dscr`]
130module"]
131#[doc(alias = "DSCR")]
132pub type Dscr = crate::Reg<dscr::DscrSpec>;
133#[doc = "Region Descriptor Area Start Address"]
134pub mod dscr;
135#[doc = "HASH (rw) register accessor: Region Hash Area Start Address\n\nYou can [`read`](crate::Reg::read) this register and get [`hash::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`hash::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@hash`]
136module"]
137#[doc(alias = "HASH")]
138pub type Hash = crate::Reg<hash::HashSpec>;
139#[doc = "Region Hash Area Start Address"]
140pub mod hash;
141#[doc = "UIHVAL (w) register accessor: User Initial Hash Value n\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`uihval::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@uihval`]
142module"]
143#[doc(alias = "UIHVAL")]
144pub type Uihval = crate::Reg<uihval::UihvalSpec>;
145#[doc = "User Initial Hash Value n"]
146pub mod uihval;