ra4e2_pac/
tsn.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.30.00, with svd2pac 0.4.0 on Sat, 12 Apr 2025 22:15:35 +0000
19
20#![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}