lpc82x_pac/crc/
sum_wr_data_sum.rs

1#[doc = "Register `SUM` reader"]
2pub struct R(crate::R<SUM_WR_DATA_SUM_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SUM_WR_DATA_SUM_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SUM_WR_DATA_SUM_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SUM_WR_DATA_SUM_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `CRC_SUM` reader - The most recent CRC sum can be read through this register with selected bit order and 1's complement post-processes."]
17pub struct CRC_SUM_R(crate::FieldReader<u32, u32>);
18impl CRC_SUM_R {
19    pub(crate) fn new(bits: u32) -> Self {
20        CRC_SUM_R(crate::FieldReader::new(bits))
21    }
22}
23impl core::ops::Deref for CRC_SUM_R {
24    type Target = crate::FieldReader<u32, u32>;
25    #[inline(always)]
26    fn deref(&self) -> &Self::Target {
27        &self.0
28    }
29}
30impl R {
31    #[doc = "Bits 0:31 - The most recent CRC sum can be read through this register with selected bit order and 1's complement post-processes."]
32    #[inline(always)]
33    pub fn crc_sum(&self) -> CRC_SUM_R {
34        CRC_SUM_R::new((self.bits & 0xffff_ffff) as u32)
35    }
36}
37#[doc = "CRC checksum register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sum_wr_data_sum](index.html) module"]
38pub struct SUM_WR_DATA_SUM_SPEC;
39impl crate::RegisterSpec for SUM_WR_DATA_SUM_SPEC {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [sum_wr_data_sum::R](R) reader structure"]
43impl crate::Readable for SUM_WR_DATA_SUM_SPEC {
44    type Reader = R;
45}
46#[doc = "`reset()` method sets SUM to value 0xffff"]
47impl crate::Resettable for SUM_WR_DATA_SUM_SPEC {
48    #[inline(always)]
49    fn reset_value() -> Self::Ux {
50        0xffff
51    }
52}