esp32c3/twai0/
rx_message_cnt.rs

1#[doc = "Register `RX_MESSAGE_CNT` reader"]
2pub type R = crate::R<RX_MESSAGE_CNT_SPEC>;
3#[doc = "Field `RX_MESSAGE_COUNTER` reader - This register reflects the number of messages available within the RX FIFO."]
4pub type RX_MESSAGE_COUNTER_R = crate::FieldReader;
5impl R {
6    #[doc = "Bits 0:6 - This register reflects the number of messages available within the RX FIFO."]
7    #[inline(always)]
8    pub fn rx_message_counter(&self) -> RX_MESSAGE_COUNTER_R {
9        RX_MESSAGE_COUNTER_R::new((self.bits & 0x7f) as u8)
10    }
11}
12#[cfg(feature = "impl-register-debug")]
13impl core::fmt::Debug for R {
14    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
15        f.debug_struct("RX_MESSAGE_CNT")
16            .field("rx_message_counter", &self.rx_message_counter())
17            .finish()
18    }
19}
20#[doc = "Receive Message Counter Register\n\nYou can [`read`](crate::Reg::read) this register and get [`rx_message_cnt::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
21pub struct RX_MESSAGE_CNT_SPEC;
22impl crate::RegisterSpec for RX_MESSAGE_CNT_SPEC {
23    type Ux = u32;
24}
25#[doc = "`read()` method returns [`rx_message_cnt::R`](R) reader structure"]
26impl crate::Readable for RX_MESSAGE_CNT_SPEC {}
27#[doc = "`reset()` method sets RX_MESSAGE_CNT to value 0"]
28impl crate::Resettable for RX_MESSAGE_CNT_SPEC {}