Change USBSerial.h constructor to allow to label the stream for, eg., redirecting stdin/out/err to a USBSerial object. Will not break existing default use as tested with mbed-os 5.11.5
Dependents: max32630fthr_stdout2usb_mbed_v5-11-5 firmware_framework1
Diff: USBSerial/USBSerial.h
- Revision:
- 71:bf73f57c4b9c
- Parent:
- 70:ce08eda95816
- Child:
- 72:6ef9c5c0250e
--- a/USBSerial/USBSerial.h Tue Apr 30 21:16:18 2019 +0000 +++ b/USBSerial/USBSerial.h Tue Apr 30 21:28:31 2019 +0000 @@ -56,6 +56,10 @@ * @param connect_blocking define if the connection must be blocked if USB not plugged in * */ + USBSerial(uint16_t vendor_id = 0x1f00, uint16_t product_id = 0x2012, uint16_t product_release = 0x0001, bool connect_blocking = true): USBCDC(vendor_id, product_id, product_release, connect_blocking) { + settingsChangedCallback = 0; + }; + USBSerial(const char *name = NULL, uint16_t vendor_id = 0x1f00, uint16_t product_id = 0x2012, uint16_t product_release = 0x0001, bool connect_blocking = true): USBCDC(vendor_id, product_id, product_release, connect_blocking), Stream(name){ settingsChangedCallback = 0; };