Skip to content

Commit b53bedb

Browse files
author
Antti Kauppila
committed
Fixed Realtek test build
1 parent bc76c2a commit b53bedb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/rtw_emac.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <stdio.h>
2020
#include "mbed_assert.h"
2121
#include "mbed_events.h"
22+
#include "mbed_wait_api.h"
2223

2324
#include "rtw_emac.h"
2425
#include "EMACMemoryManager.h"
@@ -33,7 +34,7 @@
3334

3435
#define RTW_EMAC_MTU_SIZE (1500U)
3536

36-
RTW_EMAC::RTW_EMAC()
37+
RTW_EMAC::RTW_EMAC()
3738
{
3839
set_callback_func((emac_callback)(&RTW_EMAC::wlan_emac_recv), this);
3940
}
@@ -66,7 +67,7 @@ bool RTW_EMAC::get_hwaddr(uint8_t *addr) const
6667
int i;
6768

6869
if (RTW_SUCCESS == wifi_get_mac_address(mac)) {
69-
if (sscanf(mac, "%x:%x:%x:%x:%x:%x",
70+
if (sscanf(mac, "%x:%x:%x:%x:%x:%x",
7071
&val[0], &val[1], &val[2], &val[3], &val[4], &val[5]) != 6) {
7172
printf("Get HW address failed\r\n");
7273
}
@@ -177,7 +178,7 @@ void RTW_EMAC::wlan_emac_recv(void *param, struct netif *netif, uint32_t len)
177178
buf = enet->memory_manager->alloc_heap(len, 0);
178179
if (buf == NULL) {
179180
return;
180-
}
181+
}
181182

182183
enet->memory_manager->set_len(buf, len);
183184
p = buf;
@@ -206,7 +207,7 @@ void mbed_default_mac_address(char *mac) {
206207

207208
void mbed_mac_address(char *mac)
208209
{
209-
char hwaddr[20];
210+
char hwaddr[20];
210211
int val[6];
211212
int i;
212213
if (RTW_SUCCESS == wifi_get_mac_address(hwaddr)) {

0 commit comments

Comments
 (0)