From ec079fc63e74e90fe7a159d2e06a7c4cb17fe6b2 Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Sat, 16 Jul 2016 15:05:49 +0200 Subject: Flash blue LED to indicate MKM wipe completed. --- tamper.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3