corstone300_pac/audio_i2s/
itop1.rs1#[doc = "Register `ITOP1` reader"]
6pub struct R(crate::R<ITOP1_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<ITOP1_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<ITOP1_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<ITOP1_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Register `ITOP1` writer"]
21pub struct W(crate::W<ITOP1_SPEC>);
22impl core::ops::Deref for W {
23 type Target = crate::W<ITOP1_SPEC>;
24 #[inline(always)]
25 fn deref(&self) -> &Self::Target {
26 &self.0
27 }
28}
29impl core::ops::DerefMut for W {
30 #[inline(always)]
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34}
35impl From<crate::W<ITOP1_SPEC>> for W {
36 #[inline(always)]
37 fn from(writer: crate::W<ITOP1_SPEC>) -> Self {
38 W(writer)
39 }
40}
41#[doc = "Field `SDOUT` reader - SDOUT signal value"]
42pub type SDOUT_R = crate::BitReader<bool>;
43#[doc = "Field `SDOUT` writer - SDOUT signal value"]
44pub type SDOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, ITOP1_SPEC, bool, O>;
45#[doc = "Field `SCLK` reader - SLCK signal value"]
46pub type SCLK_R = crate::BitReader<bool>;
47#[doc = "Field `SCLK` writer - SLCK signal value"]
48pub type SCLK_W<'a, const O: u8> = crate::BitWriter<'a, u32, ITOP1_SPEC, bool, O>;
49#[doc = "Field `LRCK` reader - LRCK signal value"]
50pub type LRCK_R = crate::BitReader<bool>;
51#[doc = "Field `LRCK` writer - LRCK signal value"]
52pub type LRCK_W<'a, const O: u8> = crate::BitWriter<'a, u32, ITOP1_SPEC, bool, O>;
53#[doc = "Field `IRQOUT` reader - IRQOUT signal value"]
54pub type IRQOUT_R = crate::BitReader<bool>;
55#[doc = "Field `IRQOUT` writer - IRQOUT signal value"]
56pub type IRQOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, ITOP1_SPEC, bool, O>;
57impl R {
58 #[doc = "Bit 0 - SDOUT signal value"]
59 #[inline(always)]
60 pub fn sdout(&self) -> SDOUT_R {
61 SDOUT_R::new((self.bits & 1) != 0)
62 }
63 #[doc = "Bit 1 - SLCK signal value"]
64 #[inline(always)]
65 pub fn sclk(&self) -> SCLK_R {
66 SCLK_R::new(((self.bits >> 1) & 1) != 0)
67 }
68 #[doc = "Bit 2 - LRCK signal value"]
69 #[inline(always)]
70 pub fn lrck(&self) -> LRCK_R {
71 LRCK_R::new(((self.bits >> 2) & 1) != 0)
72 }
73 #[doc = "Bit 3 - IRQOUT signal value"]
74 #[inline(always)]
75 pub fn irqout(&self) -> IRQOUT_R {
76 IRQOUT_R::new(((self.bits >> 3) & 1) != 0)
77 }
78}
79impl W {
80 #[doc = "Bit 0 - SDOUT signal value"]
81 #[inline(always)]
82 pub fn sdout(&mut self) -> SDOUT_W<0> {
83 SDOUT_W::new(self)
84 }
85 #[doc = "Bit 1 - SLCK signal value"]
86 #[inline(always)]
87 pub fn sclk(&mut self) -> SCLK_W<1> {
88 SCLK_W::new(self)
89 }
90 #[doc = "Bit 2 - LRCK signal value"]
91 #[inline(always)]
92 pub fn lrck(&mut self) -> LRCK_W<2> {
93 LRCK_W::new(self)
94 }
95 #[doc = "Bit 3 - IRQOUT signal value"]
96 #[inline(always)]
97 pub fn irqout(&mut self) -> IRQOUT_W<3> {
98 IRQOUT_W::new(self)
99 }
100 #[doc = "Writes raw bits to the register."]
101 #[inline(always)]
102 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
103 self.0.bits(bits);
104 self
105 }
106}
107#[doc = "Integration Test Output register 1\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 [itop1](index.html) module"]
108pub struct ITOP1_SPEC;
109impl crate::RegisterSpec for ITOP1_SPEC {
110 type Ux = u32;
111}
112#[doc = "`read()` method returns [itop1::R](R) reader structure"]
113impl crate::Readable for ITOP1_SPEC {
114 type Reader = R;
115}
116#[doc = "`write(|w| ..)` method takes [itop1::W](W) writer structure"]
117impl crate::Writable for ITOP1_SPEC {
118 type Writer = W;
119}
120#[doc = "`reset()` method sets ITOP1 to value 0"]
121impl crate::Resettable for ITOP1_SPEC {
122 #[inline(always)]
123 fn reset_value() -> Self::Ux {
124 0
125 }
126}