当前位置:网站首页>关于STM32使用LAN8720A插拔网线重连
关于STM32使用LAN8720A插拔网线重连
2022-06-25 13:17:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
关于STM32使用LAN8720A插拔网线重连
其实在做这个功能的时候大家一定要心平气和,不要认为有多复杂,多看DATASHEET,当然后面会遇到一些问题,所以在踩过坑之后,过了差不多一年了,也算是回过头来做个记录吧。 1.关于LAN8720的手册解读 通过查阅lan8720的数据收册:
标黄部分,在寄存器映射中第一个寄存器为基本状态寄存器,然后我们通过查阅这个寄存器发现,
在该寄存器的bit2中说明了,当检测网线插入的时候该位为1,否则为0。知道这个那就好办了,我们可以根据这个状态位去判断网线的接入状态,然后去决定是否行关于以太网的操作。
2.程序实现 在我的程序规划中主要涉及一下函数: 1.这个函数放到While循环中,或者某一时基的中断函数中:
2.该函数放到Net_Rest_Connect函数中
3.Net_Rest_Connect函数
这里在判断到网线连接之后,进行协议栈的初始化以及TCP服务器的初始化操作。
4.附上工程链接:https://download.csdn.net/download/tiange1996/85045262
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/151704.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢

Implementation of a small book system

leetcode:456. 132 模式【单调栈】

Graph contractual learning with augmentations

[pit avoidance refers to "difficult"] antd cascader implements new customized functions

NR-ARFCN和信道栅格、同步栅格和GSCN

k线图24种经典图解(影线篇)

Kubernetes cluster construction of multiple ECS

数据采集系统网关采集工厂效率

Rust, the best choice for programmers to start a business?

The starting point for learning programming.
随机推荐
The starting point for learning programming.
历史上的今天:网易成立;首届消费电子展召开;世界上第一次网络直播
一次性讲清楚 Handler 可能导致的内存泄漏和解决办法 | 开发者说·DTalk
[pit avoidance means "difficult"] actionref current. Reload() does not take effect
戴尔电脑cpu温度过高怎么办
[proteus simulation] 51 MCU +ds1302+lcd1602 display
Qt内存映射
leetcode:456. 132 mode [monotone stack]
Nova组件源码分析之冷迁移与Resize
Drago Education - typescript learning
mysql数据库压缩备份_Mysql备份压缩及恢复数据库方法总结
Explanation of a textbook question
腾讯云搭建Socks5多IP代理服务器实现游戏单窗口单IP完美搭建教程附带工具「建议收藏」
VGA display of de2-115 FPGA development board
Numpy库使用入门
On the compatibility of the disabled attribute of input on the mobile terminal
Prototype and prototype chain - constructor and instanceof
使用调试工具调试博图TCP连接所遇到的问题
Solution to Nacos' failure to modify the configuration file mysql8.0
À propos du stockage des données en mémoire