atsamd51g/ac/
calib.rs

1#[doc = "Register `CALIB` reader"]
2pub type R = crate::R<CalibSpec>;
3#[doc = "Register `CALIB` writer"]
4pub type W = crate::W<CalibSpec>;
5#[doc = "Field `BIAS0` reader - COMP0/1 Bias Scaling"]
6pub type Bias0R = crate::FieldReader;
7#[doc = "Field `BIAS0` writer - COMP0/1 Bias Scaling"]
8pub type Bias0W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9impl R {
10    #[doc = "Bits 0:1 - COMP0/1 Bias Scaling"]
11    #[inline(always)]
12    pub fn bias0(&self) -> Bias0R {
13        Bias0R::new((self.bits & 3) as u8)
14    }
15}
16impl W {
17    #[doc = "Bits 0:1 - COMP0/1 Bias Scaling"]
18    #[inline(always)]
19    #[must_use]
20    pub fn bias0(&mut self) -> Bias0W<CalibSpec> {
21        Bias0W::new(self, 0)
22    }
23}
24#[doc = "Calibration\n\nYou can [`read`](crate::Reg::read) this register and get [`calib::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`calib::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
25pub struct CalibSpec;
26impl crate::RegisterSpec for CalibSpec {
27    type Ux = u16;
28}
29#[doc = "`read()` method returns [`calib::R`](R) reader structure"]
30impl crate::Readable for CalibSpec {}
31#[doc = "`write(|w| ..)` method takes [`calib::W`](W) writer structure"]
32impl crate::Writable for CalibSpec {
33    type Safety = crate::Unsafe;
34    const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
35    const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
36}
37#[doc = "`reset()` method sets CALIB to value 0x0101"]
38impl crate::Resettable for CalibSpec {
39    const RESET_VALUE: u16 = 0x0101;
40}