/*
(c) (2016-2024), Cypress Semiconductor Corporation (an Infineon company)
or an affiliate of Cypress Semiconductor Corporation.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Generated from SVD 1.0, with svd2pac 0.6.0 on Tue, 27 May 2025 19:21:54 +0000
#![allow(clippy::identity_op)]
#![allow(clippy::module_inception)]
#![allow(clippy::derivable_impls)]
#[allow(unused_imports)]
use crate::common::sealed;
#[allow(unused_imports)]
use crate::common::*;
#[doc = r"SRSS Backup Domain"]
unsafe impl ::core::marker::Send for super::Backup {}
unsafe impl ::core::marker::Sync for super::Backup {}
impl super::Backup {
#[allow(unused)]
#[inline(always)]
pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
self.ptr
}
#[doc = "Control"]
#[inline(always)]
pub const fn ctl(&self) -> &'static crate::common::Reg<self::Ctl_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::Ctl_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(0usize),
)
}
}
#[doc = "RTC Read Write register"]
#[inline(always)]
pub const fn rtc_rw(&self) -> &'static crate::common::Reg<self::RtcRw_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::RtcRw_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(8usize),
)
}
}
#[doc = "Oscillator calibration for absolute frequency"]
#[inline(always)]
pub const fn cal_ctl(
&self,
) -> &'static crate::common::Reg<self::CalCtl_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::CalCtl_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(12usize),
)
}
}
#[doc = "Status"]
#[inline(always)]
pub const fn status(&self) -> &'static crate::common::Reg<self::Status_SPEC, crate::common::R> {
unsafe {
crate::common::Reg::<self::Status_SPEC, crate::common::R>::from_ptr(
self._svd2pac_as_ptr().add(16usize),
)
}
}
#[doc = "Calendar Seconds, Minutes, Hours, Day of Week"]
#[inline(always)]
pub const fn rtc_time(
&self,
) -> &'static crate::common::Reg<self::RtcTime_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::RtcTime_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(20usize),
)
}
}
#[doc = "Calendar Day of Month, Month, Year"]
#[inline(always)]
pub const fn rtc_date(
&self,
) -> &'static crate::common::Reg<self::RtcDate_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::RtcDate_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(24usize),
)
}
}
#[doc = "Alarm 1 Seconds, Minute, Hours, Day of Week"]
#[inline(always)]
pub const fn alm1_time(
&self,
) -> &'static crate::common::Reg<self::Alm1Time_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::Alm1Time_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(28usize),
)
}
}
#[doc = "Alarm 1 Day of Month, Month"]
#[inline(always)]
pub const fn alm1_date(
&self,
) -> &'static crate::common::Reg<self::Alm1Date_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::Alm1Date_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(32usize),
)
}
}
#[doc = "Alarm 2 Seconds, Minute, Hours, Day of Week"]
#[inline(always)]
pub const fn alm2_time(
&self,
) -> &'static crate::common::Reg<self::Alm2Time_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::Alm2Time_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(36usize),
)
}
}
#[doc = "Alarm 2 Day of Month, Month"]
#[inline(always)]
pub const fn alm2_date(
&self,
) -> &'static crate::common::Reg<self::Alm2Date_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::Alm2Date_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(40usize),
)
}
}
#[doc = "Interrupt request register"]
#[inline(always)]
pub const fn intr(&self) -> &'static crate::common::Reg<self::Intr_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::Intr_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(44usize),
)
}
}
#[doc = "Interrupt set request register"]
#[inline(always)]
pub const fn intr_set(
&self,
) -> &'static crate::common::Reg<self::IntrSet_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::IntrSet_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(48usize),
)
}
}
#[doc = "Interrupt mask register"]
#[inline(always)]
pub const fn intr_mask(
&self,
) -> &'static crate::common::Reg<self::IntrMask_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::IntrMask_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(52usize),
)
}
}
#[doc = "Interrupt masked request register"]
#[inline(always)]
pub const fn intr_masked(
&self,
) -> &'static crate::common::Reg<self::IntrMasked_SPEC, crate::common::R> {
unsafe {
crate::common::Reg::<self::IntrMasked_SPEC, crate::common::R>::from_ptr(
self._svd2pac_as_ptr().add(56usize),
)
}
}
#[doc = "32kHz oscillator counter"]
#[inline(always)]
pub const fn osccnt(&self) -> &'static crate::common::Reg<self::Osccnt_SPEC, crate::common::R> {
unsafe {
crate::common::Reg::<self::Osccnt_SPEC, crate::common::R>::from_ptr(
self._svd2pac_as_ptr().add(60usize),
)
}
}
#[doc = "128Hz tick counter"]
#[inline(always)]
pub const fn ticks(&self) -> &'static crate::common::Reg<self::Ticks_SPEC, crate::common::R> {
unsafe {
crate::common::Reg::<self::Ticks_SPEC, crate::common::R>::from_ptr(
self._svd2pac_as_ptr().add(64usize),
)
}
}
#[doc = "PMIC control register"]
#[inline(always)]
pub const fn pmic_ctl(
&self,
) -> &'static crate::common::Reg<self::PmicCtl_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::PmicCtl_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(68usize),
)
}
}
#[doc = "Backup reset register"]
#[inline(always)]
pub const fn reset(&self) -> &'static crate::common::Reg<self::Reset_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::Reset_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(72usize),
)
}
}
#[doc = "Backup register region"]
#[inline(always)]
pub const fn breg(
&self,
) -> &'static crate::common::ClusterRegisterArray<
crate::common::Reg<self::Breg_SPEC, crate::common::RW>,
64,
0x4,
> {
unsafe {
crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x1000usize))
}
}
#[doc = "Trim Register"]
#[inline(always)]
pub const fn trim(&self) -> &'static crate::common::Reg<self::Trim_SPEC, crate::common::RW> {
unsafe {
crate::common::Reg::<self::Trim_SPEC, crate::common::RW>::from_ptr(
self._svd2pac_as_ptr().add(65280usize),
)
}
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Ctl_SPEC;
impl crate::sealed::RegSpec for Ctl_SPEC {
type DataType = u32;
}
#[doc = "Control"]
pub type Ctl = crate::RegValueT<Ctl_SPEC>;
impl Ctl {
#[doc = "Watch-crystal oscillator (WCO) enable. If there is a write in progress when this bit is cleared, the WCO will be internally kept on until the write completes.\nAfter enabling the WCO software must wait until STATUS.WCO_OK=1 before configuring any component that depends on clk_lf/clk_bak, like for example RTC or WDTs. Follow the procedure in BACKUP_RTC_RW to access this bit."]
#[inline(always)]
pub fn wco_en(self) -> crate::common::RegisterFieldBool<3, 1, 0, Ctl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<3, 1, 0, Ctl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Clock select for BAK clock"]
#[inline(always)]
pub fn clk_sel(
self,
) -> crate::common::RegisterField<
8,
0x3,
1,
0,
ctl::ClkSel,
ctl::ClkSel,
Ctl_SPEC,
crate::common::RW,
> {
crate::common::RegisterField::<
8,
0x3,
1,
0,
ctl::ClkSel,
ctl::ClkSel,
Ctl_SPEC,
crate::common::RW,
>::from_register(self, 0)
}
#[doc = "N/A"]
#[inline(always)]
pub fn prescaler(
self,
) -> crate::common::RegisterField<12, 0x3, 1, 0, u8, u8, Ctl_SPEC, crate::common::RW> {
crate::common::RegisterField::<12,0x3,1,0,u8,u8,Ctl_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Configures the WCO for different board-level connections to the WCO pins. For example, this can be used to connect an external watch crystal oscillator instead of a watch crystal. In all cases, the two related GPIO pins (WCO input and output pins) must be configured as analog connections using GPIO registers, and they must be hooked at the board level as described below. Configure this field before enabling the WCO, and do not change this setting when WCO_EN=1.\n0: Watch crystal. Connect a 32.768 kHz watch crystal between WCO input and output pins.\n1: Clock signal, either a square wave or sine wave. See PRESCALER field for connection information."]
#[inline(always)]
pub fn wco_bypass(
self,
) -> crate::common::RegisterFieldBool<16, 1, 0, Ctl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<16, 1, 0, Ctl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Controls the behavior of the switch that generates vddbak from vbackup or vddd.\n0: automatically select vddd if its brownout detector says it is valid. If the brownout says its not valid, then use vmax which is the highest of vddd or vbackup.\n1,2,3: force vddbak and vmax to select vbackup, regardless of its voltage."]
#[inline(always)]
pub fn vddbak_ctl(
self,
) -> crate::common::RegisterField<17, 0x3, 1, 0, u8, u8, Ctl_SPEC, crate::common::RW> {
crate::common::RegisterField::<17,0x3,1,0,u8,u8,Ctl_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Connect vbackup supply to the vbackup_meas output for measurement by an ADC attached to amuxbusa_adft_vddd. The vbackup_meas signal is scaled to 10 percent of vbackup, so it is within the supply range of the ADC."]
#[inline(always)]
pub fn vbackup_meas(
self,
) -> crate::common::RegisterFieldBool<19, 1, 0, Ctl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<19, 1, 0, Ctl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "When set to 3C, the supercap charger circuit is enabled. Any other code disables the supercap charger. THIS CHARGING CIRCUIT IS FOR A SUPERCAP ONLY AND CANNOT SAFELY CHARGE A BATTERY. DO NOT WRITE THIS KEY WHEN VBACKUP IS CONNECTED TO A BATTERY."]
#[inline(always)]
pub fn en_charge_key(
self,
) -> crate::common::RegisterField<24, 0xff, 1, 0, u8, u8, Ctl_SPEC, crate::common::RW> {
crate::common::RegisterField::<24,0xff,1,0,u8,u8,Ctl_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for Ctl {
#[inline(always)]
fn default() -> Ctl {
<crate::RegValueT<Ctl_SPEC> as RegisterValue<_>>::new(0)
}
}
pub mod ctl {
#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
pub struct ClkSel_SPEC;
pub type ClkSel = crate::EnumBitfieldStruct<u8, ClkSel_SPEC>;
impl ClkSel {
#[doc = "Watch-crystal oscillator input."]
pub const WCO: Self = Self::new(0);
#[doc = "This allows to use the LFCLK selection as an alternate backup domain clock. Note that LFCLK is not available in all power modes, and clock glitches can propagate into the backup logic when the clock is stopped. For this reason, if the WCO is intended as the clock source then choose it directly instead of routing through LFCLK."]
pub const ALTBAK: Self = Self::new(1);
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct RtcRw_SPEC;
impl crate::sealed::RegSpec for RtcRw_SPEC {
type DataType = u32;
}
#[doc = "RTC Read Write register"]
pub type RtcRw = crate::RegValueT<RtcRw_SPEC>;
impl RtcRw {
#[doc = "Read bit\nWhen this bit is set the RTC registers will be copied to user registers and frozen so that a coherent RTC value can safely be read. The RTC will keep on running.\nDo not set the read bit if the RTC is still busy with a previous update (see RTC_BUSY bit) or if the Write bit is set. Do not set the Read bit at the same time that the Write bit is cleared."]
#[inline(always)]
pub fn read(self) -> crate::common::RegisterFieldBool<0, 1, 0, RtcRw_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<0, 1, 0, RtcRw_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Write bit\nOnly when this bit is set can the RTC registers be written to (otherwise writes are ignored). This bit cannot be set if the RTC is still busy with a previous update (see RTC_BUSY bit) or if the Read bit is set or getting set. \nThe user writes to the RTC user registers, when the Write bit is cleared by the user then the user registers content is copied to the actual RTC registers. \nOnly user RTC registers that were written to will get copied, others will not be affected. \nWhen the SECONDS field is updated then TICKS will also be reset (WDT is not affected).\nWhen the Write bit is cleared by a reset (brown out/DeepSleep) then the RTC update will be ignored/lost.\nDo not set the Write bit if the RTC if the RTC is still busy with a previous update (see RTC_BUSY). Do not set the Write bit at the same time that the Read bit is cleared."]
#[inline(always)]
pub fn write(self) -> crate::common::RegisterFieldBool<1, 1, 0, RtcRw_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<1, 1, 0, RtcRw_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
}
impl ::core::default::Default for RtcRw {
#[inline(always)]
fn default() -> RtcRw {
<crate::RegValueT<RtcRw_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct CalCtl_SPEC;
impl crate::sealed::RegSpec for CalCtl_SPEC {
type DataType = u32;
}
#[doc = "Oscillator calibration for absolute frequency"]
pub type CalCtl = crate::RegValueT<CalCtl_SPEC>;
impl CalCtl {
#[doc = "Calibration value for absolute frequency (at a fixed temperature). Each step causes 128 ticks to be added or removed each hour. Effectively that means that each step is 1.085ppm (= 128/(60*60*32,768)).\nPositive values 0x01-0x3c (1..60) add pulses, negative values remove pulses, thus giving a range of +/-65.1 ppm (limited by 60 minutes per hour, not the range of this field)\n\nCalibration is performed hourly, starting at 59 minutes and 59 seconds, and applied as 64 ticks every 30 seconds until there have been 2*CALIB_VAL adjustments."]
#[inline(always)]
pub fn calib_val(
self,
) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, CalCtl_SPEC, crate::common::RW> {
crate::common::RegisterField::<0,0x3f,1,0,u8,u8,CalCtl_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Calibration sign:\n0= Negative sign: remove pulses (it takes more clock ticks to count one second)\n1= Positive sign: add pulses (it takes less clock ticks to count one second)"]
#[inline(always)]
pub fn calib_sign(
self,
) -> crate::common::RegisterFieldBool<6, 1, 0, CalCtl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<6, 1, 0, CalCtl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Output enable for 512Hz signal for calibration and allow CALIB_VAL to be written. Note that calibration does not affect the 512Hz output signal."]
#[inline(always)]
pub fn cal_out(
self,
) -> crate::common::RegisterFieldBool<31, 1, 0, CalCtl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<31, 1, 0, CalCtl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
}
impl ::core::default::Default for CalCtl {
#[inline(always)]
fn default() -> CalCtl {
<crate::RegValueT<CalCtl_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Status_SPEC;
impl crate::sealed::RegSpec for Status_SPEC {
type DataType = u32;
}
#[doc = "Status"]
pub type Status = crate::RegValueT<Status_SPEC>;
impl Status {
#[doc = "pending RTC write"]
#[inline(always)]
pub fn rtc_busy(
self,
) -> crate::common::RegisterFieldBool<0, 1, 0, Status_SPEC, crate::common::R> {
crate::common::RegisterFieldBool::<0, 1, 0, Status_SPEC, crate::common::R>::from_register(
self, 0,
)
}
#[doc = "Indicates that output has transitioned."]
#[inline(always)]
pub fn wco_ok(
self,
) -> crate::common::RegisterFieldBool<2, 1, 0, Status_SPEC, crate::common::R> {
crate::common::RegisterFieldBool::<2, 1, 0, Status_SPEC, crate::common::R>::from_register(
self, 0,
)
}
}
impl ::core::default::Default for Status {
#[inline(always)]
fn default() -> Status {
<crate::RegValueT<Status_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct RtcTime_SPEC;
impl crate::sealed::RegSpec for RtcTime_SPEC {
type DataType = u32;
}
#[doc = "Calendar Seconds, Minutes, Hours, Day of Week"]
pub type RtcTime = crate::RegValueT<RtcTime_SPEC>;
impl RtcTime {
#[doc = "Calendar seconds in BCD, 0-59"]
#[inline(always)]
pub fn rtc_sec(
self,
) -> crate::common::RegisterField<0, 0x7f, 1, 0, u8, u8, RtcTime_SPEC, crate::common::RW> {
crate::common::RegisterField::<0,0x7f,1,0,u8,u8,RtcTime_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Calendar minutes in BCD, 0-59"]
#[inline(always)]
pub fn rtc_min(
self,
) -> crate::common::RegisterField<8, 0x7f, 1, 0, u8, u8, RtcTime_SPEC, crate::common::RW> {
crate::common::RegisterField::<8,0x7f,1,0,u8,u8,RtcTime_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Calendar hours in BCD, value depending on 12/24HR mode\n0=24HR: \\[21:16\\]=0-23\n1=12HR: \\[21\\]:0=AM, 1=PM, \\[20:16\\]=1-12"]
#[inline(always)]
pub fn rtc_hour(
self,
) -> crate::common::RegisterField<16, 0x3f, 1, 0, u8, u8, RtcTime_SPEC, crate::common::RW> {
crate::common::RegisterField::<16,0x3f,1,0,u8,u8,RtcTime_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Select 12/24HR mode: 1=12HR, 0=24HR"]
#[inline(always)]
pub fn ctrl_12hr(
self,
) -> crate::common::RegisterFieldBool<22, 1, 0, RtcTime_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<22, 1, 0, RtcTime_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Calendar Day of the week in BCD, 1-7\nIt is up to the user to define the meaning of the values, but 1=Monday is recommended"]
#[inline(always)]
pub fn rtc_day(
self,
) -> crate::common::RegisterField<24, 0x7, 1, 0, u8, u8, RtcTime_SPEC, crate::common::RW> {
crate::common::RegisterField::<24,0x7,1,0,u8,u8,RtcTime_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for RtcTime {
#[inline(always)]
fn default() -> RtcTime {
<crate::RegValueT<RtcTime_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct RtcDate_SPEC;
impl crate::sealed::RegSpec for RtcDate_SPEC {
type DataType = u32;
}
#[doc = "Calendar Day of Month, Month, Year"]
pub type RtcDate = crate::RegValueT<RtcDate_SPEC>;
impl RtcDate {
#[doc = "Calendar Day of the Month in BCD, 1-31\nAutomatic Leap Year Correction"]
#[inline(always)]
pub fn rtc_date(
self,
) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, RtcDate_SPEC, crate::common::RW> {
crate::common::RegisterField::<0,0x3f,1,0,u8,u8,RtcDate_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Calendar Month in BCD, 1-12"]
#[inline(always)]
pub fn rtc_mon(
self,
) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, RtcDate_SPEC, crate::common::RW> {
crate::common::RegisterField::<8,0x1f,1,0,u8,u8,RtcDate_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Calendar year in BCD, 0-99"]
#[inline(always)]
pub fn rtc_year(
self,
) -> crate::common::RegisterField<16, 0xff, 1, 0, u8, u8, RtcDate_SPEC, crate::common::RW> {
crate::common::RegisterField::<16,0xff,1,0,u8,u8,RtcDate_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for RtcDate {
#[inline(always)]
fn default() -> RtcDate {
<crate::RegValueT<RtcDate_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Alm1Time_SPEC;
impl crate::sealed::RegSpec for Alm1Time_SPEC {
type DataType = u32;
}
#[doc = "Alarm 1 Seconds, Minute, Hours, Day of Week"]
pub type Alm1Time = crate::RegValueT<Alm1Time_SPEC>;
impl Alm1Time {
#[doc = "Alarm seconds in BCD, 0-59"]
#[inline(always)]
pub fn alm_sec(
self,
) -> crate::common::RegisterField<0, 0x7f, 1, 0, u8, u8, Alm1Time_SPEC, crate::common::RW> {
crate::common::RegisterField::<0,0x7f,1,0,u8,u8,Alm1Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm second enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_sec_en(
self,
) -> crate::common::RegisterFieldBool<7, 1, 0, Alm1Time_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<7, 1, 0, Alm1Time_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Alarm minutes in BCD, 0-59"]
#[inline(always)]
pub fn alm_min(
self,
) -> crate::common::RegisterField<8, 0x7f, 1, 0, u8, u8, Alm1Time_SPEC, crate::common::RW> {
crate::common::RegisterField::<8,0x7f,1,0,u8,u8,Alm1Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm minutes enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_min_en(
self,
) -> crate::common::RegisterFieldBool<15, 1, 0, Alm1Time_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<15,1,0,Alm1Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm hours in BCD, value depending on 12/24HR mode\n12HR: \\[5\\]:0=AM, 1=PM, \\[4:0\\]=1-12\n24HR: \\[5:0\\]=0-23"]
#[inline(always)]
pub fn alm_hour(
self,
) -> crate::common::RegisterField<16, 0x3f, 1, 0, u8, u8, Alm1Time_SPEC, crate::common::RW>
{
crate::common::RegisterField::<16,0x3f,1,0,u8,u8,Alm1Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm hour enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_hour_en(
self,
) -> crate::common::RegisterFieldBool<23, 1, 0, Alm1Time_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<23,1,0,Alm1Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm Day of the week in BCD, 1-7\nIt is up to the user to define the meaning of the values, but 1=Monday is recommended"]
#[inline(always)]
pub fn alm_day(
self,
) -> crate::common::RegisterField<24, 0x7, 1, 0, u8, u8, Alm1Time_SPEC, crate::common::RW> {
crate::common::RegisterField::<24,0x7,1,0,u8,u8,Alm1Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm Day of the Week enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_day_en(
self,
) -> crate::common::RegisterFieldBool<31, 1, 0, Alm1Time_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<31,1,0,Alm1Time_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for Alm1Time {
#[inline(always)]
fn default() -> Alm1Time {
<crate::RegValueT<Alm1Time_SPEC> as RegisterValue<_>>::new(16777216)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Alm1Date_SPEC;
impl crate::sealed::RegSpec for Alm1Date_SPEC {
type DataType = u32;
}
#[doc = "Alarm 1 Day of Month, Month"]
pub type Alm1Date = crate::RegValueT<Alm1Date_SPEC>;
impl Alm1Date {
#[doc = "Alarm Day of the Month in BCD, 1-31\nLeap Year corrected"]
#[inline(always)]
pub fn alm_date(
self,
) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Alm1Date_SPEC, crate::common::RW> {
crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Alm1Date_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm Day of the Month enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_date_en(
self,
) -> crate::common::RegisterFieldBool<7, 1, 0, Alm1Date_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<7, 1, 0, Alm1Date_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Alarm Month in BCD, 1-12"]
#[inline(always)]
pub fn alm_mon(
self,
) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, Alm1Date_SPEC, crate::common::RW> {
crate::common::RegisterField::<8,0x1f,1,0,u8,u8,Alm1Date_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm Month enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_mon_en(
self,
) -> crate::common::RegisterFieldBool<15, 1, 0, Alm1Date_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<15,1,0,Alm1Date_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Master enable for alarm 1.\n0: Alarm 1 is disabled. Fields for date and time are ignored.\n1: Alarm 1 is enabled. Alarm triggers whenever the new date and time matches all the enabled date and time fields, which can happen more than once depending on configuration. If none of the date and time fields are enabled, then this alarm triggers once every second."]
#[inline(always)]
pub fn alm_en(
self,
) -> crate::common::RegisterFieldBool<31, 1, 0, Alm1Date_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<31,1,0,Alm1Date_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for Alm1Date {
#[inline(always)]
fn default() -> Alm1Date {
<crate::RegValueT<Alm1Date_SPEC> as RegisterValue<_>>::new(257)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Alm2Time_SPEC;
impl crate::sealed::RegSpec for Alm2Time_SPEC {
type DataType = u32;
}
#[doc = "Alarm 2 Seconds, Minute, Hours, Day of Week"]
pub type Alm2Time = crate::RegValueT<Alm2Time_SPEC>;
impl Alm2Time {
#[doc = "Alarm seconds in BCD, 0-59"]
#[inline(always)]
pub fn alm_sec(
self,
) -> crate::common::RegisterField<0, 0x7f, 1, 0, u8, u8, Alm2Time_SPEC, crate::common::RW> {
crate::common::RegisterField::<0,0x7f,1,0,u8,u8,Alm2Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm second enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_sec_en(
self,
) -> crate::common::RegisterFieldBool<7, 1, 0, Alm2Time_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<7, 1, 0, Alm2Time_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Alarm minutes in BCD, 0-59"]
#[inline(always)]
pub fn alm_min(
self,
) -> crate::common::RegisterField<8, 0x7f, 1, 0, u8, u8, Alm2Time_SPEC, crate::common::RW> {
crate::common::RegisterField::<8,0x7f,1,0,u8,u8,Alm2Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm minutes enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_min_en(
self,
) -> crate::common::RegisterFieldBool<15, 1, 0, Alm2Time_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<15,1,0,Alm2Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm hours in BCD, value depending on 12/24HR mode\n12HR: \\[5\\]:0=AM, 1=PM, \\[4:0\\]=1-12\n24HR: \\[5:0\\]=0-23"]
#[inline(always)]
pub fn alm_hour(
self,
) -> crate::common::RegisterField<16, 0x3f, 1, 0, u8, u8, Alm2Time_SPEC, crate::common::RW>
{
crate::common::RegisterField::<16,0x3f,1,0,u8,u8,Alm2Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm hour enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_hour_en(
self,
) -> crate::common::RegisterFieldBool<23, 1, 0, Alm2Time_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<23,1,0,Alm2Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm Day of the week in BCD, 1-7\nIt is up to the user to define the meaning of the values, but 1=Monday is recommended"]
#[inline(always)]
pub fn alm_day(
self,
) -> crate::common::RegisterField<24, 0x7, 1, 0, u8, u8, Alm2Time_SPEC, crate::common::RW> {
crate::common::RegisterField::<24,0x7,1,0,u8,u8,Alm2Time_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm Day of the Week enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_day_en(
self,
) -> crate::common::RegisterFieldBool<31, 1, 0, Alm2Time_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<31,1,0,Alm2Time_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for Alm2Time {
#[inline(always)]
fn default() -> Alm2Time {
<crate::RegValueT<Alm2Time_SPEC> as RegisterValue<_>>::new(16777216)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Alm2Date_SPEC;
impl crate::sealed::RegSpec for Alm2Date_SPEC {
type DataType = u32;
}
#[doc = "Alarm 2 Day of Month, Month"]
pub type Alm2Date = crate::RegValueT<Alm2Date_SPEC>;
impl Alm2Date {
#[doc = "Alarm Day of the Month in BCD, 1-31\nLeap Year corrected"]
#[inline(always)]
pub fn alm_date(
self,
) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Alm2Date_SPEC, crate::common::RW> {
crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Alm2Date_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm Day of the Month enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_date_en(
self,
) -> crate::common::RegisterFieldBool<7, 1, 0, Alm2Date_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<7, 1, 0, Alm2Date_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Alarm Month in BCD, 1-12"]
#[inline(always)]
pub fn alm_mon(
self,
) -> crate::common::RegisterField<8, 0x1f, 1, 0, u8, u8, Alm2Date_SPEC, crate::common::RW> {
crate::common::RegisterField::<8,0x1f,1,0,u8,u8,Alm2Date_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Alarm Month enable: 0=ignore, 1=match"]
#[inline(always)]
pub fn alm_mon_en(
self,
) -> crate::common::RegisterFieldBool<15, 1, 0, Alm2Date_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<15,1,0,Alm2Date_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "Master enable for alarm 2.\n0: Alarm 2 is disabled. Fields for date and time are ignored.\n1: Alarm 2 is enabled. Alarm triggers whenever the new date and time matches all the enabled date and time fields, which can happen more than once depending on configuration. If none of the date and time fields are enabled, then this alarm triggers once every second."]
#[inline(always)]
pub fn alm_en(
self,
) -> crate::common::RegisterFieldBool<31, 1, 0, Alm2Date_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<31,1,0,Alm2Date_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for Alm2Date {
#[inline(always)]
fn default() -> Alm2Date {
<crate::RegValueT<Alm2Date_SPEC> as RegisterValue<_>>::new(257)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Intr_SPEC;
impl crate::sealed::RegSpec for Intr_SPEC {
type DataType = u32;
}
#[doc = "Interrupt request register"]
pub type Intr = crate::RegValueT<Intr_SPEC>;
impl Intr {
#[doc = "Alarm 1 Interrupt"]
#[inline(always)]
pub fn alarm1(self) -> crate::common::RegisterFieldBool<0, 1, 0, Intr_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<0, 1, 0, Intr_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Alarm 2 Interrupt"]
#[inline(always)]
pub fn alarm2(self) -> crate::common::RegisterFieldBool<1, 1, 0, Intr_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<1, 1, 0, Intr_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Century overflow interrupt"]
#[inline(always)]
pub fn century(
self,
) -> crate::common::RegisterFieldBool<2, 1, 0, Intr_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<2, 1, 0, Intr_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
}
impl ::core::default::Default for Intr {
#[inline(always)]
fn default() -> Intr {
<crate::RegValueT<Intr_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct IntrSet_SPEC;
impl crate::sealed::RegSpec for IntrSet_SPEC {
type DataType = u32;
}
#[doc = "Interrupt set request register"]
pub type IntrSet = crate::RegValueT<IntrSet_SPEC>;
impl IntrSet {
#[doc = "Write with \'1\' to set corresponding bit in interrupt request register."]
#[inline(always)]
pub fn alarm1(
self,
) -> crate::common::RegisterFieldBool<0, 1, 0, IntrSet_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<0, 1, 0, IntrSet_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Write with \'1\' to set corresponding bit in interrupt request register."]
#[inline(always)]
pub fn alarm2(
self,
) -> crate::common::RegisterFieldBool<1, 1, 0, IntrSet_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<1, 1, 0, IntrSet_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Write with \'1\' to set corresponding bit in interrupt request register."]
#[inline(always)]
pub fn century(
self,
) -> crate::common::RegisterFieldBool<2, 1, 0, IntrSet_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<2, 1, 0, IntrSet_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
}
impl ::core::default::Default for IntrSet {
#[inline(always)]
fn default() -> IntrSet {
<crate::RegValueT<IntrSet_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct IntrMask_SPEC;
impl crate::sealed::RegSpec for IntrMask_SPEC {
type DataType = u32;
}
#[doc = "Interrupt mask register"]
pub type IntrMask = crate::RegValueT<IntrMask_SPEC>;
impl IntrMask {
#[doc = "Mask bit for corresponding bit in interrupt request register."]
#[inline(always)]
pub fn alarm1(
self,
) -> crate::common::RegisterFieldBool<0, 1, 0, IntrMask_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<0, 1, 0, IntrMask_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Mask bit for corresponding bit in interrupt request register."]
#[inline(always)]
pub fn alarm2(
self,
) -> crate::common::RegisterFieldBool<1, 1, 0, IntrMask_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<1, 1, 0, IntrMask_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Mask bit for corresponding bit in interrupt request register."]
#[inline(always)]
pub fn century(
self,
) -> crate::common::RegisterFieldBool<2, 1, 0, IntrMask_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<2, 1, 0, IntrMask_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
}
impl ::core::default::Default for IntrMask {
#[inline(always)]
fn default() -> IntrMask {
<crate::RegValueT<IntrMask_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct IntrMasked_SPEC;
impl crate::sealed::RegSpec for IntrMasked_SPEC {
type DataType = u32;
}
#[doc = "Interrupt masked request register"]
pub type IntrMasked = crate::RegValueT<IntrMasked_SPEC>;
impl IntrMasked {
#[doc = "Logical and of corresponding request and mask bits."]
#[inline(always)]
pub fn alarm1(
self,
) -> crate::common::RegisterFieldBool<0, 1, 0, IntrMasked_SPEC, crate::common::R> {
crate::common::RegisterFieldBool::<0,1,0,IntrMasked_SPEC,crate::common::R>::from_register(self,0)
}
#[doc = "Logical and of corresponding request and mask bits."]
#[inline(always)]
pub fn alarm2(
self,
) -> crate::common::RegisterFieldBool<1, 1, 0, IntrMasked_SPEC, crate::common::R> {
crate::common::RegisterFieldBool::<1,1,0,IntrMasked_SPEC,crate::common::R>::from_register(self,0)
}
#[doc = "Logical and of corresponding request and mask bits."]
#[inline(always)]
pub fn century(
self,
) -> crate::common::RegisterFieldBool<2, 1, 0, IntrMasked_SPEC, crate::common::R> {
crate::common::RegisterFieldBool::<2,1,0,IntrMasked_SPEC,crate::common::R>::from_register(self,0)
}
}
impl ::core::default::Default for IntrMasked {
#[inline(always)]
fn default() -> IntrMasked {
<crate::RegValueT<IntrMasked_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Osccnt_SPEC;
impl crate::sealed::RegSpec for Osccnt_SPEC {
type DataType = u32;
}
#[doc = "32kHz oscillator counter"]
pub type Osccnt = crate::RegValueT<Osccnt_SPEC>;
impl Osccnt {
#[doc = "32kHz oscillator count (msb=128Hz), calibration can cause bit 6 to skip. Reset when RTC_TIME.RTC_SEC fields is written."]
#[inline(always)]
pub fn cnt32khz(
self,
) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Osccnt_SPEC, crate::common::R> {
crate::common::RegisterField::<0,0xff,1,0,u8,u8,Osccnt_SPEC,crate::common::R>::from_register(self,0)
}
}
impl ::core::default::Default for Osccnt {
#[inline(always)]
fn default() -> Osccnt {
<crate::RegValueT<Osccnt_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Ticks_SPEC;
impl crate::sealed::RegSpec for Ticks_SPEC {
type DataType = u32;
}
#[doc = "128Hz tick counter"]
pub type Ticks = crate::RegValueT<Ticks_SPEC>;
impl Ticks {
#[doc = "128Hz counter (msb=2Hz)\nWhen SECONDS is written this field will be reset."]
#[inline(always)]
pub fn cnt128hz(
self,
) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Ticks_SPEC, crate::common::R> {
crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Ticks_SPEC,crate::common::R>::from_register(self,0)
}
}
impl ::core::default::Default for Ticks {
#[inline(always)]
fn default() -> Ticks {
<crate::RegValueT<Ticks_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PmicCtl_SPEC;
impl crate::sealed::RegSpec for PmicCtl_SPEC {
type DataType = u32;
}
#[doc = "PMIC control register"]
pub type PmicCtl = crate::RegValueT<PmicCtl_SPEC>;
impl PmicCtl {
#[doc = "This byte must be set to 0x3A for PMIC to be disabled. When the UNLOCK code is not present: writes to PMIC_EN field are ignored and the hardware ignores the value in PMIC_EN. Do not change PMIC_EN in the same write cycle as setting/clearing the UNLOCK code; do these in separate write cycles."]
#[inline(always)]
pub fn unlock(
self,
) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, PmicCtl_SPEC, crate::common::RW> {
crate::common::RegisterField::<8,0xff,1,0,u8,u8,PmicCtl_SPEC,crate::common::RW>::from_register(self,0)
}
#[doc = "N/A"]
#[inline(always)]
pub fn polarity(
self,
) -> crate::common::RegisterFieldBool<16, 1, 0, PmicCtl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<16, 1, 0, PmicCtl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Output enable for the output driver in the PMIC_EN pad.\n0: Output pad is tristate for PMIC_EN pin. This can allow this pin to be used for another purpose. Tristate condition is kept only if the UNLOCK key (0x3A) is present\n1: Output pad is enabled for PMIC_EN pin."]
#[inline(always)]
pub fn pmic_en_outen(
self,
) -> crate::common::RegisterFieldBool<29, 1, 0, PmicCtl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<29, 1, 0, PmicCtl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Override normal PMIC controls to prevent accidentally turning off the PMIC by errant firmware.\n0: Normal operation, PMIC_EN and PMIC_OUTEN work as described\n1: PMIC_EN and PMIC_OUTEN are ignored and the output pad is forced enabled.\nNote: This bit is a write-once bit until the next backup reset."]
#[inline(always)]
pub fn pmic_alwaysen(
self,
) -> crate::common::RegisterFieldBool<30, 1, 0, PmicCtl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<30, 1, 0, PmicCtl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
#[doc = "Enable for external PMIC that supplies vddd (if present). This bit will only clear if UNLOCK was written correctly in a previous write operation and PMIC_ALWAYSEN=0. When PMIC_EN=0, the system functions normally until vddd is no longer present (OFF w/Backup mode). Firmware can set this bit, if it does so before vddd is actually removed. This bit is also set by any RTC alarm or PMIC pin wakeup event regardless of UNLOCK setting."]
#[inline(always)]
pub fn pmic_en(
self,
) -> crate::common::RegisterFieldBool<31, 1, 0, PmicCtl_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<31, 1, 0, PmicCtl_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
}
impl ::core::default::Default for PmicCtl {
#[inline(always)]
fn default() -> PmicCtl {
<crate::RegValueT<PmicCtl_SPEC> as RegisterValue<_>>::new(2684354560)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Reset_SPEC;
impl crate::sealed::RegSpec for Reset_SPEC {
type DataType = u32;
}
#[doc = "Backup reset register"]
pub type Reset = crate::RegValueT<Reset_SPEC>;
impl Reset {
#[doc = "Writing 1 to this register resets the backup logic. Hardware clears it when the reset is complete. After setting this register, firmware should confirm it reads as 0 before attempting to write other backup registers."]
#[inline(always)]
pub fn reset(
self,
) -> crate::common::RegisterFieldBool<31, 1, 0, Reset_SPEC, crate::common::RW> {
crate::common::RegisterFieldBool::<31, 1, 0, Reset_SPEC, crate::common::RW>::from_register(
self, 0,
)
}
}
impl ::core::default::Default for Reset {
#[inline(always)]
fn default() -> Reset {
<crate::RegValueT<Reset_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Breg_SPEC;
impl crate::sealed::RegSpec for Breg_SPEC {
type DataType = u32;
}
#[doc = "Backup register region"]
pub type Breg = crate::RegValueT<Breg_SPEC>;
impl Breg {
#[doc = "Backup memory that contains application-specific data. Memory is retained on vbackup supply."]
#[inline(always)]
pub fn breg(
self,
) -> crate::common::RegisterField<0, 0xffffffff, 1, 0, u32, u32, Breg_SPEC, crate::common::RW>
{
crate::common::RegisterField::<0,0xffffffff,1,0,u32,u32,Breg_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for Breg {
#[inline(always)]
fn default() -> Breg {
<crate::RegValueT<Breg_SPEC> as RegisterValue<_>>::new(0)
}
}
#[doc(hidden)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Trim_SPEC;
impl crate::sealed::RegSpec for Trim_SPEC {
type DataType = u32;
}
#[doc = "Trim Register"]
pub type Trim = crate::RegValueT<Trim_SPEC>;
impl Trim {
#[doc = "WCO trim"]
#[inline(always)]
pub fn trim(
self,
) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Trim_SPEC, crate::common::RW> {
crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Trim_SPEC,crate::common::RW>::from_register(self,0)
}
}
impl ::core::default::Default for Trim {
#[inline(always)]
fn default() -> Trim {
<crate::RegValueT<Trim_SPEC> as RegisterValue<_>>::new(0)
}
}