![](/media/cache/profiles/07f26c1e7d2873a9e6860909c00075c2.jpg.50x50_q85.jpg)
fork 1
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 |
diff -r 50d8d4dc9ad6 -r 2b12ce3ec6b0 main.cpp --- 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