add serial and version information in USB descriptor

the device ID (unique to the micro-controller) is now displayed in
the USB iSerial descriptor.
the git version is now also displayed in iConfiguration in an
additional (empty) configuration descriptor.
this allows the user to quickly get the device hardware serial and
firmware version just by using lsusb (no need for a custom USB
software).

Change-Id: If9fadecc097ca3e006990160936bf11b22eae4e0
This commit is contained in:
Kévin Redon
2019-08-06 15:41:31 +02:00
committed by laforge
parent d14970f95b
commit e0265462d8
2 changed files with 109 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
/* SIMtrace 2 mode definitions
*
* (C) 2015-2017 by Harald Welte <hwelte@hmw-consulting.de>
* Copyright (c) 2015-2017 by Harald Welte <hwelte@hmw-consulting.de>
* Copyright (c) 2018-2019, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon <kredon@sysmocom.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -57,6 +58,7 @@ enum confNum {
#ifdef HAVE_MITM
CFG_NUM_MITM,
#endif
CFG_NUM_VERSION,
NUM_CONF
};