Compare commits
6 Commits
msos-descr
...
update-hea
Author | SHA1 | Date | |
---|---|---|---|
4647df14b1 | |||
b3367be9c8 | |||
da4feb3693 | |||
05a4bb3a4a | |||
4b4c28d875 | |||
1977acdb11 |
@ -10,7 +10,7 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
heapless = "0.7.16"
|
heapless = "0.8"
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
log = { version = "0.4", default-features = false, optional = true }
|
log = { version = "0.4", default-features = false, optional = true }
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" }
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" }
|
||||||
|
@ -15,9 +15,9 @@ embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-
|
|||||||
embedded-hal = { version = "1.0.0-rc.1" }
|
embedded-hal = { version = "1.0.0-rc.1" }
|
||||||
embedded-hal-async = { version = "=1.0.0-rc.1" }
|
embedded-hal-async = { version = "=1.0.0-rc.1" }
|
||||||
|
|
||||||
noproto = { git="https://github.com/embassy-rs/noproto", rev = "c90f3a78d7b5642415e0a07af401320b84d8ab6f", default-features = false, features = ["derive"] }
|
noproto = { git="https://github.com/embassy-rs/noproto", rev = "f5e6d1f325b6ad4e344f60452b09576e24671f62", default-features = false, features = ["derive"] }
|
||||||
#noproto = { version = "0.1", path = "/home/dirbaio/noproto", default-features = false, features = ["derive"] }
|
#noproto = { version = "0.1", path = "/home/dirbaio/noproto", default-features = false, features = ["derive"] }
|
||||||
heapless = "0.7.16"
|
heapless = "0.8"
|
||||||
|
|
||||||
[package.metadata.embassy_docs]
|
[package.metadata.embassy_docs]
|
||||||
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-esp-hosted-v$VERSION/embassy-net-esp-hosted/src/"
|
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-esp-hosted-v$VERSION/embassy-net-esp-hosted/src/"
|
||||||
|
@ -97,8 +97,8 @@ impl<'a> Control<'a> {
|
|||||||
|
|
||||||
pub async fn connect(&mut self, ssid: &str, password: &str) -> Result<(), Error> {
|
pub async fn connect(&mut self, ssid: &str, password: &str) -> Result<(), Error> {
|
||||||
let req = proto::CtrlMsgReqConnectAp {
|
let req = proto::CtrlMsgReqConnectAp {
|
||||||
ssid: String::from(ssid),
|
ssid: unwrap!(String::try_from(ssid)),
|
||||||
pwd: String::from(password),
|
pwd: unwrap!(String::try_from(password)),
|
||||||
bssid: String::new(),
|
bssid: String::new(),
|
||||||
listen_interval: 3,
|
listen_interval: 3,
|
||||||
is_wpa3_supported: false,
|
is_wpa3_supported: false,
|
||||||
|
@ -46,7 +46,7 @@ igmp = ["smoltcp/proto-igmp"]
|
|||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
log = { version = "0.4.14", optional = true }
|
log = { version = "0.4.14", optional = true }
|
||||||
|
|
||||||
smoltcp = { version = "0.10.0", default-features = false, features = [
|
smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev = "9b791ae3057e10f7afcb70c67deb5daf714293a9", default-features = false, features = [
|
||||||
"socket",
|
"socket",
|
||||||
"async",
|
"async",
|
||||||
] }
|
] }
|
||||||
@ -57,10 +57,10 @@ embassy-sync = { version = "0.4.0", path = "../embassy-sync" }
|
|||||||
embedded-io-async = { version = "0.6.0", optional = true }
|
embedded-io-async = { version = "0.6.0", optional = true }
|
||||||
|
|
||||||
managed = { version = "0.8.0", default-features = false, features = [ "map" ] }
|
managed = { version = "0.8.0", default-features = false, features = [ "map" ] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
as-slice = "0.2.1"
|
as-slice = "0.2.1"
|
||||||
generic-array = { version = "0.14.4", default-features = false }
|
generic-array = { version = "0.14.4", default-features = false }
|
||||||
stable_deref_trait = { version = "1.2.0", default-features = false }
|
stable_deref_trait = { version = "1.2.0", default-features = false }
|
||||||
futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] }
|
futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] }
|
||||||
atomic-pool = "1.0"
|
atomic-pool = "1.0"
|
||||||
embedded-nal-async = { version = "0.6.0", optional = true }
|
embedded-nal-async = { version = "0.7", optional = true }
|
||||||
|
@ -101,7 +101,8 @@ where
|
|||||||
async fn get_host_by_address(
|
async fn get_host_by_address(
|
||||||
&self,
|
&self,
|
||||||
_addr: embedded_nal_async::IpAddr,
|
_addr: embedded_nal_async::IpAddr,
|
||||||
) -> Result<heapless::String<256>, Self::Error> {
|
_result: &mut [u8],
|
||||||
|
) -> Result<usize, Self::Error> {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -618,10 +618,7 @@ pub mod client {
|
|||||||
async fn connect<'a>(
|
async fn connect<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
remote: embedded_nal_async::SocketAddr,
|
remote: embedded_nal_async::SocketAddr,
|
||||||
) -> Result<Self::Connection<'a>, Self::Error>
|
) -> Result<Self::Connection<'a>, Self::Error> {
|
||||||
where
|
|
||||||
Self: 'a,
|
|
||||||
{
|
|
||||||
let addr: crate::IpAddress = match remote.ip() {
|
let addr: crate::IpAddress = match remote.ip() {
|
||||||
#[cfg(feature = "proto-ipv4")]
|
#[cfg(feature = "proto-ipv4")]
|
||||||
IpAddr::V4(addr) => crate::IpAddress::Ipv4(crate::Ipv4Address::from_bytes(&addr.octets())),
|
IpAddr::V4(addr) => crate::IpAddress::Ipv4(crate::Ipv4Address::from_bytes(&addr.octets())),
|
||||||
|
@ -21,7 +21,7 @@ embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver", option
|
|||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
cortex-m = "0.7.6"
|
cortex-m = "0.7.6"
|
||||||
heapless = "0.7.16"
|
heapless = "0.8"
|
||||||
aligned = "0.4.1"
|
aligned = "0.4.1"
|
||||||
|
|
||||||
bit_field = "0.10.2"
|
bit_field = "0.10.2"
|
||||||
|
@ -18,7 +18,7 @@ flavors = [
|
|||||||
{ regex_feature = "stm32f7.*", target = "thumbv7em-none-eabi" },
|
{ regex_feature = "stm32f7.*", target = "thumbv7em-none-eabi" },
|
||||||
{ regex_feature = "stm32c0.*", target = "thumbv6m-none-eabi" },
|
{ regex_feature = "stm32c0.*", target = "thumbv6m-none-eabi" },
|
||||||
{ regex_feature = "stm32g0.*", target = "thumbv6m-none-eabi" },
|
{ regex_feature = "stm32g0.*", target = "thumbv6m-none-eabi" },
|
||||||
{ regex_feature = "stm32g4.*", target = "thumbv7em-none-eabi" },
|
{ regex_feature = "stm32g4.*", target = "thumbv7em-none-eabi", features = ["low-power"] },
|
||||||
{ regex_feature = "stm32h5.*", target = "thumbv8m.main-none-eabihf" },
|
{ regex_feature = "stm32h5.*", target = "thumbv8m.main-none-eabihf" },
|
||||||
{ regex_feature = "stm32h7.*", target = "thumbv7em-none-eabi" },
|
{ regex_feature = "stm32h7.*", target = "thumbv7em-none-eabi" },
|
||||||
{ regex_feature = "stm32l0.*", target = "thumbv6m-none-eabi", features = ["low-power"] },
|
{ regex_feature = "stm32l0.*", target = "thumbv6m-none-eabi", features = ["low-power"] },
|
||||||
|
@ -33,6 +33,61 @@ use embassy_hal_internal::Peripheral;
|
|||||||
use crate::peripherals::RTC;
|
use crate::peripherals::RTC;
|
||||||
use crate::rtc::sealed::Instance;
|
use crate::rtc::sealed::Instance;
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[repr(u8)]
|
||||||
|
#[derive(Clone, Copy, Debug)]
|
||||||
|
pub(crate) enum WakeupPrescaler {
|
||||||
|
Div2 = 2,
|
||||||
|
Div4 = 4,
|
||||||
|
Div8 = 8,
|
||||||
|
Div16 = 16,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(stm32wb, stm32f4, stm32l0, stm32g4))]
|
||||||
|
impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel {
|
||||||
|
fn from(val: WakeupPrescaler) -> Self {
|
||||||
|
use crate::pac::rtc::vals::Wucksel;
|
||||||
|
|
||||||
|
match val {
|
||||||
|
WakeupPrescaler::Div2 => Wucksel::DIV2,
|
||||||
|
WakeupPrescaler::Div4 => Wucksel::DIV4,
|
||||||
|
WakeupPrescaler::Div8 => Wucksel::DIV8,
|
||||||
|
WakeupPrescaler::Div16 => Wucksel::DIV16,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(stm32wb, stm32f4, stm32l0, stm32g4))]
|
||||||
|
impl From<crate::pac::rtc::vals::Wucksel> for WakeupPrescaler {
|
||||||
|
fn from(val: crate::pac::rtc::vals::Wucksel) -> Self {
|
||||||
|
use crate::pac::rtc::vals::Wucksel;
|
||||||
|
|
||||||
|
match val {
|
||||||
|
Wucksel::DIV2 => WakeupPrescaler::Div2,
|
||||||
|
Wucksel::DIV4 => WakeupPrescaler::Div4,
|
||||||
|
Wucksel::DIV8 => WakeupPrescaler::Div8,
|
||||||
|
Wucksel::DIV16 => WakeupPrescaler::Div16,
|
||||||
|
_ => unreachable!(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "low-power")]
|
||||||
|
impl WakeupPrescaler {
|
||||||
|
pub fn compute_min(val: u32) -> Self {
|
||||||
|
*[
|
||||||
|
WakeupPrescaler::Div2,
|
||||||
|
WakeupPrescaler::Div4,
|
||||||
|
WakeupPrescaler::Div8,
|
||||||
|
WakeupPrescaler::Div16,
|
||||||
|
]
|
||||||
|
.iter()
|
||||||
|
.skip_while(|psc| **psc as u32 <= val)
|
||||||
|
.next()
|
||||||
|
.unwrap_or(&WakeupPrescaler::Div16)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Errors that can occur on methods on [RtcClock]
|
/// Errors that can occur on methods on [RtcClock]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
@ -277,6 +332,114 @@ impl Rtc {
|
|||||||
pub fn write_backup_register(&self, register: usize, value: u32) {
|
pub fn write_backup_register(&self, register: usize, value: u32) {
|
||||||
RTC::write_backup_register(&RTC::regs(), register, value)
|
RTC::write_backup_register(&RTC::regs(), register, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "low-power")]
|
||||||
|
/// start the wakeup alarm and wtih a duration that is as close to but less than
|
||||||
|
/// the requested duration, and record the instant the wakeup alarm was started
|
||||||
|
pub(crate) fn start_wakeup_alarm(
|
||||||
|
&self,
|
||||||
|
requested_duration: embassy_time::Duration,
|
||||||
|
cs: critical_section::CriticalSection,
|
||||||
|
) {
|
||||||
|
use embassy_time::{Duration, TICK_HZ};
|
||||||
|
|
||||||
|
#[cfg(any(rtc_v3, rtc_v3u5))]
|
||||||
|
use crate::pac::rtc::vals::Calrf;
|
||||||
|
|
||||||
|
// Panic if the rcc mod knows we're not using low-power rtc
|
||||||
|
#[cfg(any(rcc_wb, rcc_f4, rcc_f410))]
|
||||||
|
unsafe { crate::rcc::get_freqs() }.rtc.unwrap();
|
||||||
|
|
||||||
|
let requested_duration = requested_duration.as_ticks().clamp(0, u32::MAX as u64);
|
||||||
|
let rtc_hz = Self::frequency().0 as u64;
|
||||||
|
let rtc_ticks = requested_duration * rtc_hz / TICK_HZ;
|
||||||
|
let prescaler = WakeupPrescaler::compute_min((rtc_ticks / u16::MAX as u64) as u32);
|
||||||
|
|
||||||
|
// adjust the rtc ticks to the prescaler and subtract one rtc tick
|
||||||
|
let rtc_ticks = rtc_ticks / prescaler as u64;
|
||||||
|
let rtc_ticks = rtc_ticks.clamp(0, (u16::MAX - 1) as u64).saturating_sub(1) as u16;
|
||||||
|
|
||||||
|
self.write(false, |regs| {
|
||||||
|
regs.cr().modify(|w| w.set_wute(false));
|
||||||
|
|
||||||
|
#[cfg(any(
|
||||||
|
rtc_v2f0, rtc_v2f2, rtc_v2f3, rtc_v2f4, rtc_v2f7, rtc_v2h7, rtc_v2l0, rtc_v2l1, rtc_v2l4, rtc_v2wb
|
||||||
|
))]
|
||||||
|
{
|
||||||
|
regs.isr().modify(|w| w.set_wutf(false));
|
||||||
|
while !regs.isr().read().wutwf() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(any(rtc_v3, rtc_v3u5))]
|
||||||
|
{
|
||||||
|
regs.scr().write(|w| w.set_cwutf(Calrf::CLEAR));
|
||||||
|
while !regs.icsr().read().wutwf() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
regs.cr().modify(|w| w.set_wucksel(prescaler.into()));
|
||||||
|
regs.wutr().write(|w| w.set_wut(rtc_ticks));
|
||||||
|
regs.cr().modify(|w| w.set_wute(true));
|
||||||
|
regs.cr().modify(|w| w.set_wutie(true));
|
||||||
|
});
|
||||||
|
|
||||||
|
let instant = self.instant().unwrap();
|
||||||
|
trace!(
|
||||||
|
"rtc: start wakeup alarm for {} ms (psc: {}, ticks: {}) at {}",
|
||||||
|
Duration::from_ticks(rtc_ticks as u64 * TICK_HZ * prescaler as u64 / rtc_hz).as_millis(),
|
||||||
|
prescaler as u32,
|
||||||
|
rtc_ticks,
|
||||||
|
instant,
|
||||||
|
);
|
||||||
|
|
||||||
|
assert!(self.stop_time.borrow(cs).replace(Some(instant)).is_none())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "low-power")]
|
||||||
|
/// stop the wakeup alarm and return the time elapsed since `start_wakeup_alarm`
|
||||||
|
/// was called, otherwise none
|
||||||
|
pub(crate) fn stop_wakeup_alarm(&self, cs: critical_section::CriticalSection) -> Option<embassy_time::Duration> {
|
||||||
|
use crate::interrupt::typelevel::Interrupt;
|
||||||
|
#[cfg(any(rtc_v3, rtc_v3u5))]
|
||||||
|
use crate::pac::rtc::vals::Calrf;
|
||||||
|
|
||||||
|
let instant = self.instant().unwrap();
|
||||||
|
if RTC::regs().cr().read().wute() {
|
||||||
|
trace!("rtc: stop wakeup alarm at {}", instant);
|
||||||
|
|
||||||
|
self.write(false, |regs| {
|
||||||
|
regs.cr().modify(|w| w.set_wutie(false));
|
||||||
|
regs.cr().modify(|w| w.set_wute(false));
|
||||||
|
|
||||||
|
#[cfg(any(
|
||||||
|
rtc_v2f0, rtc_v2f2, rtc_v2f3, rtc_v2f4, rtc_v2f7, rtc_v2h7, rtc_v2l0, rtc_v2l1, rtc_v2l4, rtc_v2wb
|
||||||
|
))]
|
||||||
|
regs.isr().modify(|w| w.set_wutf(false));
|
||||||
|
|
||||||
|
#[cfg(any(rtc_v3, rtc_v3u5))]
|
||||||
|
regs.scr().write(|w| w.set_cwutf(Calrf::CLEAR));
|
||||||
|
|
||||||
|
crate::pac::EXTI
|
||||||
|
.pr(0)
|
||||||
|
.modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true));
|
||||||
|
|
||||||
|
<RTC as crate::rtc::sealed::Instance>::WakeupInterrupt::unpend();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
self.stop_time.borrow(cs).take().map(|stop_time| instant - stop_time)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "low-power")]
|
||||||
|
pub(crate) fn enable_wakeup_line(&self) {
|
||||||
|
use crate::interrupt::typelevel::Interrupt;
|
||||||
|
use crate::pac::EXTI;
|
||||||
|
|
||||||
|
<RTC as crate::rtc::sealed::Instance>::WakeupInterrupt::unpend();
|
||||||
|
unsafe { <RTC as crate::rtc::sealed::Instance>::WakeupInterrupt::enable() };
|
||||||
|
|
||||||
|
EXTI.rtsr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true));
|
||||||
|
EXTI.imr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn byte_to_bcd2(byte: u8) -> (u8, u8) {
|
pub(crate) fn byte_to_bcd2(byte: u8) -> (u8, u8) {
|
||||||
|
@ -6,145 +6,7 @@ use crate::peripherals::RTC;
|
|||||||
use crate::rtc::sealed::Instance;
|
use crate::rtc::sealed::Instance;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[repr(u8)]
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
|
||||||
pub(crate) enum WakeupPrescaler {
|
|
||||||
Div2 = 2,
|
|
||||||
Div4 = 4,
|
|
||||||
Div8 = 8,
|
|
||||||
Div16 = 16,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(stm32wb, stm32f4, stm32l0))]
|
|
||||||
impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel {
|
|
||||||
fn from(val: WakeupPrescaler) -> Self {
|
|
||||||
use crate::pac::rtc::vals::Wucksel;
|
|
||||||
|
|
||||||
match val {
|
|
||||||
WakeupPrescaler::Div2 => Wucksel::DIV2,
|
|
||||||
WakeupPrescaler::Div4 => Wucksel::DIV4,
|
|
||||||
WakeupPrescaler::Div8 => Wucksel::DIV8,
|
|
||||||
WakeupPrescaler::Div16 => Wucksel::DIV16,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(stm32wb, stm32f4, stm32l0))]
|
|
||||||
impl From<crate::pac::rtc::vals::Wucksel> for WakeupPrescaler {
|
|
||||||
fn from(val: crate::pac::rtc::vals::Wucksel) -> Self {
|
|
||||||
use crate::pac::rtc::vals::Wucksel;
|
|
||||||
|
|
||||||
match val {
|
|
||||||
Wucksel::DIV2 => WakeupPrescaler::Div2,
|
|
||||||
Wucksel::DIV4 => WakeupPrescaler::Div4,
|
|
||||||
Wucksel::DIV8 => WakeupPrescaler::Div8,
|
|
||||||
Wucksel::DIV16 => WakeupPrescaler::Div16,
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
impl WakeupPrescaler {
|
|
||||||
pub fn compute_min(val: u32) -> Self {
|
|
||||||
*[
|
|
||||||
WakeupPrescaler::Div2,
|
|
||||||
WakeupPrescaler::Div4,
|
|
||||||
WakeupPrescaler::Div8,
|
|
||||||
WakeupPrescaler::Div16,
|
|
||||||
]
|
|
||||||
.iter()
|
|
||||||
.skip_while(|psc| **psc as u32 <= val)
|
|
||||||
.next()
|
|
||||||
.unwrap_or(&WakeupPrescaler::Div16)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl super::Rtc {
|
impl super::Rtc {
|
||||||
#[cfg(feature = "low-power")]
|
|
||||||
/// start the wakeup alarm and wtih a duration that is as close to but less than
|
|
||||||
/// the requested duration, and record the instant the wakeup alarm was started
|
|
||||||
pub(crate) fn start_wakeup_alarm(
|
|
||||||
&self,
|
|
||||||
requested_duration: embassy_time::Duration,
|
|
||||||
cs: critical_section::CriticalSection,
|
|
||||||
) {
|
|
||||||
use embassy_time::{Duration, TICK_HZ};
|
|
||||||
|
|
||||||
// Panic if the rcc mod knows we're not using low-power rtc
|
|
||||||
#[cfg(any(rcc_wb, rcc_f4, rcc_f410))]
|
|
||||||
unsafe { crate::rcc::get_freqs() }.rtc.unwrap();
|
|
||||||
|
|
||||||
let requested_duration = requested_duration.as_ticks().clamp(0, u32::MAX as u64);
|
|
||||||
let rtc_hz = Self::frequency().0 as u64;
|
|
||||||
let rtc_ticks = requested_duration * rtc_hz / TICK_HZ;
|
|
||||||
let prescaler = WakeupPrescaler::compute_min((rtc_ticks / u16::MAX as u64) as u32);
|
|
||||||
|
|
||||||
// adjust the rtc ticks to the prescaler and subtract one rtc tick
|
|
||||||
let rtc_ticks = rtc_ticks / prescaler as u64;
|
|
||||||
let rtc_ticks = rtc_ticks.clamp(0, (u16::MAX - 1) as u64).saturating_sub(1) as u16;
|
|
||||||
|
|
||||||
self.write(false, |regs| {
|
|
||||||
regs.cr().modify(|w| w.set_wute(false));
|
|
||||||
regs.isr().modify(|w| w.set_wutf(false));
|
|
||||||
while !regs.isr().read().wutwf() {}
|
|
||||||
|
|
||||||
regs.cr().modify(|w| w.set_wucksel(prescaler.into()));
|
|
||||||
regs.wutr().write(|w| w.set_wut(rtc_ticks));
|
|
||||||
regs.cr().modify(|w| w.set_wute(true));
|
|
||||||
regs.cr().modify(|w| w.set_wutie(true));
|
|
||||||
});
|
|
||||||
|
|
||||||
let instant = self.instant().unwrap();
|
|
||||||
trace!(
|
|
||||||
"rtc: start wakeup alarm for {} ms (psc: {}, ticks: {}) at {}",
|
|
||||||
Duration::from_ticks(rtc_ticks as u64 * TICK_HZ * prescaler as u64 / rtc_hz).as_millis(),
|
|
||||||
prescaler as u32,
|
|
||||||
rtc_ticks,
|
|
||||||
instant,
|
|
||||||
);
|
|
||||||
|
|
||||||
assert!(self.stop_time.borrow(cs).replace(Some(instant)).is_none())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "low-power")]
|
|
||||||
/// stop the wakeup alarm and return the time elapsed since `start_wakeup_alarm`
|
|
||||||
/// was called, otherwise none
|
|
||||||
pub(crate) fn stop_wakeup_alarm(&self, cs: critical_section::CriticalSection) -> Option<embassy_time::Duration> {
|
|
||||||
use crate::interrupt::typelevel::Interrupt;
|
|
||||||
|
|
||||||
let instant = self.instant().unwrap();
|
|
||||||
if RTC::regs().cr().read().wute() {
|
|
||||||
trace!("rtc: stop wakeup alarm at {}", instant);
|
|
||||||
|
|
||||||
self.write(false, |regs| {
|
|
||||||
regs.cr().modify(|w| w.set_wutie(false));
|
|
||||||
regs.cr().modify(|w| w.set_wute(false));
|
|
||||||
regs.isr().modify(|w| w.set_wutf(false));
|
|
||||||
|
|
||||||
crate::pac::EXTI
|
|
||||||
.pr(0)
|
|
||||||
.modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true));
|
|
||||||
|
|
||||||
<RTC as crate::rtc::sealed::Instance>::WakeupInterrupt::unpend();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
self.stop_time.borrow(cs).take().map(|stop_time| instant - stop_time)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "low-power")]
|
|
||||||
pub(crate) fn enable_wakeup_line(&self) {
|
|
||||||
use crate::interrupt::typelevel::Interrupt;
|
|
||||||
use crate::pac::EXTI;
|
|
||||||
|
|
||||||
<RTC as crate::rtc::sealed::Instance>::WakeupInterrupt::unpend();
|
|
||||||
unsafe { <RTC as crate::rtc::sealed::Instance>::WakeupInterrupt::enable() };
|
|
||||||
|
|
||||||
EXTI.rtsr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true));
|
|
||||||
EXTI.imr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Applies the RTC config
|
/// Applies the RTC config
|
||||||
/// It this changes the RTC clock source the time will be reset
|
/// It this changes the RTC clock source the time will be reset
|
||||||
pub(super) fn configure(&mut self, async_psc: u8, sync_psc: u16) {
|
pub(super) fn configure(&mut self, async_psc: u8, sync_psc: u16) {
|
||||||
|
@ -95,7 +95,7 @@ impl super::Rtc {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn write<F, R>(&mut self, init_mode: bool, f: F) -> R
|
pub(super) fn write<F, R>(&self, init_mode: bool, f: F) -> R
|
||||||
where
|
where
|
||||||
F: FnOnce(&crate::pac::rtc::Rtc) -> R,
|
F: FnOnce(&crate::pac::rtc::Rtc) -> R,
|
||||||
{
|
{
|
||||||
@ -129,6 +129,12 @@ impl super::Rtc {
|
|||||||
impl sealed::Instance for crate::peripherals::RTC {
|
impl sealed::Instance for crate::peripherals::RTC {
|
||||||
const BACKUP_REGISTER_COUNT: usize = 32;
|
const BACKUP_REGISTER_COUNT: usize = 32;
|
||||||
|
|
||||||
|
#[cfg(all(feature = "low-power", stm32g4))]
|
||||||
|
const EXTI_WAKEUP_LINE: usize = 20;
|
||||||
|
|
||||||
|
#[cfg(all(feature = "low-power", stm32g4))]
|
||||||
|
type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP;
|
||||||
|
|
||||||
fn read_backup_register(_rtc: &Rtc, register: usize) -> Option<u32> {
|
fn read_backup_register(_rtc: &Rtc, register: usize) -> Option<u32> {
|
||||||
#[allow(clippy::if_same_then_else)]
|
#[allow(clippy::if_same_then_else)]
|
||||||
if register < Self::BACKUP_REGISTER_COUNT {
|
if register < Self::BACKUP_REGISTER_COUNT {
|
||||||
|
@ -33,7 +33,7 @@ log = { version = "0.4.14", optional = true }
|
|||||||
|
|
||||||
futures-util = { version = "0.3.17", default-features = false }
|
futures-util = { version = "0.3.17", default-features = false }
|
||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
heapless = "0.7.5"
|
heapless = "0.8"
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
embedded-io-async = { version = "0.6.0", optional = true }
|
embedded-io-async = { version = "0.6.0", optional = true }
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ embedded-hal-async = { version = "=1.0.0-rc.1", optional = true}
|
|||||||
futures-util = { version = "0.3.17", default-features = false }
|
futures-util = { version = "0.3.17", default-features = false }
|
||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
heapless = "0.7"
|
heapless = "0.8"
|
||||||
|
|
||||||
# WASM dependencies
|
# WASM dependencies
|
||||||
wasm-bindgen = { version = "0.2.81", optional = true }
|
wasm-bindgen = { version = "0.2.81", optional = true }
|
||||||
|
@ -45,7 +45,7 @@ embassy-net-driver-channel = { version = "0.2.0", path = "../embassy-net-driver-
|
|||||||
|
|
||||||
defmt = { version = "0.3", optional = true }
|
defmt = { version = "0.3", optional = true }
|
||||||
log = { version = "0.4.14", optional = true }
|
log = { version = "0.4.14", optional = true }
|
||||||
heapless = "0.7.10"
|
heapless = "0.8"
|
||||||
|
|
||||||
# for HID
|
# for HID
|
||||||
usbd-hid = { version = "0.6.0", optional = true }
|
usbd-hid = { version = "0.6.0", optional = true }
|
||||||
|
@ -39,7 +39,7 @@ st7789 = "0.6.1"
|
|||||||
display-interface = "0.4.1"
|
display-interface = "0.4.1"
|
||||||
byte-slice-cast = { version = "1.2.0", default-features = false }
|
byte-slice-cast = { version = "1.2.0", default-features = false }
|
||||||
smart-leds = "0.3.0"
|
smart-leds = "0.3.0"
|
||||||
heapless = "0.7.15"
|
heapless = "0.8"
|
||||||
usbd-hid = "0.6.1"
|
usbd-hid = "0.6.1"
|
||||||
|
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" }
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" }
|
||||||
|
@ -14,7 +14,6 @@ embassy-net-ppp = { version = "0.1.0", path = "../../embassy-net-ppp", features
|
|||||||
embedded-io-async = { version = "0.6.0" }
|
embedded-io-async = { version = "0.6.0" }
|
||||||
embedded-io-adapters = { version = "0.6.0", features = ["futures-03"] }
|
embedded-io-adapters = { version = "0.6.0", features = ["futures-03"] }
|
||||||
critical-section = { version = "1.1", features = ["std"] }
|
critical-section = { version = "1.1", features = ["std"] }
|
||||||
smoltcp = { version = "0.10.0", features = ["dns-max-server-count-4"] }
|
|
||||||
|
|
||||||
async-io = "1.6.0"
|
async-io = "1.6.0"
|
||||||
env_logger = "0.9.0"
|
env_logger = "0.9.0"
|
||||||
@ -23,7 +22,7 @@ log = "0.4.14"
|
|||||||
nix = "0.26.2"
|
nix = "0.26.2"
|
||||||
clap = { version = "3.0.0-beta.5", features = ["derive"] }
|
clap = { version = "3.0.0-beta.5", features = ["derive"] }
|
||||||
rand_core = { version = "0.6.3", features = ["std"] }
|
rand_core = { version = "0.6.3", features = ["std"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
static_cell = { version = "2", features = ["nightly"]}
|
static_cell = { version = "2", features = ["nightly"]}
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
@ -19,7 +19,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = 2
|
debug = 2
|
||||||
|
@ -21,7 +21,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
@ -19,7 +19,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
@ -21,7 +21,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
static_cell = { version = "2", features = ["nightly"]}
|
static_cell = { version = "2", features = ["nightly"]}
|
||||||
|
@ -20,7 +20,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
static_cell = { version = "2", features = ["nightly"]}
|
static_cell = { version = "2", features = ["nightly"]}
|
||||||
|
@ -23,7 +23,7 @@ embedded-io = { version = "0.6.0" }
|
|||||||
embedded-io-async = { version = "0.6.0" }
|
embedded-io-async = { version = "0.6.0" }
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
micromath = "2.0.0"
|
micromath = "2.0.0"
|
||||||
|
@ -22,7 +22,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
rand_core = "0.6.3"
|
rand_core = "0.6.3"
|
||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
|
@ -19,7 +19,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] }
|
portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] }
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
@ -22,7 +22,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = 2
|
debug = 2
|
||||||
|
@ -22,10 +22,10 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" }
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" }
|
||||||
embedded-hal-async = { version = "=1.0.0-rc.1" }
|
embedded-hal-async = { version = "=1.0.0-rc.1" }
|
||||||
embedded-nal-async = { version = "0.6.0" }
|
embedded-nal-async = { version = "0.7" }
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
rand_core = "0.6.3"
|
rand_core = "0.6.3"
|
||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
micromath = "2.0.0"
|
micromath = "2.0.0"
|
||||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["
|
|||||||
embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] }
|
embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||||
embassy-executor = { version = "0.3.1", 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-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"] }
|
embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] }
|
||||||
embedded-io-async = { version = "0.6.0" }
|
embedded-io-async = { version = "0.6.0" }
|
||||||
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
|
embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||||
|
|
||||||
@ -22,10 +22,10 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" }
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1" }
|
||||||
embedded-hal-async = { version = "=1.0.0-rc.1" }
|
embedded-hal-async = { version = "=1.0.0-rc.1" }
|
||||||
embedded-nal-async = { version = "0.6.0" }
|
embedded-nal-async = { version = "0.7" }
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
rand_core = "0.6.3"
|
rand_core = "0.6.3"
|
||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
micromath = "2.0.0"
|
micromath = "2.0.0"
|
||||||
|
@ -31,7 +31,7 @@ cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-sing
|
|||||||
cortex-m-rt = "0.7.0"
|
cortex-m-rt = "0.7.0"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
static_cell = { version = "2" }
|
static_cell = { version = "2" }
|
||||||
portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] }
|
portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] }
|
||||||
|
@ -18,7 +18,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
@ -29,7 +29,7 @@ embedded-hal-async = { version = "=1.0.0-rc.1" }
|
|||||||
embedded-hal-bus = { version = "=0.1.0-rc.1", features = ["async"] }
|
embedded-hal-bus = { version = "=0.1.0-rc.1", features = ["async"] }
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
chrono = { version = "^0.4", default-features = false }
|
chrono = { version = "^0.4", default-features = false }
|
||||||
rand = { version = "0.8.5", default-features = false }
|
rand = { version = "0.8.5", default-features = false }
|
||||||
static_cell = { version = "2", features = ["nightly"]}
|
static_cell = { version = "2", features = ["nightly"]}
|
||||||
|
@ -23,7 +23,7 @@ cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-sing
|
|||||||
cortex-m-rt = "0.7.0"
|
cortex-m-rt = "0.7.0"
|
||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
rand_core = { version = "0.6.3", default-features = false }
|
rand_core = { version = "0.6.3", default-features = false }
|
||||||
embedded-io-async = { version = "0.6.0" }
|
embedded-io-async = { version = "0.6.0" }
|
||||||
static_cell = { version = "2", features = ["nightly"]}
|
static_cell = { version = "2", features = ["nightly"]}
|
||||||
|
@ -20,7 +20,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
|
|
||||||
micromath = "2.0.0"
|
micromath = "2.0.0"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
static_cell = { version = "2", features = ["nightly"]}
|
static_cell = { version = "2", features = ["nightly"]}
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
@ -19,7 +19,7 @@ cortex-m-rt = "0.7.0"
|
|||||||
embedded-hal = "0.2.6"
|
embedded-hal = "0.2.6"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
static_cell = { version = "2", features = ["nightly"]}
|
static_cell = { version = "2", features = ["nightly"]}
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
@ -25,7 +25,7 @@ embedded-hal = "0.2.6"
|
|||||||
embedded-storage = "0.3.0"
|
embedded-storage = "0.3.0"
|
||||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||||
heapless = { version = "0.7.5", default-features = false }
|
heapless = { version = "0.8", default-features = false }
|
||||||
chrono = { version = "^0.4", default-features = false }
|
chrono = { version = "^0.4", default-features = false }
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
@ -10,7 +10,7 @@ stm32f103c8 = ["embassy-stm32/stm32f103c8", "not-gpdma"]
|
|||||||
stm32f429zi = ["embassy-stm32/stm32f429zi", "chrono", "eth", "stop", "can", "not-gpdma", "dac-adc-pin", "rng"]
|
stm32f429zi = ["embassy-stm32/stm32f429zi", "chrono", "eth", "stop", "can", "not-gpdma", "dac-adc-pin", "rng"]
|
||||||
stm32g071rb = ["embassy-stm32/stm32g071rb", "cm0", "not-gpdma", "dac-adc-pin"]
|
stm32g071rb = ["embassy-stm32/stm32g071rb", "cm0", "not-gpdma", "dac-adc-pin"]
|
||||||
stm32c031c6 = ["embassy-stm32/stm32c031c6", "cm0", "not-gpdma"]
|
stm32c031c6 = ["embassy-stm32/stm32c031c6", "cm0", "not-gpdma"]
|
||||||
stm32g491re = ["embassy-stm32/stm32g491re", "chrono", "not-gpdma", "rng"]
|
stm32g491re = ["embassy-stm32/stm32g491re", "chrono", "stop", "not-gpdma", "rng"]
|
||||||
stm32h755zi = ["embassy-stm32/stm32h755zi-cm7", "chrono", "not-gpdma", "eth", "dac-adc-pin", "rng"]
|
stm32h755zi = ["embassy-stm32/stm32h755zi-cm7", "chrono", "not-gpdma", "eth", "dac-adc-pin", "rng"]
|
||||||
stm32h753zi = ["embassy-stm32/stm32h753zi", "chrono", "not-gpdma", "eth", "rng"]
|
stm32h753zi = ["embassy-stm32/stm32h753zi", "chrono", "not-gpdma", "eth", "rng"]
|
||||||
stm32h7a3zi = ["embassy-stm32/stm32h7a3zi", "not-gpdma", "rng"]
|
stm32h7a3zi = ["embassy-stm32/stm32h7a3zi", "not-gpdma", "rng"]
|
||||||
|
Reference in New Issue
Block a user