Fix stm32 ethernet
This commit is contained in:
parent
3d96b10b0c
commit
fc1ef4947d
@ -6,8 +6,8 @@ use core::ptr;
|
||||
use embassy::interrupt::{Interrupt, InterruptExt};
|
||||
|
||||
/// # Safety
|
||||
/// When types implementing this trait are used with `Peripheral` or `PeripheralMutex`,
|
||||
/// their lifetime must not end without first calling `Drop` on the `Peripheral` or `PeripheralMutex`.
|
||||
/// When types implementing this trait are used with `PeripheralMutex`,
|
||||
/// no fields referenced by `on_interrupt`'s lifetimes must end without first calling `Drop` on the `PeripheralMutex`.
|
||||
pub unsafe trait PeripheralStateUnchecked {
|
||||
type Interrupt: Interrupt;
|
||||
fn on_interrupt(&mut self);
|
||||
|
@ -5,8 +5,8 @@ use core::ptr;
|
||||
use embassy::interrupt::{Interrupt, InterruptExt};
|
||||
|
||||
/// # Safety
|
||||
/// When types implementing this trait are used with `Peripheral` or `PeripheralMutex`,
|
||||
/// their lifetime must not end without first calling `Drop` on the `Peripheral` or `PeripheralMutex`.
|
||||
/// When types implementing this trait are used with `Peripheral`,
|
||||
/// no fields referenced by `on_interrupt`'s lifetimes must end without first calling `Drop` on the `Peripheral`.
|
||||
pub unsafe trait PeripheralStateUnchecked {
|
||||
type Interrupt: Interrupt;
|
||||
fn on_interrupt(&self);
|
||||
|
@ -343,7 +343,8 @@ impl<'d, const TX: usize, const RX: usize> Inner<'d, TX, RX> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'d, const TX: usize, const RX: usize> PeripheralState for Inner<'d, TX, RX> {
|
||||
// SAFETY: The lifetime of `Inner` is only due to `PhantomData`; it isn't actually referencing any data with that lifetime.
|
||||
unsafe impl<'d, const TX: usize, const RX: usize> PeripheralStateUnchecked for Inner<'d, TX, RX> {
|
||||
type Interrupt = crate::interrupt::ETH;
|
||||
|
||||
fn on_interrupt(&mut self) {
|
||||
|
Loading…
Reference in New Issue
Block a user