Augusto Panecatl
/
FRDM-K64_Serial
FRDM-K64 Serial basic demo
main.cpp@0:7dfe47e78cf1, 2014-07-09 (annotated)
- Committer:
- APanecatl
- Date:
- Wed Jul 09 19:32:27 2014 +0000
- Revision:
- 0:7dfe47e78cf1
rev 1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
APanecatl | 0:7dfe47e78cf1 | 1 | #include "mbed.h" |
APanecatl | 0:7dfe47e78cf1 | 2 | |
APanecatl | 0:7dfe47e78cf1 | 3 | //Digital output declaration |
APanecatl | 0:7dfe47e78cf1 | 4 | DigitalOut Blue(LED3); |
APanecatl | 0:7dfe47e78cf1 | 5 | |
APanecatl | 0:7dfe47e78cf1 | 6 | //Serial port (UART) configuration |
APanecatl | 0:7dfe47e78cf1 | 7 | Serial pc(USBTX,USBRX); |
APanecatl | 0:7dfe47e78cf1 | 8 | |
APanecatl | 0:7dfe47e78cf1 | 9 | int main() |
APanecatl | 0:7dfe47e78cf1 | 10 | { |
APanecatl | 0:7dfe47e78cf1 | 11 | Blue=1; |
APanecatl | 0:7dfe47e78cf1 | 12 | pc.printf("Serial code example\r\n"); |
APanecatl | 0:7dfe47e78cf1 | 13 | while(1) |
APanecatl | 0:7dfe47e78cf1 | 14 | { |
APanecatl | 0:7dfe47e78cf1 | 15 | Blue=0; |
APanecatl | 0:7dfe47e78cf1 | 16 | pc.putc(pc.getc()); |
APanecatl | 0:7dfe47e78cf1 | 17 | } |
APanecatl | 0:7dfe47e78cf1 | 18 | |
APanecatl | 0:7dfe47e78cf1 | 19 | } |