atsamd21g/evsys/
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 `GCLKREQ` writer - Generic Clock Requests"]
6pub type GclkreqW<'a, REG> = crate::BitWriter<'a, REG>;
7impl W {
8 #[doc = "Bit 0 - Software Reset"]
9 #[inline(always)]
10 #[must_use]
11 pub fn swrst(&mut self) -> SwrstW<CtrlSpec> {
12 SwrstW::new(self, 0)
13 }
14 #[doc = "Bit 4 - Generic Clock Requests"]
15 #[inline(always)]
16 #[must_use]
17 pub fn gclkreq(&mut self) -> GclkreqW<CtrlSpec> {
18 GclkreqW::new(self, 4)
19 }
20}
21#[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)."]
22pub struct CtrlSpec;
23impl crate::RegisterSpec for CtrlSpec {
24 type Ux = u8;
25}
26#[doc = "`write(|w| ..)` method takes [`ctrl::W`](W) writer structure"]
27impl crate::Writable for CtrlSpec {
28 type Safety = crate::Unsafe;
29 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
30 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
31}
32#[doc = "`reset()` method sets CTRL to value 0"]
33impl crate::Resettable for CtrlSpec {
34 const RESET_VALUE: u8 = 0;
35}