diff options
author | Szczepan Zalega <szczepan.zalega@gmail.com> | 2016-02-20 15:23:05 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan.zalega@gmail.com> | 2016-02-20 15:23:05 +0100 |
commit | a0db16048f81313604a06509cc6afeb5cdbf740d (patch) | |
tree | eff23c3e2963928c0e95dd65b7aedfcda0c8748f /device.cc | |
parent | 6a8151c3a25b09a12118343342fdd87b3d429a83 (diff) | |
download | libnitrokey-a0db16048f81313604a06509cc6afeb5cdbf740d.tar.gz libnitrokey-a0db16048f81313604a06509cc6afeb5cdbf740d.tar.bz2 |
compiling own version of lib hid_libusb (copied from nitroapp) and linking it statically with debug messages
Diffstat (limited to 'device.cc')
-rw-r--r-- | device.cc | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -16,11 +16,19 @@ Device::Device() m_retry_timeout(50), mp_devhandle(NULL) {} +bool Device::disconnect() { + Log::instance()(__PRETTY_FUNCTION__, Loglevel::DEBUG_L2); + + hid_exit(); + mp_devhandle = NULL; + return true; +} bool Device::connect() { Log::instance()(__PRETTY_FUNCTION__, Loglevel::DEBUG_L2); hid_init(); mp_devhandle = hid_open(m_vid, m_pid, NULL); + hid_init(); return mp_devhandle != NULL; } |