atsamd11c/dsu/
ctrl.rs

1#[doc = "Register `CTRL` writer"]
2pub type W = crate::W<CtrlSpec>;
3#[doc = "Field `SWRST` writer - Software Reset"]
4pub type SwrstW<'a, REG> = crate::BitWriter<'a, REG>;
5#[doc = "Field `CRC` writer - 32-bit Cyclic Redundancy Code"]
6pub type CrcW<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `MBIST` writer - Memory built-in self-test"]
8pub type MbistW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `CE` writer - Chip-Erase"]
10pub type CeW<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `ARR` writer - Auxiliary Row Read"]
12pub type ArrW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SMSA` writer - Start Memory Stream Access"]
14pub type SmsaW<'a, REG> = crate::BitWriter<'a, REG>;
15impl W {
16    #[doc = "Bit 0 - Software Reset"]
17    #[inline(always)]
18    #[must_use]
19    pub fn swrst(&mut self) -> SwrstW<CtrlSpec> {
20        SwrstW::new(self, 0)
21    }
22    #[doc = "Bit 2 - 32-bit Cyclic Redundancy Code"]
23    #[inline(always)]
24    #[must_use]
25    pub fn crc(&mut self) -> CrcW<CtrlSpec> {
26        CrcW::new(self, 2)
27    }
28    #[doc = "Bit 3 - Memory built-in self-test"]
29    #[inline(always)]
30    #[must_use]
31    pub fn mbist(&mut self) -> MbistW<CtrlSpec> {
32        MbistW::new(self, 3)
33    }
34    #[doc = "Bit 4 - Chip-Erase"]
35    #[inline(always)]
36    #[must_use]
37    pub fn ce(&mut self) -> CeW<CtrlSpec> {
38        CeW::new(self, 4)
39    }
40    #[doc = "Bit 6 - Auxiliary Row Read"]
41    #[inline(always)]
42    #[must_use]
43    pub fn arr(&mut self) -> ArrW<CtrlSpec> {
44        ArrW::new(self, 6)
45    }
46    #[doc = "Bit 7 - Start Memory Stream Access"]
47    #[inline(always)]
48    #[must_use]
49    pub fn smsa(&mut self) -> SmsaW<CtrlSpec> {
50        SmsaW::new(self, 7)
51    }
52}
53#[doc = "Control\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
54pub struct CtrlSpec;
55impl crate::RegisterSpec for CtrlSpec {
56    type Ux = u8;
57}
58#[doc = "`write(|w| ..)` method takes [`ctrl::W`](W) writer structure"]
59impl crate::Writable for CtrlSpec {
60    type Safety = crate::Unsafe;
61    const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
62    const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
63}
64#[doc = "`reset()` method sets CTRL to value 0"]
65impl crate::Resettable for CtrlSpec {
66    const RESET_VALUE: u8 = 0;
67}