mcxa_pac/cmc/
mr0.rs

1#[doc = "Register `MR0` reader"]
2pub type R = crate::R<Mr0Spec>;
3#[doc = "Register `MR0` writer"]
4pub type W = crate::W<Mr0Spec>;
5#[doc = "Field `ISPMODE_n` reader - In System Programming Mode"]
6pub type IspmodeNR = crate::BitReader;
7#[doc = "Field `ISPMODE_n` writer - In System Programming Mode"]
8pub type IspmodeNW<'a, REG> = crate::BitWriter1C<'a, REG>;
9impl R {
10    #[doc = "Bit 0 - In System Programming Mode"]
11    #[inline(always)]
12    pub fn ispmode_n(&self) -> IspmodeNR {
13        IspmodeNR::new((self.bits & 1) != 0)
14    }
15}
16#[cfg(feature = "debug")]
17impl core::fmt::Debug for R {
18    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19        f.debug_struct("MR0").field("ispmode_n", &self.ispmode_n()).finish()
20    }
21}
22impl W {
23    #[doc = "Bit 0 - In System Programming Mode"]
24    #[inline(always)]
25    pub fn ispmode_n(&mut self) -> IspmodeNW<'_, Mr0Spec> {
26        IspmodeNW::new(self, 0)
27    }
28}
29#[doc = "Mode\n\nYou can [`read`](crate::Reg::read) this register and get [`mr0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mr0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
30pub struct Mr0Spec;
31impl crate::RegisterSpec for Mr0Spec {
32    type Ux = u32;
33}
34#[doc = "`read()` method returns [`mr0::R`](R) reader structure"]
35impl crate::Readable for Mr0Spec {}
36#[doc = "`write(|w| ..)` method takes [`mr0::W`](W) writer structure"]
37impl crate::Writable for Mr0Spec {
38    type Safety = crate::Unsafe;
39    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x01;
40}
41#[doc = "`reset()` method sets MR0 to value 0"]
42impl crate::Resettable for Mr0Spec {}