This commit is contained in:
ivmarkov 2025-06-07 07:44:36 +00:00
parent c0bea15f6e
commit f49233ad22
3 changed files with 4 additions and 4 deletions

View File

@ -760,7 +760,7 @@ impl<Dir> I2sDriver<'_, Dir> {
}
/// Borrow the I2S driver by a reference
pub fn as_ref(&mut self) -> I2sDriverRef<Dir> {
pub fn as_ref(&mut self) -> I2sDriverRef<'_, Dir> {
I2sDriverRef(unsafe { NonNull::new_unchecked(self) })
}
}
@ -1222,7 +1222,7 @@ impl I2sDriver<'_, I2sBiDir> {
/// It is safe to use the two parts separately
/// - esp-idf guarantees thread safety
/// - esp-idf-hal guarantees asynchronous safety
pub fn split(&mut self) -> (I2sDriverRef<I2sRx>, I2sDriverRef<I2sTx>) {
pub fn split(&mut self) -> (I2sDriverRef<'_, I2sRx>, I2sDriverRef<'_, I2sTx>) {
// Safe because self cannot be null
let this = unsafe { NonNull::new_unchecked(self) };

View File

@ -242,7 +242,7 @@ impl IsrCriticalSection {
/// For more information, refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/freertos-smp.html#critical-sections
#[inline(always)]
#[link_section = ".iram1.interrupt_cs_enter"]
pub fn enter(&self) -> IsrCriticalSectionGuard {
pub fn enter(&self) -> IsrCriticalSectionGuard<'_> {
enter(self);
IsrCriticalSectionGuard(self)

View File

@ -530,7 +530,7 @@ impl CriticalSection {
#[inline(always)]
#[link_section = ".iram1.cs_enter"]
pub fn enter(&self) -> CriticalSectionGuard {
pub fn enter(&self) -> CriticalSectionGuard<'_> {
enter(self);
CriticalSectionGuard(self)