This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] SW-EK-TM4C1294XL:如何将静态 IP 与 Enet_IO 配合使用?

Guru**** 2524550 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/790063/sw-ek-tm4c1294xl-how-to-use-static-ip-with-enet_io

器件型号:SW-EK-TM4C1294XL

您好!

我尝试使用以太网开发一个项目。  我采用了 enet_io 的示例代码、并将代码更改为使用静态 IP、如下所示

添加了以下代码

uint32_t gStaticIPaddr;
uint32_t gNetMask;
uint32_t gWGaddr;

//将 IP 地址设置为192.168.100.9

   gStaticIPaddr= 0xC0A86409;           //192->0xc0、168->A8100--64 192.168.100.9
    gNetMask=0xFFFFFF00;
    gWGaddr=0;
   //
   //使用 DHCP 初始化 lwIP 库。
   //
   lwIPInit (g_ui32SysClock、pui8MACArray、gStaticIPaddr、gNetMask、gWGaddr、 ipaddr_use_static);
但是、代码卡在"waitng for IP address"中
感谢你的帮助
此致、
Ramesh