usb_cdc: Report the MCU name instead of "Klipper firmware"

Change the "product id" from the redundant "Klipper firmware" to the
CONFIG_MCU value.  For now, only make this change on boards that have
CONFIG_HAVE_CHIPID set.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-11-21 11:48:36 -05:00
parent d8b6ff5c5e
commit 430b8d0e52
2 changed files with 8 additions and 0 deletions

View File

@@ -124,7 +124,11 @@ DECL_TASK(usb_bulk_out_task);
#define CONCAT1(a, b) a ## b
#define CONCAT(a, b) CONCAT1(a, b)
#define USB_STR_MANUFACTURER u"Klipper"
#if CONFIG_HAVE_CHIPID // Temporarily limit new names to boards with CHIPID
#define USB_STR_PRODUCT CONCAT(u,CONFIG_MCU)
#else
#define USB_STR_PRODUCT u"Klipper firmware"
#endif
#define USB_STR_SERIAL CONCAT(u,CONFIG_USB_SERIAL_NUMBER)
// String descriptors