atsamd51p/system_control/
shpr3.rs

1#[doc = "Register `SHPR3` reader"]
2pub type R = crate::R<Shpr3Spec>;
3#[doc = "Register `SHPR3` writer"]
4pub type W = crate::W<Shpr3Spec>;
5#[doc = "Field `PRI_14` reader - Priority of system handler 14, PendSV"]
6pub type Pri14R = crate::FieldReader;
7#[doc = "Field `PRI_14` writer - Priority of system handler 14, PendSV"]
8pub type Pri14W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `PRI_15` reader - Priority of system handler 15, SysTick exception"]
10pub type Pri15R = crate::FieldReader;
11#[doc = "Field `PRI_15` writer - Priority of system handler 15, SysTick exception"]
12pub type Pri15W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13impl R {
14    #[doc = "Bits 16:23 - Priority of system handler 14, PendSV"]
15    #[inline(always)]
16    pub fn pri_14(&self) -> Pri14R {
17        Pri14R::new(((self.bits >> 16) & 0xff) as u8)
18    }
19    #[doc = "Bits 24:31 - Priority of system handler 15, SysTick exception"]
20    #[inline(always)]
21    pub fn pri_15(&self) -> Pri15R {
22        Pri15R::new(((self.bits >> 24) & 0xff) as u8)
23    }
24}
25impl W {
26    #[doc = "Bits 16:23 - Priority of system handler 14, PendSV"]
27    #[inline(always)]
28    #[must_use]
29    pub fn pri_14(&mut self) -> Pri14W<Shpr3Spec> {
30        Pri14W::new(self, 16)
31    }
32    #[doc = "Bits 24:31 - Priority of system handler 15, SysTick exception"]
33    #[inline(always)]
34    #[must_use]
35    pub fn pri_15(&mut self) -> Pri15W<Shpr3Spec> {
36        Pri15W::new(self, 24)
37    }
38}
39#[doc = "System Handler Priority Register 3\n\nYou can [`read`](crate::Reg::read) this register and get [`shpr3::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`shpr3::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct Shpr3Spec;
41impl crate::RegisterSpec for Shpr3Spec {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [`shpr3::R`](R) reader structure"]
45impl crate::Readable for Shpr3Spec {}
46#[doc = "`write(|w| ..)` method takes [`shpr3::W`](W) writer structure"]
47impl crate::Writable for Shpr3Spec {
48    type Safety = crate::Unsafe;
49    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets SHPR3 to value 0"]
53impl crate::Resettable for Shpr3Spec {
54    const RESET_VALUE: u32 = 0;
55}