Skip to content

Commit

Permalink
set led to red blinking if mlc_clone failed
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-hofmeier committed May 29, 2023
1 parent 011c3b7 commit 3413508
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ios_mcp/source/dumper.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,12 @@ int clone_mlc(int y_offset){
while(lba < mlc_num_blocks); //! TODO: make define MLC32_SECTOR_COUNT:

result = 0;
SMC_SetNotificationLED(NOTIF_LED_RED | NOTIF_LED_BLUE);

error:
if(result)
SMC_SetNotificationLED(NOTIF_LED_RED_BLINKING);

IOS_HeapFree(CROSS_PROCESS_HEAP_ID, io_buffer);
if (fsa_raw_dest) {
FSA_RawClose(fsaHandle, fsa_raw_dest);
Expand All @@ -131,7 +135,6 @@ int clone_mlc(int y_offset){
// last print to show "done"
gfx_printf(20, y_offset, GfxPrintFlag_ClearBG, "mlc = %011llu / %011llu, res %08X, errors %lu, bad sectors %lu", lba * mlc_block_size, mlc_size, mlc_result, read_errors2, bad_blocks);

SMC_SetNotificationLED(NOTIF_LED_RED | NOTIF_LED_BLUE);
return result;
}

Expand Down

0 comments on commit 3413508

Please sign in to comment.