uc/tcp 如何配置双以太网口 现在ucos的mss配置中只能设置一个主接口 但另一个接口无法使用

lei huang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 31, 2024

aff0db59-08fa-4a9b-8376-c5717f709fad.png

 

NetDevCfg2.MemAddr = 0xFFFF4000u;

NetDevCfg2.MemSize = 0x4000;

Xil_SetTlbAttributes(0xFFFF4000u,NORM_NONCACHE);

NetDevCfg2.BaseAddr = 0xE000C000u;

UCOS_TCPIP_PhyCfgInit(&NetPhyCfg2);

if_nbr2 = NetIF_Add((void*)&NetIF_API_Ether, // (void*)&NetDev_API_GEM, // (void*)&NetDev_BSP_GEM_0, // (void*)&NetDevCfg2, // (void*)&NetPhy_API_ksz9131rnx, // (void*)&NetPhyCfg2, // & err_net);

if (err_net != NET_IF_ERR_NONE)

{ // UCOS_Printf(“UCOS - 初始化 GEM 接口时出错。错误代码 %d\r\n“,err_net);返回 (DEF_FAIL);

 

NetIF_Start(if_nbr2, &err_net);if (err_net != NET_IF_ERR_NONE) { // UCOS_Printf(“UCOS - 启动 GEM 接口时出错。错误代码 %d\r\n“,err_net);返回 (DEF_FAIL);

UCOS_Print(“UCOS - GEM 接口已成功启动。\r\n“);if_init_res = UCOS_TCPIP_IF_Cfg(if_nbr2);

{ // UCOS_Printf(“UCOS - 初始化 GEM 接口时出错。错误代码 %d\r\n“,err_net);返回 (DEF_FAIL);

NetIF_Start(if_nbr2, &err_net);

if (err_net != NET_IF_ERR_NONE) { // UCOS_Printf(“UCOS - 启动 GEM 接口时出错。错误代码 %d\r\n“,err_net);返回 (DEF_FAIL);

NetIF_Start(if_nbr2, &err_net);

 

if_init_res = UCOS_TCPIP_IF_Cfg(if_nbr2);

1 answer

0 votes
lei huang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 31, 2024

.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events