stm32f1_staging/stm32f102/spi1/
i2spr.rs1pub type R = crate::R<I2SPRrs>;
3pub type W = crate::W<I2SPRrs>;
5pub type I2SDIV_R = crate::FieldReader;
7pub type I2SDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9pub type ODD_R = crate::BitReader;
11pub type ODD_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type MCKOE_R = crate::BitReader;
15pub type MCKOE_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[inline(always)]
20 pub fn i2sdiv(&self) -> I2SDIV_R {
21 I2SDIV_R::new((self.bits & 0xff) as u8)
22 }
23 #[inline(always)]
25 pub fn odd(&self) -> ODD_R {
26 ODD_R::new(((self.bits >> 8) & 1) != 0)
27 }
28 #[inline(always)]
30 pub fn mckoe(&self) -> MCKOE_R {
31 MCKOE_R::new(((self.bits >> 9) & 1) != 0)
32 }
33}
34impl core::fmt::Debug for R {
35 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36 f.debug_struct("I2SPR")
37 .field("mckoe", &self.mckoe())
38 .field("odd", &self.odd())
39 .field("i2sdiv", &self.i2sdiv())
40 .finish()
41 }
42}
43impl W {
44 #[inline(always)]
46 pub fn i2sdiv(&mut self) -> I2SDIV_W<I2SPRrs> {
47 I2SDIV_W::new(self, 0)
48 }
49 #[inline(always)]
51 pub fn odd(&mut self) -> ODD_W<I2SPRrs> {
52 ODD_W::new(self, 8)
53 }
54 #[inline(always)]
56 pub fn mckoe(&mut self) -> MCKOE_W<I2SPRrs> {
57 MCKOE_W::new(self, 9)
58 }
59}
60pub struct I2SPRrs;
66impl crate::RegisterSpec for I2SPRrs {
67 type Ux = u16;
68}
69impl crate::Readable for I2SPRrs {}
71impl crate::Writable for I2SPRrs {
73 type Safety = crate::Unsafe;
74}
75impl crate::Resettable for I2SPRrs {
77 const RESET_VALUE: u16 = 0x0a;
78}