bl702_pac/mjpeg/
mjpeg_swap_mode.rs1#[doc = "Register `mjpeg_swap_mode` reader"]
2pub struct R(crate::R<MJPEG_SWAP_MODE_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<MJPEG_SWAP_MODE_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<MJPEG_SWAP_MODE_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<MJPEG_SWAP_MODE_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `mjpeg_swap_mode` writer"]
17pub struct W(crate::W<MJPEG_SWAP_MODE_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<MJPEG_SWAP_MODE_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_SWAP_MODE_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<MJPEG_SWAP_MODE_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `reg_w_swap_mode` reader - "]
38pub type REG_W_SWAP_MODE_R = crate::BitReader<bool>;
39#[doc = "Field `reg_w_swap_mode` writer - "]
40pub type REG_W_SWAP_MODE_W<'a, const O: u8> =
41 crate::BitWriter<'a, u32, MJPEG_SWAP_MODE_SPEC, bool, O>;
42#[doc = "Field `sts_swap0_full` reader - "]
43pub type STS_SWAP0_FULL_R = crate::BitReader<bool>;
44#[doc = "Field `sts_swap0_full` writer - "]
45pub type STS_SWAP0_FULL_W<'a, const O: u8> =
46 crate::BitWriter<'a, u32, MJPEG_SWAP_MODE_SPEC, bool, O>;
47#[doc = "Field `sts_swap1_full` reader - "]
48pub type STS_SWAP1_FULL_R = crate::BitReader<bool>;
49#[doc = "Field `sts_swap1_full` writer - "]
50pub type STS_SWAP1_FULL_W<'a, const O: u8> =
51 crate::BitWriter<'a, u32, MJPEG_SWAP_MODE_SPEC, bool, O>;
52#[doc = "Field `sts_read_swap_idx` reader - "]
53pub type STS_READ_SWAP_IDX_R = crate::BitReader<bool>;
54#[doc = "Field `sts_read_swap_idx` writer - "]
55pub type STS_READ_SWAP_IDX_W<'a, const O: u8> =
56 crate::BitWriter<'a, u32, MJPEG_SWAP_MODE_SPEC, bool, O>;
57#[doc = "Field `sts_swap_fstart` reader - "]
58pub type STS_SWAP_FSTART_R = crate::BitReader<bool>;
59#[doc = "Field `sts_swap_fstart` writer - "]
60pub type STS_SWAP_FSTART_W<'a, const O: u8> =
61 crate::BitWriter<'a, u32, MJPEG_SWAP_MODE_SPEC, bool, O>;
62#[doc = "Field `sts_swap_fend` reader - "]
63pub type STS_SWAP_FEND_R = crate::BitReader<bool>;
64#[doc = "Field `sts_swap_fend` writer - "]
65pub type STS_SWAP_FEND_W<'a, const O: u8> =
66 crate::BitWriter<'a, u32, MJPEG_SWAP_MODE_SPEC, bool, O>;
67impl R {
68 #[doc = "Bit 0"]
69 #[inline(always)]
70 pub fn reg_w_swap_mode(&self) -> REG_W_SWAP_MODE_R {
71 REG_W_SWAP_MODE_R::new((self.bits & 1) != 0)
72 }
73 #[doc = "Bit 8"]
74 #[inline(always)]
75 pub fn sts_swap0_full(&self) -> STS_SWAP0_FULL_R {
76 STS_SWAP0_FULL_R::new(((self.bits >> 8) & 1) != 0)
77 }
78 #[doc = "Bit 9"]
79 #[inline(always)]
80 pub fn sts_swap1_full(&self) -> STS_SWAP1_FULL_R {
81 STS_SWAP1_FULL_R::new(((self.bits >> 9) & 1) != 0)
82 }
83 #[doc = "Bit 10"]
84 #[inline(always)]
85 pub fn sts_read_swap_idx(&self) -> STS_READ_SWAP_IDX_R {
86 STS_READ_SWAP_IDX_R::new(((self.bits >> 10) & 1) != 0)
87 }
88 #[doc = "Bit 11"]
89 #[inline(always)]
90 pub fn sts_swap_fstart(&self) -> STS_SWAP_FSTART_R {
91 STS_SWAP_FSTART_R::new(((self.bits >> 11) & 1) != 0)
92 }
93 #[doc = "Bit 12"]
94 #[inline(always)]
95 pub fn sts_swap_fend(&self) -> STS_SWAP_FEND_R {
96 STS_SWAP_FEND_R::new(((self.bits >> 12) & 1) != 0)
97 }
98}
99impl W {
100 #[doc = "Bit 0"]
101 #[inline(always)]
102 #[must_use]
103 pub fn reg_w_swap_mode(&mut self) -> REG_W_SWAP_MODE_W<0> {
104 REG_W_SWAP_MODE_W::new(self)
105 }
106 #[doc = "Bit 8"]
107 #[inline(always)]
108 #[must_use]
109 pub fn sts_swap0_full(&mut self) -> STS_SWAP0_FULL_W<8> {
110 STS_SWAP0_FULL_W::new(self)
111 }
112 #[doc = "Bit 9"]
113 #[inline(always)]
114 #[must_use]
115 pub fn sts_swap1_full(&mut self) -> STS_SWAP1_FULL_W<9> {
116 STS_SWAP1_FULL_W::new(self)
117 }
118 #[doc = "Bit 10"]
119 #[inline(always)]
120 #[must_use]
121 pub fn sts_read_swap_idx(&mut self) -> STS_READ_SWAP_IDX_W<10> {
122 STS_READ_SWAP_IDX_W::new(self)
123 }
124 #[doc = "Bit 11"]
125 #[inline(always)]
126 #[must_use]
127 pub fn sts_swap_fstart(&mut self) -> STS_SWAP_FSTART_W<11> {
128 STS_SWAP_FSTART_W::new(self)
129 }
130 #[doc = "Bit 12"]
131 #[inline(always)]
132 #[must_use]
133 pub fn sts_swap_fend(&mut self) -> STS_SWAP_FEND_W<12> {
134 STS_SWAP_FEND_W::new(self)
135 }
136 #[doc = "Writes raw bits to the register."]
137 #[inline(always)]
138 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
139 self.0.bits(bits);
140 self
141 }
142}
143#[doc = "mjpeg_swap_mode.\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_swap_mode](index.html) module"]
144pub struct MJPEG_SWAP_MODE_SPEC;
145impl crate::RegisterSpec for MJPEG_SWAP_MODE_SPEC {
146 type Ux = u32;
147}
148#[doc = "`read()` method returns [mjpeg_swap_mode::R](R) reader structure"]
149impl crate::Readable for MJPEG_SWAP_MODE_SPEC {
150 type Reader = R;
151}
152#[doc = "`write(|w| ..)` method takes [mjpeg_swap_mode::W](W) writer structure"]
153impl crate::Writable for MJPEG_SWAP_MODE_SPEC {
154 type Writer = W;
155 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
156 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
157}
158#[doc = "`reset()` method sets mjpeg_swap_mode to value 0"]
159impl crate::Resettable for MJPEG_SWAP_MODE_SPEC {
160 const RESET_VALUE: Self::Ux = 0;
161}