Verified Commit a357a3f6 authored by Rahix's avatar Rahix

feat(lifecycle): Properly reset hardware

Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 944578ca
......@@ -173,6 +173,24 @@ int hardware_init(void)
*/
int hardware_reset(void)
{
card10_init();
/*
* API Dispatcher & API Interrupts
*/
api_interrupt_init();
api_dispatcher_init();
/*
* LEDs
*/
leds_init();
epic_leds_set_rocket(0, 0);
epic_leds_set_rocket(1, 0);
epic_leds_set_rocket(2, 0);
/*
* Display
*/
display_init_slim();
return 0;
}
......@@ -114,10 +114,12 @@ static int do_load(struct load_info *info)
core1_wait_ready();
/*
* Reinitialize API
* Reinitialize Hardware & Drivers
*/
api_dispatcher_init();
api_interrupt_init();
res = hardware_reset();
if (res < 0) {
return res;
}
switch (info->type) {
case PL_PYTHON_SCRIPT:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment