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 eic_blinky_interrupt by
Revision 4:2b12ce3ec6b0, committed 2014-05-20
- Comitter:
- lelect
- Date:
- Tue May 20 11:31:32 2014 +0000
- Parent:
- 3:50d8d4dc9ad6
- Commit message:
- test by fukuda; how to pull request
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue May 20 11:28:18 2014 +0000 +++ b/main.cpp Tue May 20 11:31:32 2014 +0000 @@ -3,17 +3,6 @@ Serial pc(USBTX,USBRX);//tx,rx AnalogOut led_y(p18); -void pc_rx(); - -int main() -{ - pc.attach(&pc_rx,Serial::RxIrq); - while(1) { - sleep(); - //pc.printf("wakeup\r\n"); - } -} - void pc_rx () { char buff=pc.getc(); @@ -26,7 +15,15 @@ float a=(buff-'0'+1)*0.1;//buff=='0'->a=0.1 buff=='9'->a=1.0 led_y=a; pc.printf("led_y=%f\r\n",a); + } else { + pc.printf("a-z,A-Z,0-9 common!",a); } +} - -} +int main() +{ + pc.attach(&pc_rx,Serial::RxIrq); + while(1) { + sleep(); + } +} \ No newline at end of file