1#[doc = "Register `BLEND_RGB` reader"]
2pub type R = crate::R<BLEND_RGB_SPEC>;
3#[doc = "Register `BLEND_RGB` writer"]
4pub type W = crate::W<BLEND_RGB_SPEC>;
5#[doc = "Field `BLEND1_RX_B` reader - blue color for A4/A8 mode."]
6pub type BLEND1_RX_B_R = crate::FieldReader;
7#[doc = "Field `BLEND1_RX_B` writer - blue color for A4/A8 mode."]
8pub type BLEND1_RX_B_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `BLEND1_RX_G` reader - green color for A4/A8 mode."]
10pub type BLEND1_RX_G_R = crate::FieldReader;
11#[doc = "Field `BLEND1_RX_G` writer - green color for A4/A8 mode."]
12pub type BLEND1_RX_G_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `BLEND1_RX_R` reader - red color for A4/A8 mode."]
14pub type BLEND1_RX_R_R = crate::FieldReader;
15#[doc = "Field `BLEND1_RX_R` writer - red color for A4/A8 mode."]
16pub type BLEND1_RX_R_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17impl R {
18 #[doc = "Bits 0:7 - blue color for A4/A8 mode."]
19 #[inline(always)]
20 pub fn blend1_rx_b(&self) -> BLEND1_RX_B_R {
21 BLEND1_RX_B_R::new((self.bits & 0xff) as u8)
22 }
23 #[doc = "Bits 8:15 - green color for A4/A8 mode."]
24 #[inline(always)]
25 pub fn blend1_rx_g(&self) -> BLEND1_RX_G_R {
26 BLEND1_RX_G_R::new(((self.bits >> 8) & 0xff) as u8)
27 }
28 #[doc = "Bits 16:23 - red color for A4/A8 mode."]
29 #[inline(always)]
30 pub fn blend1_rx_r(&self) -> BLEND1_RX_R_R {
31 BLEND1_RX_R_R::new(((self.bits >> 16) & 0xff) as u8)
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("BLEND_RGB")
38 .field(
39 "blend1_rx_b",
40 &format_args!("{}", self.blend1_rx_b().bits()),
41 )
42 .field(
43 "blend1_rx_g",
44 &format_args!("{}", self.blend1_rx_g().bits()),
45 )
46 .field(
47 "blend1_rx_r",
48 &format_args!("{}", self.blend1_rx_r().bits()),
49 )
50 .finish()
51 }
52}
53#[cfg(feature = "impl-register-debug")]
54impl core::fmt::Debug for crate::generic::Reg<BLEND_RGB_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:7 - blue color for A4/A8 mode."]
61 #[inline(always)]
62 #[must_use]
63 pub fn blend1_rx_b(&mut self) -> BLEND1_RX_B_W<BLEND_RGB_SPEC> {
64 BLEND1_RX_B_W::new(self, 0)
65 }
66 #[doc = "Bits 8:15 - green color for A4/A8 mode."]
67 #[inline(always)]
68 #[must_use]
69 pub fn blend1_rx_g(&mut self) -> BLEND1_RX_G_W<BLEND_RGB_SPEC> {
70 BLEND1_RX_G_W::new(self, 8)
71 }
72 #[doc = "Bits 16:23 - red color for A4/A8 mode."]
73 #[inline(always)]
74 #[must_use]
75 pub fn blend1_rx_r(&mut self) -> BLEND1_RX_R_W<BLEND_RGB_SPEC> {
76 BLEND1_RX_R_W::new(self, 16)
77 }
78}
79#[doc = "RGB color register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`blend_rgb::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 [`blend_rgb::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct BLEND_RGB_SPEC;
81impl crate::RegisterSpec for BLEND_RGB_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [`blend_rgb::R`](R) reader structure"]
85impl crate::Readable for BLEND_RGB_SPEC {}
86#[doc = "`write(|w| ..)` method takes [`blend_rgb::W`](W) writer structure"]
87impl crate::Writable for BLEND_RGB_SPEC {
88 type Safety = crate::Unsafe;
89 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
90 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91}
92#[doc = "`reset()` method sets BLEND_RGB to value 0x0080_8080"]
93impl crate::Resettable for BLEND_RGB_SPEC {
94 const RESET_VALUE: u32 = 0x0080_8080;
95}