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: STM32_F103-C8T6basecanblink_led
Fork of mbed-dev 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));
}
