stm32f1_staging/stm32f107/sdio/
dlen.rs

1///Register `DLEN` reader
2pub type R = crate::R<DLENrs>;
3///Register `DLEN` writer
4pub type W = crate::W<DLENrs>;
5///Field `DATALENGTH` reader - Data length value
6pub type DATALENGTH_R = crate::FieldReader<u32>;
7///Field `DATALENGTH` writer - Data length value
8pub type DATALENGTH_W<'a, REG> = crate::FieldWriter<'a, REG, 25, u32>;
9impl R {
10    ///Bits 0:24 - Data length value
11    #[inline(always)]
12    pub fn datalength(&self) -> DATALENGTH_R {
13        DATALENGTH_R::new(self.bits & 0x01ff_ffff)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("DLEN").field("datalength", &self.datalength()).finish()
19    }
20}
21impl W {
22    ///Bits 0:24 - Data length value
23    #[inline(always)]
24    pub fn datalength(&mut self) -> DATALENGTH_W<DLENrs> {
25        DATALENGTH_W::new(self, 0)
26    }
27}
28/**data length register
29
30You can [`read`](crate::Reg::read) this register and get [`dlen::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dlen::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
31
32See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F107.html#SDIO:DLEN)*/
33pub struct DLENrs;
34impl crate::RegisterSpec for DLENrs {
35    type Ux = u32;
36}
37///`read()` method returns [`dlen::R`](R) reader structure
38impl crate::Readable for DLENrs {}
39///`write(|w| ..)` method takes [`dlen::W`](W) writer structure
40impl crate::Writable for DLENrs {
41    type Safety = crate::Unsafe;
42}
43///`reset()` method sets DLEN to value 0
44impl crate::Resettable for DLENrs {}