未验证 提交 7a9cdcd5 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #1571 from enkiller/enc28j60

[components][drivers]enc28j60 1.默认关闭log打印 2.优化一个未使用的变量
#include "enc28j60.h" #include "enc28j60.h"
#define NET_TRACE /* #define NET_TRACE */
#define ETH_RX_DUMP /* #define ETH_RX_DUMP */
#define ETH_TX_DUMP /* #define ETH_TX_DUMP */
#ifdef NET_TRACE #ifdef NET_TRACE
#define NET_DEBUG rt_kprintf #define NET_DEBUG rt_kprintf
...@@ -189,10 +189,8 @@ static void enc28j60_interrupt_enable(struct rt_spi_device *spi_device, uint32_t ...@@ -189,10 +189,8 @@ static void enc28j60_interrupt_enable(struct rt_spi_device *spi_device, uint32_t
static rt_bool_t enc28j60_check_link_status(struct rt_spi_device *spi_device) static rt_bool_t enc28j60_check_link_status(struct rt_spi_device *spi_device)
{ {
uint16_t reg; uint16_t reg;
int duplex;
reg = enc28j60_phy_read(spi_device, PHSTAT2); reg = enc28j60_phy_read(spi_device, PHSTAT2);
duplex = reg & PHSTAT2_DPXSTAT;
if (reg & PHSTAT2_LSTAT) if (reg & PHSTAT2_LSTAT)
{ {
...@@ -206,7 +204,6 @@ static rt_bool_t enc28j60_check_link_status(struct rt_spi_device *spi_device) ...@@ -206,7 +204,6 @@ static rt_bool_t enc28j60_check_link_status(struct rt_spi_device *spi_device)
} }
} }
/************************* RT-Thread Device Interface *************************/ /************************* RT-Thread Device Interface *************************/
void enc28j60_isr(void) void enc28j60_isr(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册