at32f4xx_pac/at32f405/debug/
apb2_pause.rs

1#[doc = "Register `APB2_PAUSE` reader"]
2pub type R = crate::R<APB2_PAUSE_SPEC>;
3#[doc = "Register `APB2_PAUSE` writer"]
4pub type W = crate::W<APB2_PAUSE_SPEC>;
5#[doc = "Field `TMR1_PAUSE` reader - TMR1_PAUSE"]
6pub type TMR1_PAUSE_R = crate::BitReader;
7#[doc = "Field `TMR1_PAUSE` writer - TMR1_PAUSE"]
8pub type TMR1_PAUSE_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `TMR9_PAUSE` reader - TMR9_PAUSE"]
10pub type TMR9_PAUSE_R = crate::BitReader;
11#[doc = "Field `TMR9_PAUSE` writer - TMR9_PAUSE"]
12pub type TMR9_PAUSE_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `TMR10_PAUSE` reader - TMR10_PAUSE"]
14pub type TMR10_PAUSE_R = crate::BitReader;
15#[doc = "Field `TMR10_PAUSE` writer - TMR10_PAUSE"]
16pub type TMR10_PAUSE_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `TMR11_PAUSE` reader - TMR11_PAUSE"]
18pub type TMR11_PAUSE_R = crate::BitReader;
19#[doc = "Field `TMR11_PAUSE` writer - TMR11_PAUSE"]
20pub type TMR11_PAUSE_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22    #[doc = "Bit 0 - TMR1_PAUSE"]
23    #[inline(always)]
24    pub fn tmr1_pause(&self) -> TMR1_PAUSE_R {
25        TMR1_PAUSE_R::new((self.bits & 1) != 0)
26    }
27    #[doc = "Bit 16 - TMR9_PAUSE"]
28    #[inline(always)]
29    pub fn tmr9_pause(&self) -> TMR9_PAUSE_R {
30        TMR9_PAUSE_R::new(((self.bits >> 16) & 1) != 0)
31    }
32    #[doc = "Bit 17 - TMR10_PAUSE"]
33    #[inline(always)]
34    pub fn tmr10_pause(&self) -> TMR10_PAUSE_R {
35        TMR10_PAUSE_R::new(((self.bits >> 17) & 1) != 0)
36    }
37    #[doc = "Bit 18 - TMR11_PAUSE"]
38    #[inline(always)]
39    pub fn tmr11_pause(&self) -> TMR11_PAUSE_R {
40        TMR11_PAUSE_R::new(((self.bits >> 18) & 1) != 0)
41    }
42}
43impl core::fmt::Debug for R {
44    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
45        f.debug_struct("APB2_PAUSE")
46            .field("tmr1_pause", &self.tmr1_pause())
47            .field("tmr9_pause", &self.tmr9_pause())
48            .field("tmr10_pause", &self.tmr10_pause())
49            .field("tmr11_pause", &self.tmr11_pause())
50            .finish()
51    }
52}
53impl W {
54    #[doc = "Bit 0 - TMR1_PAUSE"]
55    #[inline(always)]
56    pub fn tmr1_pause(&mut self) -> TMR1_PAUSE_W<'_, APB2_PAUSE_SPEC> {
57        TMR1_PAUSE_W::new(self, 0)
58    }
59    #[doc = "Bit 16 - TMR9_PAUSE"]
60    #[inline(always)]
61    pub fn tmr9_pause(&mut self) -> TMR9_PAUSE_W<'_, APB2_PAUSE_SPEC> {
62        TMR9_PAUSE_W::new(self, 16)
63    }
64    #[doc = "Bit 17 - TMR10_PAUSE"]
65    #[inline(always)]
66    pub fn tmr10_pause(&mut self) -> TMR10_PAUSE_W<'_, APB2_PAUSE_SPEC> {
67        TMR10_PAUSE_W::new(self, 17)
68    }
69    #[doc = "Bit 18 - TMR11_PAUSE"]
70    #[inline(always)]
71    pub fn tmr11_pause(&mut self) -> TMR11_PAUSE_W<'_, APB2_PAUSE_SPEC> {
72        TMR11_PAUSE_W::new(self, 18)
73    }
74}
75#[doc = "DEBUG APB2 PAUSE\n\nYou can [`read`](crate::Reg::read) this register and get [`apb2_pause::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apb2_pause::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
76pub struct APB2_PAUSE_SPEC;
77impl crate::RegisterSpec for APB2_PAUSE_SPEC {
78    type Ux = u32;
79}
80#[doc = "`read()` method returns [`apb2_pause::R`](R) reader structure"]
81impl crate::Readable for APB2_PAUSE_SPEC {}
82#[doc = "`write(|w| ..)` method takes [`apb2_pause::W`](W) writer structure"]
83impl crate::Writable for APB2_PAUSE_SPEC {
84    type Safety = crate::Unsafe;
85}
86#[doc = "`reset()` method sets APB2_PAUSE to value 0"]
87impl crate::Resettable for APB2_PAUSE_SPEC {}