embassy/embassy-nrf/src/lib.rs
Dario Nieuwenhuis 11be9170ec Cleanup interrupt package naming. Fixes #40
The `interrupt` package previously tried to be drop-in compatible with the
`interrupt` package from PACs. THis meant that there was both a PAC-style enum
value `UARTE0` and an embassy-style owned `UARTE0Interrupt` type. This made
things VERY confusing.

This drops compatibility with the PAC, improving the names for embassy interrupts.
2021-02-26 01:55:27 +01:00

62 lines
1.8 KiB
Rust

#![no_std]
#![feature(generic_associated_types)]
#![feature(asm)]
#![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]
#[cfg(not(any(
feature = "52810",
feature = "52811",
feature = "52832",
feature = "52833",
feature = "52840",
)))]
compile_error!("No chip feature activated. You must activate exactly one of the following features: 52810, 52811, 52832, 52833, 52840");
#[cfg(any(
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"),
))]
compile_error!("Multile chip features activated. You must activate exactly one of the following features: 52810, 52811, 52832, 52833, 52840");
#[cfg(feature = "52810")]
pub use nrf52810_pac as pac;
#[cfg(feature = "52811")]
pub use nrf52811_pac as pac;
#[cfg(feature = "52832")]
pub use nrf52832_pac as pac;
#[cfg(feature = "52833")]
pub use nrf52833_pac as pac;
#[cfg(feature = "52840")]
pub use nrf52840_pac as pac;
#[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;
// This mod MUST go first, so that the others see its macros.
pub(crate) mod fmt;
pub(crate) mod util;
pub mod buffered_uarte;
pub mod gpiote;
pub mod interrupt;
#[cfg(feature = "52840")]
pub mod qspi;
pub mod rtc;
pub mod uarte;