stm32f4/stm32f407/tim1/rcr.rs
1///Register `RCR` reader
2pub type R = crate::R<RCRrs>;
3///Register `RCR` writer
4pub type W = crate::W<RCRrs>;
5///Field `REP` reader - Repetition counter value
6pub type REP_R = crate::FieldReader;
7///Field `REP` writer - Repetition counter value
8pub type REP_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
9impl R {
10 ///Bits 0:7 - Repetition counter value
11 #[inline(always)]
12 pub fn rep(&self) -> REP_R {
13 REP_R::new((self.bits & 0xff) 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("RCR").field("rep", &self.rep()).finish()
19 }
20}
21impl W {
22 ///Bits 0:7 - Repetition counter value
23 #[inline(always)]
24 pub fn rep(&mut self) -> REP_W<RCRrs> {
25 REP_W::new(self, 0)
26 }
27}
28/**repetition counter register
29
30You can [`read`](crate::Reg::read) this register and get [`rcr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rcr::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/STM32F407.html#TIM1:RCR)*/
33pub struct RCRrs;
34impl crate::RegisterSpec for RCRrs {
35 type Ux = u32;
36}
37///`read()` method returns [`rcr::R`](R) reader structure
38impl crate::Readable for RCRrs {}
39///`write(|w| ..)` method takes [`rcr::W`](W) writer structure
40impl crate::Writable for RCRrs {
41 type Safety = crate::Unsafe;
42}
43///`reset()` method sets RCR to value 0
44impl crate::Resettable for RCRrs {}