stm32f1_staging/stm32f100/cec/
oar.rs

1///Register `OAR` reader
2pub type R = crate::R<OARrs>;
3///Register `OAR` writer
4pub type W = crate::W<OARrs>;
5///Field `OA` reader - Own address
6pub type OA_R = crate::FieldReader;
7///Field `OA` writer - Own address
8pub type OA_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9impl R {
10    ///Bits 0:3 - Own address
11    #[inline(always)]
12    pub fn oa(&self) -> OA_R {
13        OA_R::new((self.bits & 0x0f) as u8)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("OAR").field("oa", &self.oa()).finish()
19    }
20}
21impl W {
22    ///Bits 0:3 - Own address
23    #[inline(always)]
24    pub fn oa(&mut self) -> OA_W<OARrs> {
25        OA_W::new(self, 0)
26    }
27}
28/**CEC own address register
29
30You can [`read`](crate::Reg::read) this register and get [`oar::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`oar::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/STM32F100.html#CEC:OAR)*/
33pub struct OARrs;
34impl crate::RegisterSpec for OARrs {
35    type Ux = u32;
36}
37///`read()` method returns [`oar::R`](R) reader structure
38impl crate::Readable for OARrs {}
39///`write(|w| ..)` method takes [`oar::W`](W) writer structure
40impl crate::Writable for OARrs {
41    type Safety = crate::Unsafe;
42}
43///`reset()` method sets OAR to value 0
44impl crate::Resettable for OARrs {}