hd_eth.h 846 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef HD_ETH_H
  2. #define HD_ETH_H
  3. #include "stdint.h"
  4. #define DP83848_PHY_ADDRESS 0x1
  5. #define ETH_INIT_FLAG 0x01 /* Ethernet Init Flag */
  6. #define ETH_LINK_FLAG 0x10 /* Ethernet Link Flag */
  7. //IP ADDR
  8. #define IP_ADDR0 192
  9. #define IP_ADDR1 168
  10. #define IP_ADDR2 0
  11. #define IP_ADDR3 48
  12. //MAC ADDR
  13. #define MAC_ADDR0 2
  14. #define MAC_ADDR1 8
  15. #define MAC_ADDR2 4
  16. #define MAC_ADDR3 2
  17. #define MAC_ADDR4 0
  18. #define MAC_ADDR5 0
  19. /*NETMASK*/
  20. #define NETMASK_ADDR0 255
  21. #define NETMASK_ADDR1 255
  22. #define NETMASK_ADDR2 255
  23. #define NETMASK_ADDR3 0
  24. /*Gateway Address*/
  25. #define GW_ADDR0 192
  26. #define GW_ADDR1 168
  27. #define GW_ADDR2 0
  28. #define GW_ADDR3 1
  29. extern uint8_t eth_recFlag;
  30. void LwIP_Pkt_Handle(void);
  31. void ETH_BSP_Config(void);
  32. uint8_t hd_ethGetPhyStatus(void);
  33. void lwIP_Init(void);
  34. #endif