From 444a6cb764fbcea3c91ae936b1c76a190f935b10 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 13 Jun 2020 12:21:44 +0200 Subject: Revert API change Remove the change to keep binary compatibility. Use the vendor_id field from the dev description. --- device.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'device.cc') diff --git a/device.cc b/device.cc index 5f89f2c..9cf4dc3 100644 --- a/device.cc +++ b/device.cc @@ -48,6 +48,10 @@ const uint16_t nitrokey::device::NITROKEY_STORAGE_PID = 0x4109; const uint16_t nitrokey::device::PURISM_VID = 0x316d; const uint16_t nitrokey::device::LIBREM_KEY_PID = 0x4c4b; +Option nitrokey::device::product_id_to_model(uint16_t product_id) { + return product_id_to_model(NITROKEY_VID, product_id); +} + Option nitrokey::device::product_id_to_model(uint16_t vendor_id, uint16_t product_id) { switch (vendor_id) { case NITROKEY_VID: -- cgit v1.2.1