summaryrefslogtreecommitdiff
path: root/NK_C_API.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-02-01 12:00:43 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2018-02-01 12:10:36 +0100
commit81b4dc8d6316f0e7b9149dcfd0cbe192a4ae900f (patch)
tree1f9734016ba2c3872104112f3ada366c84289643 /NK_C_API.h
parent3e37da97c7b2417251585c1d985b54c9a71561e7 (diff)
downloadlibnitrokey-81b4dc8d6316f0e7b9149dcfd0cbe192a4ae900f.tar.gz
libnitrokey-81b4dc8d6316f0e7b9149dcfd0cbe192a4ae900f.tar.bz2
Expose enabling firmware update in C API
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NK_C_API.h')
-rw-r--r--NK_C_API.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/NK_C_API.h b/NK_C_API.h
index aa89ece..ba6b7eb 100644
--- a/NK_C_API.h
+++ b/NK_C_API.h
@@ -475,6 +475,20 @@ extern "C" {
const char* new_update_password);
/**
+ * Enter update mode. Needs update password.
+ * When device is in update mode it no longer accepts any HID commands until
+ * firmware is launched (regardless of being updated or not).
+ * Smartcard (through CCID interface) and its all volumes are not visible as well.
+ * Its VID and PID are changed to factory-default to be detected by flashing software.
+ * Result of this command can be reversed by using 'launch' command.
+ * For dfu-programmer it would be: 'dfu-programmer at32uc3a3256s launch'.
+ * Storage only
+ * @param update_password 20 characters
+ * @return command processing error code
+ */
+ NK_C_API int NK_enable_firmware_update(const char* update_password);
+
+ /**
* Get Storage stick status as string.
* Storage only
* @return string with devices attributes