Skip to content

Commit de3234c

Browse files
committed
Stop drivers checking DEVICE_EMAC
Checking DEVICE_EMAC is problematic - particularly for the Odin W2 where apps have been shutting this off to disable the Wi-fi interface. Make drivers check a locally-relevant flag instead, pending new thoughts on how to achieve application/test-relevant flagging for XXX:get_default_instance() being provided by a system. However that is achieved, drivers do require a flag set purely by the target - they mustn't be tripped up by an add-on module providing itself as the system's default EMAC.
1 parent 2241034 commit de3234c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

features/netsocket/emac-drivers/TARGET_Freescale/k64f_emac.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#include "netsocket/nsapi_types.h"
4343
#include "mbed_shared_queues.h"
4444

45-
#if DEVICE_EMAC
45+
#ifdef ENET_BASE
4646

4747
#include "fsl_phy.h"
4848

@@ -614,7 +614,7 @@ MBED_WEAK EMAC &EMAC::get_default_instance() {
614614
* @}
615615
*/
616616

617-
#endif // DEVICE_EMAC
617+
#endif // ENET_BASE
618618

619619
/* --------------------------------- End Of File ------------------------------ */
620620

features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "mbed_shared_queues.h"
88
#include "netsocket/nsapi_types.h"
99

10-
#if DEVICE_EMAC
10+
#ifdef ETH_BASE
1111

1212
#include "stm32xx_emac_config.h"
1313
#include "stm32xx_emac.h"

0 commit comments

Comments
 (0)