Skip to main content

atsamd51p20a/dac/
data.rs

1#[doc = "Writer for register DATA[%s]"]
2pub type W = crate::W<u16, super::DATA>;
3#[doc = "Register DATA[%s]
4`reset()`'s with value 0"]
5impl crate::ResetValue for super::DATA {
6    type Type = u16;
7    #[inline(always)]
8    fn reset_value() -> Self::Type {
9        0
10    }
11}
12#[doc = "Write proxy for field `DATA`"]
13pub struct DATA_W<'a> {
14    w: &'a mut W,
15}
16impl<'a> DATA_W<'a> {
17    #[doc = r"Writes raw bits to the field"]
18    #[inline(always)]
19    pub unsafe fn bits(self, value: u16) -> &'a mut W {
20        self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff);
21        self.w
22    }
23}
24impl W {
25    #[doc = "Bits 0:15 - DAC0 Data"]
26    #[inline(always)]
27    pub fn data(&mut self) -> DATA_W {
28        DATA_W { w: self }
29    }
30}