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.6.0 on Thu, 24 Jul 2025 04:48: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
37    #[doc = "Temperature Sensor Control Register"]
38    #[inline(always)]
39    pub const fn tscr(&self) -> &'static crate::common::Reg<self::Tscr_SPEC, crate::common::RW> {
40        unsafe {
41            crate::common::Reg::<self::Tscr_SPEC, crate::common::RW>::from_ptr(
42                self._svd2pac_as_ptr().add(0usize),
43            )
44        }
45    }
46}
47#[doc(hidden)]
48#[derive(Copy, Clone, Eq, PartialEq)]
49pub struct Tscr_SPEC;
50impl crate::sealed::RegSpec for Tscr_SPEC {
51    type DataType = u8;
52}
53
54#[doc = "Temperature Sensor Control Register"]
55pub type Tscr = crate::RegValueT<Tscr_SPEC>;
56
57impl Tscr {
58    #[doc = "Temperature Sensor Output Enable"]
59    #[inline(always)]
60    pub fn tsoe(
61        self,
62    ) -> crate::common::RegisterField<
63        4,
64        0x1,
65        1,
66        0,
67        tscr::Tsoe,
68        tscr::Tsoe,
69        Tscr_SPEC,
70        crate::common::RW,
71    > {
72        crate::common::RegisterField::<
73            4,
74            0x1,
75            1,
76            0,
77            tscr::Tsoe,
78            tscr::Tsoe,
79            Tscr_SPEC,
80            crate::common::RW,
81        >::from_register(self, 0)
82    }
83
84    #[doc = "Temperature Sensor Enable"]
85    #[inline(always)]
86    pub fn tsen(
87        self,
88    ) -> crate::common::RegisterField<
89        7,
90        0x1,
91        1,
92        0,
93        tscr::Tsen,
94        tscr::Tsen,
95        Tscr_SPEC,
96        crate::common::RW,
97    > {
98        crate::common::RegisterField::<
99            7,
100            0x1,
101            1,
102            0,
103            tscr::Tsen,
104            tscr::Tsen,
105            Tscr_SPEC,
106            crate::common::RW,
107        >::from_register(self, 0)
108    }
109}
110impl ::core::default::Default for Tscr {
111    #[inline(always)]
112    fn default() -> Tscr {
113        <crate::RegValueT<Tscr_SPEC> as RegisterValue<_>>::new(0)
114    }
115}
116pub mod tscr {
117
118    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
119    pub struct Tsoe_SPEC;
120    pub type Tsoe = crate::EnumBitfieldStruct<u8, Tsoe_SPEC>;
121    impl Tsoe {
122        #[doc = "Disable output from the temperature sensor to the ADC12"]
123        pub const _0: Self = Self::new(0);
124
125        #[doc = "Enable output from the temperature sensor to the ADC12"]
126        pub const _1: Self = Self::new(1);
127    }
128    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
129    pub struct Tsen_SPEC;
130    pub type Tsen = crate::EnumBitfieldStruct<u8, Tsen_SPEC>;
131    impl Tsen {
132        #[doc = "Stop the temperature sensor"]
133        pub const _0: Self = Self::new(0);
134
135        #[doc = "Start the temperature sensor."]
136        pub const _1: Self = Self::new(1);
137    }
138}