rp2040_pac/ppb/
shpr3.rs
1#[doc = "Register `SHPR3` reader"]
2pub type R = crate::R<SHPR3_SPEC>;
3#[doc = "Register `SHPR3` writer"]
4pub type W = crate::W<SHPR3_SPEC>;
5#[doc = "Field `PRI_14` reader - Priority of system handler 14, PendSV"]
6pub type PRI_14_R = crate::FieldReader;
7#[doc = "Field `PRI_14` writer - Priority of system handler 14, PendSV"]
8pub type PRI_14_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9#[doc = "Field `PRI_15` reader - Priority of system handler 15, SysTick"]
10pub type PRI_15_R = crate::FieldReader;
11#[doc = "Field `PRI_15` writer - Priority of system handler 15, SysTick"]
12pub type PRI_15_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13impl R {
14 #[doc = "Bits 22:23 - Priority of system handler 14, PendSV"]
15 #[inline(always)]
16 pub fn pri_14(&self) -> PRI_14_R {
17 PRI_14_R::new(((self.bits >> 22) & 3) as u8)
18 }
19 #[doc = "Bits 30:31 - Priority of system handler 15, SysTick"]
20 #[inline(always)]
21 pub fn pri_15(&self) -> PRI_15_R {
22 PRI_15_R::new(((self.bits >> 30) & 3) as u8)
23 }
24}
25impl W {
26 #[doc = "Bits 22:23 - Priority of system handler 14, PendSV"]
27 #[inline(always)]
28 #[must_use]
29 pub fn pri_14(&mut self) -> PRI_14_W<SHPR3_SPEC> {
30 PRI_14_W::new(self, 22)
31 }
32 #[doc = "Bits 30:31 - Priority of system handler 15, SysTick"]
33 #[inline(always)]
34 #[must_use]
35 pub fn pri_15(&mut self) -> PRI_15_W<SHPR3_SPEC> {
36 PRI_15_W::new(self, 30)
37 }
38 #[doc = r" Writes raw bits to the register."]
39 #[doc = r""]
40 #[doc = r" # Safety"]
41 #[doc = r""]
42 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
43 #[inline(always)]
44 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
45 self.bits = bits;
46 self
47 }
48}
49#[doc = "System handlers are a special class of exception handler that can have their priority set to any of the priority levels. Use the System Handler Priority Register 3 to set the priority of PendSV and SysTick.
50
51You can [`read`](crate::generic::Reg::read) this register and get [`shpr3::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 [`shpr3::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
52pub struct SHPR3_SPEC;
53impl crate::RegisterSpec for SHPR3_SPEC {
54 type Ux = u32;
55}
56#[doc = "`read()` method returns [`shpr3::R`](R) reader structure"]
57impl crate::Readable for SHPR3_SPEC {}
58#[doc = "`write(|w| ..)` method takes [`shpr3::W`](W) writer structure"]
59impl crate::Writable for SHPR3_SPEC {
60 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
61 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
62}
63#[doc = "`reset()` method sets SHPR3 to value 0"]
64impl crate::Resettable for SHPR3_SPEC {
65 const RESET_VALUE: u32 = 0;
66}