felipe manrique
/
FRDM_serial_echo_demo
Echo back characters you type based in https://mbed.org/handbook/SerialPC example
main.cpp@0:806d4eb73e1e, 2013-10-05 (annotated)
- Committer:
- felipeM
- Date:
- Sat Oct 05 19:10:27 2013 +0000
- Revision:
- 0:806d4eb73e1e
Echoes back to the screen anything you type; taken from :; https://mbed.org/handbook/SerialPC
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
felipeM | 0:806d4eb73e1e | 1 | #include "mbed.h" |
felipeM | 0:806d4eb73e1e | 2 | |
felipeM | 0:806d4eb73e1e | 3 | Serial pc(USBTX, USBRX); |
felipeM | 0:806d4eb73e1e | 4 | |
felipeM | 0:806d4eb73e1e | 5 | int main() { |
felipeM | 0:806d4eb73e1e | 6 | pc.printf("Echoes back to the screen anything you type\n"); |
felipeM | 0:806d4eb73e1e | 7 | while(1) { |
felipeM | 0:806d4eb73e1e | 8 | pc.putc(pc.getc()); |
felipeM | 0:806d4eb73e1e | 9 | } |
felipeM | 0:806d4eb73e1e | 10 | } |