From a0db16048f81313604a06509cc6afeb5cdbf740d Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 20 Feb 2016 15:23:05 +0100 Subject: compiling own version of lib hid_libusb (copied from nitroapp) and linking it statically with debug messages --- device.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'device.cc') diff --git a/device.cc b/device.cc index e1a5615..e4ec8bd 100644 --- a/device.cc +++ b/device.cc @@ -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; } -- cgit v1.2.1