Skip to content

Commit 0d00be3

Browse files
committed
Add the function declarations of WEAK attribute to use LWIP on GR-LYCHEE
I added the function declarations of Ethernet functions that have a WEAK attribute. Although several Ethernet functions was called in rza1_emac.c, GR-LYCHEE don't have Ethernert feature. But there may be case that GR-LYCHEE uses LWIP feature. In this case, since GR-LYCHEE will occur the build error, I addressed the error by defining the functions with a WEAK attribute. For reason of WEAK attribute, there is no influence in GR-PEACH and VK_RZ_A1H that have Ethernet feature.
1 parent 9cbd678 commit 0d00be3

File tree

1 file changed

+62
-0
lines changed
  • features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_RZ_A1XX

1 file changed

+62
-0
lines changed

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_RZ_A1XX/rza1_emac.c

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,73 @@
55
#include "mbed_interface.h"
66
#include "ethernet_api.h"
77
#include "ethernetext_api.h"
8+
#include "platform/mbed_toolchain.h"
89

910
#define RECV_TASK_PRI (osPriorityNormal)
1011
#define PHY_TASK_PRI (osPriorityNormal)
1112
#define PHY_TASK_WAIT (200)
1213

14+
WEAK int ethernetext_init(ethernet_cfg_t *p_ethcfg)
15+
{
16+
return -1;
17+
}
18+
19+
WEAK void ethernetext_start_stop(int32_t mode)
20+
{
21+
}
22+
23+
WEAK int ethernetext_chk_link_mode(void)
24+
{
25+
return NEGO_FAIL;
26+
}
27+
28+
WEAK void ethernetext_set_link_mode(int32_t link)
29+
{
30+
}
31+
32+
WEAK int ethernet_init(void)
33+
{
34+
return -1;
35+
}
36+
37+
WEAK void ethernet_free(void)
38+
{
39+
}
40+
41+
WEAK int ethernet_write(const char *data, int size)
42+
{
43+
return 0;
44+
}
45+
46+
WEAK int ethernet_send(void)
47+
{
48+
return 0;
49+
}
50+
51+
WEAK int ethernet_receive(void)
52+
{
53+
return 0;
54+
}
55+
56+
WEAK int ethernet_read(char *data, int size)
57+
{
58+
return 0;
59+
}
60+
61+
WEAK void ethernet_address(char *mac)
62+
{
63+
}
64+
65+
WEAK int ethernet_link(void)
66+
{
67+
return 0;
68+
}
69+
70+
WEAK void ethernet_set_link(int speed, int duplex)
71+
{
72+
}
73+
74+
1375
/* memory */
1476
static sys_sem_t recv_ready_sem; /* receive ready semaphore */
1577

0 commit comments

Comments
 (0)