mimxrt685s_pac/adc0/
fctrl.rs1#[doc = "Register `FCTRL` reader"]
2pub type R = crate::R<FctrlSpec>;
3#[doc = "Register `FCTRL` writer"]
4pub type W = crate::W<FctrlSpec>;
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, 4>;
11impl R {
12 #[doc = "Bits 0:4 - Result FIFO counter"]
13 #[inline(always)]
14 pub fn fcount(&self) -> FcountR {
15 FcountR::new((self.bits & 0x1f) as u8)
16 }
17 #[doc = "Bits 16:19 - Watermark level selection"]
18 #[inline(always)]
19 pub fn fwmark(&self) -> FwmarkR {
20 FwmarkR::new(((self.bits >> 16) & 0x0f) 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("FCTRL")
27 .field("fcount", &self.fcount())
28 .field("fwmark", &self.fwmark())
29 .finish()
30 }
31}
32impl W {
33 #[doc = "Bits 16:19 - Watermark level selection"]
34 #[inline(always)]
35 pub fn fwmark(&mut self) -> FwmarkW<FctrlSpec> {
36 FwmarkW::new(self, 16)
37 }
38}
39#[doc = "ADC FIFO Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`fctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`fctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct FctrlSpec;
41impl crate::RegisterSpec for FctrlSpec {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`fctrl::R`](R) reader structure"]
45impl crate::Readable for FctrlSpec {}
46#[doc = "`write(|w| ..)` method takes [`fctrl::W`](W) writer structure"]
47impl crate::Writable for FctrlSpec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets FCTRL to value 0"]
53impl crate::Resettable for FctrlSpec {
54 const RESET_VALUE: u32 = 0;
55}