mimxrt685s_pac/usdhc0/
dll_ctrl.rs1#[doc = "Register `DLL_CTRL` reader"]
2pub type R = crate::R<DllCtrlSpec>;
3#[doc = "Register `DLL_CTRL` writer"]
4pub type W = crate::W<DllCtrlSpec>;
5#[doc = "Field `DLL_CTRL_ENABLE` reader - DLL_CTRL_ENABLE"]
6pub type DllCtrlEnableR = crate::BitReader;
7#[doc = "Field `DLL_CTRL_ENABLE` writer - DLL_CTRL_ENABLE"]
8pub type DllCtrlEnableW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `DLL_CTRL_RESET` reader - DLL_CTRL_RESET"]
10pub type DllCtrlResetR = crate::BitReader;
11#[doc = "Field `DLL_CTRL_RESET` writer - DLL_CTRL_RESET"]
12pub type DllCtrlResetW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `DLL_CTRL_SLV_FORCE_UPD` reader - DLL_CTRL_SLV_FORCE_UPD"]
14pub type DllCtrlSlvForceUpdR = crate::BitReader;
15#[doc = "Field `DLL_CTRL_SLV_FORCE_UPD` writer - DLL_CTRL_SLV_FORCE_UPD"]
16pub type DllCtrlSlvForceUpdW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `DLL_CTRL_SLV_DLY_TARGET0` reader - DLL_CTRL_SLV_DLY_TARGET0"]
18pub type DllCtrlSlvDlyTarget0R = crate::FieldReader;
19#[doc = "Field `DLL_CTRL_SLV_DLY_TARGET0` writer - DLL_CTRL_SLV_DLY_TARGET0"]
20pub type DllCtrlSlvDlyTarget0W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21#[doc = "Field `DLL_CTRL_GATE_UPDATE` reader - DLL_CTRL_GATE_UPDATE"]
22pub type DllCtrlGateUpdateR = crate::BitReader;
23#[doc = "Field `DLL_CTRL_GATE_UPDATE` writer - DLL_CTRL_GATE_UPDATE"]
24pub type DllCtrlGateUpdateW<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `DLL_CTRL_SLV_OVERRIDE` reader - DLL_CTRL_SLV_OVERRIDE"]
26pub type DllCtrlSlvOverrideR = crate::BitReader;
27#[doc = "Field `DLL_CTRL_SLV_OVERRIDE` writer - DLL_CTRL_SLV_OVERRIDE"]
28pub type DllCtrlSlvOverrideW<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `DLL_CTRL_SLV_OVERRIDE_VAL` reader - DLL_CTRL_SLV_OVERRIDE_VAL"]
30pub type DllCtrlSlvOverrideValR = crate::FieldReader;
31#[doc = "Field `DLL_CTRL_SLV_OVERRIDE_VAL` writer - DLL_CTRL_SLV_OVERRIDE_VAL"]
32pub type DllCtrlSlvOverrideValW<'a, REG> = crate::FieldWriter<'a, REG, 7>;
33#[doc = "Field `DLL_CTRL_SLV_DLY_TARGET1` reader - DLL_CTRL_SLV_DLY_TARGET1"]
34pub type DllCtrlSlvDlyTarget1R = crate::FieldReader;
35#[doc = "Field `DLL_CTRL_SLV_DLY_TARGET1` writer - DLL_CTRL_SLV_DLY_TARGET1"]
36pub type DllCtrlSlvDlyTarget1W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
37#[doc = "Field `DLL_CTRL_SLV_UPDATE_INT` reader - DLL_CTRL_SLV_UPDATE_INT"]
38pub type DllCtrlSlvUpdateIntR = crate::FieldReader;
39#[doc = "Field `DLL_CTRL_SLV_UPDATE_INT` writer - DLL_CTRL_SLV_UPDATE_INT"]
40pub type DllCtrlSlvUpdateIntW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
41#[doc = "Field `DLL_CTRL_REF_UPDATE_INT` reader - DLL_CTRL_REF_UPDATE_INT"]
42pub type DllCtrlRefUpdateIntR = crate::FieldReader;
43#[doc = "Field `DLL_CTRL_REF_UPDATE_INT` writer - DLL_CTRL_REF_UPDATE_INT"]
44pub type DllCtrlRefUpdateIntW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
45impl R {
46    #[doc = "Bit 0 - DLL_CTRL_ENABLE"]
47    #[inline(always)]
48    pub fn dll_ctrl_enable(&self) -> DllCtrlEnableR {
49        DllCtrlEnableR::new((self.bits & 1) != 0)
50    }
51    #[doc = "Bit 1 - DLL_CTRL_RESET"]
52    #[inline(always)]
53    pub fn dll_ctrl_reset(&self) -> DllCtrlResetR {
54        DllCtrlResetR::new(((self.bits >> 1) & 1) != 0)
55    }
56    #[doc = "Bit 2 - DLL_CTRL_SLV_FORCE_UPD"]
57    #[inline(always)]
58    pub fn dll_ctrl_slv_force_upd(&self) -> DllCtrlSlvForceUpdR {
59        DllCtrlSlvForceUpdR::new(((self.bits >> 2) & 1) != 0)
60    }
61    #[doc = "Bits 3:6 - DLL_CTRL_SLV_DLY_TARGET0"]
62    #[inline(always)]
63    pub fn dll_ctrl_slv_dly_target0(&self) -> DllCtrlSlvDlyTarget0R {
64        DllCtrlSlvDlyTarget0R::new(((self.bits >> 3) & 0x0f) as u8)
65    }
66    #[doc = "Bit 7 - DLL_CTRL_GATE_UPDATE"]
67    #[inline(always)]
68    pub fn dll_ctrl_gate_update(&self) -> DllCtrlGateUpdateR {
69        DllCtrlGateUpdateR::new(((self.bits >> 7) & 1) != 0)
70    }
71    #[doc = "Bit 8 - DLL_CTRL_SLV_OVERRIDE"]
72    #[inline(always)]
73    pub fn dll_ctrl_slv_override(&self) -> DllCtrlSlvOverrideR {
74        DllCtrlSlvOverrideR::new(((self.bits >> 8) & 1) != 0)
75    }
76    #[doc = "Bits 9:15 - DLL_CTRL_SLV_OVERRIDE_VAL"]
77    #[inline(always)]
78    pub fn dll_ctrl_slv_override_val(&self) -> DllCtrlSlvOverrideValR {
79        DllCtrlSlvOverrideValR::new(((self.bits >> 9) & 0x7f) as u8)
80    }
81    #[doc = "Bits 16:18 - DLL_CTRL_SLV_DLY_TARGET1"]
82    #[inline(always)]
83    pub fn dll_ctrl_slv_dly_target1(&self) -> DllCtrlSlvDlyTarget1R {
84        DllCtrlSlvDlyTarget1R::new(((self.bits >> 16) & 7) as u8)
85    }
86    #[doc = "Bits 20:27 - DLL_CTRL_SLV_UPDATE_INT"]
87    #[inline(always)]
88    pub fn dll_ctrl_slv_update_int(&self) -> DllCtrlSlvUpdateIntR {
89        DllCtrlSlvUpdateIntR::new(((self.bits >> 20) & 0xff) as u8)
90    }
91    #[doc = "Bits 28:31 - DLL_CTRL_REF_UPDATE_INT"]
92    #[inline(always)]
93    pub fn dll_ctrl_ref_update_int(&self) -> DllCtrlRefUpdateIntR {
94        DllCtrlRefUpdateIntR::new(((self.bits >> 28) & 0x0f) as u8)
95    }
96}
97#[cfg(feature = "debug")]
98impl core::fmt::Debug for R {
99    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
100        f.debug_struct("DLL_CTRL")
101            .field("dll_ctrl_enable", &self.dll_ctrl_enable())
102            .field("dll_ctrl_reset", &self.dll_ctrl_reset())
103            .field("dll_ctrl_slv_force_upd", &self.dll_ctrl_slv_force_upd())
104            .field("dll_ctrl_slv_dly_target0", &self.dll_ctrl_slv_dly_target0())
105            .field("dll_ctrl_gate_update", &self.dll_ctrl_gate_update())
106            .field("dll_ctrl_slv_override", &self.dll_ctrl_slv_override())
107            .field(
108                "dll_ctrl_slv_override_val",
109                &self.dll_ctrl_slv_override_val(),
110            )
111            .field("dll_ctrl_slv_dly_target1", &self.dll_ctrl_slv_dly_target1())
112            .field("dll_ctrl_slv_update_int", &self.dll_ctrl_slv_update_int())
113            .field("dll_ctrl_ref_update_int", &self.dll_ctrl_ref_update_int())
114            .finish()
115    }
116}
117impl W {
118    #[doc = "Bit 0 - DLL_CTRL_ENABLE"]
119    #[inline(always)]
120    pub fn dll_ctrl_enable(&mut self) -> DllCtrlEnableW<DllCtrlSpec> {
121        DllCtrlEnableW::new(self, 0)
122    }
123    #[doc = "Bit 1 - DLL_CTRL_RESET"]
124    #[inline(always)]
125    pub fn dll_ctrl_reset(&mut self) -> DllCtrlResetW<DllCtrlSpec> {
126        DllCtrlResetW::new(self, 1)
127    }
128    #[doc = "Bit 2 - DLL_CTRL_SLV_FORCE_UPD"]
129    #[inline(always)]
130    pub fn dll_ctrl_slv_force_upd(&mut self) -> DllCtrlSlvForceUpdW<DllCtrlSpec> {
131        DllCtrlSlvForceUpdW::new(self, 2)
132    }
133    #[doc = "Bits 3:6 - DLL_CTRL_SLV_DLY_TARGET0"]
134    #[inline(always)]
135    pub fn dll_ctrl_slv_dly_target0(&mut self) -> DllCtrlSlvDlyTarget0W<DllCtrlSpec> {
136        DllCtrlSlvDlyTarget0W::new(self, 3)
137    }
138    #[doc = "Bit 7 - DLL_CTRL_GATE_UPDATE"]
139    #[inline(always)]
140    pub fn dll_ctrl_gate_update(&mut self) -> DllCtrlGateUpdateW<DllCtrlSpec> {
141        DllCtrlGateUpdateW::new(self, 7)
142    }
143    #[doc = "Bit 8 - DLL_CTRL_SLV_OVERRIDE"]
144    #[inline(always)]
145    pub fn dll_ctrl_slv_override(&mut self) -> DllCtrlSlvOverrideW<DllCtrlSpec> {
146        DllCtrlSlvOverrideW::new(self, 8)
147    }
148    #[doc = "Bits 9:15 - DLL_CTRL_SLV_OVERRIDE_VAL"]
149    #[inline(always)]
150    pub fn dll_ctrl_slv_override_val(&mut self) -> DllCtrlSlvOverrideValW<DllCtrlSpec> {
151        DllCtrlSlvOverrideValW::new(self, 9)
152    }
153    #[doc = "Bits 16:18 - DLL_CTRL_SLV_DLY_TARGET1"]
154    #[inline(always)]
155    pub fn dll_ctrl_slv_dly_target1(&mut self) -> DllCtrlSlvDlyTarget1W<DllCtrlSpec> {
156        DllCtrlSlvDlyTarget1W::new(self, 16)
157    }
158    #[doc = "Bits 20:27 - DLL_CTRL_SLV_UPDATE_INT"]
159    #[inline(always)]
160    pub fn dll_ctrl_slv_update_int(&mut self) -> DllCtrlSlvUpdateIntW<DllCtrlSpec> {
161        DllCtrlSlvUpdateIntW::new(self, 20)
162    }
163    #[doc = "Bits 28:31 - DLL_CTRL_REF_UPDATE_INT"]
164    #[inline(always)]
165    pub fn dll_ctrl_ref_update_int(&mut self) -> DllCtrlRefUpdateIntW<DllCtrlSpec> {
166        DllCtrlRefUpdateIntW::new(self, 28)
167    }
168}
169#[doc = "DLL (Delay Line) Control\n\nYou can [`read`](crate::Reg::read) this register and get [`dll_ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dll_ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
170pub struct DllCtrlSpec;
171impl crate::RegisterSpec for DllCtrlSpec {
172    type Ux = u32;
173}
174#[doc = "`read()` method returns [`dll_ctrl::R`](R) reader structure"]
175impl crate::Readable for DllCtrlSpec {}
176#[doc = "`write(|w| ..)` method takes [`dll_ctrl::W`](W) writer structure"]
177impl crate::Writable for DllCtrlSpec {
178    type Safety = crate::Unsafe;
179    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
180    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
181}
182#[doc = "`reset()` method sets DLL_CTRL to value 0x0200"]
183impl crate::Resettable for DllCtrlSpec {
184    const RESET_VALUE: u32 = 0x0200;
185}