esp32s3/mcpwm0/ch/
tz_cfg1.rs1#[doc = "Register `TZ_CFG1` reader"]
2pub type R = crate::R<TZ_CFG1_SPEC>;
3#[doc = "Register `TZ_CFG1` writer"]
4pub type W = crate::W<TZ_CFG1_SPEC>;
5#[doc = "Field `CLR_OST` reader - a rising edge will clear on going one-shot mode action"]
6pub type CLR_OST_R = crate::BitReader;
7#[doc = "Field `CLR_OST` writer - a rising edge will clear on going one-shot mode action"]
8pub type CLR_OST_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `CBCPULSE` reader - cycle-by-cycle mode action refresh moment selection. Bit0: TEZ, bit1:TEP"]
10pub type CBCPULSE_R = crate::FieldReader;
11#[doc = "Field `CBCPULSE` writer - cycle-by-cycle mode action refresh moment selection. Bit0: TEZ, bit1:TEP"]
12pub type CBCPULSE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13#[doc = "Field `FORCE_CBC` reader - a toggle trigger a cycle-by-cycle mode action"]
14pub type FORCE_CBC_R = crate::BitReader;
15#[doc = "Field `FORCE_CBC` writer - a toggle trigger a cycle-by-cycle mode action"]
16pub type FORCE_CBC_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `FORCE_OST` reader - a toggle (software negate its value) triggers a one-shot mode action"]
18pub type FORCE_OST_R = crate::BitReader;
19#[doc = "Field `FORCE_OST` writer - a toggle (software negate its value) triggers a one-shot mode action"]
20pub type FORCE_OST_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[doc = "Bit 0 - a rising edge will clear on going one-shot mode action"]
23 #[inline(always)]
24 pub fn clr_ost(&self) -> CLR_OST_R {
25 CLR_OST_R::new((self.bits & 1) != 0)
26 }
27 #[doc = "Bits 1:2 - cycle-by-cycle mode action refresh moment selection. Bit0: TEZ, bit1:TEP"]
28 #[inline(always)]
29 pub fn cbcpulse(&self) -> CBCPULSE_R {
30 CBCPULSE_R::new(((self.bits >> 1) & 3) as u8)
31 }
32 #[doc = "Bit 3 - a toggle trigger a cycle-by-cycle mode action"]
33 #[inline(always)]
34 pub fn force_cbc(&self) -> FORCE_CBC_R {
35 FORCE_CBC_R::new(((self.bits >> 3) & 1) != 0)
36 }
37 #[doc = "Bit 4 - a toggle (software negate its value) triggers a one-shot mode action"]
38 #[inline(always)]
39 pub fn force_ost(&self) -> FORCE_OST_R {
40 FORCE_OST_R::new(((self.bits >> 4) & 1) != 0)
41 }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46 f.debug_struct("TZ_CFG1")
47 .field("clr_ost", &self.clr_ost())
48 .field("cbcpulse", &self.cbcpulse())
49 .field("force_cbc", &self.force_cbc())
50 .field("force_ost", &self.force_ost())
51 .finish()
52 }
53}
54impl W {
55 #[doc = "Bit 0 - a rising edge will clear on going one-shot mode action"]
56 #[inline(always)]
57 pub fn clr_ost(&mut self) -> CLR_OST_W<TZ_CFG1_SPEC> {
58 CLR_OST_W::new(self, 0)
59 }
60 #[doc = "Bits 1:2 - cycle-by-cycle mode action refresh moment selection. Bit0: TEZ, bit1:TEP"]
61 #[inline(always)]
62 pub fn cbcpulse(&mut self) -> CBCPULSE_W<TZ_CFG1_SPEC> {
63 CBCPULSE_W::new(self, 1)
64 }
65 #[doc = "Bit 3 - a toggle trigger a cycle-by-cycle mode action"]
66 #[inline(always)]
67 pub fn force_cbc(&mut self) -> FORCE_CBC_W<TZ_CFG1_SPEC> {
68 FORCE_CBC_W::new(self, 3)
69 }
70 #[doc = "Bit 4 - a toggle (software negate its value) triggers a one-shot mode action"]
71 #[inline(always)]
72 pub fn force_ost(&mut self) -> FORCE_OST_W<TZ_CFG1_SPEC> {
73 FORCE_OST_W::new(self, 4)
74 }
75}
76#[doc = "Software triggers for fault handler actions\n\nYou can [`read`](crate::Reg::read) this register and get [`tz_cfg1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tz_cfg1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct TZ_CFG1_SPEC;
78impl crate::RegisterSpec for TZ_CFG1_SPEC {
79 type Ux = u32;
80}
81#[doc = "`read()` method returns [`tz_cfg1::R`](R) reader structure"]
82impl crate::Readable for TZ_CFG1_SPEC {}
83#[doc = "`write(|w| ..)` method takes [`tz_cfg1::W`](W) writer structure"]
84impl crate::Writable for TZ_CFG1_SPEC {
85 type Safety = crate::Unsafe;
86 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
87 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
88}
89#[doc = "`reset()` method sets TZ_CFG1 to value 0"]
90impl crate::Resettable for TZ_CFG1_SPEC {
91 const RESET_VALUE: u32 = 0;
92}