void host_platform_reset_wifi( wiced_bool_t reset_asserted ) { if ( reset_asserted == WICED_TRUE ) { host_platform_power_wifi( WICED_FALSE ); } else { host_platform_power_wifi( WICED_TRUE ); } }
wwd_result_t host_platform_init( void ) { #ifdef USES_RESOURCE_FILESYSTEM platform_filesystem_init(); #endif host_platform_power_wifi( WICED_FALSE ); return WWD_SUCCESS; }
wwd_result_t wwd_bus_init( void ) { wwd_result_t result; result = WWD_SUCCESS; host_platform_power_wifi( WICED_FALSE ); host_platform_power_wifi( WICED_TRUE ); setup_pre_wlan_download(); boot_wlan(); /* * The enabling of SDIO internal clock is done in WLAN firmware. * Doing many access across AXI-bridge without proper sequencing will lead more instability */ setup_dma( ); return result; }
OSStatus host_platform_deinit( void ) { MicoGpioInitialize((mico_gpio_t)WL_RESET, OUTPUT_PUSH_PULL); host_platform_reset_wifi( true ); /* Stop wifi chip in reset */ MicoGpioInitialize((mico_gpio_t)WL_REG, OUTPUT_PUSH_PULL); host_platform_power_wifi( false ); /* Stop wifi chip with regulators off */ platform_reset_wlan_powersave_clock( ); return kNoErr; }
OSStatus host_platform_init( void ) { host_platform_deinit_wlan_powersave_clock( ); #if defined ( MICO_USE_WIFI_RESET_PIN ) platform_gpio_init( &wifi_control_pins[WIFI_PIN_RESET], OUTPUT_PUSH_PULL ); host_platform_reset_wifi( true ); /* Start wifi chip in reset */ #endif #if defined ( MICO_USE_WIFI_POWER_PIN ) platform_gpio_init( &wifi_control_pins[WIFI_PIN_POWER], OUTPUT_PUSH_PULL ); host_platform_power_wifi( false ); /* Start wifi chip with regulators off */ #endif return kNoErr; }
wwd_result_t host_platform_deinit( void ) { host_platform_power_wifi( WICED_FALSE ); return WWD_SUCCESS; }