esp32/mcpwm0/timer/
status.rs1#[doc = "Register `STATUS` reader"]
2pub type R = crate::R<STATUS_SPEC>;
3#[doc = "Field `VALUE` reader - "]
4pub type VALUE_R = crate::FieldReader<u16>;
5#[doc = "Field `DIRECTION` reader - "]
6pub type DIRECTION_R = crate::BitReader;
7impl R {
8 #[doc = "Bits 0:15"]
9 #[inline(always)]
10 pub fn value(&self) -> VALUE_R {
11 VALUE_R::new((self.bits & 0xffff) as u16)
12 }
13 #[doc = "Bit 16"]
14 #[inline(always)]
15 pub fn direction(&self) -> DIRECTION_R {
16 DIRECTION_R::new(((self.bits >> 16) & 1) != 0)
17 }
18}
19#[cfg(feature = "impl-register-debug")]
20impl core::fmt::Debug for R {
21 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22 f.debug_struct("STATUS")
23 .field("value", &self.value())
24 .field("direction", &self.direction())
25 .finish()
26 }
27}
28#[doc = "PWM TIMERx status register.\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct STATUS_SPEC;
30impl crate::RegisterSpec for STATUS_SPEC {
31 type Ux = u32;
32}
33#[doc = "`read()` method returns [`status::R`](R) reader structure"]
34impl crate::Readable for STATUS_SPEC {}
35#[doc = "`reset()` method sets STATUS to value 0"]
36impl crate::Resettable for STATUS_SPEC {}