1#[doc = "Register `FCTRL0` reader"]
2pub type R = crate::R<Fctrl0Spec>;
3#[doc = "Register `FCTRL0` writer"]
4pub type W = crate::W<Fctrl0Spec>;
5#[doc = "Field `FCOUNT` reader - Result FIFO Counter"]
6pub type FcountR = crate::FieldReader;
7#[doc = "Field `FWMARK` reader - Watermark Level Selection"]
8pub type FwmarkR = crate::FieldReader;
9#[doc = "Field `FWMARK` writer - Watermark Level Selection"]
10pub type FwmarkW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
11impl R {
12 #[doc = "Bits 0:3 - Result FIFO Counter"]
13 #[inline(always)]
14 pub fn fcount(&self) -> FcountR {
15 FcountR::new((self.bits & 0x0f) as u8)
16 }
17 #[doc = "Bits 16:18 - Watermark Level Selection"]
18 #[inline(always)]
19 pub fn fwmark(&self) -> FwmarkR {
20 FwmarkR::new(((self.bits >> 16) & 7) as u8)
21 }
22}
23#[cfg(feature = "debug")]
24impl core::fmt::Debug for R {
25 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
26 f.debug_struct("FCTRL0")
27 .field("fcount", &self.fcount())
28 .field("fwmark", &self.fwmark())
29 .finish()
30 }
31}
32impl W {
33 #[doc = "Bits 16:18 - Watermark Level Selection"]
34 #[inline(always)]
35 pub fn fwmark(&mut self) -> FwmarkW<'_, Fctrl0Spec> {
36 FwmarkW::new(self, 16)
37 }
38}
39#[doc = "FIFO Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`fctrl0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`fctrl0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct Fctrl0Spec;
41impl crate::RegisterSpec for Fctrl0Spec {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`fctrl0::R`](R) reader structure"]
45impl crate::Readable for Fctrl0Spec {}
46#[doc = "`write(|w| ..)` method takes [`fctrl0::W`](W) writer structure"]
47impl crate::Writable for Fctrl0Spec {
48 type Safety = crate::Unsafe;
49}
50#[doc = "`reset()` method sets FCTRL0 to value 0"]
51impl crate::Resettable for Fctrl0Spec {}