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