1#[doc = "Register `DQT_INFO` reader"]
2pub type R = crate::R<DQT_INFO_SPEC>;
3#[doc = "Register `DQT_INFO` writer"]
4pub type W = crate::W<DQT_INFO_SPEC>;
5#[doc = "Field `T0_DQT_INFO` reader - Configure dqt table0's quantization coefficient precision in bit\\[7:4\\], configure dqt table0's table id in bit\\[3:0\\]"]
6pub type T0_DQT_INFO_R = crate::FieldReader;
7#[doc = "Field `T0_DQT_INFO` writer - Configure dqt table0's quantization coefficient precision in bit\\[7:4\\], configure dqt table0's table id in bit\\[3:0\\]"]
8pub type T0_DQT_INFO_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `T1_DQT_INFO` reader - Configure dqt table1's quantization coefficient precision in bit\\[7:4\\], configure dqt table1's table id in bit\\[3:0\\]"]
10pub type T1_DQT_INFO_R = crate::FieldReader;
11#[doc = "Field `T1_DQT_INFO` writer - Configure dqt table1's quantization coefficient precision in bit\\[7:4\\], configure dqt table1's table id in bit\\[3:0\\]"]
12pub type T1_DQT_INFO_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `T2_DQT_INFO` reader - Configure dqt table2's quantization coefficient precision in bit\\[7:4\\], configure dqt table2's table id in bit\\[3:0\\]"]
14pub type T2_DQT_INFO_R = crate::FieldReader;
15#[doc = "Field `T2_DQT_INFO` writer - Configure dqt table2's quantization coefficient precision in bit\\[7:4\\], configure dqt table2's table id in bit\\[3:0\\]"]
16pub type T2_DQT_INFO_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17#[doc = "Field `T3_DQT_INFO` reader - Configure dqt table3's quantization coefficient precision in bit\\[7:4\\], configure dqt table3's table id in bit\\[3:0\\]"]
18pub type T3_DQT_INFO_R = crate::FieldReader;
19#[doc = "Field `T3_DQT_INFO` writer - Configure dqt table3's quantization coefficient precision in bit\\[7:4\\], configure dqt table3's table id in bit\\[3:0\\]"]
20pub type T3_DQT_INFO_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
21impl R {
22 #[doc = "Bits 0:7 - Configure dqt table0's quantization coefficient precision in bit\\[7:4\\], configure dqt table0's table id in bit\\[3:0\\]"]
23 #[inline(always)]
24 pub fn t0_dqt_info(&self) -> T0_DQT_INFO_R {
25 T0_DQT_INFO_R::new((self.bits & 0xff) as u8)
26 }
27 #[doc = "Bits 8:15 - Configure dqt table1's quantization coefficient precision in bit\\[7:4\\], configure dqt table1's table id in bit\\[3:0\\]"]
28 #[inline(always)]
29 pub fn t1_dqt_info(&self) -> T1_DQT_INFO_R {
30 T1_DQT_INFO_R::new(((self.bits >> 8) & 0xff) as u8)
31 }
32 #[doc = "Bits 16:23 - Configure dqt table2's quantization coefficient precision in bit\\[7:4\\], configure dqt table2's table id in bit\\[3:0\\]"]
33 #[inline(always)]
34 pub fn t2_dqt_info(&self) -> T2_DQT_INFO_R {
35 T2_DQT_INFO_R::new(((self.bits >> 16) & 0xff) as u8)
36 }
37 #[doc = "Bits 24:31 - Configure dqt table3's quantization coefficient precision in bit\\[7:4\\], configure dqt table3's table id in bit\\[3:0\\]"]
38 #[inline(always)]
39 pub fn t3_dqt_info(&self) -> T3_DQT_INFO_R {
40 T3_DQT_INFO_R::new(((self.bits >> 24) & 0xff) as u8)
41 }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46 f.debug_struct("DQT_INFO")
47 .field(
48 "t0_dqt_info",
49 &format_args!("{}", self.t0_dqt_info().bits()),
50 )
51 .field(
52 "t1_dqt_info",
53 &format_args!("{}", self.t1_dqt_info().bits()),
54 )
55 .field(
56 "t2_dqt_info",
57 &format_args!("{}", self.t2_dqt_info().bits()),
58 )
59 .field(
60 "t3_dqt_info",
61 &format_args!("{}", self.t3_dqt_info().bits()),
62 )
63 .finish()
64 }
65}
66#[cfg(feature = "impl-register-debug")]
67impl core::fmt::Debug for crate::generic::Reg<DQT_INFO_SPEC> {
68 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
69 core::fmt::Debug::fmt(&self.read(), f)
70 }
71}
72impl W {
73 #[doc = "Bits 0:7 - Configure dqt table0's quantization coefficient precision in bit\\[7:4\\], configure dqt table0's table id in bit\\[3:0\\]"]
74 #[inline(always)]
75 #[must_use]
76 pub fn t0_dqt_info(&mut self) -> T0_DQT_INFO_W<DQT_INFO_SPEC> {
77 T0_DQT_INFO_W::new(self, 0)
78 }
79 #[doc = "Bits 8:15 - Configure dqt table1's quantization coefficient precision in bit\\[7:4\\], configure dqt table1's table id in bit\\[3:0\\]"]
80 #[inline(always)]
81 #[must_use]
82 pub fn t1_dqt_info(&mut self) -> T1_DQT_INFO_W<DQT_INFO_SPEC> {
83 T1_DQT_INFO_W::new(self, 8)
84 }
85 #[doc = "Bits 16:23 - Configure dqt table2's quantization coefficient precision in bit\\[7:4\\], configure dqt table2's table id in bit\\[3:0\\]"]
86 #[inline(always)]
87 #[must_use]
88 pub fn t2_dqt_info(&mut self) -> T2_DQT_INFO_W<DQT_INFO_SPEC> {
89 T2_DQT_INFO_W::new(self, 16)
90 }
91 #[doc = "Bits 24:31 - Configure dqt table3's quantization coefficient precision in bit\\[7:4\\], configure dqt table3's table id in bit\\[3:0\\]"]
92 #[inline(always)]
93 #[must_use]
94 pub fn t3_dqt_info(&mut self) -> T3_DQT_INFO_W<DQT_INFO_SPEC> {
95 T3_DQT_INFO_W::new(self, 24)
96 }
97}
98#[doc = "Control and configuration registers\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dqt_info::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 [`dqt_info::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
99pub struct DQT_INFO_SPEC;
100impl crate::RegisterSpec for DQT_INFO_SPEC {
101 type Ux = u32;
102}
103#[doc = "`read()` method returns [`dqt_info::R`](R) reader structure"]
104impl crate::Readable for DQT_INFO_SPEC {}
105#[doc = "`write(|w| ..)` method takes [`dqt_info::W`](W) writer structure"]
106impl crate::Writable for DQT_INFO_SPEC {
107 type Safety = crate::Unsafe;
108 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
109 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
110}
111#[doc = "`reset()` method sets DQT_INFO to value 0x0302_0100"]
112impl crate::Resettable for DQT_INFO_SPEC {
113 const RESET_VALUE: u32 = 0x0302_0100;
114}