Opens the given scanner device. This function must be called before using scanbtnd_get_button(). After calling this function, it is usually not possible for another process to access the scanner until scanbtnd_close() is called.
Definition at line 172 of file artec_eplus48u.c. { int result = -ENOSYS; if (scanner->is_open) return -EINVAL; switch (scanner->connection) { case CONNECTION_LIBUSB: // if devices have been added/removed, return -ENODEV to // make scanbuttond update its device list if (libusb_get_changed_device_count() != 0) return -ENODEV; result = libusb_open((libusb_device_t*)scanner->internal_dev_ptr); break; } if (result == 0) scanner->is_open = 1; return result; } |