Skip to content

Commit 33f18d1

Browse files
committed
Update branch from mbed master
- merge branch 'master' into dev_target_k64f Conflicts: libraries/USBDevice/USBDevice/USBEndpoints.h libraries/USBDevice/USBDevice/USBHAL_KL25Z.cpp workspace_tools/export/uvision4.py workspace_tools/targets.py
2 parents 26f7587 + 74e9b2e commit 33f18d1

File tree

486 files changed

+42291
-3565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

486 files changed

+42291
-3565
lines changed

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
mbed SDK
2-
========
1+
mbed SDK
2+
========
33

44
[![Build Status](https://travis-ci.org/mbedmicro/mbed.png)](https://travis-ci.org/mbedmicro/mbed/builds)
55

@@ -20,30 +20,39 @@ Documentation
2020
* [mbed library internals](http://mbed.org/handbook/mbed-library-internals)
2121
* [Adding a new target microcontroller](http://mbed.org/handbook/mbed-SDK-porting)
2222

23-
Supported Microcontrollers
24-
--------------------------
23+
Supported Microcontrollers and Boards
24+
-------------------------------------
2525
NXP:
26-
* [LPC1768](http://mbed.org/platforms/mbed-LPC1768/) (Cortex-M3)
27-
* [LPC1768](http://mbed.org/platforms/u-blox-C027/) (Cortex-M3)
28-
* [LPC11U24](http://mbed.org/platforms/mbed-LPC11U24/) (Cortex-M0)
29-
* [LPC11U35](http://mbed.org/platforms/EA-LPC11U35/) (Cortex-M0)
30-
* LPC2368 (ARM7TDMI-S)
26+
* [mbed LPC1768](http://mbed.org/platforms/mbed-LPC1768/) (Cortex-M3)
27+
* [u-blox C027 LPC1768](http://mbed.org/platforms/u-blox-C027/) (Cortex-M3)
28+
* [mbed LPC11U24](http://mbed.org/platforms/mbed-LPC11U24/) (Cortex-M0)
29+
* [EA LPC11U35](http://mbed.org/platforms/EA-LPC11U35/) (Cortex-M0)
30+
* mbed LPC2368 (ARM7TDMI-S)
3131
* LPC810 (Cortex-M0+)
3232
* [LPC812](http://mbed.org/platforms/NXP-LPC800-MAX/) (Cortex-M0+)
33-
* [LPC4088](http://mbed.org/platforms/EA-LPC4088/) (Cortex-M4)
33+
* [EA LPC4088](http://mbed.org/platforms/EA-LPC4088/) (Cortex-M4)
3434
* LPC4330 (Cortex-M4 + Cortex-M0)
3535
* [LPC1347](http://mbed.org/platforms/DipCortex-M3/) (Cortex-M3)
3636
* [LPC1114](http://mbed.org/platforms/LPC1114FN28/) (Cortex-M0)
3737
* LPC11C24 (Cortex-M0)
38+
* [LPC1549](https://mbed.org/platforms/LPCXpresso1549/) (Cortex-M3)
3839

3940
Freescale:
40-
* KL05Z (Cortex-M0+)
41-
* [KL25Z](http://mbed.org/platforms/KL25Z/) (Cortex-M0+)
42-
* [KL46Z](https://mbed.org/platforms/FRDM-KL46Z/) (Cortex-M0+)
41+
* FRDM-K20D50M
42+
* [FRDM-KL05Z](https://mbed.org/platforms/FRDM-KL05Z/) (Cortex-M0+)
43+
* [FRDM-KL25Z](http://mbed.org/platforms/KL25Z/) (Cortex-M0+)
44+
* [FRDM-KL46Z](https://mbed.org/platforms/FRDM-KL46Z/) (Cortex-M0+)
4345

4446
STMicroelectronics:
47+
* [Nucleo-F103RB](https://mbed.org/platforms/ST-Nucleo-F103RB/) (Cortex-M3)
48+
* [Nucleo-L152RE](https://mbed.org/platforms/ST-Nucleo-L152RE/) (Cortex-M3)
49+
* [Nucleo-F030R8](https://mbed.org/platforms/ST-Nucleo-F030R8/) (Cortex-M0)
50+
* [Nucleo-F401RE](https://mbed.org/platforms/ST-Nucleo-F401RE/) (Cortex-M4)
4551
* STM32F407 (Cortex-M4)
4652

53+
Nordic:
54+
* [nRF51822-mKIT](https://mbed.org/platforms/Nordic-nRF51822/) (Cortex-M0)
55+
4756
Supported Toolchains and IDEs
4857
-----------------------------
4958
* GCC ARM: [GNU Tools for ARM Embedded Processors](https://launchpad.net/gcc-arm-embedded/4.7/4.7-2012-q4-major)

libraries/USBDevice/USBDevice/USBDevice.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,15 @@ bool USBDevice::configured(void)
703703
return (device.state == CONFIGURED);
704704
}
705705

706-
void USBDevice::connect(void)
706+
void USBDevice::connect(bool blocking)
707707
{
708708
/* Connect device */
709709
USBHAL::connect();
710-
/* Block if not configured */
711-
while (!configured());
710+
711+
if (blocking) {
712+
/* Block if not configured */
713+
while (!configured());
714+
}
712715
}
713716

714717
void USBDevice::disconnect(void)

libraries/USBDevice/USBDevice/USBDevice.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ class USBDevice: public USBHAL
3737

3838
/*
3939
* Connect a device
40+
*
41+
* @param blocking: block if not configured
4042
*/
41-
void connect(void);
43+
void connect(bool blocking = true);
4244

4345
/*
4446
* Disconnect a device

libraries/USBDevice/USBDevice/USBEndpoints.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ typedef enum {
4141
#include "USBEndpoints_LPC17_LPC23.h"
4242
#elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC1347)
4343
#include "USBEndpoints_LPC11U.h"
44-
#elif defined(TARGET_KL25Z) | defined(TARGET_K64F)
44+
#elif defined(TARGET_KL25Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D5M) | defined(TARGET_K64F)
4545
#include "USBEndpoints_KL25Z.h"
4646
#elif defined (TARGET_STM32F4XX)
4747
#include "USBEndpoints_STM32F4.h"

libraries/USBDevice/USBDevice/USBHAL_KL25Z.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1717
*/
1818

19-
#if defined(TARGET_KL25Z) | defined(TARGET_K64F)
19+
#if defined(TARGET_KL25Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D5M) | defined(TARGET_K64F)
2020

2121
#include "USBHAL.h"
2222

libraries/USBDevice/USBMSD/USBMSD.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ bool USBMSD::USBCallback_request(void) {
103103
}
104104

105105

106-
bool USBMSD::connect() {
107-
106+
bool USBMSD::connect(bool blocking) {
108107
//disk initialization
109108
if (disk_status() & NO_INIT) {
110109
if (disk_initialize()) {
@@ -131,7 +130,7 @@ bool USBMSD::connect() {
131130
}
132131

133132
//connect the device
134-
USBDevice::connect();
133+
USBDevice::connect(blocking);
135134
return true;
136135
}
137136

libraries/USBDevice/USBMSD/USBMSD.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ class USBMSD: public USBDevice {
7070
/**
7171
* Connect the USB MSD device. Establish disk initialization before really connect the device.
7272
*
73+
* @param blocking if not configured
7374
* @returns true if successful
7475
*/
75-
bool connect();
76+
bool connect(bool blocking = true);
7677

7778
/**
7879
* Disconnect the USB MSD device.

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

0 commit comments

Comments
 (0)