Ejemplo n.º 1
0
static inline void main_init( void ) {
  mcu_init();
  sys_time_init();
  led_init();
  uart1_init_tx();
  mcu_int_enable();
}
Ejemplo n.º 2
0
static inline void main_init( void ) {
  mcu_init();
  sys_time_register_timer((1./PERIODIC_FREQUENCY), NULL);
  led_init();

  uart1_init_tx();


  /* configure SS pin */
  SetBit(IO0DIR, 20); /* pin is output  */
  SetBit(IO0SET, 20);

  main_init_ssp();
  micromag_init();

  mcu_int_enable();
}
Ejemplo n.º 3
0
/********** 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
}