struct mg_wifi_data wifi;
void *bus;
struct mg_tcpip_driver_cyw_firmware *fw;
- bool hs; // use chip "high-speed" mode; otherwise SPI CPOL0 CPHA0 (DS 4.2.3 Table 6)
+ bool hs; // use chip "high-speed" mode; otherwise SPI CPOL0 CPHA0 (DS 4.2.3 Table 6)
};
-#if 0
-#define MG_TCPIP_DRIVER_INIT(mgr) \
- do { \
- static struct mg_tcpip_driver_cyw_data driver_data_; \
- static struct mg_tcpip_if mif_; \
- MG_SET_WIFI_CONFIG(&driver_data_); \
- mif_.ip = MG_TCPIP_IP; \
- mif_.mask = MG_TCPIP_MASK; \
- mif_.gw = MG_TCPIP_GW; \
- mif_.driver = &mg_tcpip_driver_pico_w; \
- mif_.driver_data = &driver_data_; \
- mif_.recv_queue.size = 8192; \
- mif_.mac[0] = 2; /* MAC read from OTP at driver init */ \
- mg_tcpip_init(mgr, &mif_); \
+#define MG_TCPIP_DRIVER_INIT(mgr) \
+ do { \
+ static struct mg_tcpip_driver_cyw_data driver_data_; \
+ static struct mg_tcpip_if mif_; \
+ MG_SET_WIFI_CONFIG(&driver_data_); \
+ mif_.ip = MG_TCPIP_IP; \
+ mif_.mask = MG_TCPIP_MASK; \
+ mif_.gw = MG_TCPIP_GW; \
+ mif_.driver = &mg_tcpip_driver_cyw; \
+ mif_.driver_data = &driver_data_; \
+ mif_.recv_queue.size = 8192; \
+ mif_.mac[0] = 2; /* MAC read from OTP at driver init */ \
+ mg_tcpip_init(mgr, &mif_); \
MG_INFO(("Driver: cyw, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0)
-#endif
#endif
struct mg_wifi_data wifi;
void *bus;
struct mg_tcpip_driver_cyw_firmware *fw;
- bool hs; // use chip "high-speed" mode; otherwise SPI CPOL0 CPHA0 (DS 4.2.3 Table 6)
+ bool hs; // use chip "high-speed" mode; otherwise SPI CPOL0 CPHA0 (DS 4.2.3 Table 6)
};
-#if 0
-#define MG_TCPIP_DRIVER_INIT(mgr) \
- do { \
- static struct mg_tcpip_driver_cyw_data driver_data_; \
- static struct mg_tcpip_if mif_; \
- MG_SET_WIFI_CONFIG(&driver_data_); \
- mif_.ip = MG_TCPIP_IP; \
- mif_.mask = MG_TCPIP_MASK; \
- mif_.gw = MG_TCPIP_GW; \
- mif_.driver = &mg_tcpip_driver_pico_w; \
- mif_.driver_data = &driver_data_; \
- mif_.recv_queue.size = 8192; \
- mif_.mac[0] = 2; /* MAC read from OTP at driver init */ \
- mg_tcpip_init(mgr, &mif_); \
+#define MG_TCPIP_DRIVER_INIT(mgr) \
+ do { \
+ static struct mg_tcpip_driver_cyw_data driver_data_; \
+ static struct mg_tcpip_if mif_; \
+ MG_SET_WIFI_CONFIG(&driver_data_); \
+ mif_.ip = MG_TCPIP_IP; \
+ mif_.mask = MG_TCPIP_MASK; \
+ mif_.gw = MG_TCPIP_GW; \
+ mif_.driver = &mg_tcpip_driver_cyw; \
+ mif_.driver_data = &driver_data_; \
+ mif_.recv_queue.size = 8192; \
+ mif_.mac[0] = 2; /* MAC read from OTP at driver init */ \
+ mg_tcpip_init(mgr, &mif_); \
MG_INFO(("Driver: cyw, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0)
-#endif
#endif