@@ -304,11 +304,11 @@ STATIC err_t wiznet5k_netif_init(struct netif *netif) {
304
304
305
305
STATIC void wiznet5k_lwip_init (wiznet5k_obj_t * self ) {
306
306
ip_addr_t ipconfig [4 ];
307
- ipconfig [0 ]. addr = 0 ;
308
- ipconfig [1 ]. addr = 0 ;
309
- ipconfig [2 ]. addr = 0 ;
310
- ipconfig [3 ]. addr = 0 ;
311
- netif_add (& self -> netif , & ipconfig [0 ], & ipconfig [1 ], & ipconfig [2 ], self , wiznet5k_netif_init , ethernet_input );
307
+ IP_ADDR4 ( ipconfig [0 ], 0 , 0 , 0 , 0 ) ;
308
+ IP_ADDR4 ( ipconfig [1 ], 0 , 0 , 0 , 0 ) ;
309
+ IP_ADDR4 ( ipconfig [2 ], 0 , 0 , 0 , 0 ) ;
310
+ IP_ADDR4 ( ipconfig [3 ], 0 , 0 , 0 , 0 ) ;
311
+ netif_add (& self -> netif , ip_2_ip4 ( & ipconfig [0 ]), ip_2_ip4 ( & ipconfig [1 ]), ip_2_ip4 ( & ipconfig [2 ]) , self , wiznet5k_netif_init , ethernet_input );
312
312
self -> netif .name [0 ] = 'e' ;
313
313
self -> netif .name [1 ] = '0' ;
314
314
netif_set_default (& self -> netif );
@@ -801,7 +801,7 @@ STATIC mp_obj_t wiznet5k_isconnected(mp_obj_t self_in) {
801
801
wizphy_getphylink () == PHY_LINK_ON
802
802
&& IS_ACTIVE (self )
803
803
#if WIZNET5K_WITH_LWIP_STACK
804
- && self -> netif .ip_addr . addr != 0
804
+ && ip_2_ip4 ( & self -> netif .ip_addr ) -> addr != 0
805
805
#endif
806
806
);
807
807
}
0 commit comments