esp32s3/dma/ch/
in_wight.rs

1#[doc = "Register `IN_WIGHT` reader"]
2pub type R = crate::R<IN_WIGHT_SPEC>;
3#[doc = "Register `IN_WIGHT` writer"]
4pub type W = crate::W<IN_WIGHT_SPEC>;
5#[doc = "Field `RX_WEIGHT` reader - The weight of Rx channel 0."]
6pub type RX_WEIGHT_R = crate::FieldReader;
7#[doc = "Field `RX_WEIGHT` writer - The weight of Rx channel 0."]
8pub type RX_WEIGHT_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9impl R {
10    #[doc = "Bits 8:11 - The weight of Rx channel 0."]
11    #[inline(always)]
12    pub fn rx_weight(&self) -> RX_WEIGHT_R {
13        RX_WEIGHT_R::new(((self.bits >> 8) & 0x0f) as u8)
14    }
15}
16#[cfg(feature = "impl-register-debug")]
17impl core::fmt::Debug for R {
18    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19        f.debug_struct("IN_WIGHT")
20            .field("rx_weight", &self.rx_weight())
21            .finish()
22    }
23}
24impl W {
25    #[doc = "Bits 8:11 - The weight of Rx channel 0."]
26    #[inline(always)]
27    pub fn rx_weight(&mut self) -> RX_WEIGHT_W<IN_WIGHT_SPEC> {
28        RX_WEIGHT_W::new(self, 8)
29    }
30}
31#[doc = "Weight register of Rx channel 0\n\nYou can [`read`](crate::Reg::read) this register and get [`in_wight::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`in_wight::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
32pub struct IN_WIGHT_SPEC;
33impl crate::RegisterSpec for IN_WIGHT_SPEC {
34    type Ux = u32;
35}
36#[doc = "`read()` method returns [`in_wight::R`](R) reader structure"]
37impl crate::Readable for IN_WIGHT_SPEC {}
38#[doc = "`write(|w| ..)` method takes [`in_wight::W`](W) writer structure"]
39impl crate::Writable for IN_WIGHT_SPEC {
40    type Safety = crate::Unsafe;
41}
42#[doc = "`reset()` method sets IN_WIGHT to value 0x0f00"]
43impl crate::Resettable for IN_WIGHT_SPEC {
44    const RESET_VALUE: u32 = 0x0f00;
45}