1#[doc = "Register `CR` writer"]
2pub type W = crate::W<CrSpec>;
3#[doc = "Field `SPIEN` writer - SPI Enable"]
4pub type SpienW<'a, REG> = crate::BitWriter<'a, REG>;
5#[doc = "Field `SPIDIS` writer - SPI Disable"]
6pub type SpidisW<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `SWRST` writer - SPI Software Reset"]
8pub type SwrstW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `LASTXFER` writer - Last Transfer"]
10pub type LastxferW<'a, REG> = crate::BitWriter<'a, REG>;
11impl W {
12 #[doc = "Bit 0 - SPI Enable"]
13 #[inline(always)]
14 #[must_use]
15 pub fn spien(&mut self) -> SpienW<CrSpec> {
16 SpienW::new(self, 0)
17 }
18 #[doc = "Bit 1 - SPI Disable"]
19 #[inline(always)]
20 #[must_use]
21 pub fn spidis(&mut self) -> SpidisW<CrSpec> {
22 SpidisW::new(self, 1)
23 }
24 #[doc = "Bit 7 - SPI Software Reset"]
25 #[inline(always)]
26 #[must_use]
27 pub fn swrst(&mut self) -> SwrstW<CrSpec> {
28 SwrstW::new(self, 7)
29 }
30 #[doc = "Bit 24 - Last Transfer"]
31 #[inline(always)]
32 #[must_use]
33 pub fn lastxfer(&mut self) -> LastxferW<CrSpec> {
34 LastxferW::new(self, 24)
35 }
36}
37#[doc = "Control Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cr::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
38pub struct CrSpec;
39impl crate::RegisterSpec for CrSpec {
40 type Ux = u32;
41}
42#[doc = "`write(|w| ..)` method takes [`cr::W`](W) writer structure"]
43impl crate::Writable for CrSpec {
44 type Safety = crate::Unsafe;
45 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
46 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
47}