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: mbed
Fork of LAB10_Oppgave3 by
Revision 1:05b1d2a203e5, committed 2015-11-04
- Comitter:
- rlanghbv
- Date:
- Wed Nov 04 21:02:48 2015 +0000
- Parent:
- 0:00b5baa80198
- Child:
- 2:497a47bd157b
- Commit message:
- Serial 3 to PC loopback
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 04 20:58:44 2015 +0000 +++ b/main.cpp Wed Nov 04 21:02:48 2015 +0000 @@ -4,25 +4,21 @@ Serial pc(USBTX, USBRX); // tx, rx void serial3Rx() -{ - putchar(serial3.getc()); +{ pc.putc(serial3.getc()); } void pcRx() -{ - serial3.putc(pc.getc()); +{ serial3.putc(pc.getc()); } -int main() -{ +int main() +{ serial3.attach(&serial3Rx); pc.attach(&pcRx); - - - while(1) - { - wait(1); - } + + while(1) { + wait(1); + } }