bl702_pac/mjpeg/
mjpeg_paket_ctrl.rs1#[doc = "Register `mjpeg_paket_ctrl` reader"]
2pub struct R(crate::R<MJPEG_PAKET_CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<MJPEG_PAKET_CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<MJPEG_PAKET_CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<MJPEG_PAKET_CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `mjpeg_paket_ctrl` writer"]
17pub struct W(crate::W<MJPEG_PAKET_CTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<MJPEG_PAKET_CTRL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<MJPEG_PAKET_CTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<MJPEG_PAKET_CTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `reg_pket_en` reader - "]
38pub type REG_PKET_EN_R = crate::BitReader<bool>;
39#[doc = "Field `reg_pket_en` writer - "]
40pub type REG_PKET_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MJPEG_PAKET_CTRL_SPEC, bool, O>;
41#[doc = "Field `reg_jend_to_pend` reader - "]
42pub type REG_JEND_TO_PEND_R = crate::BitReader<bool>;
43#[doc = "Field `reg_jend_to_pend` writer - "]
44pub type REG_JEND_TO_PEND_W<'a, const O: u8> =
45 crate::BitWriter<'a, u32, MJPEG_PAKET_CTRL_SPEC, bool, O>;
46#[doc = "Field `reg_pket_body_byte` reader - "]
47pub type REG_PKET_BODY_BYTE_R = crate::FieldReader<u16, u16>;
48#[doc = "Field `reg_pket_body_byte` writer - "]
49pub type REG_PKET_BODY_BYTE_W<'a, const O: u8> =
50 crate::FieldWriter<'a, u32, MJPEG_PAKET_CTRL_SPEC, u16, u16, 16, O>;
51impl R {
52 #[doc = "Bit 0"]
53 #[inline(always)]
54 pub fn reg_pket_en(&self) -> REG_PKET_EN_R {
55 REG_PKET_EN_R::new((self.bits & 1) != 0)
56 }
57 #[doc = "Bit 1"]
58 #[inline(always)]
59 pub fn reg_jend_to_pend(&self) -> REG_JEND_TO_PEND_R {
60 REG_JEND_TO_PEND_R::new(((self.bits >> 1) & 1) != 0)
61 }
62 #[doc = "Bits 16:31"]
63 #[inline(always)]
64 pub fn reg_pket_body_byte(&self) -> REG_PKET_BODY_BYTE_R {
65 REG_PKET_BODY_BYTE_R::new(((self.bits >> 16) & 0xffff) as u16)
66 }
67}
68impl W {
69 #[doc = "Bit 0"]
70 #[inline(always)]
71 #[must_use]
72 pub fn reg_pket_en(&mut self) -> REG_PKET_EN_W<0> {
73 REG_PKET_EN_W::new(self)
74 }
75 #[doc = "Bit 1"]
76 #[inline(always)]
77 #[must_use]
78 pub fn reg_jend_to_pend(&mut self) -> REG_JEND_TO_PEND_W<1> {
79 REG_JEND_TO_PEND_W::new(self)
80 }
81 #[doc = "Bits 16:31"]
82 #[inline(always)]
83 #[must_use]
84 pub fn reg_pket_body_byte(&mut self) -> REG_PKET_BODY_BYTE_W<16> {
85 REG_PKET_BODY_BYTE_W::new(self)
86 }
87 #[doc = "Writes raw bits to the register."]
88 #[inline(always)]
89 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
90 self.0.bits(bits);
91 self
92 }
93}
94#[doc = "mjpeg_paket_ctrl.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mjpeg_paket_ctrl](index.html) module"]
95pub struct MJPEG_PAKET_CTRL_SPEC;
96impl crate::RegisterSpec for MJPEG_PAKET_CTRL_SPEC {
97 type Ux = u32;
98}
99#[doc = "`read()` method returns [mjpeg_paket_ctrl::R](R) reader structure"]
100impl crate::Readable for MJPEG_PAKET_CTRL_SPEC {
101 type Reader = R;
102}
103#[doc = "`write(|w| ..)` method takes [mjpeg_paket_ctrl::W](W) writer structure"]
104impl crate::Writable for MJPEG_PAKET_CTRL_SPEC {
105 type Writer = W;
106 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
107 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
108}
109#[doc = "`reset()` method sets mjpeg_paket_ctrl to value 0"]
110impl crate::Resettable for MJPEG_PAKET_CTRL_SPEC {
111 const RESET_VALUE: Self::Ux = 0;
112}