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.
pull/6847/head
Kevin Bracey 2018-03-05 13:47:07 +02:00
parent c1c69be10b
commit d83dec9ea4
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@
#include "netsocket/nsapi_types.h"
#include "mbed_shared_queues.h"
#if DEVICE_EMAC
#ifdef ENET_BASE
#include "fsl_phy.h"
@ -614,7 +614,7 @@ MBED_WEAK EMAC &EMAC::get_default_instance() {
* @}
*/
#endif // DEVICE_EMAC
#endif // ENET_BASE
/* --------------------------------- End Of File ------------------------------ */

View File

@ -7,7 +7,7 @@
#include "mbed_shared_queues.h"
#include "netsocket/nsapi_types.h"
#if DEVICE_EMAC
#ifdef ETH_BASE
#include "stm32xx_emac_config.h"
#include "stm32xx_emac.h"