1 /*
2  * Copyright (c) 2006-2022, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date         Author      Notes
8  * 2011-06-22   onelife     Initial creation for using EFM32 USART module
9  */
10 
11 #ifndef __DEV_ETHERNET_H__
12 #define __DEV_ETHERNET_H__
13 
14 /* Includes ------------------------------------------------------------------*/
15 #include "enc28j60.h"
16 
17 /* Exported types ------------------------------------------------------------*/
18 /* Exported constants --------------------------------------------------------*/
19 /* Exported macro ------------------------------------------------------------*/
20 #define ETH_ADDR_LEN            (6)
21 #define ETH_CLK_MAX             (10000000)  /* Should be more than 8 Mz (Errata 1) */
22 //#define ETH_HALF_DUPLEX
23 
24 #define ETH_PERIOD_WAIT_INIT    (RT_TICK_PER_SECOND/100)
25 #define ETH_PERIOD_WAIT_TX      (RT_TICK_PER_SECOND/100)
26 #define ETH_SPI_RX_SKIP         (1)
27 
28 #define ETH_RESET_PORT          (gpioPortB)
29 #define ETH_RESET_PIN           (9)
30 #define ETH_INT_PORT            (gpioPortB)
31 #define ETH_INT_PIN             (10)
32 
33 /* Exported functions ------------------------------------------------------- */
34 rt_err_t efm_hw_eth_init(void);
35 
36 #endif /* __DEV_ETHERNET_H__ */
37