1#![no_std]
6
7use cortexm4::{initialize_ram_jump_to_main, unhandled_interrupt, CortexM4, CortexMVariant};
8
9pub mod adc;
10pub mod chip;
11pub mod cs;
12pub mod dma;
13pub mod flctl;
14pub mod gpio;
15pub mod i2c;
16pub mod nvic;
17pub mod pcm;
18pub mod ref_module;
19pub mod sysctl;
20pub mod timer;
21pub mod uart;
22pub mod usci;
23pub mod wdt;
24
25extern "C" {
26 fn _estack();
29}
30
31#[cfg_attr(
32 all(target_arch = "arm", target_os = "none"),
33 link_section = ".vectors"
34)]
35#[cfg_attr(all(target_arch = "arm", target_os = "none"), used)]
37pub static BASE_VECTORS: [unsafe extern "C" fn(); 16] = [
38 _estack,
39 initialize_ram_jump_to_main,
40 unhandled_interrupt, CortexM4::HARD_FAULT_HANDLER, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt, unhandled_interrupt,
46 unhandled_interrupt,
47 unhandled_interrupt,
48 unhandled_interrupt,
49 CortexM4::SVC_HANDLER, unhandled_interrupt, unhandled_interrupt,
52 unhandled_interrupt, CortexM4::SYSTICK_HANDLER, ];
55
56#[cfg_attr(all(target_arch = "arm", target_os = "none"), link_section = ".irqs")]
57#[cfg_attr(all(target_arch = "arm", target_os = "none"), used)]
59pub static IRQS: [unsafe extern "C" fn(); 64] = [
60 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, ];
125
126pub unsafe fn init() {
127 cortexm4::nvic::disable_all();
128 cortexm4::nvic::clear_all_pending();
129 cortexm4::nvic::enable_all();
130}