efm32gg12b390_pac/qspi0/
indirectwritexferctrl.rs1#[doc = "Register `INDIRECTWRITEXFERCTRL` reader"]
2pub struct R(crate::R<INDIRECTWRITEXFERCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<INDIRECTWRITEXFERCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<INDIRECTWRITEXFERCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<INDIRECTWRITEXFERCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `INDIRECTWRITEXFERCTRL` writer"]
17pub struct W(crate::W<INDIRECTWRITEXFERCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<INDIRECTWRITEXFERCTRL_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<INDIRECTWRITEXFERCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<INDIRECTWRITEXFERCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `START` writer - Start Indirect Write"]
38pub type START_W<'a> = crate::BitWriter<'a, u32, INDIRECTWRITEXFERCTRL_SPEC, bool, 0>;
39#[doc = "Field `CANCEL` writer - Cancel Indirect Write"]
40pub type CANCEL_W<'a> = crate::BitWriter<'a, u32, INDIRECTWRITEXFERCTRL_SPEC, bool, 1>;
41#[doc = "Field `WRSTATUS` reader - Indirect Write Status"]
42pub type WRSTATUS_R = crate::BitReader<bool>;
43#[doc = "Field `WRQUEUED` reader - Two Indirect Write Operations Have Been Queued"]
44pub type WRQUEUED_R = crate::BitReader<bool>;
45#[doc = "Field `INDOPSDONESTATUS` reader - Indirect Completion Status"]
46pub type INDOPSDONESTATUS_R = crate::BitReader<bool>;
47#[doc = "Field `INDOPSDONESTATUS` writer - Indirect Completion Status"]
48pub type INDOPSDONESTATUS_W<'a> = crate::BitWriter<'a, u32, INDIRECTWRITEXFERCTRL_SPEC, bool, 5>;
49#[doc = "Field `NUMINDOPSDONE` reader - Indirect Operations Done"]
50pub type NUMINDOPSDONE_R = crate::FieldReader<u8, u8>;
51impl R {
52 #[doc = "Bit 2 - Indirect Write Status"]
53 #[inline(always)]
54 pub fn wrstatus(&self) -> WRSTATUS_R {
55 WRSTATUS_R::new(((self.bits >> 2) & 1) != 0)
56 }
57 #[doc = "Bit 4 - Two Indirect Write Operations Have Been Queued"]
58 #[inline(always)]
59 pub fn wrqueued(&self) -> WRQUEUED_R {
60 WRQUEUED_R::new(((self.bits >> 4) & 1) != 0)
61 }
62 #[doc = "Bit 5 - Indirect Completion Status"]
63 #[inline(always)]
64 pub fn indopsdonestatus(&self) -> INDOPSDONESTATUS_R {
65 INDOPSDONESTATUS_R::new(((self.bits >> 5) & 1) != 0)
66 }
67 #[doc = "Bits 6:7 - Indirect Operations Done"]
68 #[inline(always)]
69 pub fn numindopsdone(&self) -> NUMINDOPSDONE_R {
70 NUMINDOPSDONE_R::new(((self.bits >> 6) & 3) as u8)
71 }
72}
73impl W {
74 #[doc = "Bit 0 - Start Indirect Write"]
75 #[inline(always)]
76 pub fn start(&mut self) -> START_W {
77 START_W::new(self)
78 }
79 #[doc = "Bit 1 - Cancel Indirect Write"]
80 #[inline(always)]
81 pub fn cancel(&mut self) -> CANCEL_W {
82 CANCEL_W::new(self)
83 }
84 #[doc = "Bit 5 - Indirect Completion Status"]
85 #[inline(always)]
86 pub fn indopsdonestatus(&mut self) -> INDOPSDONESTATUS_W {
87 INDOPSDONESTATUS_W::new(self)
88 }
89 #[doc = "Writes raw bits to the register."]
90 #[inline(always)]
91 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
92 self.0.bits(bits);
93 self
94 }
95}
96#[doc = "Indirect Write Transfer Control 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 [indirectwritexferctrl](index.html) module"]
97pub struct INDIRECTWRITEXFERCTRL_SPEC;
98impl crate::RegisterSpec for INDIRECTWRITEXFERCTRL_SPEC {
99 type Ux = u32;
100}
101#[doc = "`read()` method returns [indirectwritexferctrl::R](R) reader structure"]
102impl crate::Readable for INDIRECTWRITEXFERCTRL_SPEC {
103 type Reader = R;
104}
105#[doc = "`write(|w| ..)` method takes [indirectwritexferctrl::W](W) writer structure"]
106impl crate::Writable for INDIRECTWRITEXFERCTRL_SPEC {
107 type Writer = W;
108}
109#[doc = "`reset()` method sets INDIRECTWRITEXFERCTRL to value 0"]
110impl crate::Resettable for INDIRECTWRITEXFERCTRL_SPEC {
111 #[inline(always)]
112 fn reset_value() -> Self::Ux {
113 0
114 }
115}