当前位置:网站首页>Gd32f4xx UIP protocol stack migration record

Gd32f4xx UIP protocol stack migration record

2022-07-05 23:58:00 madao1234

uIP It's a very small TCP/IP Stack . Use it completely C To write , It can be transplanted to various structures and operating systems , A compiled stack can be in a few KB ROM Or hundreds of bytes RAM Run in .

1、uIP Files that need to be migrated in

First, create a ethernet Folder , The files in the directory after migration are shown in the following figure :
 Insert picture description here
(1)enc28j60.c / enc28j60.h Driver code for Ethernet chip . Please refer to my other article for details :
(2)uip.c / uip.h It is the core code of the protocol stack , from uIP Copy it from the source code .
(3)uip_arp.c / uip_arp.h Realization ARP( Address resolution protocol ) Core code , from uIP Copy it from the source code .
(4)uipopt.h / uip-conf.h yes uip Configuration file of protocol stack , from uIP Copy it from the source code .
(5)tapdev.c / tapdev.h It is the Ethernet driver initialization that needs to be implemented by ourselves 、 send out 、 Receive interface function file .
(6)ethernet.c / ethernet.h It is the processing thread of Ethernet Protocol , The processing thread structure is basically unchanged , You need to implement the processing function yourself .

2、tapdev.c /.h

#
原网站

版权声明
本文为[madao1234]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207052346539669.html