esp32s3/rmt/
ch_rx_status.rs1#[doc = "Register `CH%s_RX_STATUS` reader"]
2pub type R = crate::R<CH_RX_STATUS_SPEC>;
3#[doc = "Field `MEM_WADDR_EX` reader - This register records the memory address offset when receiver of CHANNEL%s is using the RAM."]
4pub type MEM_WADDR_EX_R = crate::FieldReader<u16>;
5#[doc = "Field `APB_MEM_RADDR` reader - This register records the memory address offset when reads RAM over APB bus."]
6pub type APB_MEM_RADDR_R = crate::FieldReader<u16>;
7#[doc = "Field `STATE` reader - This register records the FSM status of CHANNEL%s."]
8pub type STATE_R = crate::FieldReader;
9#[doc = "Field `MEM_OWNER_ERR` reader - This status bit will be set when the ownership of memory block is wrong."]
10pub type MEM_OWNER_ERR_R = crate::BitReader;
11#[doc = "Field `MEM_FULL` reader - This status bit will be set if the receiver receives more data than the memory size."]
12pub type MEM_FULL_R = crate::BitReader;
13#[doc = "Field `APB_MEM_RD_ERR` reader - This status bit will be set if the offset address out of memory size when reads via APB bus."]
14pub type APB_MEM_RD_ERR_R = crate::BitReader;
15impl R {
16 #[doc = "Bits 0:9 - This register records the memory address offset when receiver of CHANNEL%s is using the RAM."]
17 #[inline(always)]
18 pub fn mem_waddr_ex(&self) -> MEM_WADDR_EX_R {
19 MEM_WADDR_EX_R::new((self.bits & 0x03ff) as u16)
20 }
21 #[doc = "Bits 11:20 - This register records the memory address offset when reads RAM over APB bus."]
22 #[inline(always)]
23 pub fn apb_mem_raddr(&self) -> APB_MEM_RADDR_R {
24 APB_MEM_RADDR_R::new(((self.bits >> 11) & 0x03ff) as u16)
25 }
26 #[doc = "Bits 22:24 - This register records the FSM status of CHANNEL%s."]
27 #[inline(always)]
28 pub fn state(&self) -> STATE_R {
29 STATE_R::new(((self.bits >> 22) & 7) as u8)
30 }
31 #[doc = "Bit 25 - This status bit will be set when the ownership of memory block is wrong."]
32 #[inline(always)]
33 pub fn mem_owner_err(&self) -> MEM_OWNER_ERR_R {
34 MEM_OWNER_ERR_R::new(((self.bits >> 25) & 1) != 0)
35 }
36 #[doc = "Bit 26 - This status bit will be set if the receiver receives more data than the memory size."]
37 #[inline(always)]
38 pub fn mem_full(&self) -> MEM_FULL_R {
39 MEM_FULL_R::new(((self.bits >> 26) & 1) != 0)
40 }
41 #[doc = "Bit 27 - This status bit will be set if the offset address out of memory size when reads via APB bus."]
42 #[inline(always)]
43 pub fn apb_mem_rd_err(&self) -> APB_MEM_RD_ERR_R {
44 APB_MEM_RD_ERR_R::new(((self.bits >> 27) & 1) != 0)
45 }
46}
47#[cfg(feature = "impl-register-debug")]
48impl core::fmt::Debug for R {
49 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
50 f.debug_struct("CH_RX_STATUS")
51 .field("mem_waddr_ex", &self.mem_waddr_ex())
52 .field("apb_mem_raddr", &self.apb_mem_raddr())
53 .field("state", &self.state())
54 .field("mem_owner_err", &self.mem_owner_err())
55 .field("mem_full", &self.mem_full())
56 .field("apb_mem_rd_err", &self.apb_mem_rd_err())
57 .finish()
58 }
59}
60#[doc = "Channel %s status register\n\nYou can [`read`](crate::Reg::read) this register and get [`ch_rx_status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
61pub struct CH_RX_STATUS_SPEC;
62impl crate::RegisterSpec for CH_RX_STATUS_SPEC {
63 type Ux = u32;
64}
65#[doc = "`read()` method returns [`ch_rx_status::R`](R) reader structure"]
66impl crate::Readable for CH_RX_STATUS_SPEC {}
67#[doc = "`reset()` method sets CH%s_RX_STATUS to value 0x0006_00c0"]
68impl crate::Resettable for CH_RX_STATUS_SPEC {
69 const RESET_VALUE: u32 = 0x0006_00c0;
70}