diff options
| author | Meco Man <[email protected]> | 2022-07-14 06:56:25 -0400 |
|---|---|---|
| committer | guo <[email protected]> | 2022-07-15 10:09:50 +0800 |
| commit | 65a5e3af0fef9d4e08bb4c4a1e06ef9113f6bb6a (patch) | |
| tree | fa828103122969cea8b19b733d2c93ede2731916 | |
| parent | 0fe1d152f058ab168263c4c56e8360069fbaa661 (diff) | |
[arduino] 优化默认代码
| -rw-r--r-- | bsp/stm32/stm32f469-st-disco/applications/arduino_main.cpp | 6 | ||||
| -rw-r--r-- | bsp/stm32/stm32l475-atk-pandora/applications/arduino_main.cpp | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/bsp/stm32/stm32f469-st-disco/applications/arduino_main.cpp b/bsp/stm32/stm32f469-st-disco/applications/arduino_main.cpp index 873d6b7676..6abb5ce94d 100644 --- a/bsp/stm32/stm32f469-st-disco/applications/arduino_main.cpp +++ b/bsp/stm32/stm32f469-st-disco/applications/arduino_main.cpp @@ -10,17 +10,15 @@ #include <Arduino.h> -uint8_t led = LED_BUILTIN; - void setup(void) { /* put your setup code here, to run once: */ - pinMode(led, OUTPUT); + pinMode(LED_BUILTIN, OUTPUT); } void loop(void) { /* put your main code here, to run repeatedly: */ - digitalWrite(led, !digitalRead(led)); + digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); delay(100); } diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/arduino_main.cpp b/bsp/stm32/stm32l475-atk-pandora/applications/arduino_main.cpp index 873d6b7676..6abb5ce94d 100644 --- a/bsp/stm32/stm32l475-atk-pandora/applications/arduino_main.cpp +++ b/bsp/stm32/stm32l475-atk-pandora/applications/arduino_main.cpp @@ -10,17 +10,15 @@ #include <Arduino.h> -uint8_t led = LED_BUILTIN; - void setup(void) { /* put your setup code here, to run once: */ - pinMode(led, OUTPUT); + pinMode(LED_BUILTIN, OUTPUT); } void loop(void) { /* put your main code here, to run repeatedly: */ - digitalWrite(led, !digitalRead(led)); + digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); delay(100); } |
