This commit is contained in:
Dario Nieuwenhuis 2020-10-26 12:43:28 +01:00
parent a0cc229a3a
commit 878bfd2b75
4 changed files with 11 additions and 4 deletions

View file

@ -6,11 +6,17 @@ edition = "2018"
[features] [features]
std = ["futures/std"] std = ["futures/std"]
defmt-default = []
defmt-trace = []
defmt-debug = []
defmt-info = []
defmt-warn = []
defmt-error = []
[dependencies] [dependencies]
defmt = "0.1.0" defmt = "0.1.0"
cortex-m = "0.6.3" 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 } pin-project = { version = "0.4.23", default-features = false }
futures-intrusive = { version = "0.3.1", default-features = false } futures-intrusive = { version = "0.3.1", default-features = false }
embassy-macros = { version = "0.1.0", path = "../embassy-macros"} embassy-macros = { version = "0.1.0", path = "../embassy-macros"}

View file

@ -1,6 +1,3 @@
#![no_std]
#![feature(const_fn)]
use core::cell::Cell; use core::cell::Cell;
use core::cell::UnsafeCell; use core::cell::UnsafeCell;
use core::future::Future; use core::future::Future;

View file

@ -1,5 +1,6 @@
#![macro_use] #![macro_use]
#[macro_export]
macro_rules! depanic { macro_rules! depanic {
($( $i:expr ),*) => { ($( $i:expr ),*) => {
{ {
@ -9,6 +10,7 @@ macro_rules! depanic {
} }
} }
#[macro_export]
macro_rules! deassert { macro_rules! deassert {
($cond:expr) => { ($cond:expr) => {
deassert!($cond, "assertion failed"); deassert!($cond, "assertion failed");

View file

@ -13,6 +13,8 @@ pub use drop_bomb::*;
use defmt::{debug, error, info, intern, trace, warn}; use defmt::{debug, error, info, intern, trace, warn};
pub use macros::*;
pub trait Dewrap<T> { pub trait Dewrap<T> {
/// dewrap = defmt unwrap /// dewrap = defmt unwrap
fn dewrap(self) -> T; fn dewrap(self) -> T;