stm32g0_staging/stm32g0c1/crc/
init.rs

1///Register `INIT` reader
2pub type R = crate::R<INITrs>;
3///Register `INIT` writer
4pub type W = crate::W<INITrs>;
5///Field `CRC_INIT` reader - Programmable initial CRC value
6pub type CRC_INIT_R = crate::FieldReader<u32>;
7///Field `CRC_INIT` writer - Programmable initial CRC value
8pub type CRC_INIT_W<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
9impl R {
10    ///Bits 0:31 - Programmable initial CRC value
11    #[inline(always)]
12    pub fn crc_init(&self) -> CRC_INIT_R {
13        CRC_INIT_R::new(self.bits)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("INIT").field("crc_init", &self.crc_init()).finish()
19    }
20}
21impl W {
22    ///Bits 0:31 - Programmable initial CRC value
23    #[inline(always)]
24    pub fn crc_init(&mut self) -> CRC_INIT_W<INITrs> {
25        CRC_INIT_W::new(self, 0)
26    }
27}
28/**Initial CRC value
29
30You can [`read`](crate::Reg::read) this register and get [`init::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`init::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
31
32See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#CRC:INIT)*/
33pub struct INITrs;
34impl crate::RegisterSpec for INITrs {
35    type Ux = u32;
36}
37///`read()` method returns [`init::R`](R) reader structure
38impl crate::Readable for INITrs {}
39///`write(|w| ..)` method takes [`init::W`](W) writer structure
40impl crate::Writable for INITrs {
41    type Safety = crate::Unsafe;
42    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
43    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
44}
45///`reset()` method sets INIT to value 0xffff_ffff
46impl crate::Resettable for INITrs {
47    const RESET_VALUE: u32 = 0xffff_ffff;
48}