static inline void main_init( void ) { hw_init(); sys_time_init(); led_init(); uart0_init_tx(); int_enable(); }
static inline void main_init(void) { mcu_init(); sys_time_register_timer((1. / PERIODIC_FREQUENCY), NULL); uart0_init_tx(); mcu_int_enable(); }
/********** INIT *************************************************************/ void init_fbw( void ) { hw_init(); sys_time_init(); #ifdef LED led_init(); #endif #ifdef USE_UART0 uart0_init_tx(); #endif #ifdef USE_UART1 uart1_init_tx(); #endif #ifdef ADC adc_init(); adc_buf_channel(ADC_CHANNEL_VSUPPLY, &vsupply_adc_buf, DEFAULT_AV_NB_SAMPLE); #endif #ifdef ACTUATORS actuators_init(); /* Load the failsafe defaults */ SetCommands(commands_failsafe); #endif #ifdef RADIO_CONTROL ppm_init(); #endif #ifdef INTER_MCU inter_mcu_init(); #endif #ifdef MCU_SPI_LINK spi_init(); link_mcu_restart(); #endif #ifdef LINK_IMU spi_init(); link_imu_init(); #endif #ifdef CTL_GRZ ctl_grz_init(); #endif #ifndef SINGLE_MCU int_enable(); #endif }