rp2040_pac/busctrl/
perfctr3.rs

1#[doc = "Register `PERFCTR3` reader"]
2pub type R = crate::R<PERFCTR3_SPEC>;
3#[doc = "Register `PERFCTR3` writer"]
4pub type W = crate::W<PERFCTR3_SPEC>;
5#[doc = "Field `PERFCTR3` reader - Busfabric saturating performance counter 3  
6 Count some event signal from the busfabric arbiters.  
7 Write any value to clear. Select an event to count using PERFSEL3"]
8pub type PERFCTR3_R = crate::FieldReader<u32>;
9#[doc = "Field `PERFCTR3` writer - Busfabric saturating performance counter 3  
10 Count some event signal from the busfabric arbiters.  
11 Write any value to clear. Select an event to count using PERFSEL3"]
12pub type PERFCTR3_W<'a, REG> = crate::FieldWriter<'a, REG, 24, u32>;
13impl R {
14    #[doc = "Bits 0:23 - Busfabric saturating performance counter 3  
15 Count some event signal from the busfabric arbiters.  
16 Write any value to clear. Select an event to count using PERFSEL3"]
17    #[inline(always)]
18    pub fn perfctr3(&self) -> PERFCTR3_R {
19        PERFCTR3_R::new(self.bits & 0x00ff_ffff)
20    }
21}
22impl W {
23    #[doc = "Bits 0:23 - Busfabric saturating performance counter 3  
24 Count some event signal from the busfabric arbiters.  
25 Write any value to clear. Select an event to count using PERFSEL3"]
26    #[inline(always)]
27    #[must_use]
28    pub fn perfctr3(&mut self) -> PERFCTR3_W<PERFCTR3_SPEC> {
29        PERFCTR3_W::new(self, 0)
30    }
31    #[doc = r" Writes raw bits to the register."]
32    #[doc = r""]
33    #[doc = r" # Safety"]
34    #[doc = r""]
35    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
36    #[inline(always)]
37    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
38        self.bits = bits;
39        self
40    }
41}
42#[doc = "Bus fabric performance counter 3  
43
44You can [`read`](crate::generic::Reg::read) this register and get [`perfctr3::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`perfctr3::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct PERFCTR3_SPEC;
46impl crate::RegisterSpec for PERFCTR3_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`perfctr3::R`](R) reader structure"]
50impl crate::Readable for PERFCTR3_SPEC {}
51#[doc = "`write(|w| ..)` method takes [`perfctr3::W`](W) writer structure"]
52impl crate::Writable for PERFCTR3_SPEC {
53    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
54    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x00ff_ffff;
55}
56#[doc = "`reset()` method sets PERFCTR3 to value 0"]
57impl crate::Resettable for PERFCTR3_SPEC {
58    const RESET_VALUE: u32 = 0;
59}