mirror of
https://github.com/esp-rs/esp-idf-hal.git
synced 2025-10-02 14:44:51 +00:00
Clippy
This commit is contained in:
parent
c0bea15f6e
commit
f49233ad22
@ -760,7 +760,7 @@ impl<Dir> I2sDriver<'_, Dir> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Borrow the I2S driver by a reference
|
/// 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) })
|
I2sDriverRef(unsafe { NonNull::new_unchecked(self) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1222,7 +1222,7 @@ impl I2sDriver<'_, I2sBiDir> {
|
|||||||
/// It is safe to use the two parts separately
|
/// It is safe to use the two parts separately
|
||||||
/// - esp-idf guarantees thread safety
|
/// - esp-idf guarantees thread safety
|
||||||
/// - esp-idf-hal guarantees asynchronous 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
|
// Safe because self cannot be null
|
||||||
let this = unsafe { NonNull::new_unchecked(self) };
|
let this = unsafe { NonNull::new_unchecked(self) };
|
||||||
|
|
||||||
|
@ -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
|
/// For more information, refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/freertos-smp.html#critical-sections
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[link_section = ".iram1.interrupt_cs_enter"]
|
#[link_section = ".iram1.interrupt_cs_enter"]
|
||||||
pub fn enter(&self) -> IsrCriticalSectionGuard {
|
pub fn enter(&self) -> IsrCriticalSectionGuard<'_> {
|
||||||
enter(self);
|
enter(self);
|
||||||
|
|
||||||
IsrCriticalSectionGuard(self)
|
IsrCriticalSectionGuard(self)
|
||||||
|
@ -530,7 +530,7 @@ impl CriticalSection {
|
|||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[link_section = ".iram1.cs_enter"]
|
#[link_section = ".iram1.cs_enter"]
|
||||||
pub fn enter(&self) -> CriticalSectionGuard {
|
pub fn enter(&self) -> CriticalSectionGuard<'_> {
|
||||||
enter(self);
|
enter(self);
|
||||||
|
|
||||||
CriticalSectionGuard(self)
|
CriticalSectionGuard(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user