aboutsummaryrefslogtreecommitdiff
path: root/stm-keystore.c
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-05-21 14:40:11 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-05-21 14:40:11 +0200
commitac2357b001b970ff281d05566697c3d73f66ea4a (patch)
treeba877047fcf3538eebd2ae43941301e5bae00725 /stm-keystore.c
parent3d16ad028d69acc581095430d20463ed66f65779 (diff)
Add code to test reading, writing and erasing keystore data.
Diffstat (limited to 'stm-keystore.c')
-rw-r--r--stm-keystore.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stm-keystore.c b/stm-keystore.c
index 19c5ccc..575cda0 100644
--- a/stm-keystore.c
+++ b/stm-keystore.c
@@ -45,6 +45,11 @@ int keystore_check_id()
return n25q128_check_id(&keystore_ctx);
}
+int keystore_read_data(uint32_t offset, uint8_t *buf, const uint32_t len)
+{
+ return n25q128_read_data(&keystore_ctx, offset, buf, len);
+}
+
int keystore_write_data(uint32_t offset, const uint8_t *buf, const uint32_t len)
{
return n25q128_write_data(&keystore_ctx, offset, buf, len);