Miscellaneous pre-release fixes (#883)

* Temporarily disable async `SYSTIMER` implementation, remove mention from `CHANGELOG.md`

* Remove a couple files which are not required

* Fix warning for `sha` examples

* Fix warning for non-C3 devices

* s/interrupt_clear/clear_interrupt/
This commit is contained in:
Jesse Braham 2023-10-31 06:50:54 -07:00 committed by GitHub
parent ff80b69183
commit 9cb8f7e941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 39 additions and 47 deletions

View File

@ -19,8 +19,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add UART support for splitting into TX and RX (#754) - Add UART support for splitting into TX and RX (#754)
- Async support for I2S (#801) - Async support for I2S (#801)
- Async support for PARL_IO (#807) - Async support for PARL_IO (#807)
- Implement `embeded_hal_async::delay::DelayUs` trait for `SYSTIMER` alarms (#812)
- This trait is NOT implemented when the `embassy-time-systick` feature is enabled!
- ETM driver, GPIO ETM (#819) - ETM driver, GPIO ETM (#819)
- (G)DMA AES support (#821) - (G)DMA AES support (#821)
- SYSTIMER ETM functionality (#828) - SYSTIMER ETM functionality (#828)

View File

@ -1 +0,0 @@
rust-toolchain.toml

View File

@ -43,7 +43,7 @@ impl EmbassyTimer {
fn on_interrupt(&self, id: usize) { fn on_interrupt(&self, id: usize) {
critical_section::with(|cs| { critical_section::with(|cs| {
self.interrupt_clear(id); self.clear_interrupt(id);
self.trigger_alarm(id, cs); self.trigger_alarm(id, cs);
}) })
} }
@ -96,11 +96,11 @@ impl EmbassyTimer {
}) })
} }
fn interrupt_clear(&self, id: usize) { fn clear_interrupt(&self, id: usize) {
match id { match id {
0 => self.alarm0.interrupt_clear(), 0 => self.alarm0.clear_interrupt(),
1 => self.alarm1.interrupt_clear(), 1 => self.alarm1.clear_interrupt(),
2 => self.alarm2.interrupt_clear(), 2 => self.alarm2.clear_interrupt(),
_ => {} _ => {}
} }
} }

View File

@ -21,10 +21,9 @@
use core::{cell::RefCell, time::Duration}; use core::{cell::RefCell, time::Duration};
use crate::{ #[cfg(esp32c3)]
gpio::{RTCPin, RTCPinWithResistors}, use crate::gpio::RTCPinWithResistors;
Rtc, use crate::{gpio::RTCPin, Rtc};
};
#[cfg_attr(esp32, path = "rtc/esp32_sleep.rs")] #[cfg_attr(esp32, path = "rtc/esp32_sleep.rs")]
#[cfg_attr(esp32s3, path = "rtc/esp32s3_sleep.rs")] #[cfg_attr(esp32s3, path = "rtc/esp32s3_sleep.rs")]

View File

@ -30,7 +30,7 @@
//! ## Example //! ## Example
//! ```no_run //! ```no_run
//! let source_data = "HELLO, ESPRESSIF!".as_bytes(); //! let source_data = "HELLO, ESPRESSIF!".as_bytes();
//! let mut remaining = source_data.clone(); //! let mut remaining = source_data;
//! let mut hasher = Sha::new(peripherals.SHA, ShaMode::SHA256); //! let mut hasher = Sha::new(peripherals.SHA, ShaMode::SHA256);
//! //!
//! // Short hashes can be created by decreasing the output buffer to the desired //! // Short hashes can be created by decreasing the output buffer to the desired

View File

@ -128,7 +128,7 @@ impl<T, const CHANNEL: u8> Alarm<T, CHANNEL> {
} }
} }
pub fn interrupt_clear(&self) { pub fn clear_interrupt(&self) {
let systimer = unsafe { &*SYSTIMER::ptr() }; let systimer = unsafe { &*SYSTIMER::ptr() };
match CHANNEL { match CHANNEL {
0 => systimer.int_clr.write(|w| w.target0_int_clr().set_bit()), 0 => systimer.int_clr.write(|w| w.target0_int_clr().set_bit()),
@ -272,7 +272,9 @@ impl<T> Alarm<T, 2> {
// interferes with the embassy time driver, which also uses the // interferes with the embassy time driver, which also uses the
// `SYSTIMER` peripheral. Until we come up with a solution, do not // `SYSTIMER` peripheral. Until we come up with a solution, do not
// implement this trait if the `embassy-time-systick` feature is enabled. // implement this trait if the `embassy-time-systick` feature is enabled.
#[cfg(all(feature = "async", not(feature = "embassy-time-systick")))] // #[cfg(all(feature = "async", not(feature = "embassy-time-systick")))]
// HACK: disable `asynch` module *always* until we come up with a solution
#[cfg(not(systimer))]
mod asynch { mod asynch {
use core::{ use core::{
pin::Pin, pin::Pin,
@ -295,7 +297,7 @@ mod asynch {
impl<'a, const N: u8> AlarmFuture<'a, N> { impl<'a, const N: u8> AlarmFuture<'a, N> {
pub(crate) fn new(alarm: &'a Alarm<Periodic, N>) -> Self { pub(crate) fn new(alarm: &'a Alarm<Periodic, N>) -> Self {
alarm.interrupt_clear(); alarm.clear_interrupt();
alarm.enable_interrupt(true); alarm.enable_interrupt(true);
Self { Self {

View File

@ -1,6 +0,0 @@
use std::{env, path::PathBuf};
fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
println!("cargo:rustc-link-search={}", out_dir.display());
}

View File

@ -23,7 +23,7 @@ fn main() -> ! {
let _clocks = ClockControl::boot_defaults(system.clock_control).freeze(); let _clocks = ClockControl::boot_defaults(system.clock_control).freeze();
let source_data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".as_bytes(); let source_data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".as_bytes();
let mut remaining = source_data.clone(); let mut remaining = source_data;
let mut hasher = Sha::new(peripherals.SHA, ShaMode::SHA512); let mut hasher = Sha::new(peripherals.SHA, ShaMode::SHA512);
// Short hashes can be created by decreasing the output buffer to the desired // Short hashes can be created by decreasing the output buffer to the desired

View File

@ -35,7 +35,7 @@ fn main() -> ! {
let alarm0 = syst.alarm0.into_periodic(); let alarm0 = syst.alarm0.into_periodic();
alarm0.set_period(1u32.secs()); alarm0.set_period(1u32.secs());
alarm0.interrupt_clear(); alarm0.clear_interrupt();
alarm0.enable_interrupt(true); alarm0.enable_interrupt(true);
let alarm1 = syst.alarm1; let alarm1 = syst.alarm1;
@ -85,7 +85,7 @@ fn SYSTIMER_TARGET0() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -97,7 +97,7 @@ fn SYSTIMER_TARGET1() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -109,6 +109,6 @@ fn SYSTIMER_TARGET2() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }

View File

@ -35,7 +35,7 @@ fn main() -> ! {
let alarm0 = syst.alarm0.into_periodic(); let alarm0 = syst.alarm0.into_periodic();
alarm0.set_period(1u32.secs()); alarm0.set_period(1u32.secs());
alarm0.interrupt_clear(); alarm0.clear_interrupt();
alarm0.enable_interrupt(true); alarm0.enable_interrupt(true);
let alarm1 = syst.alarm1; let alarm1 = syst.alarm1;
@ -85,7 +85,7 @@ fn SYSTIMER_TARGET0() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -97,7 +97,7 @@ fn SYSTIMER_TARGET1() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -109,6 +109,6 @@ fn SYSTIMER_TARGET2() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }

View File

@ -35,7 +35,7 @@ fn main() -> ! {
let alarm0 = syst.alarm0.into_periodic(); let alarm0 = syst.alarm0.into_periodic();
alarm0.set_period(1u32.secs()); alarm0.set_period(1u32.secs());
alarm0.interrupt_clear(); alarm0.clear_interrupt();
alarm0.enable_interrupt(true); alarm0.enable_interrupt(true);
let alarm1 = syst.alarm1; let alarm1 = syst.alarm1;
@ -85,7 +85,7 @@ fn SYSTIMER_TARGET0() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -97,7 +97,7 @@ fn SYSTIMER_TARGET1() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -109,6 +109,6 @@ fn SYSTIMER_TARGET2() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }

View File

@ -35,7 +35,7 @@ fn main() -> ! {
let alarm0 = syst.alarm0.into_periodic(); let alarm0 = syst.alarm0.into_periodic();
alarm0.set_period(1u32.secs()); alarm0.set_period(1u32.secs());
alarm0.interrupt_clear(); alarm0.clear_interrupt();
alarm0.enable_interrupt(true); alarm0.enable_interrupt(true);
let alarm1 = syst.alarm1; let alarm1 = syst.alarm1;
@ -85,7 +85,7 @@ fn SYSTIMER_TARGET0() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -97,7 +97,7 @@ fn SYSTIMER_TARGET1() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -109,6 +109,6 @@ fn SYSTIMER_TARGET2() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }

View File

@ -23,7 +23,7 @@ fn main() -> ! {
let _clocks = ClockControl::boot_defaults(system.clock_control).freeze(); let _clocks = ClockControl::boot_defaults(system.clock_control).freeze();
let source_data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".as_bytes(); let source_data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".as_bytes();
let mut remaining = source_data.clone(); let mut remaining = source_data;
let mut hasher = Sha::new(peripherals.SHA, ShaMode::SHA512); let mut hasher = Sha::new(peripherals.SHA, ShaMode::SHA512);
// Short hashes can be created by decreasing the output buffer to the desired // Short hashes can be created by decreasing the output buffer to the desired

View File

@ -84,7 +84,7 @@ fn SYSTIMER_TARGET0() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -96,7 +96,7 @@ fn SYSTIMER_TARGET1() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -108,6 +108,6 @@ fn SYSTIMER_TARGET2() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }

View File

@ -23,7 +23,7 @@ fn main() -> ! {
let _clocks = ClockControl::boot_defaults(system.clock_control).freeze(); let _clocks = ClockControl::boot_defaults(system.clock_control).freeze();
let source_data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".as_bytes(); let source_data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".as_bytes();
let mut remaining = source_data.clone(); let mut remaining = source_data;
let mut hasher = Sha::new(peripherals.SHA, ShaMode::SHA512); let mut hasher = Sha::new(peripherals.SHA, ShaMode::SHA512);
// Short hashes can be created by decreasing the output buffer to the desired // Short hashes can be created by decreasing the output buffer to the desired

View File

@ -84,7 +84,7 @@ fn SYSTIMER_TARGET0() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -96,7 +96,7 @@ fn SYSTIMER_TARGET1() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }
@ -108,6 +108,6 @@ fn SYSTIMER_TARGET2() {
.borrow_ref_mut(cs) .borrow_ref_mut(cs)
.as_mut() .as_mut()
.unwrap() .unwrap()
.interrupt_clear() .clear_interrupt()
}); });
} }