Nuvoton
/
NuMaker-mbed-GPIO-button-buzzer-rgbled
NuMaker GPIO button with LED and buzzer
Revision 13:9982ee238f27, committed 2021-02-25
- Comitter:
- SHLIU1@OANBE02333.nuvoton.com
- Date:
- Thu Feb 25 10:55:25 2021 +0800
- Parent:
- 12:dcd1125ab50e
- Commit message:
- Support the both V5.X and V6.X for mbed-os
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Apr 19 10:57:02 2018 +0800 +++ b/main.cpp Thu Feb 25 10:55:25 2021 +0800 @@ -41,7 +41,9 @@ rgbled_B=1; rgbled_R=1; rgbled_G=1; greenled=1; buzzer=1; - +#ifdef MBED_MAJOR_VERSION + printf("Mbed OS version %d.%d.%d\r\n\n", MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION); +#endif while (true) { // press SW1 will turn on greeled and RGBLED=blue if (button_SW1==0) {