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.
Revision 1:b0727a3df2eb, committed 2021-05-18
- Comitter:
- stephensv650
- Date:
- Tue May 18 15:33:15 2021 +0000
- Parent:
- 0:1ab76f8f48ce
- Commit message:
- Q11 Complete
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1ab76f8f48ce -r b0727a3df2eb main.cpp --- a/main.cpp Sun May 09 13:29:46 2021 +0000 +++ b/main.cpp Tue May 18 15:33:15 2021 +0000 @@ -1,40 +1,40 @@ /* part of the MTU COMP71004 module author: Krishna Panduru - + the program here performs a serial passthrough operation between USB and serial (p9, p10). correct upto 5 errors for proper functionality. the 6th error is a runtime error generating the following error. correct that as well. - + ++ MbedOS Error Info ++ Error Status: 0x80010130 Code: 304 Module: 1 Error Message: pinmap not found for peripheral Location: 0x4353 Error Value: 0xFFFFFFFF */ #include "mbed.h" - - + + DigitalOut myled(LED1); -Serial pc(USBRX, USBTX); +Serial pc(USBTX, USBRX); Serial dev(p9, p10); - + void dev_recv(){ while(dev.readable()){ - pc.putc(dev.getc()) + pc.putc(dev.getc()); } } - + void pc_recv(){ while(pc.readable()){ dev.putc(pc.getc()); } } - + int main() { pc.baud(9600); - device1.baud(115200); + dev.baud(115200); pc.attach(&pc_recv); - dev.atach(&dev); + dev.attach(&dev_recv); pc.printf("Hello!! \r\n"); while(1) { @@ -44,3 +44,4 @@ wait(1); } } +