drv_ethernet.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #ifndef __DEV_ETHERNET_H__
  11. #define __DEV_ETHERNET_H__
  12. /* Includes ------------------------------------------------------------------*/
  13. #include "enc28j60.h"
  14. /* Exported types ------------------------------------------------------------*/
  15. /* Exported constants --------------------------------------------------------*/
  16. /* Exported macro ------------------------------------------------------------*/
  17. #define ETH_ADDR_LEN (6)
  18. #define ETH_CLK_MAX (10000000) /* Should be more than 8 Mz (Errata 1) */
  19. //#define ETH_HALF_DUPLEX
  20. #define ETH_PERIOD_WAIT_INIT (RT_TICK_PER_SECOND/100)
  21. #define ETH_PERIOD_WAIT_TX (RT_TICK_PER_SECOND/100)
  22. #define ETH_SPI_RX_SKIP (1)
  23. #define ETH_RESET_PORT (gpioPortB)
  24. #define ETH_RESET_PIN (9)
  25. #define ETH_INT_PORT (gpioPortB)
  26. #define ETH_INT_PIN (10)
  27. /* Exported functions ------------------------------------------------------- */
  28. rt_err_t efm_hw_eth_init(void);
  29. #endif /* __DEV_ETHERNET_H__ */