NuMaker GPIO Interrupt with Debounce Setting

Files at this revision

API Documentation at this revision

Comitter:
cyliang
Date:
Wed Mar 01 09:37:13 2023 +0000
Parent:
18:a53eb3c1d7b7
Commit message:
Change baud-rate as 115200, update json & os to v6.17.0 for M467 target

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
diff -r a53eb3c1d7b7 -r 6e52d72cc78b main.cpp
--- a/main.cpp	Thu Feb 25 10:30:59 2021 +0800
+++ b/main.cpp	Wed Mar 01 09:37:13 2023 +0000
@@ -22,6 +22,9 @@
 #elif defined(TARGET_NUMAKER_IOT_M263A)
 InterruptIn button(PG_4); // Button1 (SW10)
 DigitalOut led(LED1);
+#elif defined(TARGET_NUMAKER_IOT_M467)
+InterruptIn button(BUTTON1);
+DigitalOut led(LED1);
 #endif
 
 void flip() {
diff -r a53eb3c1d7b7 -r 6e52d72cc78b mbed-os.lib
--- a/mbed-os.lib	Thu Feb 25 10:30:59 2021 +0800
+++ b/mbed-os.lib	Wed Mar 01 09:37:13 2023 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#679d24833acf0a0b5b0d528576bb37c70863bc4e
+https://github.com/ARMmbed/mbed-os/#17dc3dc2e6e2817a8bd3df62f38583319f0e4fed
\ No newline at end of file
diff -r a53eb3c1d7b7 -r 6e52d72cc78b mbed_app.json
--- a/mbed_app.json	Thu Feb 25 10:30:59 2021 +0800
+++ b/mbed_app.json	Wed Mar 01 09:37:13 2023 +0000
@@ -1,5 +1,9 @@
 {
     "target_overrides": {
+        "*": {
+            "platform.stdio-baud-rate"              : 115200,
+            "platform.stdio-convert-newlines"       : true
+        },
         "NUMAKER_PFM_NUC472": {
             "target.gpio-irq-debounce-enable-list": "SW1, SW2",
             "target.gpio-irq-debounce-clock-source": "GPIO_DBCTL_DBCLKSRC_IRC10K",
@@ -34,6 +38,11 @@
             "target.gpio-irq-debounce-enable-list": "SW2, SW3",
             "target.gpio-irq-debounce-clock-source": "GPIO_DBCTL_DBCLKSRC_LIRC",
             "target.gpio-irq-debounce-sample-rate": "GPIO_DBCTL_DBCLKSEL_16"
+        },
+        "NUMAKER_IOT_M467": {
+            "target.gpio-irq-debounce-enable-list": "BUTTON1, BUTTON2",
+            "target.gpio-irq-debounce-clock-source": "GPIO_DBCTL_DBCLKSRC_LIRC",
+            "target.gpio-irq-debounce-sample-rate": "GPIO_DBCTL_DBCLKSEL_16"
         }
     }
 }