diff options
Diffstat (limited to 'main/init.c')
-rw-r--r-- | main/init.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/init.c b/main/init.c index 08177c7..90f0b1e 100644 --- a/main/init.c +++ b/main/init.c @@ -16,7 +16,7 @@ static void init_stdio() { } static void init_cyw34() { - if (cyw43_arch_init_with_country(CONF_NET_COUNTRY)) + if (cyw43_arch_init_with_country(CFG_NET_COUNTRY)) panic("cyw43_arch_init_with_country failed\n"); } @@ -24,8 +24,8 @@ static void init_wifi() { // enable 'station' mode (connect to an access point instead of acting like one) cyw43_arch_enable_sta_mode(); - // if (cyw43_arch_wifi_connect_timeout_ms(CONF_NET_SSID, CONF_NET_PASS, CONF_NET_AUTH, CONF_NET_CONN_TIMEOUT)) - // panic("cyw43_arch_wifi_connect failed\n"); + if (cyw43_arch_wifi_connect_timeout_ms(CFG_NET_SSID, CFG_NET_PASS, CFG_NET_AUTH, CFG_NET_CONN_TIMEOUT)) + panic("cyw43_arch_wifi_connect failed\n"); printf("connected to Wi-Fi\n"); @@ -35,7 +35,9 @@ static void init_wifi() { static void async_init() { init_cyw34(); init_i2c(); +#ifndef CFG_NET_DISABLE init_wifi(); +#endif xEventGroupSetBits(init_complete, 1); |