esp32p4/i3c_mst_mem/
ibi_status_buf.rs1#[doc = "Register `IBI_STATUS_BUF` reader"]
2pub type R = crate::R<IBI_STATUS_BUF_SPEC>;
3#[doc = "Field `DATA_LENGTH` reader - This field represents the length of data received along with IBI, in bytes."]
4pub type DATA_LENGTH_R = crate::FieldReader;
5#[doc = "Field `IBI_ID` reader - IBI Identifier. The byte received after START which includes the address the R/W bit: Device address and R/W bit in case of Slave Interrupt or Master Request."]
6pub type IBI_ID_R = crate::FieldReader;
7#[doc = "Field `IBI_STS` reader - IBI received data/status. IBI Data register is mapped to the IBI Buffer. The IBI Data is always packed in4-byte aligned and put to the IBI Buffer. This register When read from, reads the data from the IBI buffer. IBI Status register when read from, returns the data from the IBI Buffer and indicates how the controller responded to incoming IBI(SIR, MR and HJ)."]
8pub type IBI_STS_R = crate::BitReader;
9impl R {
10 #[doc = "Bits 0:7 - This field represents the length of data received along with IBI, in bytes."]
11 #[inline(always)]
12 pub fn data_length(&self) -> DATA_LENGTH_R {
13 DATA_LENGTH_R::new((self.bits & 0xff) as u8)
14 }
15 #[doc = "Bits 8:15 - IBI Identifier. The byte received after START which includes the address the R/W bit: Device address and R/W bit in case of Slave Interrupt or Master Request."]
16 #[inline(always)]
17 pub fn ibi_id(&self) -> IBI_ID_R {
18 IBI_ID_R::new(((self.bits >> 8) & 0xff) as u8)
19 }
20 #[doc = "Bit 28 - IBI received data/status. IBI Data register is mapped to the IBI Buffer. The IBI Data is always packed in4-byte aligned and put to the IBI Buffer. This register When read from, reads the data from the IBI buffer. IBI Status register when read from, returns the data from the IBI Buffer and indicates how the controller responded to incoming IBI(SIR, MR and HJ)."]
21 #[inline(always)]
22 pub fn ibi_sts(&self) -> IBI_STS_R {
23 IBI_STS_R::new(((self.bits >> 28) & 1) != 0)
24 }
25}
26#[cfg(feature = "impl-register-debug")]
27impl core::fmt::Debug for R {
28 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
29 f.debug_struct("IBI_STATUS_BUF")
30 .field(
31 "data_length",
32 &format_args!("{}", self.data_length().bits()),
33 )
34 .field("ibi_id", &format_args!("{}", self.ibi_id().bits()))
35 .field("ibi_sts", &format_args!("{}", self.ibi_sts().bit()))
36 .finish()
37 }
38}
39#[cfg(feature = "impl-register-debug")]
40impl core::fmt::Debug for crate::generic::Reg<IBI_STATUS_BUF_SPEC> {
41 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
42 core::fmt::Debug::fmt(&self.read(), f)
43 }
44}
45#[doc = "In-Band Interrupt Buffer Status/Data Register. When receiving an IBI, IBI_PORT is used to both: Read the IBI Status Read the IBI Data(which is raw/opaque data)\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ibi_status_buf::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
46pub struct IBI_STATUS_BUF_SPEC;
47impl crate::RegisterSpec for IBI_STATUS_BUF_SPEC {
48 type Ux = u32;
49}
50#[doc = "`read()` method returns [`ibi_status_buf::R`](R) reader structure"]
51impl crate::Readable for IBI_STATUS_BUF_SPEC {}
52#[doc = "`reset()` method sets IBI_STATUS_BUF to value 0"]
53impl crate::Resettable for IBI_STATUS_BUF_SPEC {
54 const RESET_VALUE: u32 = 0;
55}