[lib][minip] add a mechanism to wait for the stack to be configured

Configured in this case means an ip address assigned and a nic
installed.
This commit is contained in:
Travis Geiselbrecht
2021-05-28 17:06:00 -07:00
committed by Travis Geiselbrecht
parent 9caf62273c
commit fe28bd8a95
13 changed files with 152 additions and 66 deletions

View File

@@ -123,13 +123,13 @@ void target_init(void) {
eth_init(mac_addr, PHY_KSZ8721);
/* start minip */
minip_set_macaddr(mac_addr);
minip_set_eth(stm32_eth_send_minip_pkt, NULL, mac_addr);
uint32_t ip_addr = IPV4(192, 168, 0, 98);
uint32_t ip_mask = IPV4(255, 255, 255, 0);
uint32_t ip_gateway = IPV4_NONE;
minip_init(stm32_eth_send_minip_pkt, NULL, ip_addr, ip_mask, ip_gateway);
minip_start_static(ip_addr, ip_mask, ip_gateway);
#endif
#if WITH_LIB_FS_SPIFS

View File

@@ -67,13 +67,13 @@ void target_init(void) {
eth_init(mac_addr, PHY_DP83848);
/* start minip */
minip_set_macaddr(mac_addr);
minip_set_eth(stm32_eth_send_minip_pkt, NULL, mac_addr);
uint32_t ip_addr = IPV4(192, 168, 0, 99);
uint32_t ip_mask = IPV4(255, 255, 255, 0);
uint32_t ip_gateway = IPV4_NONE;
minip_init(stm32_eth_send_minip_pkt, NULL, ip_addr, ip_mask, ip_gateway);
minip_start_static(ip_addr, ip_mask, ip_gateway);
#endif
TRACE_EXIT;

View File

@@ -64,13 +64,13 @@ void target_init(void) {
eth_init(mac_addr, PHY_LAN8742A);
/* start minip */
minip_set_macaddr(mac_addr);
minip_set_eth(stm32_eth_send_minip_pkt, NULL, mac_addr);
uint32_t ip_addr = IPV4(192, 168, 0, 98);
uint32_t ip_mask = IPV4(255, 255, 255, 0);
uint32_t ip_gateway = IPV4_NONE;
minip_init(stm32_eth_send_minip_pkt, NULL, ip_addr, ip_mask, ip_gateway);
minip_start_static(ip_addr, ip_mask, ip_gateway);
#endif
// start usb