Use Uart

Dependencies:   mbed

Fork of Serial_HelloWorld_Mbed by eunkyoung kim

Committer:
IOP
Date:
Thu Jan 07 00:02:17 2016 +0000
Revision:
5:4e99dfae8dca
Parent:
4:3974a6c7b088
Child:
6:3689cb2a18f4
update mbed lib

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:879aa9d0247b 1 #include "mbed.h"
IOP 4:3974a6c7b088 2
eunkyoungkim 2:ab03b0b5012c 3 #if defined(TARGET_WIZwiki_W7500)
IOP 4:3974a6c7b088 4 #define USBTX PC_2
IOP 4:3974a6c7b088 5 #define USBRX PC_3
eunkyoungkim 2:ab03b0b5012c 6 #endif
eunkyoungkim 2:ab03b0b5012c 7
IOP 4:3974a6c7b088 8 Serial pc(USBTX,USBRX);
IOP 4:3974a6c7b088 9
IOP 4:3974a6c7b088 10 int main() {
IOP 5:4e99dfae8dca 11 pc.baud(115200); // set baudrate
IOP 4:3974a6c7b088 12
IOP 3:1f30ebd64626 13 pc.printf("Hello World!\n"); // string output
IOP 4:3974a6c7b088 14
IOP 5:4e99dfae8dca 15 while(1) {
IOP 5:4e99dfae8dca 16 pc.putc(pc.getc()+1); // typing characters
mbed_official 0:879aa9d0247b 17 }
IOP 4:3974a6c7b088 18 }
IOP 4:3974a6c7b088 19
IOP 4:3974a6c7b088 20
IOP 4:3974a6c7b088 21
IOP 4:3974a6c7b088 22
IOP 4:3974a6c7b088 23
IOP 4:3974a6c7b088 24