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
- Committer:
- eric11fr
- Date:
- 2021-03-05
- Revision:
- 1:2bd6dc642bb9
- Parent:
- 0:a563059f0473
File content as of revision 1:2bd6dc642bb9:
#include "mbed.h"
#include "soft_uart.h"
Serial pc(USBTX, USBRX);
char tmp;
int main() {
pc.baud(9600);
pc.printf("test");
init_uart();
pc.printf("cpuclock:%d",SystemCoreClock);
//printStr("d\n\r");
wait(1);
//printStr("Voila!\n\r");
//printStr("Voila!\n\r");
printStr("$PMTK314,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n");
printStr("$PMTK314,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n");
// printStr("$PMTK314,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n");
wait(1);
while(1){
// printStr("V");
// printStr("$PMTK314,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n");
//pc.putc( _getchar() );
do
{
tmp= _getchar();
pc.printf("%c",tmp);
}while(tmp!='\r');
//wait(0.1);
}
}
