lwip_eth.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef LWIP_ETH_H
  2. #define LWIP_ETH_H
  3. #include "main.h"
  4. //#define USE_DHCP 1 /* enable DHCP, if disabled static address is used */
  5. #define USE_ETH_INTERRUPT
  6. //#define TIMEOUT_CHECK_USE_LWIP
  7. /* MAC address: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
  8. #define MAC_ADDR0 2
  9. #define MAC_ADDR1 0
  10. #define MAC_ADDR2 0
  11. #define MAC_ADDR3 0
  12. #define MAC_ADDR4 0
  13. #define MAC_ADDR5 0
  14. /* static IP address: IP_ADDR0.IP_ADDR1.IP_ADDR2.IP_ADDR3 */
  15. #define IP_ADDR0 192
  16. #define IP_ADDR1 168
  17. #define IP_ADDR2 1
  18. #define IP_ADDR3 40
  19. /* remote IP address: IP_S_ADDR0.IP_S_ADDR1.IP_S_ADDR2.IP_S_ADDR3 */
  20. #define IP_S_ADDR0 192
  21. #define IP_S_ADDR1 168
  22. #define IP_S_ADDR2 1
  23. #define IP_S_ADDR3 10
  24. /* net mask */
  25. #define NETMASK_ADDR0 255
  26. #define NETMASK_ADDR1 255
  27. #define NETMASK_ADDR2 255
  28. #define NETMASK_ADDR3 0
  29. /* gateway address */
  30. #define GW_ADDR0 192
  31. #define GW_ADDR1 168
  32. #define GW_ADDR2 1
  33. #define GW_ADDR3 1
  34. /* MII and RMII mode selection */
  35. #define RMII_MODE // user have to provide the 50 MHz clock by soldering a 50 MHz oscillator
  36. //#define MII_MODE
  37. /* clock the PHY from external 25MHz crystal (only for MII mode) */
  38. #ifdef MII_MODE
  39. #define PHY_CLOCK_MCO
  40. #endif
  41. #ifdef USE_DHCP
  42. /* dhcp_task */
  43. void dhcp_task(void *pvParameters);
  44. #endif /* USE_DHCP */
  45. void lwip_eth_setup(void);
  46. #endif /* NETCONF_H */