esp8266/uart1/
uart_lowpulse.rs

1#[doc = "Register `UART_LOWPULSE` reader"]
2pub struct R(crate::R<UART_LOWPULSE_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<UART_LOWPULSE_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<UART_LOWPULSE_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<UART_LOWPULSE_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `lowpulse_min_cnt` reader - used in baudrate detect"]
17pub struct LOWPULSE_MIN_CNT_R(crate::FieldReader<u32, u32>);
18impl LOWPULSE_MIN_CNT_R {
19    #[inline(always)]
20    pub(crate) fn new(bits: u32) -> Self {
21        LOWPULSE_MIN_CNT_R(crate::FieldReader::new(bits))
22    }
23}
24impl core::ops::Deref for LOWPULSE_MIN_CNT_R {
25    type Target = crate::FieldReader<u32, u32>;
26    #[inline(always)]
27    fn deref(&self) -> &Self::Target {
28        &self.0
29    }
30}
31impl R {
32    #[doc = "Bits 0:19 - used in baudrate detect"]
33    #[inline(always)]
34    pub fn lowpulse_min_cnt(&self) -> LOWPULSE_MIN_CNT_R {
35        LOWPULSE_MIN_CNT_R::new((self.bits & 0x000f_ffff) as u32)
36    }
37}
38#[doc = "UART_LOWPULSE\n\nThis register you can [`read`]
39(crate::generic::Reg::read). See [API]
40(https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [uart_lowpulse]
41(index.html) module"]
42pub struct UART_LOWPULSE_SPEC;
43impl crate::RegisterSpec for UART_LOWPULSE_SPEC {
44    type Ux = u32;
45}
46#[doc = "`read()` method returns [uart_lowpulse::R]
47(R) reader structure"]
48impl crate::Readable for UART_LOWPULSE_SPEC {
49    type Reader = R;
50}
51#[doc = "`reset()` method sets UART_LOWPULSE to value 0"]
52impl crate::Resettable for UART_LOWPULSE_SPEC {
53    #[inline(always)]
54    fn reset_value() -> Self::Ux {
55        0
56    }
57}