efm32pg12_pac/ldma/
ctrl.rs1#[doc = "Reader of register CTRL"]
2pub type R = crate::R<u32, super::CTRL>;
3#[doc = "Writer for register CTRL"]
4pub type W = crate::W<u32, super::CTRL>;
5#[doc = "Register CTRL `reset()`'s with value 0x0700_0000"]
6impl crate::ResetValue for super::CTRL {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0x0700_0000
11 }
12}
13#[doc = "Reader of field `SYNCPRSSETEN`"]
14pub type SYNCPRSSETEN_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `SYNCPRSSETEN`"]
16pub struct SYNCPRSSETEN_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> SYNCPRSSETEN_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff);
24 self.w
25 }
26}
27#[doc = "Reader of field `SYNCPRSCLREN`"]
28pub type SYNCPRSCLREN_R = crate::R<u8, u8>;
29#[doc = "Write proxy for field `SYNCPRSCLREN`"]
30pub struct SYNCPRSCLREN_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> SYNCPRSCLREN_W<'a> {
34 #[doc = r"Writes raw bits to the field"]
35 #[inline(always)]
36 pub unsafe fn bits(self, value: u8) -> &'a mut W {
37 self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8);
38 self.w
39 }
40}
41#[doc = "Reader of field `NUMFIXED`"]
42pub type NUMFIXED_R = crate::R<u8, u8>;
43#[doc = "Write proxy for field `NUMFIXED`"]
44pub struct NUMFIXED_W<'a> {
45 w: &'a mut W,
46}
47impl<'a> NUMFIXED_W<'a> {
48 #[doc = r"Writes raw bits to the field"]
49 #[inline(always)]
50 pub unsafe fn bits(self, value: u8) -> &'a mut W {
51 self.w.bits = (self.w.bits & !(0x07 << 24)) | (((value as u32) & 0x07) << 24);
52 self.w
53 }
54}
55impl R {
56 #[doc = "Bits 0:7 - Synchronization PRS Set Enable"]
57 #[inline(always)]
58 pub fn syncprsseten(&self) -> SYNCPRSSETEN_R {
59 SYNCPRSSETEN_R::new((self.bits & 0xff) as u8)
60 }
61 #[doc = "Bits 8:15 - Synchronization PRS Clear Enable"]
62 #[inline(always)]
63 pub fn syncprsclren(&self) -> SYNCPRSCLREN_R {
64 SYNCPRSCLREN_R::new(((self.bits >> 8) & 0xff) as u8)
65 }
66 #[doc = "Bits 24:26 - Number of Fixed Priority Channels"]
67 #[inline(always)]
68 pub fn numfixed(&self) -> NUMFIXED_R {
69 NUMFIXED_R::new(((self.bits >> 24) & 0x07) as u8)
70 }
71}
72impl W {
73 #[doc = "Bits 0:7 - Synchronization PRS Set Enable"]
74 #[inline(always)]
75 pub fn syncprsseten(&mut self) -> SYNCPRSSETEN_W {
76 SYNCPRSSETEN_W { w: self }
77 }
78 #[doc = "Bits 8:15 - Synchronization PRS Clear Enable"]
79 #[inline(always)]
80 pub fn syncprsclren(&mut self) -> SYNCPRSCLREN_W {
81 SYNCPRSCLREN_W { w: self }
82 }
83 #[doc = "Bits 24:26 - Number of Fixed Priority Channels"]
84 #[inline(always)]
85 pub fn numfixed(&mut self) -> NUMFIXED_W {
86 NUMFIXED_W { w: self }
87 }
88}