Use Uart

Dependencies:   mbed

Fork of Serial_HelloWorld_Mbed by eunkyoung kim

Committer:
IOP
Date:
Fri Jul 24 00:30:17 2015 +0000
Revision:
3:1f30ebd64626
Parent:
2:ab03b0b5012c
Child:
4:3974a6c7b088
comment added

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:879aa9d0247b 1 #include "mbed.h"
mbed_official 0:879aa9d0247b 2
eunkyoungkim 2:ab03b0b5012c 3 #if defined(TARGET_WIZwiki_W7500)
eunkyoungkim 2:ab03b0b5012c 4 #define USBTX PC_2
eunkyoungkim 2:ab03b0b5012c 5 #define USBRX PC_3
eunkyoungkim 2:ab03b0b5012c 6 #endif
eunkyoungkim 2:ab03b0b5012c 7
eunkyoungkim 2:ab03b0b5012c 8 Serial pc(USBTX, USBRX); // tx, rx
mbed_official 0:879aa9d0247b 9
mbed_official 0:879aa9d0247b 10 int main() {
IOP 3:1f30ebd64626 11 pc.printf("Hello World!\n"); // string output
mbed_official 0:879aa9d0247b 12 while(1) {
IOP 3:1f30ebd64626 13 pc.putc(pc.getc() + 1); // typing characters
mbed_official 0:879aa9d0247b 14 }
mbed_official 0:879aa9d0247b 15 }