Skip to content

Commit

Permalink
[SC64][SW] Release SD lock on init error
Browse files Browse the repository at this point in the history
  • Loading branch information
Polprzewodnikowy committed Sep 29, 2024
1 parent 74e20cb commit db4f167
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sw/controller/src/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ void cfg_process (void) {
led_activity_on();
error = sd_card_init();
led_activity_off();
if (error != SD_OK) {
sd_release_lock(SD_LOCK_N64);
}
}
break;

Expand Down
3 changes: 3 additions & 0 deletions sw/controller/src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ static void usb_rx_process (void) {
led_activity_on();
error = sd_card_init();
led_activity_off();
if (error != SD_OK) {
sd_release_lock(SD_LOCK_USB);
}
}
break;

Expand Down

0 comments on commit db4f167

Please sign in to comment.