esp32/rmt/
apb_conf.rs

1#[doc = "Register `APB_CONF` reader"]
2pub type R = crate::R<APB_CONF_SPEC>;
3#[doc = "Register `APB_CONF` writer"]
4pub type W = crate::W<APB_CONF_SPEC>;
5#[doc = "Field `APB_FIFO_MASK` reader - Set this bit to disable apb fifo access"]
6pub type APB_FIFO_MASK_R = crate::BitReader;
7#[doc = "Field `APB_FIFO_MASK` writer - Set this bit to disable apb fifo access"]
8pub type APB_FIFO_MASK_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `MEM_TX_WRAP_EN` reader - when datas need to be send is more than channel's mem can store then set this bit to enable reusage of mem this bit is used together with reg_rmt_tx_lim_chn."]
10pub type MEM_TX_WRAP_EN_R = crate::BitReader;
11#[doc = "Field `MEM_TX_WRAP_EN` writer - when datas need to be send is more than channel's mem can store then set this bit to enable reusage of mem this bit is used together with reg_rmt_tx_lim_chn."]
12pub type MEM_TX_WRAP_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14    #[doc = "Bit 0 - Set this bit to disable apb fifo access"]
15    #[inline(always)]
16    pub fn apb_fifo_mask(&self) -> APB_FIFO_MASK_R {
17        APB_FIFO_MASK_R::new((self.bits & 1) != 0)
18    }
19    #[doc = "Bit 1 - when datas need to be send is more than channel's mem can store then set this bit to enable reusage of mem this bit is used together with reg_rmt_tx_lim_chn."]
20    #[inline(always)]
21    pub fn mem_tx_wrap_en(&self) -> MEM_TX_WRAP_EN_R {
22        MEM_TX_WRAP_EN_R::new(((self.bits >> 1) & 1) != 0)
23    }
24}
25#[cfg(feature = "impl-register-debug")]
26impl core::fmt::Debug for R {
27    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28        f.debug_struct("APB_CONF")
29            .field("apb_fifo_mask", &self.apb_fifo_mask())
30            .field("mem_tx_wrap_en", &self.mem_tx_wrap_en())
31            .finish()
32    }
33}
34impl W {
35    #[doc = "Bit 0 - Set this bit to disable apb fifo access"]
36    #[inline(always)]
37    pub fn apb_fifo_mask(&mut self) -> APB_FIFO_MASK_W<APB_CONF_SPEC> {
38        APB_FIFO_MASK_W::new(self, 0)
39    }
40    #[doc = "Bit 1 - when datas need to be send is more than channel's mem can store then set this bit to enable reusage of mem this bit is used together with reg_rmt_tx_lim_chn."]
41    #[inline(always)]
42    pub fn mem_tx_wrap_en(&mut self) -> MEM_TX_WRAP_EN_W<APB_CONF_SPEC> {
43        MEM_TX_WRAP_EN_W::new(self, 1)
44    }
45}
46#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`apb_conf::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`apb_conf::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct APB_CONF_SPEC;
48impl crate::RegisterSpec for APB_CONF_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [`apb_conf::R`](R) reader structure"]
52impl crate::Readable for APB_CONF_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`apb_conf::W`](W) writer structure"]
54impl crate::Writable for APB_CONF_SPEC {
55    type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets APB_CONF to value 0"]
58impl crate::Resettable for APB_CONF_SPEC {}