Skip to main content

mcxa_pac/smartdma0/
pc.rs

1#[doc = "Register `PC` reader"]
2pub type R = crate::R<PcSpec>;
3#[doc = "Field `PC` reader - Program Counter"]
4pub type PcR = crate::FieldReader<u32>;
5impl R {
6    #[doc = "Bits 0:31 - Program Counter"]
7    #[inline(always)]
8    pub fn pc(&self) -> PcR {
9        PcR::new(self.bits)
10    }
11}
12#[cfg(feature = "debug")]
13impl core::fmt::Debug for R {
14    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
15        f.debug_struct("PC").field("pc", &self.pc()).finish()
16    }
17}
18#[doc = "Program Counter\n\nYou can [`read`](crate::Reg::read) this register and get [`pc::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
19pub struct PcSpec;
20impl crate::RegisterSpec for PcSpec {
21    type Ux = u32;
22}
23#[doc = "`read()` method returns [`pc::R`](R) reader structure"]
24impl crate::Readable for PcSpec {}
25#[doc = "`reset()` method sets PC to value 0"]
26impl crate::Resettable for PcSpec {}