Add embassy-cortex-m crate.

- Move Interrupt and InterruptExecutor from `embassy` to `embassy-cortex-m`.
- Move Unborrow from `embassy` to `embassy-hal-common` (nothing in `embassy` requires it anymore)
- Move PeripheralMutex from `embassy-hal-common` to `embassy-cortex-m`.
This commit is contained in:
Dario Nieuwenhuis
2022-06-11 05:08:57 +02:00
parent db344c2bda
commit 5085100df2
104 changed files with 814 additions and 460 deletions

View File

@ -4,14 +4,6 @@
feature(generic_associated_types, type_alias_impl_trait)
)]
#[cfg(feature = "unstable-pac")]
pub use stm32_metapac as pac;
#[cfg(not(feature = "unstable-pac"))]
pub(crate) use stm32_metapac as pac;
pub use embassy::util::Unborrow;
pub use embassy_hal_common::unborrow;
// This must go FIRST so that all the other modules see its macros.
pub mod fmt;
include!(concat!(env!("OUT_DIR"), "/_macros.rs"));
@ -79,8 +71,17 @@ pub(crate) mod _generated {
include!(concat!(env!("OUT_DIR"), "/_generated.rs"));
}
// Reexports
pub use _generated::{peripherals, Peripherals};
pub use embassy_macros::interrupt;
pub use embassy_cortex_m::executor;
pub use embassy_hal_common::{unborrow, Unborrow};
pub use embassy_macros::cortex_m_interrupt as interrupt;
#[cfg(feature = "unstable-pac")]
pub use stm32_metapac as pac;
#[cfg(not(feature = "unstable-pac"))]
pub(crate) use stm32_metapac as pac;
#[non_exhaustive]
pub struct Config {