Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: SPIne CH_Communicatuin_Test CH_Communicatuin_Test2 MCP_SPIne ... more
Fork of mbed-dev-f303 by
Diff: targets/TARGET_Realtek/TARGET_AMEBA/rtw_emac.cpp
- Revision:
 - 174:b96e65c34a4d
 - Parent:
 - 167:e84263d55307
 
--- 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));
     }
    