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"Temperature Sensor"]
28unsafe impl ::core::marker::Send for super::Tsn {}
29unsafe impl ::core::marker::Sync for super::Tsn {}
30impl super::Tsn {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36 #[doc = "Temperature Sensor Control Register"]
37 #[inline(always)]
38 pub const fn tscr(&self) -> &'static crate::common::Reg<self::Tscr_SPEC, crate::common::RW> {
39 unsafe {
40 crate::common::Reg::<self::Tscr_SPEC, crate::common::RW>::from_ptr(
41 self._svd2pac_as_ptr().add(0usize),
42 )
43 }
44 }
45}
46#[doc(hidden)]
47#[derive(Copy, Clone, Eq, PartialEq)]
48pub struct Tscr_SPEC;
49impl crate::sealed::RegSpec for Tscr_SPEC {
50 type DataType = u8;
51}
52#[doc = "Temperature Sensor Control Register"]
53pub type Tscr = crate::RegValueT<Tscr_SPEC>;
54
55impl Tscr {
56 #[doc = "Temperature Sensor Output Enable"]
57 #[inline(always)]
58 pub fn tsoe(
59 self,
60 ) -> crate::common::RegisterField<4, 0x1, 1, 0, tscr::Tsoe, Tscr_SPEC, crate::common::RW> {
61 crate::common::RegisterField::<4,0x1,1,0,tscr::Tsoe, Tscr_SPEC,crate::common::RW>::from_register(self,0)
62 }
63 #[doc = "Temperature Sensor Enable"]
64 #[inline(always)]
65 pub fn tsen(
66 self,
67 ) -> crate::common::RegisterField<7, 0x1, 1, 0, tscr::Tsen, Tscr_SPEC, crate::common::RW> {
68 crate::common::RegisterField::<7,0x1,1,0,tscr::Tsen, Tscr_SPEC,crate::common::RW>::from_register(self,0)
69 }
70}
71impl ::core::default::Default for Tscr {
72 #[inline(always)]
73 fn default() -> Tscr {
74 <crate::RegValueT<Tscr_SPEC> as RegisterValue<_>>::new(0)
75 }
76}
77pub mod tscr {
78
79 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
80 pub struct Tsoe_SPEC;
81 pub type Tsoe = crate::EnumBitfieldStruct<u8, Tsoe_SPEC>;
82 impl Tsoe {
83 #[doc = "Disable output from the temperature sensor to the ADC12"]
84 pub const _0: Self = Self::new(0);
85 #[doc = "Enable output from the temperature sensor to the ADC12"]
86 pub const _1: Self = Self::new(1);
87 }
88 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
89 pub struct Tsen_SPEC;
90 pub type Tsen = crate::EnumBitfieldStruct<u8, Tsen_SPEC>;
91 impl Tsen {
92 #[doc = "Stop the temperature sensor"]
93 pub const _0: Self = Self::new(0);
94 #[doc = "Start the temperature sensor."]
95 pub const _1: Self = Self::new(1);
96 }
97}