esp32c6/ieee802154/
coex_pti.rs

1#[doc = "Register `COEX_PTI` reader"]
2pub type R = crate::R<COEX_PTI_SPEC>;
3#[doc = "Register `COEX_PTI` writer"]
4pub type W = crate::W<COEX_PTI_SPEC>;
5#[doc = "Field `COEX_PTI` reader - "]
6pub type COEX_PTI_R = crate::FieldReader;
7#[doc = "Field `COEX_PTI` writer - "]
8pub type COEX_PTI_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `COEX_ACK_PTI` reader - "]
10pub type COEX_ACK_PTI_R = crate::FieldReader;
11#[doc = "Field `COEX_ACK_PTI` writer - "]
12pub type COEX_ACK_PTI_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13#[doc = "Field `CLOSE_RF_SEL` reader - "]
14pub type CLOSE_RF_SEL_R = crate::BitReader;
15#[doc = "Field `CLOSE_RF_SEL` writer - "]
16pub type CLOSE_RF_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18    #[doc = "Bits 0:3"]
19    #[inline(always)]
20    pub fn coex_pti(&self) -> COEX_PTI_R {
21        COEX_PTI_R::new((self.bits & 0x0f) as u8)
22    }
23    #[doc = "Bits 4:7"]
24    #[inline(always)]
25    pub fn coex_ack_pti(&self) -> COEX_ACK_PTI_R {
26        COEX_ACK_PTI_R::new(((self.bits >> 4) & 0x0f) as u8)
27    }
28    #[doc = "Bit 8"]
29    #[inline(always)]
30    pub fn close_rf_sel(&self) -> CLOSE_RF_SEL_R {
31        CLOSE_RF_SEL_R::new(((self.bits >> 8) & 1) != 0)
32    }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for R {
36    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
37        f.debug_struct("COEX_PTI")
38            .field("coex_pti", &self.coex_pti())
39            .field("coex_ack_pti", &self.coex_ack_pti())
40            .field("close_rf_sel", &self.close_rf_sel())
41            .finish()
42    }
43}
44impl W {
45    #[doc = "Bits 0:3"]
46    #[inline(always)]
47    pub fn coex_pti(&mut self) -> COEX_PTI_W<COEX_PTI_SPEC> {
48        COEX_PTI_W::new(self, 0)
49    }
50    #[doc = "Bits 4:7"]
51    #[inline(always)]
52    pub fn coex_ack_pti(&mut self) -> COEX_ACK_PTI_W<COEX_PTI_SPEC> {
53        COEX_ACK_PTI_W::new(self, 4)
54    }
55    #[doc = "Bit 8"]
56    #[inline(always)]
57    pub fn close_rf_sel(&mut self) -> CLOSE_RF_SEL_W<COEX_PTI_SPEC> {
58        CLOSE_RF_SEL_W::new(self, 8)
59    }
60}
61#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`coex_pti::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`coex_pti::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
62pub struct COEX_PTI_SPEC;
63impl crate::RegisterSpec for COEX_PTI_SPEC {
64    type Ux = u32;
65}
66#[doc = "`read()` method returns [`coex_pti::R`](R) reader structure"]
67impl crate::Readable for COEX_PTI_SPEC {}
68#[doc = "`write(|w| ..)` method takes [`coex_pti::W`](W) writer structure"]
69impl crate::Writable for COEX_PTI_SPEC {
70    type Safety = crate::Unsafe;
71    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
72    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
73}
74#[doc = "`reset()` method sets COEX_PTI to value 0"]
75impl crate::Resettable for COEX_PTI_SPEC {
76    const RESET_VALUE: u32 = 0;
77}