2020-09-22 16:03:43 +00:00
#![ no_std ]
#![ feature(generic_associated_types) ]
#![ feature(asm) ]
2021-03-17 01:48:16 +00:00
#![ feature(min_type_alias_impl_trait) ]
#![ feature(impl_trait_in_bindings) ]
2020-09-22 16:03:43 +00:00
#![ feature(type_alias_impl_trait) ]
2021-02-26 00:06:58 +00:00
#![ allow(incomplete_features) ]
2020-09-22 16:03:43 +00:00
#[ cfg(not(any(
2021-05-11 01:04:59 +00:00
feature = " nrf51 " ,
feature = " nrf52805 " ,
feature = " nrf52810 " ,
feature = " nrf52811 " ,
feature = " nrf52820 " ,
feature = " nrf52832 " ,
feature = " nrf52833 " ,
feature = " nrf52840 " ,
feature = " nrf5340-app " ,
feature = " nrf5340-net " ,
feature = " nrf9160 " ,
2020-09-22 16:03:43 +00:00
) ) ) ]
2021-05-11 01:04:59 +00:00
compile_error! ( " No chip feature activated. You must activate exactly one of the following features: nrf52810, nrf52811, nrf52832, nrf52833, nrf52840 " ) ;
2021-01-18 13:22:55 +00:00
2020-12-01 16:46:56 +00:00
// This mod MUST go first, so that the others see its macros.
pub ( crate ) mod fmt ;
2021-05-11 01:04:59 +00:00
pub ( crate ) mod util ;
2020-12-01 16:46:56 +00:00
2020-12-28 22:57:50 +00:00
pub mod buffered_uarte ;
2021-03-19 03:08:44 +00:00
pub mod gpio ;
2020-09-22 22:32:49 +00:00
pub mod gpiote ;
2021-03-27 03:40:05 +00:00
pub mod ppi ;
2021-05-11 01:04:59 +00:00
#[ cfg(feature = " nrf52840 " ) ]
2020-09-22 16:03:43 +00:00
pub mod qspi ;
2020-09-24 17:59:20 +00:00
pub mod rtc ;
2021-05-11 01:04:59 +00:00
#[ cfg(not(feature = " nrf52820 " )) ]
2021-03-24 17:33:17 +00:00
pub mod saadc ;
2021-01-18 13:22:55 +00:00
pub mod spim ;
2021-03-28 22:42:08 +00:00
pub mod system ;
2021-03-28 20:40:41 +00:00
pub mod timer ;
2020-12-23 15:18:29 +00:00
pub mod uarte ;
2021-03-21 20:58:59 +00:00
2021-05-11 01:04:59 +00:00
// This mod MUST go last, so that it sees all the `impl_foo!` macros
#[ cfg(feature = " nrf52805 " ) ]
#[ path = " chips/nrf52805.rs " ]
mod chip ;
#[ cfg(feature = " nrf52810 " ) ]
#[ path = " chips/nrf52810.rs " ]
mod chip ;
#[ cfg(feature = " nrf52811 " ) ]
#[ path = " chips/nrf52811.rs " ]
mod chip ;
#[ cfg(feature = " nrf52820 " ) ]
#[ path = " chips/nrf52820.rs " ]
mod chip ;
#[ cfg(feature = " nrf52832 " ) ]
#[ path = " chips/nrf52832.rs " ]
mod chip ;
#[ cfg(feature = " nrf52833 " ) ]
#[ path = " chips/nrf52833.rs " ]
mod chip ;
#[ cfg(feature = " nrf52840 " ) ]
#[ path = " chips/nrf52840.rs " ]
mod chip ;
pub ( crate ) use chip ::pac ;
pub use chip ::{ peripherals , Peripherals } ;
pub mod interrupt {
pub use crate ::chip ::irqs ::* ;
pub use cortex_m ::interrupt ::{ CriticalSection , Mutex } ;
pub use embassy ::interrupt ::{ declare , take , Interrupt } ;
pub use embassy_extras ::interrupt ::Priority3 as Priority ;
2021-03-21 20:58:59 +00:00
}