1#[doc = "Register `MWDATAB` writer"]
2pub type W = crate::W<MwdatabSpec>;
3#[doc = "Field `VALUE` writer - Data Byte"]
4pub type ValueW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
5#[doc = "End of Message\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum End {
9 #[doc = "0: Not the end"]
10 NotEnd = 0,
11 #[doc = "1: End"]
12 End = 1,
13}
14impl From<End> for bool {
15 #[inline(always)]
16 fn from(variant: End) -> Self {
17 variant as u8 != 0
18 }
19}
20#[doc = "Field `END` writer - End of Message"]
21pub type EndW<'a, REG> = crate::BitWriter<'a, REG, End>;
22impl<'a, REG> EndW<'a, REG>
23where
24 REG: crate::Writable + crate::RegisterSpec,
25{
26 #[doc = "Not the end"]
27 #[inline(always)]
28 pub fn not_end(self) -> &'a mut crate::W<REG> {
29 self.variant(End::NotEnd)
30 }
31 #[doc = "End"]
32 #[inline(always)]
33 pub fn end(self) -> &'a mut crate::W<REG> {
34 self.variant(End::End)
35 }
36}
37#[doc = "End of Message ALSO\n\nValue on reset: 0"]
38#[cfg_attr(feature = "defmt", derive(defmt::Format))]
39#[derive(Clone, Copy, Debug, PartialEq, Eq)]
40pub enum EndAlso {
41 #[doc = "0: Not the end"]
42 NotEnd = 0,
43 #[doc = "1: End"]
44 End = 1,
45}
46impl From<EndAlso> for bool {
47 #[inline(always)]
48 fn from(variant: EndAlso) -> Self {
49 variant as u8 != 0
50 }
51}
52#[doc = "Field `END_ALSO` writer - End of Message ALSO"]
53pub type EndAlsoW<'a, REG> = crate::BitWriter<'a, REG, EndAlso>;
54impl<'a, REG> EndAlsoW<'a, REG>
55where
56 REG: crate::Writable + crate::RegisterSpec,
57{
58 #[doc = "Not the end"]
59 #[inline(always)]
60 pub fn not_end(self) -> &'a mut crate::W<REG> {
61 self.variant(EndAlso::NotEnd)
62 }
63 #[doc = "End"]
64 #[inline(always)]
65 pub fn end(self) -> &'a mut crate::W<REG> {
66 self.variant(EndAlso::End)
67 }
68}
69#[cfg(feature = "debug")]
70impl core::fmt::Debug for crate::generic::Reg<MwdatabSpec> {
71 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
72 write!(f, "(not readable)")
73 }
74}
75impl W {
76 #[doc = "Bits 0:7 - Data Byte"]
77 #[inline(always)]
78 pub fn value(&mut self) -> ValueW<'_, MwdatabSpec> {
79 ValueW::new(self, 0)
80 }
81 #[doc = "Bit 8 - End of Message"]
82 #[inline(always)]
83 pub fn end(&mut self) -> EndW<'_, MwdatabSpec> {
84 EndW::new(self, 8)
85 }
86 #[doc = "Bit 16 - End of Message ALSO"]
87 #[inline(always)]
88 pub fn end_also(&mut self) -> EndAlsoW<'_, MwdatabSpec> {
89 EndAlsoW::new(self, 16)
90 }
91}
92#[doc = "Controller Write Data Byte\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mwdatab::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
93pub struct MwdatabSpec;
94impl crate::RegisterSpec for MwdatabSpec {
95 type Ux = u32;
96}
97#[doc = "`write(|w| ..)` method takes [`mwdatab::W`](W) writer structure"]
98impl crate::Writable for MwdatabSpec {
99 type Safety = crate::Unsafe;
100}
101#[doc = "`reset()` method sets MWDATAB to value 0"]
102impl crate::Resettable for MwdatabSpec {}