efm32pg12_pac/ldma/
ifc.rs

1#[doc = "Writer for register IFC"]
2pub type W = crate::W<u32, super::IFC>;
3#[doc = "Register IFC `reset()`'s with value 0"]
4impl crate::ResetValue for super::IFC {
5    type Type = u32;
6    #[inline(always)]
7    fn reset_value() -> Self::Type {
8        0
9    }
10}
11#[doc = "Write proxy for field `DONE`"]
12pub struct DONE_W<'a> {
13    w: &'a mut W,
14}
15impl<'a> DONE_W<'a> {
16    #[doc = r"Writes raw bits to the field"]
17    #[inline(always)]
18    pub unsafe fn bits(self, value: u8) -> &'a mut W {
19        self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff);
20        self.w
21    }
22}
23#[doc = "Write proxy for field `ERROR`"]
24pub struct ERROR_W<'a> {
25    w: &'a mut W,
26}
27impl<'a> ERROR_W<'a> {
28    #[doc = r"Sets the field bit"]
29    #[inline(always)]
30    pub fn set_bit(self) -> &'a mut W {
31        self.bit(true)
32    }
33    #[doc = r"Clears the field bit"]
34    #[inline(always)]
35    pub fn clear_bit(self) -> &'a mut W {
36        self.bit(false)
37    }
38    #[doc = r"Writes raw bits to the field"]
39    #[inline(always)]
40    pub fn bit(self, value: bool) -> &'a mut W {
41        self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
42        self.w
43    }
44}
45impl W {
46    #[doc = "Bits 0:7 - Clear DONE Interrupt Flag"]
47    #[inline(always)]
48    pub fn done(&mut self) -> DONE_W {
49        DONE_W { w: self }
50    }
51    #[doc = "Bit 31 - Clear ERROR Interrupt Flag"]
52    #[inline(always)]
53    pub fn error(&mut self) -> ERROR_W {
54        ERROR_W { w: self }
55    }
56}