4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-11 03:11:25 +08:00

Merge pull request #1571 from enkiller/enc28j60

[components][drivers]enc28j60 1.默认关闭log打印 2.优化一个未使用的变量
This commit is contained in:
Bernard Xiong 2018-06-26 12:09:48 +08:00 committed by GitHub
commit 7a9cdcd5c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,8 @@
#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
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)
} }
} }
/************************* RT-Thread Device Interface *************************/ /************************* RT-Thread Device Interface *************************/
void enc28j60_isr(void) void enc28j60_isr(void)
{ {