void app_init(app_configuration *conf) { app_set_configuration(conf); switch (appconf.app_to_use) { case APP_PPM: app_ppm_start(); break; case APP_ADC: app_adc_start(true); break; case APP_UART: hw_stop_i2c(); app_uartcomm_start(); break; case APP_PPM_UART: hw_stop_i2c(); app_ppm_start(); app_uartcomm_start(); break; case APP_ADC_UART: hw_stop_i2c(); app_adc_start(false); app_uartcomm_start(); break; case APP_NUNCHUK: app_nunchuk_start(); break; case APP_NRF: nrf_driver_init(); break; case APP_CUSTOM: #ifdef USE_APP_STEN hw_stop_i2c(); app_sten_init(); #endif #ifdef USE_APP_GURGALOF app_gurgalof_init(); #endif break; default: break; } }
/**@brief Function for initializing IP stack. * * @details Initialize the IP Stack and its driver. */ static void ip_stack_init(void) { uint32_t err_code; err_code = ipv6_medium_eui64_get(m_ipv6_medium.ipv6_medium_instance_id, \ &eui64_local_iid); APP_ERROR_CHECK(err_code); err_code = nrf_mem_init(); APP_ERROR_CHECK(err_code); //Initialize LwIP stack. lwip_init(); //Initialize LwIP stack driver. err_code = nrf_driver_init(); APP_ERROR_CHECK(err_code); }