stm32f4_staging/stm32f469/otg_fs_device/
dvbuspulse.rs

1///Register `DVBUSPULSE` reader
2pub type R = crate::R<DVBUSPULSErs>;
3///Register `DVBUSPULSE` writer
4pub type W = crate::W<DVBUSPULSErs>;
5///Field `DVBUSP` reader - Device VBUS pulsing time
6pub type DVBUSP_R = crate::FieldReader<u16>;
7///Field `DVBUSP` writer - Device VBUS pulsing time
8pub type DVBUSP_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
9impl R {
10    ///Bits 0:11 - Device VBUS pulsing time
11    #[inline(always)]
12    pub fn dvbusp(&self) -> DVBUSP_R {
13        DVBUSP_R::new((self.bits & 0x0fff) as u16)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("DVBUSPULSE")
19            .field("dvbusp", &self.dvbusp())
20            .finish()
21    }
22}
23impl W {
24    ///Bits 0:11 - Device VBUS pulsing time
25    #[inline(always)]
26    pub fn dvbusp(&mut self) -> DVBUSP_W<DVBUSPULSErs> {
27        DVBUSP_W::new(self, 0)
28    }
29}
30/**OTG_FS device VBUS pulsing time register
31
32You can [`read`](crate::Reg::read) this register and get [`dvbuspulse::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dvbuspulse::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
33
34See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F469.html#OTG_FS_DEVICE:DVBUSPULSE)*/
35pub struct DVBUSPULSErs;
36impl crate::RegisterSpec for DVBUSPULSErs {
37    type Ux = u32;
38}
39///`read()` method returns [`dvbuspulse::R`](R) reader structure
40impl crate::Readable for DVBUSPULSErs {}
41///`write(|w| ..)` method takes [`dvbuspulse::W`](W) writer structure
42impl crate::Writable for DVBUSPULSErs {
43    type Safety = crate::Unsafe;
44}
45///`reset()` method sets DVBUSPULSE to value 0x05b8
46impl crate::Resettable for DVBUSPULSErs {
47    const RESET_VALUE: u32 = 0x05b8;
48}