1#[doc = "Register `CR` writer"]
2pub type W = crate::W<CrSpec>;
3#[doc = "Field `START` writer - Send a START Condition"]
4pub type StartW<'a, REG> = crate::BitWriter<'a, REG>;
5#[doc = "Field `STOP` writer - Send a STOP Condition"]
6pub type StopW<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `MSEN` writer - TWI Master Mode Enabled"]
8pub type MsenW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `MSDIS` writer - TWI Master Mode Disabled"]
10pub type MsdisW<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `SVEN` writer - TWI Slave Mode Enabled"]
12pub type SvenW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SVDIS` writer - TWI Slave Mode Disabled"]
14pub type SvdisW<'a, REG> = crate::BitWriter<'a, REG>;
15#[doc = "Field `QUICK` writer - SMBUS Quick Command"]
16pub type QuickW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `SWRST` writer - Software Reset"]
18pub type SwrstW<'a, REG> = crate::BitWriter<'a, REG>;
19impl W {
20 #[doc = "Bit 0 - Send a START Condition"]
21 #[inline(always)]
22 #[must_use]
23 pub fn start(&mut self) -> StartW<CrSpec> {
24 StartW::new(self, 0)
25 }
26 #[doc = "Bit 1 - Send a STOP Condition"]
27 #[inline(always)]
28 #[must_use]
29 pub fn stop(&mut self) -> StopW<CrSpec> {
30 StopW::new(self, 1)
31 }
32 #[doc = "Bit 2 - TWI Master Mode Enabled"]
33 #[inline(always)]
34 #[must_use]
35 pub fn msen(&mut self) -> MsenW<CrSpec> {
36 MsenW::new(self, 2)
37 }
38 #[doc = "Bit 3 - TWI Master Mode Disabled"]
39 #[inline(always)]
40 #[must_use]
41 pub fn msdis(&mut self) -> MsdisW<CrSpec> {
42 MsdisW::new(self, 3)
43 }
44 #[doc = "Bit 4 - TWI Slave Mode Enabled"]
45 #[inline(always)]
46 #[must_use]
47 pub fn sven(&mut self) -> SvenW<CrSpec> {
48 SvenW::new(self, 4)
49 }
50 #[doc = "Bit 5 - TWI Slave Mode Disabled"]
51 #[inline(always)]
52 #[must_use]
53 pub fn svdis(&mut self) -> SvdisW<CrSpec> {
54 SvdisW::new(self, 5)
55 }
56 #[doc = "Bit 6 - SMBUS Quick Command"]
57 #[inline(always)]
58 #[must_use]
59 pub fn quick(&mut self) -> QuickW<CrSpec> {
60 QuickW::new(self, 6)
61 }
62 #[doc = "Bit 7 - Software Reset"]
63 #[inline(always)]
64 #[must_use]
65 pub fn swrst(&mut self) -> SwrstW<CrSpec> {
66 SwrstW::new(self, 7)
67 }
68}
69#[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)."]
70pub struct CrSpec;
71impl crate::RegisterSpec for CrSpec {
72 type Ux = u32;
73}
74#[doc = "`write(|w| ..)` method takes [`cr::W`](W) writer structure"]
75impl crate::Writable for CrSpec {
76 type Safety = crate::Unsafe;
77 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
78 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
79}