synopsys_usb_otg/ral/instances/
otg_hs_device.rs

1#![allow(non_snake_case, non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3//! USB on the go high speed
4//!
5//! Used by: stm32f405, stm32f407, stm32f427, stm32f429, stm32f446
6
7#[cfg(not(feature = "nosync"))]
8pub use super::super::peripherals::otg_hs_device::Instance;
9pub use super::super::peripherals::otg_hs_device::{RegisterBlock, ResetValues};
10pub use super::super::peripherals::otg_hs_device::{
11    DAINT, DAINTMSK, DCFG, DCTL, DEACHINT, DEACHINTMSK, DIEPCTL0, DIEPCTL1, DIEPCTL2, DIEPCTL3,
12    DIEPCTL4, DIEPCTL5, DIEPDMA1, DIEPDMA2, DIEPDMA3, DIEPDMA4, DIEPDMA5, DIEPEACHMSK1, DIEPEMPMSK,
13    DIEPINT0, DIEPINT1, DIEPINT2, DIEPINT3, DIEPINT4, DIEPINT5, DIEPMSK, DIEPTSIZ0, DIEPTSIZ1,
14    DIEPTSIZ2, DIEPTSIZ3, DIEPTSIZ4, DIEPTSIZ5, DOEPCTL0, DOEPCTL1, DOEPCTL2, DOEPCTL3, DOEPCTL4,
15    DOEPCTL5, DOEPEACHMSK1, DOEPINT0, DOEPINT1, DOEPINT2, DOEPINT3, DOEPINT4, DOEPINT5, DOEPMSK,
16    DOEPTSIZ0, DOEPTSIZ1, DOEPTSIZ2, DOEPTSIZ3, DOEPTSIZ4, DOEPTSIZ5, DSTS, DTHRCTL, DTXFSTS0,
17    DTXFSTS1, DTXFSTS2, DTXFSTS3, DTXFSTS4, DTXFSTS5, DVBUSDIS, DVBUSPULSE,
18};
19
20/// Access functions for the OTG_HS_DEVICE peripheral instance
21pub mod OTG_HS_DEVICE {
22    use super::ResetValues;
23
24    #[cfg(not(feature = "nosync"))]
25    use super::Instance;
26
27    #[cfg(not(feature = "nosync"))]
28    const INSTANCE: Instance = Instance {
29        addr: 0x40040800,
30        _marker: ::core::marker::PhantomData,
31    };
32
33    /// Reset values for each field in OTG_HS_DEVICE
34    pub const reset: ResetValues = ResetValues {
35        DCFG: 0x02200000,
36        DCTL: 0x00000000,
37        DSTS: 0x00000010,
38        DIEPMSK: 0x00000000,
39        DOEPMSK: 0x00000000,
40        DAINT: 0x00000000,
41        DAINTMSK: 0x00000000,
42        DVBUSDIS: 0x000017D7,
43        DVBUSPULSE: 0x000005B8,
44        DTHRCTL: 0x00000000,
45        DIEPEMPMSK: 0x00000000,
46        DEACHINT: 0x00000000,
47        DEACHINTMSK: 0x00000000,
48        DIEPEACHMSK1: 0x00000000,
49        DOEPEACHMSK1: 0x00000000,
50        DIEPCTL0: 0x00000000,
51        DIEPCTL1: 0x00000000,
52        DIEPCTL2: 0x00000000,
53        DIEPCTL3: 0x00000000,
54        DIEPCTL4: 0x00000000,
55        DIEPCTL5: 0x00000000,
56        DIEPINT0: 0x00000080,
57        DIEPINT1: 0x00000080,
58        DIEPINT2: 0x00000080,
59        DIEPINT3: 0x00000080,
60        DIEPINT4: 0x00000080,
61        DIEPINT5: 0x00000080,
62        DIEPTSIZ0: 0x00000000,
63        DIEPDMA1: 0x00000000,
64        DIEPDMA2: 0x00000000,
65        DIEPDMA3: 0x00000000,
66        DIEPDMA4: 0x00000000,
67        DIEPDMA5: 0x00000000,
68        DTXFSTS0: 0x00000000,
69        DTXFSTS1: 0x00000000,
70        DTXFSTS2: 0x00000000,
71        DTXFSTS3: 0x00000000,
72        DTXFSTS4: 0x00000000,
73        DTXFSTS5: 0x00000000,
74        DIEPTSIZ1: 0x00000000,
75        DIEPTSIZ2: 0x00000000,
76        DIEPTSIZ3: 0x00000000,
77        DIEPTSIZ4: 0x00000000,
78        DIEPTSIZ5: 0x00000000,
79        DOEPCTL0: 0x00008000,
80        DOEPCTL1: 0x00000000,
81        DOEPCTL2: 0x00000000,
82        DOEPCTL3: 0x00000000,
83        DOEPCTL4: 0x00000000,
84        DOEPCTL5: 0x00000000,
85        DOEPINT0: 0x00000080,
86        DOEPINT1: 0x00000080,
87        DOEPINT2: 0x00000080,
88        DOEPINT3: 0x00000080,
89        DOEPINT4: 0x00000080,
90        DOEPINT5: 0x00000080,
91        DOEPTSIZ0: 0x00000000,
92        DOEPTSIZ1: 0x00000000,
93        DOEPTSIZ2: 0x00000000,
94        DOEPTSIZ3: 0x00000000,
95        DOEPTSIZ4: 0x00000000,
96        DOEPTSIZ5: 0x00000000,
97    };
98}
99
100/// Raw pointer to OTG_HS_DEVICE
101///
102/// Dereferencing this is unsafe because you are not ensured unique
103/// access to the peripheral, so you may encounter data races with
104/// other users of this peripheral. It is up to you to ensure you
105/// will not cause data races.
106///
107/// This constant is provided for ease of use in unsafe code: you can
108/// simply call for example `write_reg!(gpio, GPIOA, ODR, 1);`.
109pub const OTG_HS_DEVICE: *const RegisterBlock = 0x40040800 as *const _;