Merge branch 'master' of https://github.com/embassy-rs/embassy into rtos-trace

This commit is contained in:
Quentin Smith
2022-08-19 00:53:06 -04:00
315 changed files with 2533 additions and 1344 deletions

View File

@ -5,38 +5,26 @@ version = "0.1.0"
[features]
default = ["log", "nightly"]
nightly = ["embassy-executor/nightly", "embassy-nrf/nightly", "embassy-nrf/unstable-traits", "embassy-usb", "embassy-usb-serial", "embassy-usb-hid", "embassy-usb-ncm", "embedded-io/async", "embassy-net"]
nightly = ["embassy-executor/nightly", "embassy-nrf/nightly", "embassy-nrf/unstable-traits"]
log = [
"dep:log",
"embassy-util/log",
"embassy-executor/log",
"embassy-time/log",
"embassy-nrf/log",
"embassy-net/log",
"embassy-usb-ncm/log",
# Currently broken:
# "embassy-usb/log",
# "embassy-usb-serial/log",
# "embassy-usb-hid/log",
]
[dependencies]
embassy-util = { version = "0.1.0", path = "../../embassy-util" }
embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features=["rtos-trace", "rtos-trace-interrupt"] }
embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features=["rtos-trace", "rtos-trace-interrupt", "integrated-timers"] }
embassy-time = { version = "0.1.0", path = "../../embassy-time" }
embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] }
embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["tcp", "dhcpv4", "medium-ethernet", "pool-16"], optional = true }
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", optional = true }
embassy-usb-serial = { version = "0.1.0", path = "../../embassy-usb-serial", optional = true }
embassy-usb-hid = { version = "0.1.0", path = "../../embassy-usb-hid", optional = true }
embassy-usb-ncm = { version = "0.1.0", path = "../../embassy-usb-ncm", optional = true }
embedded-io = "0.3.0"
cortex-m = "0.7.3"
cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
cortex-m-rt = "0.7.0"
panic-probe = { version = "0.3" }
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
rand = { version = "0.8.4", default-features = false }
embedded-storage = "0.3.0"
usbd-hid = "0.5.2"
serde = { version = "1.0.136", default-features = false }
rtos-trace = "0.1.3"
systemview-target = { version = "0.1.1", features = ["callbacks-app", "callbacks-os", "log", "cortex-m"] }

View File

@ -4,9 +4,8 @@
use core::task::Poll;
use embassy_executor::executor::Spawner;
use embassy_executor::time::{Duration, Instant, Timer};
use embassy_nrf::Peripherals;
use embassy_executor::Spawner;
use embassy_time::{Duration, Instant, Timer};
#[cfg(feature = "log")]
use log::*;
use panic_probe as _;
@ -55,7 +54,8 @@ async fn run3() {
}
#[embassy_executor::main]
async fn main(spawner: Spawner, _p: Peripherals) {
async fn main(spawner: Spawner) {
let _p = embassy_nrf::init(Default::default());
LOGGER.init();
#[cfg(feature = "log")]
{