//Simple program allowing user to recieve string from STM32F4 and output it through com port
Fork of FRDM-K64F-UARTCOMMS by
main.cpp
00001 #include "mbed.h" 00002 //Simple program allowing user to recieve string from STM32F4 and output it through com port 00003 //Andrea Corrado 00004 Serial pc(USBTX, USBRX); // tx, rx 00005 Serial uart (PTC17, PTC16); 00006 char strn [17]; 00007 char c; 00008 00009 int main() 00010 { 00011 while(1) { 00012 // if (pc.readable()) { 00013 // uart.putc(pc.getc()); //trans 00014 // } 00015 if (uart.readable()) { 00016 uart.gets(strn, 17); 00017 pc.printf ("\n\r%s", strn); 00018 } 00019 } 00020 }
Generated on Wed Jul 20 2022 19:35:22 by 1.7.2