efm32pg12_pac/adc0/
scanfifoclear.rs

1#[doc = "Writer for register SCANFIFOCLEAR"]
2pub type W = crate::W<u32, super::SCANFIFOCLEAR>;
3#[doc = "Register SCANFIFOCLEAR `reset()`'s with value 0"]
4impl crate::ResetValue for super::SCANFIFOCLEAR {
5    type Type = u32;
6    #[inline(always)]
7    fn reset_value() -> Self::Type {
8        0
9    }
10}
11#[doc = "Write proxy for field `SCANFIFOCLEAR`"]
12pub struct SCANFIFOCLEAR_W<'a> {
13    w: &'a mut W,
14}
15impl<'a> SCANFIFOCLEAR_W<'a> {
16    #[doc = r"Sets the field bit"]
17    #[inline(always)]
18    pub fn set_bit(self) -> &'a mut W {
19        self.bit(true)
20    }
21    #[doc = r"Clears the field bit"]
22    #[inline(always)]
23    pub fn clear_bit(self) -> &'a mut W {
24        self.bit(false)
25    }
26    #[doc = r"Writes raw bits to the field"]
27    #[inline(always)]
28    pub fn bit(self, value: bool) -> &'a mut W {
29        self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
30        self.w
31    }
32}
33impl W {
34    #[doc = "Bit 0 - Clear Scan FIFO Content"]
35    #[inline(always)]
36    pub fn scanfifoclear(&mut self) -> SCANFIFOCLEAR_W {
37        SCANFIFOCLEAR_W { w: self }
38    }
39}