From 0429452465a8e8968028e9ac06b66a1936192808 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 5 Mar 2023 20:22:24 -0500 Subject: [PATCH] [bsp][rtduino] update arduino_main.cpp --- .../lpc55s69_nxp_evk/applications/arduino_main.cpp | 4 ++-- .../stm32f072-st-nucleo/applications/arduino_main.cpp | 4 ++-- .../stm32f103-blue-pill/applications/arduino_main.cpp | 4 ++-- .../stm32f401-st-nucleo/applications/arduino_main.cpp | 4 ++-- .../stm32f410-st-nucleo/applications/arduino_main.cpp | 4 ++-- .../stm32f411-st-nucleo/applications/arduino_main.cpp | 4 ++-- .../applications/arduino_main.cpp | 4 ++-- .../stm32l431-BearPi/applications/arduino_main.cpp | 4 ++-- .../risc-v/ch32v208w-r0/applications/arduino_main.cpp | 10 +++------- .../applications/arduino_pinout/pins_arduino.h | 2 ++ .../risc-v/ch32v307v-r1/applications/arduino_main.cpp | 4 ++-- 11 files changed, 23 insertions(+), 25 deletions(-) diff --git a/bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_main.cpp b/bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_main.cpp index 1323d585ab..baab793d3b 100644 --- a/bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_main.cpp +++ b/bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_main.cpp @@ -15,11 +15,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } diff --git a/bsp/stm32/stm32f072-st-nucleo/applications/arduino_main.cpp b/bsp/stm32/stm32f072-st-nucleo/applications/arduino_main.cpp index 3219ffc63d..bcd6e49470 100644 --- a/bsp/stm32/stm32f072-st-nucleo/applications/arduino_main.cpp +++ b/bsp/stm32/stm32f072-st-nucleo/applications/arduino_main.cpp @@ -14,11 +14,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } diff --git a/bsp/stm32/stm32f103-blue-pill/applications/arduino_main.cpp b/bsp/stm32/stm32f103-blue-pill/applications/arduino_main.cpp index 254c3d2e13..2d716cd96f 100644 --- a/bsp/stm32/stm32f103-blue-pill/applications/arduino_main.cpp +++ b/bsp/stm32/stm32f103-blue-pill/applications/arduino_main.cpp @@ -14,11 +14,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } diff --git a/bsp/stm32/stm32f401-st-nucleo/applications/arduino_main.cpp b/bsp/stm32/stm32f401-st-nucleo/applications/arduino_main.cpp index b2b2ab8162..ebcbdf9d53 100644 --- a/bsp/stm32/stm32f401-st-nucleo/applications/arduino_main.cpp +++ b/bsp/stm32/stm32f401-st-nucleo/applications/arduino_main.cpp @@ -14,11 +14,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } diff --git a/bsp/stm32/stm32f410-st-nucleo/applications/arduino_main.cpp b/bsp/stm32/stm32f410-st-nucleo/applications/arduino_main.cpp index ea6f0f5670..decc15cfe1 100644 --- a/bsp/stm32/stm32f410-st-nucleo/applications/arduino_main.cpp +++ b/bsp/stm32/stm32f410-st-nucleo/applications/arduino_main.cpp @@ -14,11 +14,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } diff --git a/bsp/stm32/stm32f411-st-nucleo/applications/arduino_main.cpp b/bsp/stm32/stm32f411-st-nucleo/applications/arduino_main.cpp index cab8989469..3d6048ac8f 100644 --- a/bsp/stm32/stm32f411-st-nucleo/applications/arduino_main.cpp +++ b/bsp/stm32/stm32f411-st-nucleo/applications/arduino_main.cpp @@ -14,11 +14,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } diff --git a/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_main.cpp b/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_main.cpp index 5ffd0f7be0..74997c0f32 100644 --- a/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_main.cpp +++ b/bsp/stm32/stm32f411-weact-blackpill/applications/arduino_main.cpp @@ -14,11 +14,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } diff --git a/bsp/stm32/stm32l431-BearPi/applications/arduino_main.cpp b/bsp/stm32/stm32l431-BearPi/applications/arduino_main.cpp index ed2c7cf02b..120fa514d9 100644 --- a/bsp/stm32/stm32l431-BearPi/applications/arduino_main.cpp +++ b/bsp/stm32/stm32l431-BearPi/applications/arduino_main.cpp @@ -14,11 +14,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } diff --git a/bsp/wch/risc-v/ch32v208w-r0/applications/arduino_main.cpp b/bsp/wch/risc-v/ch32v208w-r0/applications/arduino_main.cpp index b491796946..64e079733e 100644 --- a/bsp/wch/risc-v/ch32v208w-r0/applications/arduino_main.cpp +++ b/bsp/wch/risc-v/ch32v208w-r0/applications/arduino_main.cpp @@ -13,16 +13,12 @@ void setup(void) { /* put your setup code here, to run once: */ - pinMode(8, OUTPUT); - Serial.begin(); - Serial.println("Hello Arduino!"); + pinMode(LED_BUILTIN, OUTPUT); } void loop(void) { /* put your main code here, to run repeatedly: */ - digitalWrite(8, HIGH); - delay(500); - digitalWrite(8, LOW); - delay(500); + digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); + delay(100); } diff --git a/bsp/wch/risc-v/ch32v208w-r0/applications/arduino_pinout/pins_arduino.h b/bsp/wch/risc-v/ch32v208w-r0/applications/arduino_pinout/pins_arduino.h index eb26bbb40c..62c7e2205b 100644 --- a/bsp/wch/risc-v/ch32v208w-r0/applications/arduino_pinout/pins_arduino.h +++ b/bsp/wch/risc-v/ch32v208w-r0/applications/arduino_pinout/pins_arduino.h @@ -37,6 +37,8 @@ #define F_CPU 144000000L /* CPU:144MHz */ +#define LED_BUILTIN D8 + /* Serial1 : PA9-TX PB0-RX */ #define RTDUINO_SERIAL2_DEVICE_NAME "uart1" diff --git a/bsp/wch/risc-v/ch32v307v-r1/applications/arduino_main.cpp b/bsp/wch/risc-v/ch32v307v-r1/applications/arduino_main.cpp index 1ef508264f..17883c8a7c 100644 --- a/bsp/wch/risc-v/ch32v307v-r1/applications/arduino_main.cpp +++ b/bsp/wch/risc-v/ch32v307v-r1/applications/arduino_main.cpp @@ -14,11 +14,11 @@ void setup(void) { /* put your setup code here, to run once: */ Serial.begin(); + Serial.println("Hello RTduino!"); } void loop(void) { /* put your main code here, to run repeatedly: */ - Serial.println("Hello Arduino!"); - delay(800); + delay(1000); } -- GitLab