From 878bfd2b7520631ab4b39dbe928dec6fc1a69f00 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 26 Oct 2020 12:43:28 +0100 Subject: [PATCH] Fixes --- embassy/Cargo.toml | 8 +++++++- embassy/src/executor/executor.rs | 3 --- embassy/src/util/macros.rs | 2 ++ embassy/src/util/mod.rs | 2 ++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/embassy/Cargo.toml b/embassy/Cargo.toml index 4abcda99..7e9ea91d 100644 --- a/embassy/Cargo.toml +++ b/embassy/Cargo.toml @@ -6,11 +6,17 @@ edition = "2018" [features] std = ["futures/std"] +defmt-default = [] +defmt-trace = [] +defmt-debug = [] +defmt-info = [] +defmt-warn = [] +defmt-error = [] [dependencies] defmt = "0.1.0" cortex-m = "0.6.3" -futures = { version = "0.3.5", default-features = false, features = [ "async-await" ] } +futures = { version = "0.3.5", default-features = false } pin-project = { version = "0.4.23", default-features = false } futures-intrusive = { version = "0.3.1", default-features = false } embassy-macros = { version = "0.1.0", path = "../embassy-macros"} diff --git a/embassy/src/executor/executor.rs b/embassy/src/executor/executor.rs index 43127d61..e7bb659f 100644 --- a/embassy/src/executor/executor.rs +++ b/embassy/src/executor/executor.rs @@ -1,6 +1,3 @@ -#![no_std] -#![feature(const_fn)] - use core::cell::Cell; use core::cell::UnsafeCell; use core::future::Future; diff --git a/embassy/src/util/macros.rs b/embassy/src/util/macros.rs index 69987e42..3773af69 100644 --- a/embassy/src/util/macros.rs +++ b/embassy/src/util/macros.rs @@ -1,5 +1,6 @@ #![macro_use] +#[macro_export] macro_rules! depanic { ($( $i:expr ),*) => { { @@ -9,6 +10,7 @@ macro_rules! depanic { } } +#[macro_export] macro_rules! deassert { ($cond:expr) => { deassert!($cond, "assertion failed"); diff --git a/embassy/src/util/mod.rs b/embassy/src/util/mod.rs index 601a9b4a..109cc35a 100644 --- a/embassy/src/util/mod.rs +++ b/embassy/src/util/mod.rs @@ -13,6 +13,8 @@ pub use drop_bomb::*; use defmt::{debug, error, info, intern, trace, warn}; +pub use macros::*; + pub trait Dewrap { /// dewrap = defmt unwrap fn dewrap(self) -> T;