Skip to content
Snippets Groups Projects
Verified Commit a357a3f6 authored by rahix's avatar rahix
Browse files

feat(lifecycle): Properly reset hardware


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 944578ca
No related branches found
No related tags found
1 merge request!118Proper Hardware Init in Epicardium
Pipeline #2436 passed
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment