Make sure busses are running before devices are initialized
Signed-off-by: Keith Packard <keithp@keithp.com>
- /*
- * Reduce the transient on the ignite pins at startup by
- * pulling the pins low as soon as possible at power up
- */
- ao_ignite_set_pins();
-
+#if HAS_STACK_GUARD
+ ao_mpu_init();
+#endif
+ ao_task_init();
+
/* Turn on the red LED until the system is stable */
ao_led_init(LEDS_AVAILABLE);
ao_led_on(AO_LED_RED);
/* Turn on the red LED until the system is stable */
ao_led_init(LEDS_AVAILABLE);
ao_led_on(AO_LED_RED);
+
+ ao_spi_init();
+ ao_exti_init();
- ao_spi_init();
- ao_exti_init();
ao_flight_init();
ao_log_init();
ao_report_init();
ao_flight_init();
ao_log_init();
ao_report_init();
ao_usb_init();
ao_telemetry_init();
ao_radio_init();
ao_packet_slave_init(TRUE);
ao_usb_init();
ao_telemetry_init();
ao_radio_init();
ao_packet_slave_init(TRUE);
ao_config_init();
ao_start_scheduler();
}
ao_config_init();
ao_start_scheduler();
}