esp32p4/i3c_mst/
buffer_status_level.rs1#[doc = "Register `BUFFER_STATUS_LEVEL` reader"]
2pub type R = crate::R<BUFFER_STATUS_LEVEL_SPEC>;
3#[doc = "Field `CMD_BUF_EMPTY_CNT` reader - Command Buffer Empty Locations contains the number of empty locations in the command buffer."]
4pub type CMD_BUF_EMPTY_CNT_R = crate::FieldReader;
5#[doc = "Field `RESP_BUF_CNT` reader - Response Buffer Level Value contains the number of valid data entries in the response buffer."]
6pub type RESP_BUF_CNT_R = crate::FieldReader;
7#[doc = "Field `IBI_DATA_BUF_CNT` reader - IBI Buffer Level Value contains the number of valid entries in the IBI Buffer. This is field is used in master mode."]
8pub type IBI_DATA_BUF_CNT_R = crate::FieldReader;
9#[doc = "Field `IBI_STATUS_BUF_CNT` reader - IBI Buffer Status Count contains the number of IBI status entries in the IBI Buffer. This field is used in master mode."]
10pub type IBI_STATUS_BUF_CNT_R = crate::FieldReader;
11impl R {
12 #[doc = "Bits 0:4 - Command Buffer Empty Locations contains the number of empty locations in the command buffer."]
13 #[inline(always)]
14 pub fn cmd_buf_empty_cnt(&self) -> CMD_BUF_EMPTY_CNT_R {
15 CMD_BUF_EMPTY_CNT_R::new((self.bits & 0x1f) as u8)
16 }
17 #[doc = "Bits 8:11 - Response Buffer Level Value contains the number of valid data entries in the response buffer."]
18 #[inline(always)]
19 pub fn resp_buf_cnt(&self) -> RESP_BUF_CNT_R {
20 RESP_BUF_CNT_R::new(((self.bits >> 8) & 0x0f) as u8)
21 }
22 #[doc = "Bits 16:19 - IBI Buffer Level Value contains the number of valid entries in the IBI Buffer. This is field is used in master mode."]
23 #[inline(always)]
24 pub fn ibi_data_buf_cnt(&self) -> IBI_DATA_BUF_CNT_R {
25 IBI_DATA_BUF_CNT_R::new(((self.bits >> 16) & 0x0f) as u8)
26 }
27 #[doc = "Bits 24:27 - IBI Buffer Status Count contains the number of IBI status entries in the IBI Buffer. This field is used in master mode."]
28 #[inline(always)]
29 pub fn ibi_status_buf_cnt(&self) -> IBI_STATUS_BUF_CNT_R {
30 IBI_STATUS_BUF_CNT_R::new(((self.bits >> 24) & 0x0f) as u8)
31 }
32}
33#[cfg(feature = "impl-register-debug")]
34impl core::fmt::Debug for R {
35 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36 f.debug_struct("BUFFER_STATUS_LEVEL")
37 .field(
38 "cmd_buf_empty_cnt",
39 &format_args!("{}", self.cmd_buf_empty_cnt().bits()),
40 )
41 .field(
42 "resp_buf_cnt",
43 &format_args!("{}", self.resp_buf_cnt().bits()),
44 )
45 .field(
46 "ibi_data_buf_cnt",
47 &format_args!("{}", self.ibi_data_buf_cnt().bits()),
48 )
49 .field(
50 "ibi_status_buf_cnt",
51 &format_args!("{}", self.ibi_status_buf_cnt().bits()),
52 )
53 .finish()
54 }
55}
56#[cfg(feature = "impl-register-debug")]
57impl core::fmt::Debug for crate::generic::Reg<BUFFER_STATUS_LEVEL_SPEC> {
58 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
59 core::fmt::Debug::fmt(&self.read(), f)
60 }
61}
62#[doc = "BUFFER_STATUS_LEVEL reflects the status level of Buffers in the controller.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`buffer_status_level::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
63pub struct BUFFER_STATUS_LEVEL_SPEC;
64impl crate::RegisterSpec for BUFFER_STATUS_LEVEL_SPEC {
65 type Ux = u32;
66}
67#[doc = "`read()` method returns [`buffer_status_level::R`](R) reader structure"]
68impl crate::Readable for BUFFER_STATUS_LEVEL_SPEC {}
69#[doc = "`reset()` method sets BUFFER_STATUS_LEVEL to value 0x10"]
70impl crate::Resettable for BUFFER_STATUS_LEVEL_SPEC {
71 const RESET_VALUE: u32 = 0x10;
72}