mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
174:b96e65c34a4d
Parent:
167:e84263d55307
Child:
186:707f6e361f3e
--- a/targets/TARGET_Realtek/TARGET_AMEBA/rtw_emac.cpp	Fri Sep 15 14:59:18 2017 +0100
+++ b/targets/TARGET_Realtek/TARGET_AMEBA/rtw_emac.cpp	Mon Oct 02 15:33:19 2017 +0100
@@ -217,11 +217,8 @@
 {
 
     if (_emac == NULL) {
-        _emac = new emac_interface_t();
-    	if (_emac == NULL) {//new emac_interface_t fail
-        	printf("emac initialization failed\r\n");
-		return NULL;
-    	}
+        _emac = (emac_interface_t*) malloc(sizeof(emac_interface_t));
+        MBED_ASSERT(_emac);
         _emac->hw = NULL;
         memcpy((void*)&_emac->ops, &wlan_emac_interface, sizeof(wlan_emac_interface));
     }