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 Serial_ex_2 by
main.cpp
00001 #include "mbed.h" 00002 #include "BufferedSerial.h" 00003 00004 BufferedSerial *pc; 00005 BufferedSerial *pi; 00006 00007 00008 char c; 00009 char buffer[128]; 00010 int x; 00011 int main() { 00012 pc = new BufferedSerial(USBTX, USBRX); 00013 pi = new BufferedSerial(PB_6, PB_7); 00014 00015 pc->baud(115200*2); 00016 pc->format(8); 00017 pc->printf("Hello World\n\r"); 00018 00019 pi->baud(57600); 00020 pi->format(8); 00021 pi->printf("Hello World\n\r"); 00022 00023 00024 00025 pi->printf("Hello World\n"); 00026 pc->printf("Hello World\n"); 00027 while(1) { 00028 wait(1); 00029 pi->printf("Iteration %d\n", x); 00030 pc->printf("Iteration %d\n", x); 00031 x++; 00032 } 00033 }
Generated on Wed Jul 20 2022 14:01:45 by
1.7.2
