Richard Kuo
/
NTOUEE-mbed-UART0
mbed UART0 print message
main.cpp@1:a7588a79e23d, 2016-10-26 (annotated)
- Committer:
- rkuo2000
- Date:
- Wed Oct 26 03:27:50 2016 +0000
- Revision:
- 1:a7588a79e23d
- Parent:
- 0:1d715454a185
update to mbed OS 5.2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rkuo2000 | 0:1d715454a185 | 1 | // using NuMaker-PFM-NUC472 pinout |
rkuo2000 | 0:1d715454a185 | 2 | #include "mbed.h" |
rkuo2000 | 0:1d715454a185 | 3 | |
rkuo2000 | 0:1d715454a185 | 4 | Serial device(PG_2, PG_1); // TX0, RX0 |
rkuo2000 | 0:1d715454a185 | 5 | |
rkuo2000 | 0:1d715454a185 | 6 | int main() { |
rkuo2000 | 0:1d715454a185 | 7 | device.baud(115200); // set UART0 baudrate at 115200 |
rkuo2000 | 0:1d715454a185 | 8 | device.printf("Hello ARM mbed\n\r"); |
rkuo2000 | 0:1d715454a185 | 9 | } |