1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
//! HAL for the STM32F7xx family of microcontrollers

#![no_std]
#![allow(non_camel_case_types)]

#[cfg(not(feature = "device-selected"))]
compile_error!(
    "This crate requires one of the following device features enabled:
        stm32f722
        stm32f723
        stm32f730
        stm32f732
        stm32f733
        stm32f745
        stm32f746
        stm32f756
        stm32f765
        stm32f767
        stm32f769
        stm32f777
        stm32f778
        stm32f779
                "
);

pub(crate) use embedded_hal as hal;

#[cfg(feature = "stm32f722")]
pub use stm32f7::stm32f7x2 as device;

#[cfg(feature = "stm32f723")]
pub use stm32f7::stm32f7x3 as device;

#[cfg(feature = "stm32f730")]
pub use stm32f7::stm32f730 as device;

#[cfg(feature = "stm32f732")]
pub use stm32f7::stm32f7x2 as device;

#[cfg(feature = "stm32f733")]
pub use stm32f7::stm32f7x3 as device;

#[cfg(feature = "stm32f745")]
pub use stm32f7::stm32f745 as device;

#[cfg(feature = "stm32f746")]
pub use stm32f7::stm32f7x6 as device;

#[cfg(feature = "stm32f756")]
pub use stm32f7::stm32f7x6 as device;

#[cfg(feature = "stm32f765")]
pub use stm32f7::stm32f765 as device;

#[cfg(feature = "stm32f767")]
pub use stm32f7::stm32f7x7 as device;

#[cfg(feature = "stm32f769")]
pub use stm32f7::stm32f7x9 as device;

#[cfg(feature = "stm32f777")]
pub use stm32f7::stm32f7x7 as device;

#[cfg(feature = "stm32f778")]
pub use stm32f7::stm32f7x9 as device;

#[cfg(feature = "stm32f779")]
pub use stm32f7::stm32f7x9 as device;

// Enable use of interrupt macro
#[cfg(feature = "rt")]
pub use crate::device::interrupt;

#[cfg(feature = "device-selected")]
pub mod delay;

#[cfg(feature = "device-selected")]
pub mod dma;

#[cfg(feature = "device-selected")]
pub mod gpio;

#[cfg(feature = "device-selected")]
pub mod prelude;

#[cfg(feature = "device-selected")]
pub mod rcc;

#[cfg(feature = "device-selected")]
pub mod serial;

#[cfg(feature = "device-selected")]
pub mod spi;

#[cfg(feature = "device-selected")]
pub mod time;

#[cfg(feature = "device-selected")]
pub mod timer;

#[cfg(feature = "device-selected")]
pub mod signature;

#[cfg(feature = "device-selected")]
pub mod i2c;

#[cfg(feature = "ltdc")]
pub mod ltdc;

#[cfg(all(
    feature = "device-selected",
    not(any(
        feature = "stm32f765",
        feature = "stm32f767",
        feature = "stm32f769",
        feature = "stm32f777",
        feature = "stm32f778",
        feature = "stm32f779",
    ))
))]
pub mod flash;

pub mod state {
    /// Indicates that a peripheral is enabled
    pub struct Enabled;

    /// Indicates that a peripheral is disabled
    pub struct Disabled;
}