diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-28 14:55:56 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-11-26 18:56:26 +0100 |
commit | 6343eea03980627cb763de777af6b316130bdf43 (patch) | |
tree | c8bb5413f81a7fa22f45180c9ff215eb5549148a /include/stick20_commands.h | |
parent | e45e2f03cf40b5826632ab95cbc79c487249897a (diff) | |
download | libnitrokey-6343eea03980627cb763de777af6b316130bdf43.tar.gz libnitrokey-6343eea03980627cb763de777af6b316130bdf43.tar.bz2 |
Support getting SD card occupancy and test
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick20_commands.h')
-rw-r--r-- | include/stick20_commands.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/stick20_commands.h b/include/stick20_commands.h index 237118d..42f46ad 100644 --- a/include/stick20_commands.h +++ b/include/stick20_commands.h @@ -273,6 +273,27 @@ namespace nitrokey { CommandTransaction; }; + class GetSDCardOccupancy : Command<CommandID::SD_CARD_HIGH_WATERMARK> { + public: + struct ResponsePayload { + uint8_t WriteLevelMin; + uint8_t WriteLevelMax; + uint8_t ReadLevelMin; + uint8_t ReadLevelMax; + std::string dissect() const { + std::stringstream ss; + print_to_ss((int) WriteLevelMin); + print_to_ss((int) WriteLevelMax); + print_to_ss((int) ReadLevelMin); + print_to_ss((int) ReadLevelMax); + return ss.str(); + } + } __packed; + + typedef Transaction<command_id(), struct EmptyPayload, struct ResponsePayload> + CommandTransaction; + }; + class SetupHiddenVolume : Command<CommandID::SEND_HIDDEN_VOLUME_SETUP> { public: |