2020-09-22 16:03:43 +00:00
|
|
|
#![no_std]
|
|
|
|
#![feature(generic_associated_types)]
|
|
|
|
#![feature(asm)]
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
|
|
|
|
|
|
#[cfg(not(any(
|
2020-09-24 17:56:47 +00:00
|
|
|
feature = "52810",
|
|
|
|
feature = "52811",
|
|
|
|
feature = "52832",
|
|
|
|
feature = "52833",
|
|
|
|
feature = "52840",
|
2020-09-22 16:03:43 +00:00
|
|
|
)))]
|
2020-09-24 17:56:47 +00:00
|
|
|
compile_error!("No chip feature activated. You must activate exactly one of the following features: 52810, 52811, 52832, 52833, 52840");
|
2020-09-22 16:03:43 +00:00
|
|
|
|
|
|
|
#[cfg(any(
|
2020-09-24 17:56:47 +00:00
|
|
|
all(feature = "52810", feature = "52811"),
|
|
|
|
all(feature = "52810", feature = "52832"),
|
|
|
|
all(feature = "52810", feature = "52833"),
|
|
|
|
all(feature = "52810", feature = "52840"),
|
|
|
|
all(feature = "52811", feature = "52832"),
|
|
|
|
all(feature = "52811", feature = "52833"),
|
|
|
|
all(feature = "52811", feature = "52840"),
|
|
|
|
all(feature = "52832", feature = "52833"),
|
|
|
|
all(feature = "52832", feature = "52840"),
|
|
|
|
all(feature = "52833", feature = "52840"),
|
2020-09-22 16:03:43 +00:00
|
|
|
))]
|
2020-09-24 17:56:47 +00:00
|
|
|
compile_error!("Multile chip features activated. You must activate exactly one of the following features: 52810, 52811, 52832, 52833, 52840");
|
2020-09-22 16:03:43 +00:00
|
|
|
|
2020-09-24 17:56:47 +00:00
|
|
|
#[cfg(feature = "52810")]
|
2020-09-22 16:03:43 +00:00
|
|
|
pub use nrf52810_pac as pac;
|
2020-09-24 17:56:47 +00:00
|
|
|
#[cfg(feature = "52811")]
|
2020-09-22 16:03:43 +00:00
|
|
|
pub use nrf52811_pac as pac;
|
2020-09-24 17:56:47 +00:00
|
|
|
#[cfg(feature = "52832")]
|
2020-09-22 16:03:43 +00:00
|
|
|
pub use nrf52832_pac as pac;
|
2020-09-24 17:56:47 +00:00
|
|
|
#[cfg(feature = "52833")]
|
2020-09-22 16:03:43 +00:00
|
|
|
pub use nrf52833_pac as pac;
|
2020-09-24 17:56:47 +00:00
|
|
|
#[cfg(feature = "52840")]
|
2020-09-22 16:03:43 +00:00
|
|
|
pub use nrf52840_pac as pac;
|
|
|
|
|
2020-10-31 22:03:09 +00:00
|
|
|
#[cfg(feature = "52810")]
|
|
|
|
pub use nrf52810_hal as hal;
|
|
|
|
#[cfg(feature = "52811")]
|
|
|
|
pub use nrf52811_hal as hal;
|
|
|
|
#[cfg(feature = "52832")]
|
|
|
|
pub use nrf52832_hal as hal;
|
|
|
|
#[cfg(feature = "52833")]
|
|
|
|
pub use nrf52833_hal as hal;
|
|
|
|
#[cfg(feature = "52840")]
|
|
|
|
pub use nrf52840_hal as hal;
|
|
|
|
|
2020-12-01 16:46:56 +00:00
|
|
|
// This mod MUST go first, so that the others see its macros.
|
|
|
|
pub(crate) mod fmt;
|
|
|
|
|
2020-12-28 22:57:50 +00:00
|
|
|
pub mod buffered_uarte;
|
2020-09-22 22:32:49 +00:00
|
|
|
pub mod gpiote;
|
2020-09-22 16:03:43 +00:00
|
|
|
pub mod interrupt;
|
2020-10-31 22:03:09 +00:00
|
|
|
#[cfg(feature = "52840")]
|
2020-09-22 16:03:43 +00:00
|
|
|
pub mod qspi;
|
2020-09-24 17:59:20 +00:00
|
|
|
pub mod rtc;
|
2020-09-22 22:32:49 +00:00
|
|
|
|
2020-09-22 16:03:43 +00:00
|
|
|
pub use cortex_m_rt::interrupt;
|