lwip_init.h 766 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __LWIP_INIT_H
  2. #define __LWIP_INIT_H
  3. #include "lwip/netif.h"
  4. #include "lwip/opt.h"
  5. #include "lwip/tcpip.h"
  6. #include "netif/etharp.h"
  7. #include <stdint.h>
  8. #include <stdio.h>
  9. #ifdef USE_DHCP
  10. #include "lwip/dhcp.h"
  11. #include "lwip/prot/dhcp.h"
  12. #endif
  13. #include "dm9k.h"
  14. #include "ethernetif_dm9k.h"
  15. #include "ethernetif_eth.h"
  16. #include "stm32f4x7_phy.h"
  17. #define LWIP_MAX_DHCP_TRIES 4 // DHCP服务器最大重试次数
  18. #define DHCP_OFF (uint8_t)0
  19. #define DHCP_START (uint8_t)1
  20. #define DHCP_WAIT_ADDRESS (uint8_t)2
  21. #define DHCP_ADDRESS_ASSIGNED (uint8_t)3
  22. #define DHCP_TIMEOUT (uint8_t)4
  23. #define DHCP_LINK_DOWN (uint8_t)5
  24. #define DHCP_LINK_FAIL (uint8_t)0xff
  25. void lwip_setup(void);
  26. #endif /* __LWIP_INIT_H */