Skip to content

Commit 41305f4

Browse files
committed
Merge branch 'master' of https://github.com/mbedmicro/mbed
2 parents 4109142 + 8719388 commit 41305f4

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

libraries/USBDevice/USBSerial/USBCDC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ static uint8_t cdc_line_coding[7]= {0x80, 0x25, 0x00, 0x00, 0x00, 0x00, 0x08};
2929

3030
#define MAX_CDC_REPORT_SIZE MAX_PACKET_SIZE_EPBULK
3131

32-
USBCDC::USBCDC(uint16_t vendor_id, uint16_t product_id, uint16_t product_release): USBDevice(vendor_id, product_id, product_release) {
32+
USBCDC::USBCDC(uint16_t vendor_id, uint16_t product_id, uint16_t product_release, bool connect_blocking): USBDevice(vendor_id, product_id, product_release) {
3333
terminal_connected = false;
34-
USBDevice::connect();
34+
USBDevice::connect(connect_blocking);
3535
}
3636

3737
bool USBCDC::USBCallback_request(void) {

libraries/USBDevice/USBSerial/USBCDC.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ class USBCDC: public USBDevice {
3535
* @param vendor_id Your vendor_id
3636
* @param product_id Your product_id
3737
* @param product_release Your preoduct_release
38+
* @param connect_blocking define if the connection must be blocked if USB not plugged in
3839
*/
39-
USBCDC(uint16_t vendor_id, uint16_t product_id, uint16_t product_release);
40+
USBCDC(uint16_t vendor_id, uint16_t product_id, uint16_t product_release, bool connect_blocking);
4041

4142
protected:
4243

libraries/USBDevice/USBSerial/USBSerial.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ class USBSerial: public USBCDC, public Stream {
5353
* @param vendor_id Your vendor_id (default: 0x1f00)
5454
* @param product_id Your product_id (default: 0x2012)
5555
* @param product_release Your preoduct_release (default: 0x0001)
56+
* @param connect_blocking define if the connection must be blocked if USB not plugged in
5657
*
5758
*/
58-
USBSerial(uint16_t vendor_id = 0x1f00, uint16_t product_id = 0x2012, uint16_t product_release = 0x0001): USBCDC(vendor_id, product_id, product_release), buf(128){
59+
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), buf(128){
5960
settingsChangedCallback = 0;
6061
};
6162

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/PinNames.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ typedef enum {
196196
LED_BLUE = PTD1,
197197

198198
// mbed original LED naming
199-
LED1 = LED_BLUE,
199+
LED1 = LED_RED,
200200
LED2 = LED_GREEN,
201-
LED3 = LED_RED,
202-
LED4 = LED_RED,
201+
LED3 = LED_BLUE,
202+
LED4 = LED_BLUE,
203203

204204
// USB Pins
205205
USBTX = PTA2,
@@ -229,6 +229,9 @@ typedef enum {
229229
A3 = PTB3,
230230
A4 = PTC2,
231231
A5 = PTC1,
232+
233+
I2C_SCL = D15,
234+
I2C_SDA = D14,
232235

233236
// Not connected
234237
NC = (int)0xFFFFFFFF

workspace_tools/build.py

100644100755
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@
5858

5959
# Get target list
6060
if options.mcu:
61+
if options.mcu not in TARGET_NAMES:
62+
print "Given MCU '%s' not into the supported list:\n%s" % (options.mcu, TARGET_NAMES)
63+
sys.exit(1)
6164
targets = [options.mcu]
6265
else:
6366
targets = TARGET_NAMES
6467

6568
# Get toolchains list
6669
if options.tool:
70+
if options.tool not in TOOLCHAINS:
71+
print "Given toolchain '%s' not into the supported list:\n%s" % (options.tool, TOOLCHAINS)
72+
sys.exit(1)
6773
toolchains = [options.tool]
6874
else:
6975
toolchains = TOOLCHAINS

0 commit comments

Comments
 (0)