esp32p4/h264/
b_roi_config.rs1#[doc = "Register `B_ROI_CONFIG` reader"]
2pub type R = crate::R<B_ROI_CONFIG_SPEC>;
3#[doc = "Register `B_ROI_CONFIG` writer"]
4pub type W = crate::W<B_ROI_CONFIG_SPEC>;
5#[doc = "Field `B_ROI_EN` reader - Configure whether or not to enable ROI in video B.\\\\0:not enable ROI\\\\1:enable ROI."]
6pub type B_ROI_EN_R = crate::BitReader;
7#[doc = "Field `B_ROI_EN` writer - Configure whether or not to enable ROI in video B.\\\\0:not enable ROI\\\\1:enable ROI."]
8pub type B_ROI_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `B_ROI_MODE` reader - Configure the mode of ROI in video B.\\\\0:fixed qp\\\\1:delta qp."]
10pub type B_ROI_MODE_R = crate::BitReader;
11#[doc = "Field `B_ROI_MODE` writer - Configure the mode of ROI in video B.\\\\0:fixed qp\\\\1:delta qp."]
12pub type B_ROI_MODE_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 0 - Configure whether or not to enable ROI in video B.\\\\0:not enable ROI\\\\1:enable ROI."]
15 #[inline(always)]
16 pub fn b_roi_en(&self) -> B_ROI_EN_R {
17 B_ROI_EN_R::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 1 - Configure the mode of ROI in video B.\\\\0:fixed qp\\\\1:delta qp."]
20 #[inline(always)]
21 pub fn b_roi_mode(&self) -> B_ROI_MODE_R {
22 B_ROI_MODE_R::new(((self.bits >> 1) & 1) != 0)
23 }
24}
25#[cfg(feature = "impl-register-debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("B_ROI_CONFIG")
29 .field("b_roi_en", &format_args!("{}", self.b_roi_en().bit()))
30 .field("b_roi_mode", &format_args!("{}", self.b_roi_mode().bit()))
31 .finish()
32 }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for crate::generic::Reg<B_ROI_CONFIG_SPEC> {
36 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
37 core::fmt::Debug::fmt(&self.read(), f)
38 }
39}
40impl W {
41 #[doc = "Bit 0 - Configure whether or not to enable ROI in video B.\\\\0:not enable ROI\\\\1:enable ROI."]
42 #[inline(always)]
43 #[must_use]
44 pub fn b_roi_en(&mut self) -> B_ROI_EN_W<B_ROI_CONFIG_SPEC> {
45 B_ROI_EN_W::new(self, 0)
46 }
47 #[doc = "Bit 1 - Configure the mode of ROI in video B.\\\\0:fixed qp\\\\1:delta qp."]
48 #[inline(always)]
49 #[must_use]
50 pub fn b_roi_mode(&mut self) -> B_ROI_MODE_W<B_ROI_CONFIG_SPEC> {
51 B_ROI_MODE_W::new(self, 1)
52 }
53}
54#[doc = "Video B H264 ROI configure register.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`b_roi_config::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_roi_config::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct B_ROI_CONFIG_SPEC;
56impl crate::RegisterSpec for B_ROI_CONFIG_SPEC {
57 type Ux = u32;
58}
59#[doc = "`read()` method returns [`b_roi_config::R`](R) reader structure"]
60impl crate::Readable for B_ROI_CONFIG_SPEC {}
61#[doc = "`write(|w| ..)` method takes [`b_roi_config::W`](W) writer structure"]
62impl crate::Writable for B_ROI_CONFIG_SPEC {
63 type Safety = crate::Unsafe;
64 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
65 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
66}
67#[doc = "`reset()` method sets B_ROI_CONFIG to value 0"]
68impl crate::Resettable for B_ROI_CONFIG_SPEC {
69 const RESET_VALUE: u32 = 0;
70}