#![allow(incomplete_features)]
#![feature(adt_const_params)]
#![feature(never_type)]
#![cfg_attr(not(test), no_std)]
extern crate cortex_m;
pub extern crate embedded_hal as hal;
pub extern crate ambiq_apollo3_pac2 as pac;
#[cfg(feature = "rt")]
#[cortex_m_rt::pre_init]
unsafe fn pre_init() {
(*cortex_m::peripheral::SCB::PTR).vtor.write(0x10000);
}
#[cfg(feature = "ambiq-sdk")]
pub extern crate ambiq_hal_sys as halc;
pub mod clock;
pub mod rtc;
pub mod time;
pub mod delay;
pub mod gpio;
pub mod adc;
pub mod watchdog;
#[cfg(feature = "ambiq-sdk")]
pub mod uart;
#[cfg(feature = "ambiq-sdk")]
pub mod iom;
#[cfg(feature = "ambiq-sdk")]
pub use iom::{i2c, spi};
pub mod prelude {
pub use hal::prelude::*;
pub use hal::digital::v2::{InputPin, OutputPin, ToggleableOutputPin};
#[cfg(feature = "ambiq-sdk")]
pub use halc;
#[cfg(feature = "ambiq-sdk")]
pub use halc::c_types::*;
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}