summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/NitrokeyManager.h2
-rw-r--r--include/stick10_commands.h8
-rw-r--r--include/stick20_commands.h9
3 files changed, 14 insertions, 5 deletions
diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h
index 8f47860..f6e02cc 100644
--- a/include/NitrokeyManager.h
+++ b/include/NitrokeyManager.h
@@ -210,6 +210,8 @@ char * strndup(const char* str, size_t maxlen);
void set_unencrypted_read_write_admin_pin(const char *admin_pin);
void set_unencrypted_read_only_admin_pin(const char *admin_pin);
+
+ int get_major_firmware_version();
};
}
diff --git a/include/stick10_commands.h b/include/stick10_commands.h
index c9a5e5b..893b98f 100644
--- a/include/stick10_commands.h
+++ b/include/stick10_commands.h
@@ -367,7 +367,13 @@ class ReadSlot : Command<CommandID::READ_SLOT> {
class GetStatus : Command<CommandID::GET_STATUS> {
public:
struct ResponsePayload {
- uint16_t firmware_version;
+ union {
+ uint16_t firmware_version;
+ struct {
+ uint8_t minor;
+ uint8_t major;
+ } firmware_version_st;
+ };
union{
uint8_t card_serial[4];
uint32_t card_serial_u32;
diff --git a/include/stick20_commands.h b/include/stick20_commands.h
index f45283f..4b75e6a 100644
--- a/include/stick20_commands.h
+++ b/include/stick20_commands.h
@@ -168,10 +168,10 @@ namespace nitrokey {
union{
uint8_t VersionInfo_au8[4];
struct {
- uint8_t _reserved;
+ uint8_t major;
uint8_t minor;
uint8_t _reserved2;
- uint8_t major;
+ uint8_t build_iteration;
} __packed versionInfo;
} __packed;
@@ -215,8 +215,9 @@ namespace nitrokey {
print_to_ss((int) ReadWriteFlagUncryptedVolume_u8 );
print_to_ss((int) ReadWriteFlagCryptedVolume_u8 );
print_to_ss((int) ReadWriteFlagHiddenVolume_u8 );
- print_to_ss((int) VersionInfo_au8[1] );
- print_to_ss((int) VersionInfo_au8[3] );
+ print_to_ss((int) versionInfo.major );
+ print_to_ss((int) versionInfo.minor );
+ print_to_ss((int) versionInfo.build_iteration );
print_to_ss((int) FirmwareLocked_u8 );
print_to_ss((int) NewSDCardFound_u8 );
print_to_ss((int) NewSDCardFound_st.NewCard );