Skip to content

Commit

Permalink
testkit/memory: Flash the power LED on memory error, 1Hz cycle
Browse files Browse the repository at this point in the history
Refs #56
  • Loading branch information
keirf committed Aug 24, 2024
1 parent eefec6e commit 87e8b82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions testkit/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@ static int test_memory_range(void *_args)
(a & (1u<< 1)) ? 'X' : '-', (a & (1u<< 0)) ? 'X' : '-');
print_line(r);
/* Wait for async exit. */
for (;;)
continue;
for (;;) {
delay_ms(500);
ciaa->pra ^= CIAAPRA_LED;
}
}

return 0;
Expand Down
5 changes: 4 additions & 1 deletion testkit/testkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,8 +1167,11 @@ static void c_SOFT_IRQ(struct c_exception_frame *frame)
prev_ciaapra = ciaapra;

/* Perform an asynchronous function cancellation if so instructed. */
if (do_cancel)
if (do_cancel) {
cancel_call(&test_cancellation, frame);
/* Memory test may mess with power LED / audio filter: Reset it. */
ciaa->pra &= ~CIAAPRA_LED;
}

IRQ_RESET(INT_SOFT);
}
Expand Down

0 comments on commit 87e8b82

Please sign in to comment.