1#![crate_name = "msp432"]
6#![crate_type = "rlib"]
7#![no_std]
8
9use cortexm4::{initialize_ram_jump_to_main, unhandled_interrupt, CortexM4, CortexMVariant};
10
11pub mod adc;
12pub mod chip;
13pub mod cs;
14pub mod dma;
15pub mod flctl;
16pub mod gpio;
17pub mod i2c;
18pub mod nvic;
19pub mod pcm;
20pub mod ref_module;
21pub mod sysctl;
22pub mod timer;
23pub mod uart;
24pub mod usci;
25pub mod wdt;
26
27extern "C" {
28 fn _estack();
31}
32
33#[cfg_attr(
34 all(target_arch = "arm", target_os = "none"),
35 link_section = ".vectors"
36)]
37#[cfg_attr(all(target_arch = "arm", target_os = "none"), used)]
39pub static BASE_VECTORS: [unsafe extern "C" fn(); 16] = [
40 _estack,
41 initialize_ram_jump_to_main,
42 unhandled_interrupt, CortexM4::HARD_FAULT_HANDLER, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt,
48 unhandled_interrupt,
49 unhandled_interrupt,
50 unhandled_interrupt,
51 CortexM4::SVC_HANDLER, unhandled_interrupt, unhandled_interrupt,
54 unhandled_interrupt, CortexM4::SYSTICK_HANDLER, ];
57
58#[cfg_attr(all(target_arch = "arm", target_os = "none"), link_section = ".irqs")]
59#[cfg_attr(all(target_arch = "arm", target_os = "none"), used)]
61pub static IRQS: [unsafe extern "C" fn(); 64] = [
62 CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, CortexM4::GENERIC_ISR, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, ];
127
128pub unsafe fn init() {
129 cortexm4::nvic::disable_all();
130 cortexm4::nvic::clear_all_pending();
131 cortexm4::nvic::enable_all();
132}