d1_pac/tve/
tve_auto_detection_debounce_setting.rs1#[doc = "Register `tve_auto_detection_debounce_setting` reader"]
2pub type R = crate::R<TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC>;
3#[doc = "Register `tve_auto_detection_debounce_setting` writer"]
4pub type W = crate::W<TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC>;
5#[doc = "Field `dac0_de_bounce_times` reader - The de_bounce time for hot plug detect function."]
6pub type DAC0_DE_BOUNCE_TIMES_R = crate::FieldReader;
7#[doc = "Field `dac0_de_bounce_times` writer - The de_bounce time for hot plug detect function."]
8pub type DAC0_DE_BOUNCE_TIMES_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `dac_test_register` reader - DAC test register."]
10pub type DAC_TEST_REGISTER_R = crate::FieldReader<u16>;
11#[doc = "Field `dac_test_register` writer - DAC test register."]
12pub type DAC_TEST_REGISTER_W<'a, REG> = crate::FieldWriter<'a, REG, 10, u16>;
13impl R {
14 #[doc = "Bits 0:3 - The de_bounce time for hot plug detect function."]
15 #[inline(always)]
16 pub fn dac0_de_bounce_times(&self) -> DAC0_DE_BOUNCE_TIMES_R {
17 DAC0_DE_BOUNCE_TIMES_R::new((self.bits & 0x0f) as u8)
18 }
19 #[doc = "Bits 16:25 - DAC test register."]
20 #[inline(always)]
21 pub fn dac_test_register(&self) -> DAC_TEST_REGISTER_R {
22 DAC_TEST_REGISTER_R::new(((self.bits >> 16) & 0x03ff) as u16)
23 }
24}
25impl W {
26 #[doc = "Bits 0:3 - The de_bounce time for hot plug detect function."]
27 #[inline(always)]
28 #[must_use]
29 pub fn dac0_de_bounce_times(
30 &mut self,
31 ) -> DAC0_DE_BOUNCE_TIMES_W<TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC> {
32 DAC0_DE_BOUNCE_TIMES_W::new(self, 0)
33 }
34 #[doc = "Bits 16:25 - DAC test register."]
35 #[inline(always)]
36 #[must_use]
37 pub fn dac_test_register(
38 &mut self,
39 ) -> DAC_TEST_REGISTER_W<TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC> {
40 DAC_TEST_REGISTER_W::new(self, 16)
41 }
42 #[doc = r" Writes raw bits to the register."]
43 #[doc = r""]
44 #[doc = r" # Safety"]
45 #[doc = r""]
46 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
47 #[inline(always)]
48 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
49 self.bits = bits;
50 self
51 }
52}
53#[doc = "TV Encoder Auto Detection De-bounce Setting Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`tve_auto_detection_debounce_setting::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`tve_auto_detection_debounce_setting::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
54pub struct TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC;
55impl crate::RegisterSpec for TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC {
56 type Ux = u32;
57}
58#[doc = "`read()` method returns [`tve_auto_detection_debounce_setting::R`](R) reader structure"]
59impl crate::Readable for TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC {}
60#[doc = "`write(|w| ..)` method takes [`tve_auto_detection_debounce_setting::W`](W) writer structure"]
61impl crate::Writable for TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC {
62 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
63 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
64}
65#[doc = "`reset()` method sets tve_auto_detection_debounce_setting to value 0"]
66impl crate::Resettable for TVE_AUTO_DETECTION_DEBOUNCE_SETTING_SPEC {
67 const RESET_VALUE: Self::Ux = 0;
68}