Skip to content

Commit 3c22676

Browse files
committed
Fix stm32f1xx-hal interrupt handler
1 parent 656a8e5 commit 3c22676

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub struct InterruptReason {
6464
pub tx: bool,
6565
/// A DMA error occured.
6666
pub dma_error: bool,
67-
#[cfg(feature = "ptp")]
67+
#[cfg(all(feature = "ptp", not(feature = "stm32f1xx-hal")))]
6868
/// The target time configured for PTP has
6969
/// passed.
7070
pub time_passed: bool,
@@ -78,14 +78,14 @@ pub struct InterruptReason {
7878
pub fn eth_interrupt_handler() -> InterruptReason {
7979
let dma = EthernetDMA::interrupt_handler();
8080

81-
#[cfg(feature = "ptp")]
81+
#[cfg(all(feature = "ptp", not(feature = "stm32f1xx-hal")))]
8282
let is_time_trigger = EthernetPTP::interrupt_handler();
8383

8484
InterruptReason {
8585
rx: dma.is_rx,
8686
tx: dma.is_tx,
8787
dma_error: dma.is_error,
88-
#[cfg(feature = "ptp")]
88+
#[cfg(all(feature = "ptp", not(feature = "stm32f1xx-hal")))]
8989
time_passed: is_time_trigger,
9090
}
9191
}

0 commit comments

Comments
 (0)