max78000_pac/
crc.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    ctrl: Ctrl,
5    _reserved_1_datain8: [u8; 0x04],
6    poly: Poly,
7    val: Val,
8}
9impl RegisterBlock {
10    #[doc = "0x00 - CRC Control"]
11    #[inline(always)]
12    pub const fn ctrl(&self) -> &Ctrl {
13        &self.ctrl
14    }
15    #[doc = "0x04 - CRC Data Input"]
16    #[inline(always)]
17    pub const fn datain8(&self) -> &Datain8 {
18        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(4).cast() }
19    }
20    #[doc = "0x04 - CRC Data Input"]
21    #[inline(always)]
22    pub const fn datain16(&self) -> &Datain16 {
23        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(4).cast() }
24    }
25    #[doc = "0x04 - CRC Data Input"]
26    #[inline(always)]
27    pub const fn datain32(&self) -> &Datain32 {
28        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(4).cast() }
29    }
30    #[doc = "0x08 - CRC Polynomial"]
31    #[inline(always)]
32    pub const fn poly(&self) -> &Poly {
33        &self.poly
34    }
35    #[doc = "0x0c - Current CRC Value"]
36    #[inline(always)]
37    pub const fn val(&self) -> &Val {
38        &self.val
39    }
40}
41#[doc = "CTRL (rw) register accessor: CRC Control\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl::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@ctrl`]
42module"]
43#[doc(alias = "CTRL")]
44pub type Ctrl = crate::Reg<ctrl::CtrlSpec>;
45#[doc = "CRC Control"]
46pub mod ctrl;
47#[doc = "DATAIN32 (rw) register accessor: CRC Data Input\n\nYou can [`read`](crate::Reg::read) this register and get [`datain32::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`datain32::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@datain32`]
48module"]
49#[doc(alias = "DATAIN32")]
50pub type Datain32 = crate::Reg<datain32::Datain32Spec>;
51#[doc = "CRC Data Input"]
52pub mod datain32;
53#[doc = "DATAIN16 (rw) register accessor: CRC Data Input\n\nYou can [`read`](crate::Reg::read) this register and get [`datain16::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`datain16::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@datain16`]
54module"]
55#[doc(alias = "DATAIN16")]
56pub type Datain16 = crate::Reg<datain16::Datain16Spec>;
57#[doc = "CRC Data Input"]
58pub mod datain16;
59#[doc = "DATAIN8 (rw) register accessor: CRC Data Input\n\nYou can [`read`](crate::Reg::read) this register and get [`datain8::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`datain8::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@datain8`]
60module"]
61#[doc(alias = "DATAIN8")]
62pub type Datain8 = crate::Reg<datain8::Datain8Spec>;
63#[doc = "CRC Data Input"]
64pub mod datain8;
65#[doc = "POLY (rw) register accessor: CRC Polynomial\n\nYou can [`read`](crate::Reg::read) this register and get [`poly::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`poly::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@poly`]
66module"]
67#[doc(alias = "POLY")]
68pub type Poly = crate::Reg<poly::PolySpec>;
69#[doc = "CRC Polynomial"]
70pub mod poly;
71#[doc = "VAL (rw) register accessor: Current CRC Value\n\nYou can [`read`](crate::Reg::read) this register and get [`val::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`val::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@val`]
72module"]
73#[doc(alias = "VAL")]
74pub type Val = crate::Reg<val::ValSpec>;
75#[doc = "Current CRC Value"]
76pub mod val;