aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-07-16 15:03:44 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-07-16 15:03:44 +0200
commit94b848d9dcd6ee0eb7c3eab817ca2c64971b35a3 (patch)
tree629f718933ec57a9221d28b20fece871ecbacf4a
parent0c57c746ccc000b00e29816ee6c58bcb7a18e745 (diff)
mkm_wipe: Toggle CS to conclude spi_set_operation.
-rw-r--r--tamper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tamper.c b/tamper.c
index d1d5c04..9169895 100644
--- a/tamper.c
+++ b/tamper.c
@@ -213,8 +213,12 @@ mkm_wipe()
spi_setup(1);
mkm_grab();
+
mkm_chip_select(1);
spi_set_operation(SPI_OPERATION_SEQUENCE);
+ mkm_chip_select(0);
+
+ mkm_chip_select(1);
spi_write(SPI_WRITE);
spi_write(0); /* Address, high byte. */
spi_write(0); /* Address, low byte. */