stm32g4/stm32g484/i2c1/
pecr.rs

1///Register `PECR` reader
2pub type R = crate::R<PECRrs>;
3///Field `PEC` reader - Packet error checking register
4pub type PEC_R = crate::FieldReader;
5impl R {
6    ///Bits 0:7 - Packet error checking register
7    #[inline(always)]
8    pub fn pec(&self) -> PEC_R {
9        PEC_R::new((self.bits & 0xff) as u8)
10    }
11}
12impl core::fmt::Debug for R {
13    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
14        f.debug_struct("PECR").field("pec", &self.pec()).finish()
15    }
16}
17/**PEC register
18
19You can [`read`](crate::Reg::read) this register and get [`pecr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
20
21See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G484.html#I2C1:PECR)*/
22pub struct PECRrs;
23impl crate::RegisterSpec for PECRrs {
24    type Ux = u32;
25}
26///`read()` method returns [`pecr::R`](R) reader structure
27impl crate::Readable for PECRrs {}
28///`reset()` method sets PECR to value 0
29impl crate::Resettable for PECRrs {}