aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-07-16 15:05:49 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-07-16 15:05:49 +0200
commitec079fc63e74e90fe7a159d2e06a7c4cb17fe6b2 (patch)
tree374f0c06448a44ffcdbdff03151656377be8d01c
parent574aea07d7d0eeddae965a80d9f1e6a3a42f2645 (diff)
Flash blue LED to indicate MKM wipe completed.HEADmaster
-rw-r--r--tamper.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tamper.c b/tamper.c
index e2b2127..477198e 100644
--- a/tamper.c
+++ b/tamper.c
@@ -225,10 +225,17 @@ mkm_wipe()
for (int i = 0; i < 0x1fff; i++) /* 8192 bytes (64Kbit). */
spi_write(0);
mkm_chip_select(0);
+
mkm_release();
spi_setup(0);
AVR_LED_PORT &= ~_BV(AVR_LED_RED_BIT);
+
+ /* Flash blue LED three times to indicate wipe is done */
+ for (int x = 0; x < 6; x++) {
+ AVR_LED_PORT ^= _BV(AVR_LED_BLUE_BIT);
+ for (int i = 0; i < 3200; i++);
+ }
}
static inline void