muscab1_pac/qspifctrl/
devwriteinstr.rs

1#[doc = "Register `DEVWRITEINSTR` reader"]
2pub type R = crate::R<DevwriteinstrSpec>;
3#[doc = "Register `DEVWRITEINSTR` writer"]
4pub type W = crate::W<DevwriteinstrSpec>;
5#[doc = "Field `WROPCODE` reader - Write Opcode"]
6pub type WropcodeR = crate::FieldReader;
7#[doc = "Field `WROPCODE` writer - Write Opcode"]
8pub type WropcodeW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `WELDISABLE` reader - WEL Disable"]
10pub type WeldisableR = crate::BitReader;
11#[doc = "Field `WELDISABLE` writer - WEL Disable"]
12pub type WeldisableW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ADDRTRTYPESSPI` reader - Address Transfer Type for Standard SPI modes"]
14pub type AddrtrtypesspiR = crate::FieldReader;
15#[doc = "Field `ADDRTRTYPESSPI` writer - Address Transfer Type for Standard SPI modes"]
16pub type AddrtrtypesspiW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17#[doc = "Field `DATATRTYPESSPI` reader - Data Transfer Type for Standard SPI modes"]
18pub type DatatrtypesspiR = crate::FieldReader;
19#[doc = "Field `DATATRTYPESSPI` writer - Data Transfer Type for Standard SPI modes"]
20pub type DatatrtypesspiW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
21#[doc = "Field `WRITEDUMCLKCYCNUM` reader - Number of Dummy Clock Cycles required by device for Write Instruction"]
22pub type WritedumclkcycnumR = crate::FieldReader;
23#[doc = "Field `WRITEDUMCLKCYCNUM` writer - Number of Dummy Clock Cycles required by device for Write Instruction"]
24pub type WritedumclkcycnumW<'a, REG> = crate::FieldWriter<'a, REG, 5>;
25impl R {
26    #[doc = "Bits 0:7 - Write Opcode"]
27    #[inline(always)]
28    pub fn wropcode(&self) -> WropcodeR {
29        WropcodeR::new((self.bits & 0xff) as u8)
30    }
31    #[doc = "Bit 8 - WEL Disable"]
32    #[inline(always)]
33    pub fn weldisable(&self) -> WeldisableR {
34        WeldisableR::new(((self.bits >> 8) & 1) != 0)
35    }
36    #[doc = "Bits 12:13 - Address Transfer Type for Standard SPI modes"]
37    #[inline(always)]
38    pub fn addrtrtypesspi(&self) -> AddrtrtypesspiR {
39        AddrtrtypesspiR::new(((self.bits >> 12) & 3) as u8)
40    }
41    #[doc = "Bits 16:17 - Data Transfer Type for Standard SPI modes"]
42    #[inline(always)]
43    pub fn datatrtypesspi(&self) -> DatatrtypesspiR {
44        DatatrtypesspiR::new(((self.bits >> 16) & 3) as u8)
45    }
46    #[doc = "Bits 24:28 - Number of Dummy Clock Cycles required by device for Write Instruction"]
47    #[inline(always)]
48    pub fn writedumclkcycnum(&self) -> WritedumclkcycnumR {
49        WritedumclkcycnumR::new(((self.bits >> 24) & 0x1f) as u8)
50    }
51}
52impl W {
53    #[doc = "Bits 0:7 - Write Opcode"]
54    #[inline(always)]
55    pub fn wropcode(&mut self) -> WropcodeW<DevwriteinstrSpec> {
56        WropcodeW::new(self, 0)
57    }
58    #[doc = "Bit 8 - WEL Disable"]
59    #[inline(always)]
60    pub fn weldisable(&mut self) -> WeldisableW<DevwriteinstrSpec> {
61        WeldisableW::new(self, 8)
62    }
63    #[doc = "Bits 12:13 - Address Transfer Type for Standard SPI modes"]
64    #[inline(always)]
65    pub fn addrtrtypesspi(&mut self) -> AddrtrtypesspiW<DevwriteinstrSpec> {
66        AddrtrtypesspiW::new(self, 12)
67    }
68    #[doc = "Bits 16:17 - Data Transfer Type for Standard SPI modes"]
69    #[inline(always)]
70    pub fn datatrtypesspi(&mut self) -> DatatrtypesspiW<DevwriteinstrSpec> {
71        DatatrtypesspiW::new(self, 16)
72    }
73    #[doc = "Bits 24:28 - Number of Dummy Clock Cycles required by device for Write Instruction"]
74    #[inline(always)]
75    pub fn writedumclkcycnum(&mut self) -> WritedumclkcycnumW<DevwriteinstrSpec> {
76        WritedumclkcycnumW::new(self, 24)
77    }
78}
79#[doc = "Device Write Instruction Configuration Register\n\nYou can [`read`](crate::Reg::read) this register and get [`devwriteinstr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`devwriteinstr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct DevwriteinstrSpec;
81impl crate::RegisterSpec for DevwriteinstrSpec {
82    type Ux = u32;
83}
84#[doc = "`read()` method returns [`devwriteinstr::R`](R) reader structure"]
85impl crate::Readable for DevwriteinstrSpec {}
86#[doc = "`write(|w| ..)` method takes [`devwriteinstr::W`](W) writer structure"]
87impl crate::Writable for DevwriteinstrSpec {
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 DEVWRITEINSTR to value 0x02"]
93impl crate::Resettable for DevwriteinstrSpec {
94    const RESET_VALUE: u32 = 0x02;
95}