stm32f1_staging/stm32f103/crc/idr.rs
1///Register `IDR` reader
2pub type R = crate::R<IDRrs>;
3///Register `IDR` writer
4pub type W = crate::W<IDRrs>;
5///Field `IDR` reader - Independent Data register
6pub type IDR_R = crate::FieldReader;
7///Field `IDR` writer - Independent Data register
8pub type IDR_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
9impl R {
10 ///Bits 0:7 - Independent Data register
11 #[inline(always)]
12 pub fn idr(&self) -> IDR_R {
13 IDR_R::new((self.bits & 0xff) as u8)
14 }
15}
16impl core::fmt::Debug for R {
17 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18 f.debug_struct("IDR").field("idr", &self.idr()).finish()
19 }
20}
21impl W {
22 ///Bits 0:7 - Independent Data register
23 #[inline(always)]
24 pub fn idr(&mut self) -> IDR_W<IDRrs> {
25 IDR_W::new(self, 0)
26 }
27}
28/**Independent Data register
29
30You can [`read`](crate::Reg::read) this register and get [`idr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`idr::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/STM32F103.html#CRC:IDR)*/
33pub struct IDRrs;
34impl crate::RegisterSpec for IDRrs {
35 type Ux = u32;
36}
37///`read()` method returns [`idr::R`](R) reader structure
38impl crate::Readable for IDRrs {}
39///`write(|w| ..)` method takes [`idr::W`](W) writer structure
40impl crate::Writable for IDRrs {
41 type Safety = crate::Unsafe;
42}
43///`reset()` method sets IDR to value 0
44impl crate::Resettable for IDRrs {}