esp8266/uart1/
uart_rxd_cnt.rs1#[doc = "Register `UART_RXD_CNT` reader"]
2pub struct R(crate::R<UART_RXD_CNT_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<UART_RXD_CNT_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<UART_RXD_CNT_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<UART_RXD_CNT_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `rxd_edge_cnt` reader - used in baudrate detect"]
17pub struct RXD_EDGE_CNT_R(crate::FieldReader<u16, u16>);
18impl RXD_EDGE_CNT_R {
19 #[inline(always)]
20 pub(crate) fn new(bits: u16) -> Self {
21 RXD_EDGE_CNT_R(crate::FieldReader::new(bits))
22 }
23}
24impl core::ops::Deref for RXD_EDGE_CNT_R {
25 type Target = crate::FieldReader<u16, u16>;
26 #[inline(always)]
27 fn deref(&self) -> &Self::Target {
28 &self.0
29 }
30}
31impl R {
32 #[doc = "Bits 0:9 - used in baudrate detect"]
33 #[inline(always)]
34 pub fn rxd_edge_cnt(&self) -> RXD_EDGE_CNT_R {
35 RXD_EDGE_CNT_R::new((self.bits & 0x03ff) as u16)
36 }
37}
38#[doc = "UART_RXD_CNT\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_rxd_cnt]
41(index.html) module"]
42pub struct UART_RXD_CNT_SPEC;
43impl crate::RegisterSpec for UART_RXD_CNT_SPEC {
44 type Ux = u32;
45}
46#[doc = "`read()` method returns [uart_rxd_cnt::R]
47(R) reader structure"]
48impl crate::Readable for UART_RXD_CNT_SPEC {
49 type Reader = R;
50}
51#[doc = "`reset()` method sets UART_RXD_CNT to value 0"]
52impl crate::Resettable for UART_RXD_CNT_SPEC {
53 #[inline(always)]
54 fn reset_value() -> Self::Ux {
55 0
56 }
57}