1#[doc = "Register `RX_CTRL` reader"]
2pub type R = crate::R<RX_CTRL_SPEC>;
3#[doc = "Register `RX_CTRL` writer"]
4pub type W = crate::W<RX_CTRL_SPEC>;
5#[doc = "Field `RX_DESCR_RELOAD` reader - Instruct the hardware to reload the RX descriptors"]
6pub type RX_DESCR_RELOAD_R = crate::BitReader;
7#[doc = "Field `RX_DESCR_RELOAD` writer - Instruct the hardware to reload the RX descriptors"]
8pub type RX_DESCR_RELOAD_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `RX_ENABLE` reader - Enable frame reception"]
10pub type RX_ENABLE_R = crate::BitReader;
11#[doc = "Field `RX_ENABLE` writer - Enable frame reception"]
12pub type RX_ENABLE_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bit 0 - Instruct the hardware to reload the RX descriptors"]
15 #[inline(always)]
16 pub fn rx_descr_reload(&self) -> RX_DESCR_RELOAD_R {
17 RX_DESCR_RELOAD_R::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 31 - Enable frame reception"]
20 #[inline(always)]
21 pub fn rx_enable(&self) -> RX_ENABLE_R {
22 RX_ENABLE_R::new(((self.bits >> 31) & 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("RX_CTRL")
29 .field("rx_descr_reload", &self.rx_descr_reload())
30 .field("rx_enable", &self.rx_enable())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bit 0 - Instruct the hardware to reload the RX descriptors"]
36 #[inline(always)]
37 pub fn rx_descr_reload(&mut self) -> RX_DESCR_RELOAD_W<RX_CTRL_SPEC> {
38 RX_DESCR_RELOAD_W::new(self, 0)
39 }
40 #[doc = "Bit 31 - Enable frame reception"]
41 #[inline(always)]
42 pub fn rx_enable(&mut self) -> RX_ENABLE_W<RX_CTRL_SPEC> {
43 RX_ENABLE_W::new(self, 31)
44 }
45}
46#[doc = "Controls the reception of frames\n\nYou can [`read`](crate::Reg::read) this register and get [`rx_ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rx_ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct RX_CTRL_SPEC;
48impl crate::RegisterSpec for RX_CTRL_SPEC {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`rx_ctrl::R`](R) reader structure"]
52impl crate::Readable for RX_CTRL_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`rx_ctrl::W`](W) writer structure"]
54impl crate::Writable for RX_CTRL_SPEC {
55 type Safety = crate::Unsafe;
56 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
57 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58}
59#[doc = "`reset()` method sets RX_CTRL to value 0"]
60impl crate::Resettable for RX_CTRL_SPEC {
61 const RESET_VALUE: u32 = 0;
62}