cc2538_pac/sys_ctrl/
i_map.rs

1#[doc = "Register `I_MAP` reader"]
2pub type R = crate::R<IMapSpec>;
3#[doc = "Register `I_MAP` writer"]
4pub type W = crate::W<IMapSpec>;
5#[doc = "Field `ALTMAP` reader - 1: Select alternate interrupt map. 0: Select regular interrupt map. (See the ASD document for details.)"]
6pub type AltmapR = crate::BitReader;
7#[doc = "Field `ALTMAP` writer - 1: Select alternate interrupt map. 0: Select regular interrupt map. (See the ASD document for details.)"]
8pub type AltmapW<'a, REG> = crate::BitWriter<'a, REG>;
9impl R {
10    #[doc = "Bit 0 - 1: Select alternate interrupt map. 0: Select regular interrupt map. (See the ASD document for details.)"]
11    #[inline(always)]
12    pub fn altmap(&self) -> AltmapR {
13        AltmapR::new((self.bits & 1) != 0)
14    }
15}
16impl W {
17    #[doc = "Bit 0 - 1: Select alternate interrupt map. 0: Select regular interrupt map. (See the ASD document for details.)"]
18    #[inline(always)]
19    pub fn altmap(&mut self) -> AltmapW<IMapSpec> {
20        AltmapW::new(self, 0)
21    }
22}
23#[doc = "This register selects which interrupt map to be used.\n\nYou can [`read`](crate::Reg::read) this register and get [`i_map::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`i_map::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct IMapSpec;
25impl crate::RegisterSpec for IMapSpec {
26    type Ux = u32;
27}
28#[doc = "`read()` method returns [`i_map::R`](R) reader structure"]
29impl crate::Readable for IMapSpec {}
30#[doc = "`write(|w| ..)` method takes [`i_map::W`](W) writer structure"]
31impl crate::Writable for IMapSpec {
32    type Safety = crate::Unsafe;
33    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets I_MAP to value 0"]
37impl crate::Resettable for IMapSpec {
38    const RESET_VALUE: u32 = 0;
39}