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