atsamd51p/evsys/
prictrl.rs1#[doc = "Register `PRICTRL` reader"]
2pub type R = crate::R<PrictrlSpec>;
3#[doc = "Register `PRICTRL` writer"]
4pub type W = crate::W<PrictrlSpec>;
5#[doc = "Field `PRI` reader - Channel Priority Number"]
6pub type PriR = crate::FieldReader;
7#[doc = "Field `PRI` writer - Channel Priority Number"]
8pub type PriW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `RREN` reader - Round-Robin Scheduling Enable"]
10pub type RrenR = crate::BitReader;
11#[doc = "Field `RREN` writer - Round-Robin Scheduling Enable"]
12pub type RrenW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bits 0:3 - Channel Priority Number"]
15 #[inline(always)]
16 pub fn pri(&self) -> PriR {
17 PriR::new(self.bits & 0x0f)
18 }
19 #[doc = "Bit 7 - Round-Robin Scheduling Enable"]
20 #[inline(always)]
21 pub fn rren(&self) -> RrenR {
22 RrenR::new(((self.bits >> 7) & 1) != 0)
23 }
24}
25impl W {
26 #[doc = "Bits 0:3 - Channel Priority Number"]
27 #[inline(always)]
28 #[must_use]
29 pub fn pri(&mut self) -> PriW<PrictrlSpec> {
30 PriW::new(self, 0)
31 }
32 #[doc = "Bit 7 - Round-Robin Scheduling Enable"]
33 #[inline(always)]
34 #[must_use]
35 pub fn rren(&mut self) -> RrenW<PrictrlSpec> {
36 RrenW::new(self, 7)
37 }
38}
39#[doc = "Priority Control\n\nYou can [`read`](crate::Reg::read) this register and get [`prictrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prictrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct PrictrlSpec;
41impl crate::RegisterSpec for PrictrlSpec {
42 type Ux = u8;
43}
44#[doc = "`read()` method returns [`prictrl::R`](R) reader structure"]
45impl crate::Readable for PrictrlSpec {}
46#[doc = "`write(|w| ..)` method takes [`prictrl::W`](W) writer structure"]
47impl crate::Writable for PrictrlSpec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
51}
52#[doc = "`reset()` method sets PRICTRL to value 0"]
53impl crate::Resettable for PrictrlSpec {
54 const RESET_VALUE: u8 = 0;
55}