stm32g4_staging/stm32g474/crc/
pol.rs

1///Register `POL` reader
2pub type R = crate::R<POLrs>;
3///Register `POL` writer
4pub type W = crate::W<POLrs>;
5///Field `POL` reader - Programmable polynomial
6pub type POL_R = crate::FieldReader<u32>;
7///Field `POL` writer - Programmable polynomial
8pub type POL_W<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
9impl R {
10    ///Bits 0:31 - Programmable polynomial
11    #[inline(always)]
12    pub fn pol(&self) -> POL_R {
13        POL_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("POL").field("pol", &self.pol()).finish()
19    }
20}
21impl W {
22    ///Bits 0:31 - Programmable polynomial
23    #[inline(always)]
24    pub fn pol(&mut self) -> POL_W<POLrs> {
25        POL_W::new(self, 0)
26    }
27}
28/**polynomial
29
30You can [`read`](crate::Reg::read) this register and get [`pol::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pol::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/STM32G474.html#CRC:POL)*/
33pub struct POLrs;
34impl crate::RegisterSpec for POLrs {
35    type Ux = u32;
36}
37///`read()` method returns [`pol::R`](R) reader structure
38impl crate::Readable for POLrs {}
39///`write(|w| ..)` method takes [`pol::W`](W) writer structure
40impl crate::Writable for POLrs {
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 POL to value 0x04c1_1db7
46impl crate::Resettable for POLrs {
47    const RESET_VALUE: u32 = 0x04c1_1db7;
48}