esp32p4/twai0/
arb_lost_cap.rs

1#[doc = "Register `ARB_LOST_CAP` reader"]
2pub type R = crate::R<ARB_LOST_CAP_SPEC>;
3#[doc = "Field `ARBITRATION_LOST_CAPTURE` reader - This register contains information about the bit position of losing arbitration."]
4pub type ARBITRATION_LOST_CAPTURE_R = crate::FieldReader;
5impl R {
6    #[doc = "Bits 0:4 - This register contains information about the bit position of losing arbitration."]
7    #[inline(always)]
8    pub fn arbitration_lost_capture(&self) -> ARBITRATION_LOST_CAPTURE_R {
9        ARBITRATION_LOST_CAPTURE_R::new((self.bits & 0x1f) 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("ARB_LOST_CAP")
16            .field(
17                "arbitration_lost_capture",
18                &format_args!("{}", self.arbitration_lost_capture().bits()),
19            )
20            .finish()
21    }
22}
23#[cfg(feature = "impl-register-debug")]
24impl core::fmt::Debug for crate::generic::Reg<ARB_LOST_CAP_SPEC> {
25    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
26        core::fmt::Debug::fmt(&self.read(), f)
27    }
28}
29#[doc = "TWAI arbiter lost capture register.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`arb_lost_cap::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
30pub struct ARB_LOST_CAP_SPEC;
31impl crate::RegisterSpec for ARB_LOST_CAP_SPEC {
32    type Ux = u32;
33}
34#[doc = "`read()` method returns [`arb_lost_cap::R`](R) reader structure"]
35impl crate::Readable for ARB_LOST_CAP_SPEC {}
36#[doc = "`reset()` method sets ARB_LOST_CAP to value 0"]
37impl crate::Resettable for ARB_LOST_CAP_SPEC {
38    const RESET_VALUE: u32 = 0;
39}