max78000_pac/fcr/
urvctrl.rs

1#[doc = "Register `URVCTRL` reader"]
2pub type R = crate::R<UrvctrlSpec>;
3#[doc = "Register `URVCTRL` writer"]
4pub type W = crate::W<UrvctrlSpec>;
5#[doc = "Field `MEMSEL` reader - RAM2, RAM3 exclusive ownership."]
6pub type MemselR = crate::BitReader;
7#[doc = "Field `MEMSEL` writer - RAM2, RAM3 exclusive ownership."]
8pub type MemselW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `IFLUSHEN` reader - URV instruction flush enable."]
10pub type IflushenR = crate::BitReader;
11#[doc = "Field `IFLUSHEN` writer - URV instruction flush enable."]
12pub type IflushenW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14    #[doc = "Bit 0 - RAM2, RAM3 exclusive ownership."]
15    #[inline(always)]
16    pub fn memsel(&self) -> MemselR {
17        MemselR::new((self.bits & 1) != 0)
18    }
19    #[doc = "Bit 1 - URV instruction flush enable."]
20    #[inline(always)]
21    pub fn iflushen(&self) -> IflushenR {
22        IflushenR::new(((self.bits >> 1) & 1) != 0)
23    }
24}
25impl W {
26    #[doc = "Bit 0 - RAM2, RAM3 exclusive ownership."]
27    #[inline(always)]
28    pub fn memsel(&mut self) -> MemselW<UrvctrlSpec> {
29        MemselW::new(self, 0)
30    }
31    #[doc = "Bit 1 - URV instruction flush enable."]
32    #[inline(always)]
33    pub fn iflushen(&mut self) -> IflushenW<UrvctrlSpec> {
34        IflushenW::new(self, 1)
35    }
36}
37#[doc = "RISC-V Control Register.\n\nYou can [`read`](crate::Reg::read) this register and get [`urvctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`urvctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
38pub struct UrvctrlSpec;
39impl crate::RegisterSpec for UrvctrlSpec {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [`urvctrl::R`](R) reader structure"]
43impl crate::Readable for UrvctrlSpec {}
44#[doc = "`write(|w| ..)` method takes [`urvctrl::W`](W) writer structure"]
45impl crate::Writable for UrvctrlSpec {
46    type Safety = crate::Unsafe;
47    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
48    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
49}
50#[doc = "`reset()` method sets URVCTRL to value 0"]
51impl crate::Resettable for UrvctrlSpec {
52    const RESET_VALUE: u32 = 0;
53}