#[doc = "Writer for register SRSET"]
pub type W = crate::W<u32, super::SRSET>;
#[doc = "Register SRSET `reset()`'s with value 0"]
impl crate::ResetValue for super::SRSET {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Write proxy for field `PRWARN`"]
pub struct PRWARN_W<'a> {
w: &'a mut W,
}
impl<'a> PRWARN_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
#[doc = "Write proxy for field `PI`"]
pub struct PI_W<'a> {
w: &'a mut W,
}
impl<'a> PI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
self.w
}
}
#[doc = "Write proxy for field `AI`"]
pub struct AI_W<'a> {
w: &'a mut W,
}
impl<'a> AI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
self.w
}
}
#[doc = "Write proxy for field `VDDPI`"]
pub struct VDDPI_W<'a> {
w: &'a mut W,
}
impl<'a> VDDPI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
self.w
}
}
#[doc = "Write proxy for field `VDROPI`"]
pub struct VDROPI_W<'a> {
w: &'a mut W,
}
impl<'a> VDROPI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
self.w
}
}
#[doc = "Write proxy for field `LOCI`"]
pub struct LOCI_W<'a> {
w: &'a mut W,
}
impl<'a> LOCI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
self.w
}
}
#[doc = "Write proxy for field `PESRAMI`"]
pub struct PESRAMI_W<'a> {
w: &'a mut W,
}
impl<'a> PESRAMI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
self.w
}
}
#[doc = "Write proxy for field `PEU0I`"]
pub struct PEU0I_W<'a> {
w: &'a mut W,
}
impl<'a> PEU0I_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
self.w
}
}
#[doc = "Write proxy for field `FLECC2I`"]
pub struct FLECC2I_W<'a> {
w: &'a mut W,
}
impl<'a> FLECC2I_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
self.w
}
}
#[doc = "Write proxy for field `FLCMPLTI`"]
pub struct FLCMPLTI_W<'a> {
w: &'a mut W,
}
impl<'a> FLCMPLTI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
self.w
}
}
#[doc = "Write proxy for field `VCLIPI`"]
pub struct VCLIPI_W<'a> {
w: &'a mut W,
}
impl<'a> VCLIPI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
self.w
}
}
#[doc = "Write proxy for field `SBYCLKFI`"]
pub struct SBYCLKFI_W<'a> {
w: &'a mut W,
}
impl<'a> SBYCLKFI_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
self.w
}
}
#[doc = "Write proxy for field `RTC_CTR`"]
pub struct RTC_CTR_W<'a> {
w: &'a mut W,
}
impl<'a> RTC_CTR_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
self.w
}
}
#[doc = "Write proxy for field `RTC_ATIM0`"]
pub struct RTC_ATIM0_W<'a> {
w: &'a mut W,
}
impl<'a> RTC_ATIM0_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
self.w
}
}
#[doc = "Write proxy for field `RTC_ATIM1`"]
pub struct RTC_ATIM1_W<'a> {
w: &'a mut W,
}
impl<'a> RTC_ATIM1_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26);
self.w
}
}
#[doc = "Write proxy for field `RTC_TIM0`"]
pub struct RTC_TIM0_W<'a> {
w: &'a mut W,
}
impl<'a> RTC_TIM0_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27);
self.w
}
}
#[doc = "Write proxy for field `RTC_TIM1`"]
pub struct RTC_TIM1_W<'a> {
w: &'a mut W,
}
impl<'a> RTC_TIM1_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28);
self.w
}
}
#[doc = "Write proxy for field `TSE_DONE`"]
pub struct TSE_DONE_W<'a> {
w: &'a mut W,
}
impl<'a> TSE_DONE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29);
self.w
}
}
#[doc = "Write proxy for field `TSE_HIGH`"]
pub struct TSE_HIGH_W<'a> {
w: &'a mut W,
}
impl<'a> TSE_HIGH_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30);
self.w
}
}
#[doc = "Write proxy for field `TSE_LOW`"]
pub struct TSE_LOW_W<'a> {
w: &'a mut W,
}
impl<'a> TSE_LOW_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
self.w
}
}
impl W {
#[doc = "Bit 0 - WDT pre-warning Interrupt Set"]
#[inline(always)]
pub fn prwarn(&mut self) -> PRWARN_W {
PRWARN_W { w: self }
}
#[doc = "Bit 1 - RTC Periodic Interrupt Set"]
#[inline(always)]
pub fn pi(&mut self) -> PI_W {
PI_W { w: self }
}
#[doc = "Bit 2 - RTC Alarm Interrupt Set"]
#[inline(always)]
pub fn ai(&mut self) -> AI_W {
AI_W { w: self }
}
#[doc = "Bit 3 - VDDP pre-warning Interrupt Set"]
#[inline(always)]
pub fn vddpi(&mut self) -> VDDPI_W {
VDDPI_W { w: self }
}
#[doc = "Bit 7 - VDROP Interrupt Set"]
#[inline(always)]
pub fn vdropi(&mut self) -> VDROPI_W {
VDROPI_W { w: self }
}
#[doc = "Bit 16 - Loss of Clock Interrupt Set"]
#[inline(always)]
pub fn loci(&mut self) -> LOCI_W {
LOCI_W { w: self }
}
#[doc = "Bit 17 - 16kbytes SRAM Parity Error Interrupt Set"]
#[inline(always)]
pub fn pesrami(&mut self) -> PESRAMI_W {
PESRAMI_W { w: self }
}
#[doc = "Bit 18 - USIC0 SRAM Parity Error Interrupt Set"]
#[inline(always)]
pub fn peu0i(&mut self) -> PEU0I_W {
PEU0I_W { w: self }
}
#[doc = "Bit 19 - Flash Double Bit ECC Interrupt Set"]
#[inline(always)]
pub fn flecc2i(&mut self) -> FLECC2I_W {
FLECC2I_W { w: self }
}
#[doc = "Bit 20 - Flash Operation Complete Interrupt Set"]
#[inline(always)]
pub fn flcmplti(&mut self) -> FLCMPLTI_W {
FLCMPLTI_W { w: self }
}
#[doc = "Bit 21 - VCLIP Interrupt Set"]
#[inline(always)]
pub fn vclipi(&mut self) -> VCLIPI_W {
VCLIPI_W { w: self }
}
#[doc = "Bit 22 - Standby Clock Failure Interrupt Set"]
#[inline(always)]
pub fn sbyclkfi(&mut self) -> SBYCLKFI_W {
SBYCLKFI_W { w: self }
}
#[doc = "Bit 24 - RTC CTR Mirror Register Update Set"]
#[inline(always)]
pub fn rtc_ctr(&mut self) -> RTC_CTR_W {
RTC_CTR_W { w: self }
}
#[doc = "Bit 25 - RTC ATIM0 Mirror Register Update Set"]
#[inline(always)]
pub fn rtc_atim0(&mut self) -> RTC_ATIM0_W {
RTC_ATIM0_W { w: self }
}
#[doc = "Bit 26 - RTC ATIM1 Mirror Register Update Set"]
#[inline(always)]
pub fn rtc_atim1(&mut self) -> RTC_ATIM1_W {
RTC_ATIM1_W { w: self }
}
#[doc = "Bit 27 - RTC TIM0 Mirror Register Update Set"]
#[inline(always)]
pub fn rtc_tim0(&mut self) -> RTC_TIM0_W {
RTC_TIM0_W { w: self }
}
#[doc = "Bit 28 - RTC TIM1 Mirror Register Update Set"]
#[inline(always)]
pub fn rtc_tim1(&mut self) -> RTC_TIM1_W {
RTC_TIM1_W { w: self }
}
#[doc = "Bit 29 - TSE Measurement Done Interrupt Set"]
#[inline(always)]
pub fn tse_done(&mut self) -> TSE_DONE_W {
TSE_DONE_W { w: self }
}
#[doc = "Bit 30 - TSE Compare High Temperature Interrupt Set"]
#[inline(always)]
pub fn tse_high(&mut self) -> TSE_HIGH_W {
TSE_HIGH_W { w: self }
}
#[doc = "Bit 31 - TSE Compare Low Temperature Interrupt Set"]
#[inline(always)]
pub fn tse_low(&mut self) -> TSE_LOW_W {
TSE_LOW_W { w: self }
}
}