mirror of
https://github.com/micropython/micropython.git
synced 2025-12-13 08:20:13 +01:00
rp2,extmod/cyw43: Move the LWIP responder fix into common CYW43 config.
This means the fix from dd1465e7 will also apply to stm32 and mimxrt ports that use CYW43. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
@@ -107,4 +107,20 @@ static inline void cyw43_delay_ms(uint32_t ms) {
|
||||
}
|
||||
}
|
||||
|
||||
#if LWIP_MDNS_RESPONDER == 1
|
||||
|
||||
// Hook for any additional TCP/IP initialization than needs to be done.
|
||||
// Called after the netif specified by `itf` has been set up.
|
||||
#ifndef CYW43_CB_TCPIP_INIT_EXTRA
|
||||
#define CYW43_CB_TCPIP_INIT_EXTRA(self, itf) mdns_resp_add_netif(&self->netif[itf], mod_network_hostname_data)
|
||||
#endif
|
||||
|
||||
// Hook for any additional TCP/IP deinitialization than needs to be done.
|
||||
// Called before the netif specified by `itf` is removed.
|
||||
#ifndef CYW43_CB_TCPIP_DEINIT_EXTRA
|
||||
#define CYW43_CB_TCPIP_DEINIT_EXTRA(self, itf) mdns_resp_remove_netif(&self->netif[itf])
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_INCLUDED_EXTMOD_CYW43_CONFIG_COMMON_H
|
||||
|
||||
@@ -103,20 +103,4 @@ uint cyw43_get_pin_wl(cyw43_pin_index_t pin_id);
|
||||
#define cyw43_free m_tracked_free
|
||||
#endif
|
||||
|
||||
#if LWIP_MDNS_RESPONDER == 1
|
||||
|
||||
// Hook for any additional TCP/IP initialization than needs to be done.
|
||||
// Called after the netif specified by `itf` has been set up.
|
||||
#ifndef CYW43_CB_TCPIP_INIT_EXTRA
|
||||
#define CYW43_CB_TCPIP_INIT_EXTRA(self, itf) mdns_resp_add_netif(&self->netif[itf], mod_network_hostname_data)
|
||||
#endif
|
||||
|
||||
// Hook for any additional TCP/IP deinitialization than needs to be done.
|
||||
// Called before the netif specified by `itf` is removed.
|
||||
#ifndef CYW43_CB_TCPIP_DEINIT_EXTRA
|
||||
#define CYW43_CB_TCPIP_DEINIT_EXTRA(self, itf) mdns_resp_remove_netif(&self->netif[itf])
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_INCLUDED_RP2_CYW43_CONFIGPORT_H
|
||||
|
||||
Reference in New Issue
Block a user