Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BaseDAP F042K6_USBDevice SWD USBDAP mbed
Fork of Simple-CMSIS-DAP by
Revision 2:6846bcae69aa, committed 2016-01-20
- Comitter:
- va009039
- Date:
- Wed Jan 20 04:51:50 2016 +0000
- Parent:
- 1:2957e24bb52f
- Commit message:
- for Nucleo-F042K6
Changed in this revision
diff -r 2957e24bb52f -r 6846bcae69aa F042K6_USBDevice.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/F042K6_USBDevice.lib Wed Jan 20 04:51:50 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/va009039/code/F042K6_USBDevice/#0ba7c5e2b3dc
diff -r 2957e24bb52f -r 6846bcae69aa USBDevice.lib --- a/USBDevice.lib Sat Jul 05 08:26:21 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/USBDevice/#0c6524151939
diff -r 2957e24bb52f -r 6846bcae69aa main.cpp
--- a/main.cpp Sat Jul 05 08:26:21 2014 +0000
+++ b/main.cpp Wed Jan 20 04:51:50 2016 +0000
@@ -1,10 +1,13 @@
+// main.cpp 2016/1/20
#include "mbed.h"
#include "USBDAP.h"
#include "BaseDAP.h"
-SWD swd(D12, D10, D6); // SWDIO,SWCLK,nRESET
-DigitalOut connected(LED_GREEN);
-DigitalOut running(LED_RED);
+SWD swd(D7, D6, D3); // SWDIO,SWCLK,nRESET
+DigitalOut connected(LED1); // D13
+DigitalOut running(D12);
+const int LED_ON = 1;
+const int LED_OFF = 0;
class myDAP : public BaseDAP {
public:
@@ -12,19 +15,17 @@
virtual void infoLED(int select, int value) {
switch(select) {
case 0:
- connected = value^1;
- running = 1;
+ connected = value ? LED_ON : LED_OFF;
break;
case 1:
- running = value^1;
- connected = 1;
+ running = value ? LED_ON : LED_OFF;
break;
}
}
};
int main() {
- USBDAP* hid = new USBDAP("CMSIS-DAP");
+ USBDAP* hid = new USBDAP("F042K6 CMSIS-DAP");
myDAP* dap = new myDAP(&swd);
while(1) {
HID_REPORT recv_report;
diff -r 2957e24bb52f -r 6846bcae69aa mbed.bld --- a/mbed.bld Sat Jul 05 08:26:21 2014 +0000 +++ b/mbed.bld Wed Jan 20 04:51:50 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96 \ No newline at end of file
