1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"ADC-DAC Interface"]
28unsafe impl ::core::marker::Send for super::Ami {}
29unsafe impl ::core::marker::Sync for super::Ami {}
30impl super::Ami {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "D/A A/D Synchronous Unit Select Register"]
38 #[inline(always)]
39 pub const fn daadusr(
40 &self,
41 ) -> &'static crate::common::Reg<self::Daadusr_SPEC, crate::common::RW> {
42 unsafe {
43 crate::common::Reg::<self::Daadusr_SPEC, crate::common::RW>::from_ptr(
44 self._svd2pac_as_ptr().add(192usize),
45 )
46 }
47 }
48}
49#[doc(hidden)]
50#[derive(Copy, Clone, Eq, PartialEq)]
51pub struct Daadusr_SPEC;
52impl crate::sealed::RegSpec for Daadusr_SPEC {
53 type DataType = u8;
54}
55
56#[doc = "D/A A/D Synchronous Unit Select Register"]
57pub type Daadusr = crate::RegValueT<Daadusr_SPEC>;
58
59impl Daadusr {
60 #[doc = "A/D Unit 1 Select"]
61 #[inline(always)]
62 pub fn amadsel1(
63 self,
64 ) -> crate::common::RegisterField<
65 1,
66 0x1,
67 1,
68 0,
69 daadusr::Amadsel1,
70 daadusr::Amadsel1,
71 Daadusr_SPEC,
72 crate::common::RW,
73 > {
74 crate::common::RegisterField::<
75 1,
76 0x1,
77 1,
78 0,
79 daadusr::Amadsel1,
80 daadusr::Amadsel1,
81 Daadusr_SPEC,
82 crate::common::RW,
83 >::from_register(self, 0)
84 }
85}
86impl ::core::default::Default for Daadusr {
87 #[inline(always)]
88 fn default() -> Daadusr {
89 <crate::RegValueT<Daadusr_SPEC> as RegisterValue<_>>::new(0)
90 }
91}
92pub mod daadusr {
93
94 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
95 pub struct Amadsel1_SPEC;
96 pub type Amadsel1 = crate::EnumBitfieldStruct<u8, Amadsel1_SPEC>;
97 impl Amadsel1 {
98 #[doc = "Unit 1 is not selected."]
99 pub const _0: Self = Self::new(0);
100
101 #[doc = "Unit 1 is selected."]
102 pub const _1: Self = Self::new(1);
103 }
104}