corstone300_pac/ssp0/
icr.rs1#[doc = "Register `ICR` reader"]
6pub struct R(crate::R<ICR_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<ICR_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<ICR_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<ICR_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Register `ICR` writer"]
21pub struct W(crate::W<ICR_SPEC>);
22impl core::ops::Deref for W {
23 type Target = crate::W<ICR_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<ICR_SPEC>> for W {
36 #[inline(always)]
37 fn from(writer: crate::W<ICR_SPEC>) -> Self {
38 W(writer)
39 }
40}
41#[doc = "Field `RORIC` reader - Clears the SSPRORINTR interrupt"]
42pub type RORIC_R = crate::BitReader<bool>;
43#[doc = "Field `RORIC` writer - Clears the SSPRORINTR interrupt"]
44pub type RORIC_W<'a, const O: u8> = crate::BitWriter<'a, u32, ICR_SPEC, bool, O>;
45#[doc = "Field `RTIC` reader - Clears the SSPRTINTR interrupt"]
46pub type RTIC_R = crate::BitReader<bool>;
47#[doc = "Field `RTIC` writer - Clears the SSPRTINTR interrupt"]
48pub type RTIC_W<'a, const O: u8> = crate::BitWriter<'a, u32, ICR_SPEC, bool, O>;
49impl R {
50 #[doc = "Bit 0 - Clears the SSPRORINTR interrupt"]
51 #[inline(always)]
52 pub fn roric(&self) -> RORIC_R {
53 RORIC_R::new((self.bits & 1) != 0)
54 }
55 #[doc = "Bit 1 - Clears the SSPRTINTR interrupt"]
56 #[inline(always)]
57 pub fn rtic(&self) -> RTIC_R {
58 RTIC_R::new(((self.bits >> 1) & 1) != 0)
59 }
60}
61impl W {
62 #[doc = "Bit 0 - Clears the SSPRORINTR interrupt"]
63 #[inline(always)]
64 pub fn roric(&mut self) -> RORIC_W<0> {
65 RORIC_W::new(self)
66 }
67 #[doc = "Bit 1 - Clears the SSPRTINTR interrupt"]
68 #[inline(always)]
69 pub fn rtic(&mut self) -> RTIC_W<1> {
70 RTIC_W::new(self)
71 }
72 #[doc = "Writes raw bits to the register."]
73 #[inline(always)]
74 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
75 self.0.bits(bits);
76 self
77 }
78}
79#[doc = "Interrupt clear register\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 [icr](index.html) module"]
80pub struct ICR_SPEC;
81impl crate::RegisterSpec for ICR_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [icr::R](R) reader structure"]
85impl crate::Readable for ICR_SPEC {
86 type Reader = R;
87}
88#[doc = "`write(|w| ..)` method takes [icr::W](W) writer structure"]
89impl crate::Writable for ICR_SPEC {
90 type Writer = W;
91}
92#[doc = "`reset()` method sets ICR to value 0"]
93impl crate::Resettable for ICR_SPEC {
94 #[inline(always)]
95 fn reset_value() -> Self::Ux {
96 0
97 }
98}