From 6c52c50d59eafa5acc7ae650695f199b7a014841 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 13 Jan 2019 12:04:12 +0100 Subject: Add product_id_to_model function --- libnitrokey/device.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libnitrokey') diff --git a/libnitrokey/device.h b/libnitrokey/device.h index 477640f..8fbb385 100644 --- a/libnitrokey/device.h +++ b/libnitrokey/device.h @@ -26,6 +26,7 @@ #include #include #include +#include "misc.h" #define HID_REPORT_SIZE 65 @@ -63,6 +64,12 @@ extern const uint16_t NITROKEY_PRO_PID; */ extern const uint16_t NITROKEY_STORAGE_PID; +/** + * Convert the given USB product ID to a Nitrokey model. If there is no model + * with that ID, return an absent value. + */ +misc::Option product_id_to_model(uint16_t product_id); + /** * Information about a connected device. * -- cgit v1.2.1