Skip to content

Commit 281ecee

Browse files
committed
Merge pull request #350 from 0xc0170/dev_k64f_enet_fix
[K64F] enet - IRQ handlers are in the emac (eth) layer
2 parents 37fa662 + 372009f commit 281ecee

File tree

2 files changed

+19
-19
lines changed
  • libraries
    • mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/drivers/enet/src
    • net/eth/lwip-eth/arch/TARGET_K64F

2 files changed

+19
-19
lines changed

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/drivers/enet/src/fsl_enet_irq.c

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/*******************************************************************************
3434
* Variables
3535
******************************************************************************/
36-
extern void *enetIfHandle;
36+
3737

3838
/* Internal irq number*/
3939
typedef enum _enet_irq_number
@@ -81,24 +81,7 @@ uint8_t enetIntMap[kEnetIntNum] =
8181
/*******************************************************************************
8282
* Code
8383
******************************************************************************/
84-
#if defined (K64F12_SERIES) || defined (K70F12_SERIES)
85-
void ENET_Transmit_IRQHandler(void)
86-
{
87-
enet_mac_tx_isr(enetIfHandle);
88-
}
89-
90-
void ENET_Receive_IRQHandler(void)
91-
{
92-
enet_mac_rx_isr(enetIfHandle);
93-
}
94-
95-
#if FSL_FEATURE_ENET_SUPPORT_PTP
96-
void ENET_1588_Timer_IRQHandler(void)
97-
{
98-
enet_mac_ts_isr(enetIfHandle);
99-
}
100-
#endif
101-
#endif
84+
/* The code was moved to k64f mac file (eth) */
10285

10386
/*******************************************************************************
10487
* EOF

libraries/net/eth/lwip-eth/arch/TARGET_K64F/k64f_emac.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
extern IRQn_Type enet_irq_ids[HW_ENET_INSTANCE_COUNT][FSL_FEATURE_ENET_INTERRUPT_COUNT];
2929
extern uint8_t enetIntMap[kEnetIntNum];
30+
extern void *enetIfHandle;
3031

3132
/********************************************************************************
3233
* Internal data
@@ -855,6 +856,22 @@ void eth_arch_disable_interrupts(void) {
855856
interrupt_disable(enet_irq_ids[BOARD_DEBUG_ENET_INSTANCE][enetIntMap[kEnetTxfInt]]);
856857
}
857858

859+
void ENET_Transmit_IRQHandler(void)
860+
{
861+
enet_mac_tx_isr(enetIfHandle);
862+
}
863+
864+
void ENET_Receive_IRQHandler(void)
865+
{
866+
enet_mac_rx_isr(enetIfHandle);
867+
}
868+
869+
#if FSL_FEATURE_ENET_SUPPORT_PTP
870+
void ENET_1588_Timer_IRQHandler(void)
871+
{
872+
enet_mac_ts_isr(enetIfHandle);
873+
}
874+
#endif
858875
/**
859876
* @}
860877
*/

0 commit comments

Comments
 (0)