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 nucleo_test_soft_serial by
main.cpp
00001 #include "mbed.h" 00002 #include "soft_uart.h" 00003 Serial pc(USBTX, USBRX); 00004 char tmp; 00005 int main() { 00006 00007 pc.baud(9600); 00008 pc.printf("test"); 00009 init_uart(); 00010 pc.printf("cpuclock:%d",SystemCoreClock); 00011 //printStr("d\n\r"); 00012 wait(1); 00013 //printStr("Voila!\n\r"); 00014 //printStr("Voila!\n\r"); 00015 printStr("$PMTK314,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n"); 00016 printStr("$PMTK314,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n"); 00017 // printStr("$PMTK314,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n"); 00018 wait(1); 00019 while(1){ 00020 // printStr("V"); 00021 // printStr("$PMTK314,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n"); 00022 //pc.putc( _getchar() ); 00023 do 00024 { 00025 tmp= _getchar(); 00026 pc.printf("%c",tmp); 00027 00028 }while(tmp!='\r'); 00029 //wait(0.1); 00030 } 00031 }
Generated on Mon Jul 25 2022 07:30:39 by
1.7.2
