atsamd21j/port/
ctrl.rs

1#[doc = "Register `CTRL%s` reader"]
2pub type R = crate::R<CtrlSpec>;
3#[doc = "Register `CTRL%s` writer"]
4pub type W = crate::W<CtrlSpec>;
5#[doc = "Field `SAMPLING` writer - Input Sampling Mode"]
6pub type SamplingW<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
7impl W {
8    #[doc = "Bits 0:31 - Input Sampling Mode"]
9    #[inline(always)]
10    #[must_use]
11    pub fn sampling(&mut self) -> SamplingW<CtrlSpec> {
12        SamplingW::new(self, 0)
13    }
14}
15#[doc = "Control\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
16pub struct CtrlSpec;
17impl crate::RegisterSpec for CtrlSpec {
18    type Ux = u32;
19}
20#[doc = "`read()` method returns [`ctrl::R`](R) reader structure"]
21impl crate::Readable for CtrlSpec {}
22#[doc = "`write(|w| ..)` method takes [`ctrl::W`](W) writer structure"]
23impl crate::Writable for CtrlSpec {
24    type Safety = crate::Unsafe;
25    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
26    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
27}
28#[doc = "`reset()` method sets CTRL%s to value 0"]
29impl crate::Resettable for CtrlSpec {
30    const RESET_VALUE: u32 = 0;
31}