esp32p4/h264/
b_sys_conf.rs1#[doc = "Register `B_SYS_CONF` reader"]
2pub type R = crate::R<B_SYS_CONF_SPEC>;
3#[doc = "Register `B_SYS_CONF` writer"]
4pub type W = crate::W<B_SYS_CONF_SPEC>;
5#[doc = "Field `B_DB_TMP_READY_TRIGGER_MB_NUM` reader - Configures when to trigger video B H264_DB_TMP_READY_INT. When the (MB number of written db temp+1) is greater than this filed in first MB line, trigger H264_DB_TMP_READY_INT. Min is 3."]
6pub type B_DB_TMP_READY_TRIGGER_MB_NUM_R = crate::FieldReader;
7#[doc = "Field `B_DB_TMP_READY_TRIGGER_MB_NUM` writer - Configures when to trigger video B H264_DB_TMP_READY_INT. When the (MB number of written db temp+1) is greater than this filed in first MB line, trigger H264_DB_TMP_READY_INT. Min is 3."]
8pub type B_DB_TMP_READY_TRIGGER_MB_NUM_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
9#[doc = "Field `B_REC_READY_TRIGGER_MB_LINES` reader - Configures when to trigger video B H264_REC_READY_INT. When the MB line number of generated reconstruct pixel is greater than this filed, trigger H264_REC_READY_INT. Min is 4."]
10pub type B_REC_READY_TRIGGER_MB_LINES_R = crate::FieldReader;
11#[doc = "Field `B_REC_READY_TRIGGER_MB_LINES` writer - Configures when to trigger video B H264_REC_READY_INT. When the MB line number of generated reconstruct pixel is greater than this filed, trigger H264_REC_READY_INT. Min is 4."]
12pub type B_REC_READY_TRIGGER_MB_LINES_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
13#[doc = "Field `B_INTRA_COST_CMP_OFFSET` reader - Configures video B intra cost offset when I MB compared with P MB."]
14pub type B_INTRA_COST_CMP_OFFSET_R = crate::FieldReader<u16>;
15#[doc = "Field `B_INTRA_COST_CMP_OFFSET` writer - Configures video B intra cost offset when I MB compared with P MB."]
16pub type B_INTRA_COST_CMP_OFFSET_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
17impl R {
18 #[doc = "Bits 0:6 - Configures when to trigger video B H264_DB_TMP_READY_INT. When the (MB number of written db temp+1) is greater than this filed in first MB line, trigger H264_DB_TMP_READY_INT. Min is 3."]
19 #[inline(always)]
20 pub fn b_db_tmp_ready_trigger_mb_num(&self) -> B_DB_TMP_READY_TRIGGER_MB_NUM_R {
21 B_DB_TMP_READY_TRIGGER_MB_NUM_R::new((self.bits & 0x7f) as u8)
22 }
23 #[doc = "Bits 7:13 - Configures when to trigger video B H264_REC_READY_INT. When the MB line number of generated reconstruct pixel is greater than this filed, trigger H264_REC_READY_INT. Min is 4."]
24 #[inline(always)]
25 pub fn b_rec_ready_trigger_mb_lines(&self) -> B_REC_READY_TRIGGER_MB_LINES_R {
26 B_REC_READY_TRIGGER_MB_LINES_R::new(((self.bits >> 7) & 0x7f) as u8)
27 }
28 #[doc = "Bits 14:29 - Configures video B intra cost offset when I MB compared with P MB."]
29 #[inline(always)]
30 pub fn b_intra_cost_cmp_offset(&self) -> B_INTRA_COST_CMP_OFFSET_R {
31 B_INTRA_COST_CMP_OFFSET_R::new(((self.bits >> 14) & 0xffff) as u16)
32 }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for R {
36 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
37 f.debug_struct("B_SYS_CONF")
38 .field(
39 "b_db_tmp_ready_trigger_mb_num",
40 &format_args!("{}", self.b_db_tmp_ready_trigger_mb_num().bits()),
41 )
42 .field(
43 "b_rec_ready_trigger_mb_lines",
44 &format_args!("{}", self.b_rec_ready_trigger_mb_lines().bits()),
45 )
46 .field(
47 "b_intra_cost_cmp_offset",
48 &format_args!("{}", self.b_intra_cost_cmp_offset().bits()),
49 )
50 .finish()
51 }
52}
53#[cfg(feature = "impl-register-debug")]
54impl core::fmt::Debug for crate::generic::Reg<B_SYS_CONF_SPEC> {
55 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
56 core::fmt::Debug::fmt(&self.read(), f)
57 }
58}
59impl W {
60 #[doc = "Bits 0:6 - Configures when to trigger video B H264_DB_TMP_READY_INT. When the (MB number of written db temp+1) is greater than this filed in first MB line, trigger H264_DB_TMP_READY_INT. Min is 3."]
61 #[inline(always)]
62 #[must_use]
63 pub fn b_db_tmp_ready_trigger_mb_num(
64 &mut self,
65 ) -> B_DB_TMP_READY_TRIGGER_MB_NUM_W<B_SYS_CONF_SPEC> {
66 B_DB_TMP_READY_TRIGGER_MB_NUM_W::new(self, 0)
67 }
68 #[doc = "Bits 7:13 - Configures when to trigger video B H264_REC_READY_INT. When the MB line number of generated reconstruct pixel is greater than this filed, trigger H264_REC_READY_INT. Min is 4."]
69 #[inline(always)]
70 #[must_use]
71 pub fn b_rec_ready_trigger_mb_lines(
72 &mut self,
73 ) -> B_REC_READY_TRIGGER_MB_LINES_W<B_SYS_CONF_SPEC> {
74 B_REC_READY_TRIGGER_MB_LINES_W::new(self, 7)
75 }
76 #[doc = "Bits 14:29 - Configures video B intra cost offset when I MB compared with P MB."]
77 #[inline(always)]
78 #[must_use]
79 pub fn b_intra_cost_cmp_offset(&mut self) -> B_INTRA_COST_CMP_OFFSET_W<B_SYS_CONF_SPEC> {
80 B_INTRA_COST_CMP_OFFSET_W::new(self, 14)
81 }
82}
83#[doc = "Video B system level configuration register.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`b_sys_conf::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 [`b_sys_conf::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
84pub struct B_SYS_CONF_SPEC;
85impl crate::RegisterSpec for B_SYS_CONF_SPEC {
86 type Ux = u32;
87}
88#[doc = "`read()` method returns [`b_sys_conf::R`](R) reader structure"]
89impl crate::Readable for B_SYS_CONF_SPEC {}
90#[doc = "`write(|w| ..)` method takes [`b_sys_conf::W`](W) writer structure"]
91impl crate::Writable for B_SYS_CONF_SPEC {
92 type Safety = crate::Unsafe;
93 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
94 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
95}
96#[doc = "`reset()` method sets B_SYS_CONF to value 0x0203"]
97impl crate::Resettable for B_SYS_CONF_SPEC {
98 const RESET_VALUE: u32 = 0x0203;
99}