Compare commits
	
		
			19 Commits
		
	
	
		
			embassy-sy
			...
			static-cel
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 1f51367eb9 | ||
|  | d6f42eafad | ||
|  | dcce8945af | ||
|  | d98c064bfe | ||
|  | a904538555 | ||
|  | 4ef3dc5b90 | ||
|  | bab61f9665 | ||
|  | 2765f0978f | ||
|  | bc07539133 | ||
|  | b4a82b7ed4 | ||
|  | e2688dda22 | ||
|  | d0d8585e4c | ||
|  | 729d69246a | ||
|  | e78a6db151 | ||
|  | f8721c3786 | ||
|  | e519e00265 | ||
|  | 35bb20abe7 | ||
|  | dd6a29adb2 | ||
|  | 5f9602d28b | 
| @@ -1,6 +1,6 @@ | ||||
| #![no_std] | ||||
| #![allow(incomplete_features)] | ||||
| #![feature(async_fn_in_trait)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
|  | ||||
| use core::slice; | ||||
|  | ||||
|   | ||||
| @@ -4,7 +4,6 @@ use embassy_net_driver_channel as ch; | ||||
| use embassy_net_driver_channel::driver::{HardwareAddress, LinkState}; | ||||
| use embassy_time::Timer; | ||||
|  | ||||
| pub use crate::bus::SpiBusCyw43; | ||||
| use crate::consts::*; | ||||
| use crate::events::{Event, EventSubscriber, Events}; | ||||
| use crate::fmt::Bytes; | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| #![no_std] | ||||
| #![no_main] | ||||
| #![allow(incomplete_features)] | ||||
| #![feature(async_fn_in_trait, type_alias_impl_trait, concat_bytes)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
| #![deny(unused_must_use)] | ||||
|  | ||||
| // This mod MUST go first, so that the others see its macros. | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| #![cfg_attr(feature = "nightly", feature(async_fn_in_trait))] | ||||
| #![cfg_attr(feature = "nightly", allow(stable_features, unknown_lints, async_fn_in_trait))] | ||||
| #![no_std] | ||||
| #![warn(missing_docs)] | ||||
| #![doc = include_str!("../README.md")] | ||||
|   | ||||
| @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. | ||||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||||
|  | ||||
| ## 0.3.1 - 2023-11-01 | ||||
|  | ||||
| - Fix spurious "Found waker not created by the Embassy executor" error in recent nightlies. | ||||
|  | ||||
| ## 0.3.0 - 2023-08-25 | ||||
|  | ||||
| - Replaced Pender. Implementations now must define an extern function called `__pender`. | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| [package] | ||||
| name = "embassy-executor" | ||||
| version = "0.3.0" | ||||
| version = "0.3.1" | ||||
| edition = "2021" | ||||
| license = "MIT OR Apache-2.0" | ||||
| description = "async/await executor designed for embedded usage" | ||||
| @@ -62,7 +62,6 @@ embassy-macros = { version = "0.2.1", path = "../embassy-macros" } | ||||
| embassy-time = { version = "0.1.5", path = "../embassy-time", optional = true} | ||||
| atomic-polyfill = "1.0.1" | ||||
| critical-section = "1.1" | ||||
| static_cell = "1.1" | ||||
|  | ||||
| # arch-cortex-m dependencies | ||||
| cortex-m = { version = "0.7.6", optional = true } | ||||
|   | ||||
| @@ -33,6 +33,7 @@ check_at_most_one!("arch-cortex-m", "arch-riscv32", "arch-xtensa", "arch-std", " | ||||
| mod arch; | ||||
|  | ||||
| #[cfg(feature = "_arch")] | ||||
| #[allow(unused_imports)] // don't warn if the module is empty. | ||||
| pub use arch::*; | ||||
|  | ||||
| pub mod raw; | ||||
| @@ -46,7 +47,6 @@ pub use spawner::*; | ||||
| pub mod _export { | ||||
|     #[cfg(feature = "rtos-trace")] | ||||
|     pub use rtos_trace::trace; | ||||
|     pub use static_cell::StaticCell; | ||||
|  | ||||
|     /// Expands the given block of code when `embassy-executor` is compiled with | ||||
|     /// the `rtos-trace-interrupt` feature. | ||||
|   | ||||
| @@ -53,8 +53,7 @@ pub fn wasm() -> TokenStream { | ||||
|     quote! { | ||||
|         #[wasm_bindgen::prelude::wasm_bindgen(start)] | ||||
|         pub fn main() -> Result<(), wasm_bindgen::JsValue> { | ||||
|             static EXECUTOR: ::embassy_executor::_export::StaticCell<::embassy_executor::Executor> = ::embassy_executor::_export::StaticCell::new(); | ||||
|             let executor = EXECUTOR.init(::embassy_executor::Executor::new()); | ||||
|             let executor = ::std::boxed::Box::leak(::std::boxed::Box::new(::embassy_executor::Executor::new())); | ||||
|  | ||||
|             executor.start(|spawner| { | ||||
|                 spawner.spawn(__embassy_main(spawner)).unwrap(); | ||||
|   | ||||
| @@ -22,9 +22,7 @@ embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | ||||
| bitfield = "0.14.0" | ||||
|  | ||||
| [dev-dependencies] | ||||
| # reenable when https://github.com/dbrgn/embedded-hal-mock/pull/86 is merged. | ||||
| #embedded-hal-mock = { git = "https://github.com/dbrgn/embedded-hal-mock", branch = "1-alpha", features = ["embedded-hal-async", "eh1"] }] } | ||||
| embedded-hal-mock = { git = "https://github.com/newAM/embedded-hal-mock", branch = "eh1-rc.1", features = ["embedded-hal-async", "eh1"] } | ||||
| embedded-hal-mock = { version = "=0.10.0-rc.1", features = ["embedded-hal-async", "eh1"] } | ||||
| crc = "3.0.1" | ||||
| env_logger = "0.10" | ||||
| critical-section = { version = "1.1.2", features = ["std"] } | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| #![deny(clippy::pedantic)] | ||||
| #![feature(async_fn_in_trait)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
| #![cfg_attr(not(any(test, feature = "std")), no_std)] | ||||
| #![allow(clippy::module_name_repetitions)] | ||||
| #![allow(clippy::missing_errors_doc)] | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| #![no_std] | ||||
| #![feature(async_fn_in_trait)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
| #![doc = include_str!("../README.md")] | ||||
|  | ||||
| pub mod chip; | ||||
|   | ||||
| @@ -94,5 +94,5 @@ pio = {version= "0.2.1" } | ||||
| rp2040-boot2 = "0.3" | ||||
|  | ||||
| [dev-dependencies] | ||||
| embassy-executor = { version = "0.3.0", path = "../embassy-executor", features = ["nightly", "arch-std", "executor-thread"] } | ||||
| static_cell = "1.1" | ||||
| embassy-executor = { version = "0.3.1", path = "../embassy-executor", features = ["nightly", "arch-std", "executor-thread"] } | ||||
| static_cell = { version = "2" } | ||||
|   | ||||
| @@ -1,5 +1,9 @@ | ||||
| #![no_std] | ||||
| #![cfg_attr(any(feature = "ble", feature = "mac"), feature(async_fn_in_trait))] | ||||
| #![cfg_attr( | ||||
|     any(feature = "ble", feature = "mac"), | ||||
|     allow(stable_features, unknown_lints, async_fn_in_trait) | ||||
| )] | ||||
| #![cfg_attr(feature = "mac", feature(type_alias_impl_trait, concat_bytes))] | ||||
|  | ||||
| // This must go FIRST so that all the other modules see its macros. | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| #![allow(incomplete_features)] | ||||
| #![deny(unused_must_use)] | ||||
|  | ||||
| use core::task::Context; | ||||
|   | ||||
| @@ -39,7 +39,7 @@ embassy-hal-internal = {version = "0.1.0", path = "../embassy-hal-internal", fea | ||||
| embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } | ||||
| embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } | ||||
| embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true } | ||||
| embassy-executor = { version = "0.3.0", path = "../embassy-executor", optional = true } | ||||
| embassy-executor = { version = "0.3.1", path = "../embassy-executor", optional = true } | ||||
|  | ||||
| embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | ||||
| embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1", optional = true} | ||||
| @@ -58,7 +58,7 @@ rand_core = "0.6.3" | ||||
| sdio-host = "0.5.0" | ||||
| embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "a4f293d3a6f72158385f79c98634cb8a14d0d2fc", optional = true } | ||||
| critical-section = "1.1" | ||||
| stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-bcc9b6bf9fa195e91625849efc4ba473d9ace4e9" } | ||||
| stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-73b8c37ae74fc28b247188c989fd99400611bd6b" } | ||||
| vcell = "0.1.3" | ||||
| bxcan = "0.7.0" | ||||
| nb = "1.0.0" | ||||
| @@ -76,7 +76,7 @@ critical-section = { version = "1.1", features = ["std"] } | ||||
| [build-dependencies] | ||||
| proc-macro2 = "1.0.36" | ||||
| quote = "1.0.15" | ||||
| stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-bcc9b6bf9fa195e91625849efc4ba473d9ace4e9", default-features = false, features = ["metadata"]} | ||||
| stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-73b8c37ae74fc28b247188c989fd99400611bd6b", default-features = false, features = ["metadata"]} | ||||
|  | ||||
|  | ||||
| [features] | ||||
|   | ||||
| @@ -47,6 +47,9 @@ pub unsafe fn on_irq() { | ||||
|     #[cfg(any(exti_c0, exti_g0, exti_l5, exti_u5, exti_h5, exti_h50))] | ||||
|     let bits = EXTI.rpr(0).read().0 | EXTI.fpr(0).read().0; | ||||
|  | ||||
|     // We don't handle or change any EXTI lines above 16. | ||||
|     let bits = bits & 0x0000FFFF; | ||||
|  | ||||
|     // Mask all the channels that fired. | ||||
|     cpu_regs().imr(0).modify(|w| w.0 &= !bits); | ||||
|  | ||||
|   | ||||
| @@ -61,7 +61,7 @@ pub struct Executor { | ||||
| impl Executor { | ||||
|     /// Create a new Executor. | ||||
|     pub fn take() -> &'static mut Self { | ||||
|         unsafe { | ||||
|         critical_section::with(|_| unsafe { | ||||
|             assert!(EXECUTOR.is_none()); | ||||
|  | ||||
|             EXECUTOR = Some(Self { | ||||
| @@ -72,7 +72,7 @@ impl Executor { | ||||
|             }); | ||||
|  | ||||
|             EXECUTOR.as_mut().unwrap() | ||||
|         } | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|     unsafe fn on_wakeup_irq(&mut self) { | ||||
|   | ||||
| @@ -152,9 +152,9 @@ pub(crate) unsafe fn init(config: Config) { | ||||
|         source: config.pll_src, | ||||
|     }; | ||||
|     let pll = init_pll(PllInstance::Pll, config.pll, &pll_input); | ||||
|     #[cfg(any(all(stm32f4, not(any(stm32f410, stm32f429))), stm32f7))] | ||||
|     #[cfg(any(all(stm32f4, not(stm32f410)), stm32f7))] | ||||
|     let _plli2s = init_pll(PllInstance::Plli2s, config.plli2s, &pll_input); | ||||
|     #[cfg(all(any(stm32f446, stm32f427, stm32f437, stm32f4x9, stm32f7), not(stm32f429)))] | ||||
|     #[cfg(any(stm32f446, stm32f427, stm32f437, stm32f4x9, stm32f7))] | ||||
|     let _pllsai = init_pll(PllInstance::Pllsai, config.pllsai, &pll_input); | ||||
|  | ||||
|     // Configure sysclk | ||||
| @@ -197,25 +197,15 @@ pub(crate) unsafe fn init(config: Config) { | ||||
|         pclk2_tim, | ||||
|         rtc, | ||||
|         pll1_q: pll.q, | ||||
|         #[cfg(all(rcc_f4, not(any(stm32f410, stm32f429))))] | ||||
|         #[cfg(all(rcc_f4, not(stm32f410)))] | ||||
|         plli2s1_q: _plli2s.q, | ||||
|         #[cfg(all(rcc_f4, not(any(stm32f410, stm32f429))))] | ||||
|         #[cfg(all(rcc_f4, not(stm32f410)))] | ||||
|         plli2s1_r: _plli2s.r, | ||||
|  | ||||
|         #[cfg(stm32f429)] | ||||
|         plli2s1_q: None, | ||||
|         #[cfg(stm32f429)] | ||||
|         plli2s1_r: None, | ||||
|  | ||||
|         #[cfg(any(stm32f427, stm32f437, stm32f439, stm32f446, stm32f469, stm32f479))] | ||||
|         #[cfg(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f446, stm32f469, stm32f479))] | ||||
|         pllsai1_q: _pllsai.q, | ||||
|         #[cfg(any(stm32f427, stm32f437, stm32f439, stm32f446, stm32f469, stm32f479))] | ||||
|         #[cfg(any(stm32f427, stm32f429, stm32f437, stm32f439, stm32f446, stm32f469, stm32f479))] | ||||
|         pllsai1_r: _pllsai.r, | ||||
|  | ||||
|         #[cfg(stm32f429)] | ||||
|         pllsai1_q: None, | ||||
|         #[cfg(stm32f429)] | ||||
|         pllsai1_r: None, | ||||
|     }); | ||||
| } | ||||
|  | ||||
| @@ -233,7 +223,6 @@ struct PllOutput { | ||||
|     r: Option<Hertz>, | ||||
| } | ||||
|  | ||||
| #[allow(dead_code)] | ||||
| #[derive(PartialEq, Eq, Clone, Copy)] | ||||
| enum PllInstance { | ||||
|     Pll, | ||||
|   | ||||
| @@ -4,8 +4,8 @@ pub use crate::pac::rcc::vals::Clk48sel as Clk48Src; | ||||
| #[cfg(any(stm32wb, stm32wl))] | ||||
| pub use crate::pac::rcc::vals::Hsepre as HsePrescaler; | ||||
| pub use crate::pac::rcc::vals::{ | ||||
|     Hpre as AHBPrescaler, Msirange as MSIRange, Pllm as PllPreDiv, Plln as PllMul, Pllp as PllPDiv, Pllq as PllQDiv, | ||||
|     Pllr as PllRDiv, Pllsrc as PLLSource, Ppre as APBPrescaler, Sw as ClockSrc, | ||||
|     Adcsel as AdcClockSource, Hpre as AHBPrescaler, Msirange as MSIRange, Pllm as PllPreDiv, Plln as PllMul, | ||||
|     Pllp as PllPDiv, Pllq as PllQDiv, Pllr as PllRDiv, Pllsrc as PLLSource, Ppre as APBPrescaler, Sw as ClockSrc, | ||||
| }; | ||||
| use crate::pac::{FLASH, RCC}; | ||||
| use crate::rcc::{set_freqs, Clocks}; | ||||
| @@ -52,7 +52,7 @@ pub struct Pll { | ||||
|     pub divr: Option<PllRDiv>, | ||||
| } | ||||
|  | ||||
| /// Clocks configutation | ||||
| /// Clocks configuration | ||||
| pub struct Config { | ||||
|     // base clock sources | ||||
|     pub msi: Option<MSIRange>, | ||||
| @@ -84,6 +84,8 @@ pub struct Config { | ||||
|  | ||||
|     // low speed LSI/LSE/RTC | ||||
|     pub ls: super::LsConfig, | ||||
|  | ||||
|     pub adc_clock_source: AdcClockSource, | ||||
| } | ||||
|  | ||||
| impl Default for Config { | ||||
| @@ -111,6 +113,7 @@ impl Default for Config { | ||||
|             #[cfg(any(stm32l4, stm32l5, stm32wb))] | ||||
|             clk48_src: Clk48Src::HSI48, | ||||
|             ls: Default::default(), | ||||
|             adc_clock_source: AdcClockSource::SYS, | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -145,6 +148,7 @@ pub const WPAN_DEFAULT: Config = Config { | ||||
|     shared_ahb_pre: AHBPrescaler::DIV1, | ||||
|     apb1_pre: APBPrescaler::DIV1, | ||||
|     apb2_pre: APBPrescaler::DIV1, | ||||
|     adc_clock_source: AdcClockSource::SYS, | ||||
| }; | ||||
|  | ||||
| pub(crate) unsafe fn init(config: Config) { | ||||
| @@ -344,6 +348,11 @@ pub(crate) unsafe fn init(config: Config) { | ||||
|     }); | ||||
|     while RCC.cfgr().read().sws() != config.mux {} | ||||
|  | ||||
|     #[cfg(stm32l5)] | ||||
|     RCC.ccipr1().modify(|w| w.set_adcsel(config.adc_clock_source)); | ||||
|     #[cfg(not(stm32l5))] | ||||
|     RCC.ccipr().modify(|w| w.set_adcsel(config.adc_clock_source)); | ||||
|  | ||||
|     #[cfg(any(stm32wl, stm32wb))] | ||||
|     { | ||||
|         RCC.extcfgr().modify(|w| { | ||||
|   | ||||
| @@ -18,11 +18,15 @@ pub struct RtcInstant { | ||||
| } | ||||
|  | ||||
| impl RtcInstant { | ||||
|     #[allow(dead_code)] | ||||
|     pub(super) fn from(second: u8, subsecond: u16) -> Result<Self, super::RtcError> { | ||||
|     #[cfg(not(rtc_v2f2))] | ||||
|     pub(super) const fn from(second: u8, subsecond: u16) -> Result<Self, Error> { | ||||
|         if second > 59 { | ||||
|             Err(Error::InvalidSecond) | ||||
|         } else { | ||||
|             Ok(Self { second, subsecond }) | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "defmt")] | ||||
| impl defmt::Format for RtcInstant { | ||||
| @@ -226,7 +230,7 @@ impl From<DayOfWeek> for chrono::Weekday { | ||||
|     } | ||||
| } | ||||
|  | ||||
| fn day_of_week_from_u8(v: u8) -> Result<DayOfWeek, Error> { | ||||
| pub(super) const fn day_of_week_from_u8(v: u8) -> Result<DayOfWeek, Error> { | ||||
|     Ok(match v { | ||||
|         1 => DayOfWeek::Monday, | ||||
|         2 => DayOfWeek::Tuesday, | ||||
| @@ -239,24 +243,6 @@ fn day_of_week_from_u8(v: u8) -> Result<DayOfWeek, Error> { | ||||
|     }) | ||||
| } | ||||
|  | ||||
| pub(super) fn day_of_week_to_u8(dotw: DayOfWeek) -> u8 { | ||||
| pub(super) const fn day_of_week_to_u8(dotw: DayOfWeek) -> u8 { | ||||
|     dotw as u8 | ||||
| } | ||||
|  | ||||
| pub(super) fn validate_datetime(dt: &DateTime) -> Result<(), Error> { | ||||
|     if dt.year > 4095 { | ||||
|         Err(Error::InvalidYear) | ||||
|     } else if dt.month < 1 || dt.month > 12 { | ||||
|         Err(Error::InvalidMonth) | ||||
|     } else if dt.day < 1 || dt.day > 31 { | ||||
|         Err(Error::InvalidDay) | ||||
|     } else if dt.hour > 23 { | ||||
|         Err(Error::InvalidHour) | ||||
|     } else if dt.minute > 59 { | ||||
|         Err(Error::InvalidMinute) | ||||
|     } else if dt.second > 59 { | ||||
|         Err(Error::InvalidSecond) | ||||
|     } else { | ||||
|         Ok(()) | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -9,8 +9,11 @@ use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | ||||
| #[cfg(feature = "low-power")] | ||||
| use embassy_sync::blocking_mutex::Mutex; | ||||
|  | ||||
| pub use self::datetime::{DateTime, DayOfWeek, Error as DateTimeError, RtcInstant}; | ||||
| use crate::rtc::datetime::day_of_week_to_u8; | ||||
| use self::datetime::day_of_week_to_u8; | ||||
| #[cfg(not(rtc_v2f2))] | ||||
| use self::datetime::RtcInstant; | ||||
| pub use self::datetime::{DateTime, DayOfWeek, Error as DateTimeError}; | ||||
| use crate::pac::rtc::regs::{Dr, Tr}; | ||||
| use crate::time::Hertz; | ||||
|  | ||||
| /// refer to AN4759 to compare features of RTC2 and RTC3 | ||||
| @@ -31,11 +34,15 @@ use crate::peripherals::RTC; | ||||
| use crate::rtc::sealed::Instance; | ||||
|  | ||||
| /// Errors that can occur on methods on [RtcClock] | ||||
| #[non_exhaustive] | ||||
| #[derive(Clone, Debug, PartialEq, Eq)] | ||||
| pub enum RtcError { | ||||
|     /// An invalid DateTime was given or stored on the hardware. | ||||
|     InvalidDateTime(DateTimeError), | ||||
|  | ||||
|     /// The current time could not be read | ||||
|     ReadFailure, | ||||
|  | ||||
|     /// The RTC clock is not running | ||||
|     NotRunning, | ||||
| } | ||||
| @@ -45,24 +52,22 @@ pub struct RtcTimeProvider { | ||||
| } | ||||
|  | ||||
| impl RtcTimeProvider { | ||||
|     #[cfg(not(rtc_v2f2))] | ||||
|     pub(crate) fn instant(&self) -> Result<RtcInstant, RtcError> { | ||||
|         self.read(|_, tr, ss| { | ||||
|             let second = bcd2_to_byte((tr.st(), tr.su())); | ||||
|  | ||||
|             RtcInstant::from(second, ss).map_err(RtcError::InvalidDateTime) | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|     /// Return the current datetime. | ||||
|     /// | ||||
|     /// # Errors | ||||
|     /// | ||||
|     /// Will return an `RtcError::InvalidDateTime` if the stored value in the system is not a valid [`DayOfWeek`]. | ||||
|     pub fn now(&self) -> Result<DateTime, RtcError> { | ||||
|         // For RM0433 we use BYPSHAD=1 to work around errata ES0392 2.19.1 | ||||
|         #[cfg(rcc_h7rm0433)] | ||||
|         loop { | ||||
|             let r = RTC::regs(); | ||||
|             let ss = r.ssr().read().ss(); | ||||
|             let dr = r.dr().read(); | ||||
|             let tr = r.tr().read(); | ||||
|  | ||||
|             // If an RTCCLK edge occurs during read we may see inconsistent values | ||||
|             // so read ssr again and see if it has changed. (see RM0433 Rev 7 46.3.9) | ||||
|             let ss_after = r.ssr().read().ss(); | ||||
|             if ss == ss_after { | ||||
|         self.read(|dr, tr, _| { | ||||
|             let second = bcd2_to_byte((tr.st(), tr.su())); | ||||
|             let minute = bcd2_to_byte((tr.mnt(), tr.mnu())); | ||||
|             let hour = bcd2_to_byte((tr.ht(), tr.hu())); | ||||
| @@ -72,29 +77,34 @@ impl RtcTimeProvider { | ||||
|             let month = bcd2_to_byte((dr.mt() as u8, dr.mu())); | ||||
|             let year = bcd2_to_byte((dr.yt(), dr.yu())) as u16 + 1970_u16; | ||||
|  | ||||
|                 return DateTime::from(year, month, day, weekday, hour, minute, second) | ||||
|                     .map_err(RtcError::InvalidDateTime); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         #[cfg(not(rcc_h7rm0433))] | ||||
|         { | ||||
|             let r = RTC::regs(); | ||||
|             let tr = r.tr().read(); | ||||
|             let second = bcd2_to_byte((tr.st(), tr.su())); | ||||
|             let minute = bcd2_to_byte((tr.mnt(), tr.mnu())); | ||||
|             let hour = bcd2_to_byte((tr.ht(), tr.hu())); | ||||
|             // Reading either RTC_SSR or RTC_TR locks the values in the higher-order | ||||
|             // calendar shadow registers until RTC_DR is read. | ||||
|             let dr = r.dr().read(); | ||||
|  | ||||
|             let weekday = dr.wdu(); | ||||
|             let day = bcd2_to_byte((dr.dt(), dr.du())); | ||||
|             let month = bcd2_to_byte((dr.mt() as u8, dr.mu())); | ||||
|             let year = bcd2_to_byte((dr.yt(), dr.yu())) as u16 + 1970_u16; | ||||
|  | ||||
|             DateTime::from(year, month, day, weekday, hour, minute, second).map_err(RtcError::InvalidDateTime) | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|     fn read<R>(&self, mut f: impl FnMut(Dr, Tr, u16) -> Result<R, RtcError>) -> Result<R, RtcError> { | ||||
|         let r = RTC::regs(); | ||||
|  | ||||
|         #[cfg(not(rtc_v2f2))] | ||||
|         let read_ss = || r.ssr().read().ss(); | ||||
|         #[cfg(rtc_v2f2)] | ||||
|         let read_ss = || 0; | ||||
|  | ||||
|         let mut ss = read_ss(); | ||||
|         for _ in 0..5 { | ||||
|             let tr = r.tr().read(); | ||||
|             let dr = r.dr().read(); | ||||
|             let ss_after = read_ss(); | ||||
|  | ||||
|             // If an RTCCLK edge occurs during read we may see inconsistent values | ||||
|             // so read ssr again and see if it has changed. (see RM0433 Rev 7 46.3.9) | ||||
|             if ss == ss_after { | ||||
|                 return f(dr, tr, ss.try_into().unwrap()); | ||||
|             } else { | ||||
|                 ss = ss_after | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         return Err(RtcError::ReadFailure); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @@ -145,6 +155,7 @@ impl Rtc { | ||||
|         #[cfg(not(any(stm32l0, stm32f3, stm32l1, stm32f0, stm32f2)))] | ||||
|         critical_section::with(|cs| { | ||||
|             <RTC as crate::rcc::sealed::RccPeripheral>::enable_and_reset_with_cs(cs); | ||||
|  | ||||
|             #[cfg(feature = "low-power")] | ||||
|             unsafe { | ||||
|                 crate::rcc::REFCOUNT_STOP2 -= 1 | ||||
| @@ -164,6 +175,14 @@ impl Rtc { | ||||
|  | ||||
|         this.configure(async_psc, sync_psc); | ||||
|  | ||||
|         // Wait for the clock to update after initialization | ||||
|         #[cfg(not(rtc_v2f2))] | ||||
|         { | ||||
|             let now = this.instant().unwrap(); | ||||
|  | ||||
|             while this.instant().unwrap().subsecond == now.subsecond {} | ||||
|         } | ||||
|  | ||||
|         this | ||||
|     } | ||||
|  | ||||
| @@ -183,7 +202,6 @@ impl Rtc { | ||||
|     /// | ||||
|     /// Will return `RtcError::InvalidDateTime` if the datetime is not a valid range. | ||||
|     pub fn set_datetime(&mut self, t: DateTime) -> Result<(), RtcError> { | ||||
|         self::datetime::validate_datetime(&t).map_err(RtcError::InvalidDateTime)?; | ||||
|         self.write(true, |rtc| { | ||||
|             let (ht, hu) = byte_to_bcd2(t.hour() as u8); | ||||
|             let (mnt, mnu) = byte_to_bcd2(t.minute() as u8); | ||||
| @@ -223,16 +241,8 @@ impl Rtc { | ||||
|  | ||||
|     #[cfg(not(rtc_v2f2))] | ||||
|     /// Return the current instant. | ||||
|     pub fn instant(&self) -> Result<RtcInstant, RtcError> { | ||||
|         let r = RTC::regs(); | ||||
|         let tr = r.tr().read(); | ||||
|         let subsecond = r.ssr().read().ss(); | ||||
|         let second = bcd2_to_byte((tr.st(), tr.su())); | ||||
|  | ||||
|         // Unlock the registers | ||||
|         r.dr().read(); | ||||
|  | ||||
|         RtcInstant::from(second, subsecond.try_into().unwrap()) | ||||
|     fn instant(&self) -> Result<RtcInstant, RtcError> { | ||||
|         self.time_provider().instant() | ||||
|     } | ||||
|  | ||||
|     /// Return the current datetime. | ||||
|   | ||||
| @@ -150,14 +150,14 @@ impl super::Rtc { | ||||
|     pub(super) fn configure(&mut self, async_psc: u8, sync_psc: u16) { | ||||
|         self.write(true, |rtc| { | ||||
|             rtc.cr().modify(|w| { | ||||
|                 #[cfg(not(rtc_v2f2))] | ||||
|                 w.set_bypshad(true); | ||||
|                 #[cfg(rtc_v2f2)] | ||||
|                 w.set_fmt(false); | ||||
|                 #[cfg(not(rtc_v2f2))] | ||||
|                 w.set_fmt(stm32_metapac::rtc::vals::Fmt::TWENTY_FOUR_HOUR); | ||||
|                 w.set_osel(Osel::DISABLED); | ||||
|                 w.set_pol(Pol::HIGH); | ||||
|                 #[cfg(rcc_h7rm0433)] | ||||
|                 w.set_bypshad(true); | ||||
|             }); | ||||
|  | ||||
|             rtc.prer().modify(|w| { | ||||
|   | ||||
| @@ -11,6 +11,7 @@ impl super::Rtc { | ||||
|     pub(super) fn configure(&mut self, async_psc: u8, sync_psc: u16) { | ||||
|         self.write(true, |rtc| { | ||||
|             rtc.cr().modify(|w| { | ||||
|                 w.set_bypshad(true); | ||||
|                 w.set_fmt(Fmt::TWENTYFOURHOUR); | ||||
|                 w.set_osel(Osel::DISABLED); | ||||
|                 w.set_pol(Pol::HIGH); | ||||
|   | ||||
| @@ -45,4 +45,4 @@ futures-util = { version = "0.3.17", features = [ "channel" ] } | ||||
|  | ||||
| # Enable critical-section implementation for std, for tests | ||||
| critical-section = { version = "1.1", features = ["std"] } | ||||
| static_cell = "1.1" | ||||
| static_cell = { version = "2" } | ||||
|   | ||||
| @@ -258,4 +258,4 @@ wasm-timer = { version = "0.2.5", optional = true } | ||||
| [dev-dependencies] | ||||
| serial_test = "0.9" | ||||
| critical-section = { version = "1.1", features = ["std"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../embassy-executor", features = ["nightly"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../embassy-executor", features = ["nightly"] } | ||||
|   | ||||
| @@ -51,7 +51,7 @@ impl MockDriver { | ||||
|  | ||||
| impl Driver for MockDriver { | ||||
|     fn now(&self) -> u64 { | ||||
|         critical_section::with(|cs| self.now.borrow(cs).get().as_micros() as u64) | ||||
|         critical_section::with(|cs| self.now.borrow(cs).get().as_ticks() as u64) | ||||
|     } | ||||
|  | ||||
|     unsafe fn allocate_alarm(&self) -> Option<AlarmHandle> { | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| #![cfg_attr(not(any(feature = "std", feature = "wasm", test)), no_std)] | ||||
| #![cfg_attr(feature = "nightly", feature(async_fn_in_trait))] | ||||
| #![cfg_attr(feature = "nightly", allow(stable_features, unknown_lints, async_fn_in_trait))] | ||||
| #![doc = include_str!("../README.md")] | ||||
| #![allow(clippy::new_without_default)] | ||||
| #![warn(missing_docs)] | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| #![no_std] | ||||
| #![feature(async_fn_in_trait)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
| #![doc = include_str!("../README.md")] | ||||
| #![warn(missing_docs)] | ||||
|  | ||||
|   | ||||
| @@ -13,6 +13,6 @@ embassy-usb = { version = "0.1.0", path = "../embassy-usb" } | ||||
| embassy-sync = { version = "0.4.0", path = "../embassy-sync" } | ||||
| embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | ||||
| futures = { version = "0.3", default-features = false } | ||||
| static_cell = "1" | ||||
| static_cell = { version = "2" } | ||||
| usbd-hid = "0.6.0" | ||||
| log = "0.4" | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly"] } | ||||
| embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly"] } | ||||
| embassy-boot = { version = "0.1.0", path = "../../../../embassy-boot/boot", features = ["nightly"] } | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly"] } | ||||
| embassy-rp = { version = "0.1.0", path = "../../../../embassy-rp", features = ["time-driver", "unstable-traits", "nightly"] } | ||||
| embassy-boot-rp = { version = "0.1.0", path = "../../../../embassy-boot/rp", features = ["nightly"] } | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"]  } | ||||
| embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] } | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"]  } | ||||
| embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] } | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"]  } | ||||
| embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] } | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"]  } | ||||
| embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] } | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"]  } | ||||
| embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] } | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"]  } | ||||
| embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] } | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"]  } | ||||
| embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32", features = ["nightly"] } | ||||
|   | ||||
| @@ -17,7 +17,7 @@ log = [ | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace", "rtos-trace-interrupt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace", "rtos-trace-interrupt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time" } | ||||
| embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } | ||||
|  | ||||
|   | ||||
| @@ -30,7 +30,7 @@ nightly = [ | ||||
| [dependencies] | ||||
| embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | ||||
| embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"], optional = true } | ||||
| @@ -48,7 +48,7 @@ defmt = "0.3" | ||||
| defmt-rtt = "0.4" | ||||
|  | ||||
| fixed = "1.10.0" | ||||
| static_cell = "1.1" | ||||
| static_cell = { version = "2" } | ||||
| cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | ||||
| cortex-m-rt = "0.7.0" | ||||
| panic-probe = { version = "0.3", features = ["print-defmt"] } | ||||
|   | ||||
| @@ -9,7 +9,7 @@ embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = [ | ||||
|     "defmt", | ||||
| ] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread",  | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread",  | ||||
|     "nightly", | ||||
|     "defmt", | ||||
|     "integrated-timers", | ||||
| @@ -42,7 +42,7 @@ embedded-io-async = { version = "0.6.0" } | ||||
| defmt = "0.3" | ||||
| defmt-rtt = "0.4" | ||||
|  | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
| cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | ||||
| cortex-m-rt = "0.7.0" | ||||
| panic-probe = { version = "0.3", features = ["print-defmt"] } | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| [dependencies] | ||||
| embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime"] } | ||||
| embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "critical-section-impl"] } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
| @@ -47,7 +47,8 @@ embedded-hal-async = "1.0.0-rc.1" | ||||
| embedded-hal-bus = { version = "0.1.0-rc.1", features = ["async"] } | ||||
| embedded-io-async = { version = "0.6.0", features = ["defmt-03"] } | ||||
| embedded-storage = { version = "0.3" } | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
| portable-atomic = { version = "1.5", features = ["critical-section"] } | ||||
| log = "0.4" | ||||
| pio-proc = "0.2" | ||||
| pio = "0.2.1" | ||||
|   | ||||
| @@ -10,6 +10,7 @@ | ||||
| #![no_main] | ||||
| #![feature(type_alias_impl_trait)] | ||||
| #![feature(async_fn_in_trait)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
|  | ||||
| use defmt::{info, panic, trace}; | ||||
| use embassy_executor::Spawner; | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
| #![no_main] | ||||
| #![feature(type_alias_impl_trait)] | ||||
| #![feature(async_fn_in_trait)] | ||||
| #![allow(incomplete_features)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
|  | ||||
| use core::str::from_utf8; | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
| #![no_main] | ||||
| #![feature(type_alias_impl_trait)] | ||||
| #![feature(async_fn_in_trait)] | ||||
| #![allow(incomplete_features)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
|  | ||||
| use core::str; | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
| #![no_main] | ||||
| #![feature(type_alias_impl_trait)] | ||||
| #![feature(async_fn_in_trait)] | ||||
| #![allow(incomplete_features)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
|  | ||||
| use core::str::from_utf8; | ||||
|  | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["log"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["log", "std", "nightly"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } | ||||
| embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } | ||||
| @@ -24,7 +24,7 @@ nix = "0.26.2" | ||||
| clap = { version = "3.0.0-beta.5", features = ["derive"] } | ||||
| rand_core = { version = "0.6.3", features = ["std"] } | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|  | ||||
| [profile.release] | ||||
| debug = 2 | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32c031c6 to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
|  | ||||
| defmt = "0.3" | ||||
|   | ||||
| @@ -15,9 +15,10 @@ defmt = "0.3" | ||||
| defmt-rtt = "0.4" | ||||
| panic-probe = "0.3" | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
| portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] } | ||||
|  | ||||
| [profile.release] | ||||
| debug = 2 | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32f103c8 to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any", "unstable-traits" ]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
| embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32f207zg to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
|  | ||||
| defmt = "0.3" | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32f303ze to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-any", "exti"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
| embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
| @@ -24,7 +24,7 @@ futures = { version = "0.3.17", default-features = false, features = ["async-awa | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| nb = "1.0.0" | ||||
| embedded-storage = "0.3.0" | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|  | ||||
| [profile.release] | ||||
| debug = 2 | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f334r8", "unstable-pac", "memory-x", "time-driver-any", "exti"]  } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
| @@ -23,4 +23,4 @@ futures = { version = "0.3.17", default-features = false, features = ["async-awa | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| nb = "1.0.0" | ||||
| embedded-storage = "0.3.0" | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32f429zi to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti", "embedded-sdmmc", "chrono"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "nightly"] } | ||||
| @@ -27,7 +27,7 @@ heapless = { version = "0.7.5", default-features = false } | ||||
| nb = "1.0.0" | ||||
| embedded-storage = "0.3.0" | ||||
| micromath = "2.0.0" | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
| chrono = { version = "^0.4", default-features = false} | ||||
|  | ||||
| [profile.release] | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32f767zi to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f767zi", "memory-x", "unstable-pac", "time-driver-any", "exti"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } | ||||
| embedded-io-async = { version = "0.6.0" } | ||||
| @@ -27,7 +27,7 @@ nb = "1.0.0" | ||||
| rand_core = "0.6.3" | ||||
| critical-section = "1.1" | ||||
| embedded-storage = "0.3.0" | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|  | ||||
| [profile.release] | ||||
| debug = 2 | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32g071rb to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g071rb", "memory-x", "unstable-pac", "exti"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
|  | ||||
| defmt = "0.3" | ||||
| @@ -20,6 +20,7 @@ embedded-hal = "0.2.6" | ||||
| panic-probe = { version = "0.3", features = ["print-defmt"] } | ||||
| futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] } | ||||
|  | ||||
| [profile.release] | ||||
| debug = 2 | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32g491re to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
| embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32h563zi to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h563zi", "memory-x", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } | ||||
| embedded-io-async = { version = "0.6.0" } | ||||
| @@ -31,7 +31,7 @@ critical-section = "1.1" | ||||
| micromath = "2.0.0" | ||||
| stm32-fmc = "0.3.0" | ||||
| embedded-storage = "0.3.0" | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|  | ||||
| # cargo build/run | ||||
| [profile.dev] | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32h743bi to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "time-driver-any", "exti", "memory-x", "unstable-pac", "unstable-traits", "chrono"] } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } | ||||
| embedded-io-async = { version = "0.6.0" } | ||||
| @@ -31,7 +31,7 @@ critical-section = "1.1" | ||||
| micromath = "2.0.0" | ||||
| stm32-fmc = "0.3.0" | ||||
| embedded-storage = "0.3.0" | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
| chrono = { version = "^0.4", default-features = false } | ||||
|  | ||||
| # cargo build/run | ||||
|   | ||||
| @@ -13,7 +13,7 @@ nightly = ["embassy-stm32/nightly", "embassy-time/nightly", "embassy-time/unstab | ||||
| # Change stm32l072cz to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-any", "exti", "unstable-traits", "memory-x"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"], optional = true } | ||||
| lora-phy = { version = "2", optional = true } | ||||
| @@ -33,7 +33,8 @@ panic-probe = { version = "0.3", features = ["print-defmt"] } | ||||
| futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| embedded-hal = "0.2.6" | ||||
| static_cell = "1.1" | ||||
| static_cell = { version = "2" } | ||||
| portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] } | ||||
|  | ||||
| [profile.release] | ||||
| debug = 2 | ||||
|   | ||||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"]  } | ||||
|  | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32l4s5vi to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l4s5qi", "memory-x", "time-driver-any", "exti", "unstable-traits", "chrono"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768", "unstable-traits", "nightly"] } | ||||
| embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
| @@ -32,7 +32,7 @@ futures = { version = "0.3.17", default-features = false, features = ["async-awa | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| chrono = { version = "^0.4", default-features = false } | ||||
| rand = { version = "0.8.5", default-features = false } | ||||
| static_cell = {version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|  | ||||
| micromath = "2.0.0" | ||||
|  | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32l552ze to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "unstable-traits", "memory-x"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } | ||||
| @@ -26,7 +26,7 @@ futures = { version = "0.3.17", default-features = false, features = ["async-awa | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| rand_core = { version = "0.6.3", default-features = false } | ||||
| embedded-io-async = { version = "0.6.0" } | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|  | ||||
| [profile.release] | ||||
| debug = 2 | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32u585ai to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wb55rg", "time-driver-any", "memory-x", "exti"]  } | ||||
| embassy-stm32-wpan = { version = "0.1.0", path = "../../embassy-stm32-wpan", features = ["defmt", "stm32wb55rg"] } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", "nightly"], optional=true } | ||||
|  | ||||
| @@ -22,7 +22,7 @@ embedded-hal = "0.2.6" | ||||
| panic-probe = { version = "0.3", features = ["print-defmt"] } | ||||
| futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|  | ||||
| [features] | ||||
| default = ["ble", "mac"] | ||||
|   | ||||
| @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0" | ||||
| [dependencies] | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wba52cg", "time-driver-any", "memory-x", "exti"]  } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", "nightly"], optional=true } | ||||
|  | ||||
| @@ -20,7 +20,7 @@ embedded-hal = "0.2.6" | ||||
| panic-probe = { version = "0.3", features = ["print-defmt"] } | ||||
| futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | ||||
| heapless = { version = "0.7.5", default-features = false } | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
|  | ||||
| [profile.release] | ||||
| debug = 2 | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| # Change stm32wl55jc-cm4 to your chip name, if necessary. | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "unstable-pac", "exti", "chrono"] } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | ||||
| embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" } | ||||
| embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time", "defmt"] } | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
| #![no_main] | ||||
| #![macro_use] | ||||
| #![feature(type_alias_impl_trait, async_fn_in_trait)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
|  | ||||
| use defmt::info; | ||||
| use embassy_executor::Spawner; | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
| #![no_main] | ||||
| #![macro_use] | ||||
| #![feature(type_alias_impl_trait, async_fn_in_trait)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
|  | ||||
| use defmt::info; | ||||
| use embassy_executor::Spawner; | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
| #![no_main] | ||||
| #![macro_use] | ||||
| #![feature(type_alias_impl_trait, async_fn_in_trait)] | ||||
| #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||||
|  | ||||
| use defmt::info; | ||||
| use embassy_executor::Spawner; | ||||
|   | ||||
| @@ -9,7 +9,7 @@ crate-type = ["cdylib"] | ||||
|  | ||||
| [dependencies] | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["log"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["log", "wasm", "nightly"] } | ||||
|  | ||||
| wasm-logger = "0.2.0" | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| # Before upgrading check that everything is available on all tier1 targets here: | ||||
| # https://rust-lang.github.io/rustup-components-history | ||||
| [toolchain] | ||||
| channel = "nightly-2023-10-02" | ||||
| channel = "nightly-2023-11-01" | ||||
| components = [ "rust-src", "rustfmt", "llvm-tools" ] | ||||
| targets = [ | ||||
|     "thumbv7em-none-eabi", | ||||
|   | ||||
| @@ -9,7 +9,7 @@ teleprobe-meta = "1" | ||||
|  | ||||
| embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt", "nightly"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits", "defmt-timestamp-uptime"] } | ||||
| embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } | ||||
| embedded-io-async = { version = "0.6.0" } | ||||
| @@ -18,7 +18,7 @@ embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-host | ||||
| embassy-net-enc28j60 = { version = "0.1.0", path = "../../embassy-net-enc28j60", features = ["defmt"] } | ||||
| embedded-hal-async = { version = "1.0.0-rc.1" } | ||||
| embedded-hal-bus = { version = "0.1.0-rc.1", features = ["async"] } | ||||
| static_cell = { version = "1.1", features = [ "nightly" ] } | ||||
| static_cell = { version = "2", features = [ "nightly" ] } | ||||
| perf-client = { path = "../perf-client" } | ||||
|  | ||||
| defmt = "0.3" | ||||
|   | ||||
| @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0" | ||||
| [dependencies] | ||||
| critical-section = { version = "1.1.1", features = ["restore-state-bool"] } | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync" } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["arch-riscv32", "nightly", "executor-thread"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["arch-riscv32", "nightly", "executor-thread"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time" } | ||||
| embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
|  | ||||
|   | ||||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | ||||
| teleprobe-meta = "1.1" | ||||
|  | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "nightly", "unstable-traits"] } | ||||
| embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram"]  } | ||||
| embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
| @@ -31,7 +31,8 @@ panic-probe = { version = "0.3.0", features = ["print-defmt"] } | ||||
| futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | ||||
| embedded-io-async = { version = "0.6.0" } | ||||
| embedded-storage = { version = "0.3" } | ||||
| static_cell = { version = "1.1", features = ["nightly"]} | ||||
| static_cell = { version = "2", features = ["nightly"]} | ||||
| portable-atomic = { version = "1.5", features = ["critical-section"] } | ||||
| pio = "0.2" | ||||
| pio-proc = "0.2" | ||||
| rand = { version = "0.8.5", default-features = false } | ||||
|   | ||||
| @@ -5,12 +5,12 @@ teleprobe_meta::target!(b"rpi-pico"); | ||||
|  | ||||
| use defmt::{info, unwrap}; | ||||
| use embassy_executor::Executor; | ||||
| use embassy_executor::_export::StaticCell; | ||||
| use embassy_rp::gpio::{Input, Level, Output, Pull}; | ||||
| use embassy_rp::multicore::{spawn_core1, Stack}; | ||||
| use embassy_rp::peripherals::{PIN_0, PIN_1}; | ||||
| use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | ||||
| use embassy_sync::channel::Channel; | ||||
| use static_cell::StaticCell; | ||||
| use {defmt_rtt as _, panic_probe as _}; | ||||
|  | ||||
| static mut CORE1_STACK: Stack<1024> = Stack::new(); | ||||
|   | ||||
| @@ -5,12 +5,12 @@ teleprobe_meta::target!(b"rpi-pico"); | ||||
|  | ||||
| use defmt::{assert_eq, info, panic, unwrap}; | ||||
| use embassy_executor::Executor; | ||||
| use embassy_executor::_export::StaticCell; | ||||
| use embassy_rp::multicore::{spawn_core1, Stack}; | ||||
| use embassy_rp::peripherals::{I2C0, I2C1}; | ||||
| use embassy_rp::{bind_interrupts, i2c, i2c_slave}; | ||||
| use embedded_hal_1::i2c::Operation; | ||||
| use embedded_hal_async::i2c::I2c; | ||||
| use static_cell::StaticCell; | ||||
| use {defmt_rtt as _, panic_probe as _, panic_probe as _, panic_probe as _}; | ||||
|  | ||||
| static mut CORE1_STACK: Stack<1024> = Stack::new(); | ||||
|   | ||||
| @@ -5,10 +5,10 @@ teleprobe_meta::target!(b"rpi-pico"); | ||||
|  | ||||
| use defmt::{info, unwrap}; | ||||
| use embassy_executor::Executor; | ||||
| use embassy_executor::_export::StaticCell; | ||||
| use embassy_rp::multicore::{spawn_core1, Stack}; | ||||
| use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | ||||
| use embassy_sync::channel::Channel; | ||||
| use static_cell::StaticCell; | ||||
| use {defmt_rtt as _, panic_probe as _}; | ||||
|  | ||||
| static mut CORE1_STACK: Stack<1024> = Stack::new(); | ||||
|   | ||||
| @@ -8,8 +8,8 @@ autobins = false | ||||
| [features] | ||||
| stm32f103c8 = ["embassy-stm32/stm32f103c8", "not-gpdma"] | ||||
| stm32f429zi = ["embassy-stm32/stm32f429zi", "chrono", "eth", "stop", "can", "not-gpdma", "dac-adc-pin", "rng"] | ||||
| stm32g071rb = ["embassy-stm32/stm32g071rb", "not-gpdma", "dac-adc-pin"] | ||||
| stm32c031c6 = ["embassy-stm32/stm32c031c6", "not-gpdma"] | ||||
| stm32g071rb = ["embassy-stm32/stm32g071rb", "cm0", "not-gpdma", "dac-adc-pin"] | ||||
| stm32c031c6 = ["embassy-stm32/stm32c031c6", "cm0", "not-gpdma"] | ||||
| stm32g491re = ["embassy-stm32/stm32g491re", "chrono", "not-gpdma", "rng"] | ||||
| stm32h755zi = ["embassy-stm32/stm32h755zi-cm7", "chrono", "not-gpdma", "eth", "dac-adc-pin", "rng"] | ||||
| stm32h753zi = ["embassy-stm32/stm32h753zi", "chrono", "not-gpdma", "eth", "rng"] | ||||
| @@ -19,7 +19,7 @@ stm32h563zi = ["embassy-stm32/stm32h563zi", "chrono", "eth", "rng"] | ||||
| stm32u585ai = ["embassy-stm32/stm32u585ai", "chrono", "rng"] | ||||
| stm32u5a5zj = ["embassy-stm32/stm32u5a5zj", "chrono", "rng"] | ||||
| stm32wba52cg = ["embassy-stm32/stm32wba52cg", "chrono", "rng"] | ||||
| stm32l073rz = ["embassy-stm32/stm32l073rz", "not-gpdma", "rng"] | ||||
| stm32l073rz = ["embassy-stm32/stm32l073rz", "cm0", "not-gpdma", "rng"] | ||||
| stm32l152re = ["embassy-stm32/stm32l152re", "chrono", "not-gpdma"] | ||||
| stm32l4a6zg = ["embassy-stm32/stm32l4a6zg", "chrono", "not-gpdma", "rng"] | ||||
| stm32l4r5zi = ["embassy-stm32/stm32l4r5zi", "chrono", "not-gpdma", "rng"] | ||||
| @@ -42,11 +42,13 @@ embassy-stm32-wpan = [] | ||||
| not-gpdma = [] | ||||
| dac-adc-pin = [] | ||||
|  | ||||
| cm0 = ["portable-atomic/unsafe-assume-single-core"] | ||||
|  | ||||
| [dependencies] | ||||
| teleprobe-meta = "1" | ||||
|  | ||||
| embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | ||||
| embassy-executor = { version = "0.3.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-executor = { version = "0.3.1", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | ||||
| embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "tick-hz-131_072", "defmt-timestamp-uptime"] } | ||||
| embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-any"]  } | ||||
| embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||||
| @@ -66,7 +68,8 @@ micromath = "2.0.0" | ||||
| panic-probe = { version = "0.3.0", features = ["print-defmt"] } | ||||
| rand_core = { version = "0.6", default-features = false } | ||||
| rand_chacha = { version = "0.3", default-features = false } | ||||
| static_cell = {version = "1.1", features = ["nightly"] } | ||||
| static_cell = { version = "2", features = ["nightly"] } | ||||
| portable-atomic = { version = "1.5", features = [] } | ||||
|  | ||||
| chrono = { version = "^0.4", default-features = false, optional = true} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user