aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-11-21 11:48:36 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-11-21 11:56:31 -0500
commit430b8d0e52158159f60dc45a123e4d60d4ec31be (patch)
tree7b64058c763fff97131eb560f6f143e76d0627f2
parentd8b6ff5c5e6846fd23381d99a8463adb0ee3099b (diff)
downloadkutter-430b8d0e52158159f60dc45a123e4d60d4ec31be.tar.gz
kutter-430b8d0e52158159f60dc45a123e4d60d4ec31be.tar.xz
kutter-430b8d0e52158159f60dc45a123e4d60d4ec31be.zip
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>
-rw-r--r--docs/Config_Changes.md4
-rw-r--r--src/generic/usb_cdc.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md
index fc59b66c..b5640587 100644
--- a/docs/Config_Changes.md
+++ b/docs/Config_Changes.md
@@ -6,6 +6,10 @@ All dates in this document are approximate.
# Changes
+20191121: The USB name has changed on lpc176x. It now uses the unique
+chip id by default. Update the "serial" setting in the "mcu" config
+section accordingly.
+
20191112: The tmc stepper driver virtual enable capability is now
automatically enabled if the stepper does not have a dedicated stepper
enable pin. Remove references to tmcXXXX:virtual_enable from the
diff --git a/src/generic/usb_cdc.c b/src/generic/usb_cdc.c
index fa1c5cb1..e213a07c 100644
--- a/src/generic/usb_cdc.c
+++ b/src/generic/usb_cdc.c
@@ -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