1234567891011121314151617181920212223242526272829303132 |
- #ifndef __LWIP_INIT_H
- #define __LWIP_INIT_H
- #include "lwip/netif.h"
- #include "lwip/opt.h"
- #include "lwip/tcpip.h"
- #include "netif/etharp.h"
- #include <stdint.h>
- #include <stdio.h>
- #ifdef USE_DHCP
- #include "lwip/dhcp.h"
- #include "lwip/prot/dhcp.h"
- #endif
- #include "dm9k.h"
- #include "ethernetif_dm9k.h"
- #include "ethernetif_eth.h"
- #include "stm32f4x7_phy.h"
- #define LWIP_MAX_DHCP_TRIES 4 // DHCP服务器最大重试次数
- #define DHCP_OFF (uint8_t)0
- #define DHCP_START (uint8_t)1
- #define DHCP_WAIT_ADDRESS (uint8_t)2
- #define DHCP_ADDRESS_ASSIGNED (uint8_t)3
- #define DHCP_TIMEOUT (uint8_t)4
- #define DHCP_LINK_DOWN (uint8_t)5
- #define DHCP_LINK_FAIL (uint8_t)0xff
- void lwip_setup(void);
- #endif /* __LWIP_INIT_H */
|