1#![crate_name = "stm32f4xx"]
10#![crate_type = "rlib"]
11#![no_std]
12
13pub mod chip;
14pub mod chip_specific;
15pub mod nvic;
16
17pub mod adc;
19pub mod can;
20pub mod dac;
21pub mod dbg;
22pub mod dma;
23pub mod exti;
24pub mod flash;
25pub mod fsmc;
26pub mod gpio;
27pub mod i2c;
28pub mod rcc;
29pub mod spi;
30pub mod syscfg;
31pub mod tim2;
32pub mod trng;
33pub mod usart;
34
35pub mod clocks;
37
38use cortexm4f::{initialize_ram_jump_to_main, unhandled_interrupt, CortexM4F, CortexMVariant};
39
40extern "C" {
41 fn _estack();
44}
45
46#[cfg_attr(
47 all(target_arch = "arm", target_os = "none"),
48 link_section = ".vectors"
49)]
50#[cfg_attr(all(target_arch = "arm", target_os = "none"), used)]
52pub static BASE_VECTORS: [unsafe extern "C" fn(); 16] = [
53 _estack,
54 initialize_ram_jump_to_main,
55 unhandled_interrupt, CortexM4F::HARD_FAULT_HANDLER, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt,
61 unhandled_interrupt,
62 unhandled_interrupt,
63 unhandled_interrupt,
64 CortexM4F::SVC_HANDLER, unhandled_interrupt, unhandled_interrupt,
67 unhandled_interrupt, CortexM4F::SYSTICK_HANDLER, ];
70
71pub unsafe fn init() {
72 cortexm4f::nvic::disable_all();
73 cortexm4f::nvic::clear_all_pending();
74 cortexm4f::nvic::enable_all();
75}