gd32f4pac 0.9.2

Device support crate for GD32F4 devices
Documentation
#[doc = "Register `FCTL` reader"]
pub type R = crate::R<FctlSpec>;
#[doc = "Register `FCTL` writer"]
pub type W = crate::W<FctlSpec>;
#[doc = "Field `DF` reader - Digital noise filter"]
pub type DfR = crate::FieldReader;
#[doc = "Field `DF` writer - Digital noise filter"]
pub type DfW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
#[doc = "Field `AFD` reader - Analog noise filter disable"]
pub type AfdR = crate::BitReader;
#[doc = "Field `AFD` writer - Analog noise filter disable"]
pub type AfdW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bits 0:3 - Digital noise filter"]
    #[inline(always)]
    pub fn df(&self) -> DfR {
        DfR::new((self.bits & 0x0f) as u8)
    }
    #[doc = "Bit 4 - Analog noise filter disable"]
    #[inline(always)]
    pub fn afd(&self) -> AfdR {
        AfdR::new(((self.bits >> 4) & 1) != 0)
    }
}
impl W {
    #[doc = "Bits 0:3 - Digital noise filter"]
    #[inline(always)]
    pub fn df(&mut self) -> DfW<FctlSpec> {
        DfW::new(self, 0)
    }
    #[doc = "Bit 4 - Analog noise filter disable"]
    #[inline(always)]
    pub fn afd(&mut self) -> AfdW<FctlSpec> {
        AfdW::new(self, 4)
    }
}
#[doc = "Filter control register\n\nYou can [`read`](crate::Reg::read) this register and get [`fctl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`fctl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct FctlSpec;
impl crate::RegisterSpec for FctlSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`fctl::R`](R) reader structure"]
impl crate::Readable for FctlSpec {}
#[doc = "`write(|w| ..)` method takes [`fctl::W`](W) writer structure"]
impl crate::Writable for FctlSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets FCTL to value 0"]
impl crate::Resettable for FctlSpec {}