diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-07-29 14:26:37 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-08-01 13:54:58 +0200 |
commit | 77e388ed2dbbe262e61ddf514f7554e236a1c1a1 (patch) | |
tree | ddfd7a1995599a424dc3d0434dcb8fda606b8465 /device.cc | |
parent | 195cc3fd7a52af0db40c33f3287aa32cec64631f (diff) | |
download | libnitrokey-77e388ed2dbbe262e61ddf514f7554e236a1c1a1.tar.gz libnitrokey-77e388ed2dbbe262e61ddf514f7554e236a1c1a1.tar.bz2 |
Let device identify itself by model
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'device.cc')
-rw-r--r-- | device.cc | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -45,8 +45,6 @@ int Device::send(const void *packet) { } int Device::recv(void *packet) { - // FIXME change CommError return value to int (return value of - // hid_get_feature_report) int status; int retry_count = 0; @@ -86,10 +84,13 @@ int Device::recv(void *packet) { Stick10::Stick10() { m_vid = 0x20a0; m_pid = 0x4108; + m_model = DeviceModel::PRO; } Stick20::Stick20() { m_vid = 0x20a0; m_pid = 0x4109; m_retry_timeout = std::chrono::milliseconds(500); + m_model = DeviceModel::STORAGE; + } |