rp2040_pac/ppb/
vtor.rs

1#[doc = "Register `VTOR` reader"]
2pub type R = crate::R<VTOR_SPEC>;
3#[doc = "Register `VTOR` writer"]
4pub type W = crate::W<VTOR_SPEC>;
5#[doc = "Field `TBLOFF` reader - Bits \\[31:8\\]
6of the indicate the vector table offset address."]
7pub type TBLOFF_R = crate::FieldReader<u32>;
8#[doc = "Field `TBLOFF` writer - Bits \\[31:8\\]
9of the indicate the vector table offset address."]
10pub type TBLOFF_W<'a, REG> = crate::FieldWriter<'a, REG, 24, u32>;
11impl R {
12    #[doc = "Bits 8:31 - Bits \\[31:8\\]
13of the indicate the vector table offset address."]
14    #[inline(always)]
15    pub fn tbloff(&self) -> TBLOFF_R {
16        TBLOFF_R::new((self.bits >> 8) & 0x00ff_ffff)
17    }
18}
19impl W {
20    #[doc = "Bits 8:31 - Bits \\[31:8\\]
21of the indicate the vector table offset address."]
22    #[inline(always)]
23    #[must_use]
24    pub fn tbloff(&mut self) -> TBLOFF_W<VTOR_SPEC> {
25        TBLOFF_W::new(self, 8)
26    }
27    #[doc = r" Writes raw bits to the register."]
28    #[doc = r""]
29    #[doc = r" # Safety"]
30    #[doc = r""]
31    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
32    #[inline(always)]
33    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
34        self.bits = bits;
35        self
36    }
37}
38#[doc = "The VTOR holds the vector table offset address.  
39
40You can [`read`](crate::generic::Reg::read) this register and get [`vtor::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 [`vtor::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
41pub struct VTOR_SPEC;
42impl crate::RegisterSpec for VTOR_SPEC {
43    type Ux = u32;
44}
45#[doc = "`read()` method returns [`vtor::R`](R) reader structure"]
46impl crate::Readable for VTOR_SPEC {}
47#[doc = "`write(|w| ..)` method takes [`vtor::W`](W) writer structure"]
48impl crate::Writable for VTOR_SPEC {
49    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets VTOR to value 0"]
53impl crate::Resettable for VTOR_SPEC {
54    const RESET_VALUE: u32 = 0;
55}