efm32gg11b/ldma/
ch10_src.rs

1#[doc = "Reader of register CH10_SRC"]
2pub type R = crate::R<u32, super::CH10_SRC>;
3#[doc = "Writer for register CH10_SRC"]
4pub type W = crate::W<u32, super::CH10_SRC>;
5#[doc = "Register CH10_SRC `reset()`'s with value 0"]
6impl crate::ResetValue for super::CH10_SRC {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type { 0 }
10}
11#[doc = "Reader of field `SRCADDR`"]
12pub type SRCADDR_R = crate::R<u32, u32>;
13#[doc = "Write proxy for field `SRCADDR`"]
14pub struct SRCADDR_W<'a> {
15    w: &'a mut W,
16}
17impl<'a> SRCADDR_W<'a> {
18    #[doc = r"Writes raw bits to the field"]
19    #[inline(always)]
20    pub unsafe fn bits(self, value: u32) -> &'a mut W {
21        self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff);
22        self.w
23    }
24}
25impl R {
26    #[doc = "Bits 0:31 - Source Data Address"]
27    #[inline(always)]
28    pub fn srcaddr(&self) -> SRCADDR_R { SRCADDR_R::new((self.bits & 0xffff_ffff) as u32) }
29}
30impl W {
31    #[doc = "Bits 0:31 - Source Data Address"]
32    #[inline(always)]
33    pub fn srcaddr(&mut self) -> SRCADDR_W { SRCADDR_W { w: self } }
34}