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.
Fork of frdm_helloworld by
Revision 3:3eac3aecc889, committed 2014-12-23
- Comitter:
- Jasper_lee
- Date:
- Tue Dec 23 03:35:48 2014 +0000
- Parent:
- 2:87db61b14dff
- Child:
- 4:b851b9236d1a
- Commit message:
- change some io setting for TWR-K22F120M
Changed in this revision
--- a/main.cpp Mon Apr 07 20:10:53 2014 +0000
+++ b/main.cpp Tue Dec 23 03:35:48 2014 +0000
@@ -5,7 +5,8 @@
DigitalIn sw2(SW2);
DigitalIn sw3(SW3);
Serial pc(USBTX, USBRX);
-
+char str[6];
+uint32_t i;
void check_sw2(void)
{
if (sw2 == 0) {
@@ -22,11 +23,15 @@
led_green = 0;
led_red = 1;
pc.printf("5 characters will be echoed. Start typing. \n");
- for (uint32_t i = 0; i < 5; i++) {
- pc.putc(pc.getc());
+ for ( i = 0; i < 5; i++) {
+ str[i] = pc.getc();
+ // pc.putc(pc.getc());
}
+ str[i] ='\0';
+ pc.puts(str);
pc.putc(13); /* CR */
pc.putc(10); /* LF */
+ pc.printf("Test Finished \n");
}
}
--- a/mbed.bld Mon Apr 07 20:10:53 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/6473597d706e \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.lib Tue Dec 23 03:35:48 2014 +0000 @@ -0,0 +1,1 @@ +mbed#b16d94660a33
