From 89bf823f7d2aa12782483f15d5f7240dbb3fdcf8 Mon Sep 17 00:00:00 2001 From: "Man, Jianting (Meco)" <920369182@qq.com> Date: Thu, 17 Feb 2022 00:36:15 -0500 Subject: [PATCH] [arduino][stm32l475] update application/arduino folder (#5599) --- .../applications/arduino/SConscript | 5 +--- .../applications/arduino/arduino_main.cpp | 23 ------------------- .../{arduino_pinout.c => pins_arduino.c} | 2 +- .../{arduino_pinout.h => pins_arduino.h} | 6 ++--- 4 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_main.cpp rename bsp/stm32/stm32l475-atk-pandora/applications/arduino/{arduino_pinout.c => pins_arduino.c} (98%) rename bsp/stm32/stm32l475-atk-pandora/applications/arduino/{arduino_pinout.h => pins_arduino.h} (88%) diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/arduino/SConscript b/bsp/stm32/stm32l475-atk-pandora/applications/arduino/SConscript index 82cb10de12..cce015c7ea 100644 --- a/bsp/stm32/stm32l475-atk-pandora/applications/arduino/SConscript +++ b/bsp/stm32/stm32l475-atk-pandora/applications/arduino/SConscript @@ -1,12 +1,9 @@ from building import * cwd = GetCurrentDir() -src = ['arduino_pinout.c'] +src = Glob('*.c') + Glob('*.cpp') inc = [cwd] group = DefineGroup('Arduino', src, depend = ['RT_USING_ARDUINO'], CPPPATH = inc) -src = ['arduino_main.cpp'] -group = group + DefineGroup('Applications', src, depend = ['RT_USING_ARDUINO']) - Return('group') diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_main.cpp b/bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_main.cpp deleted file mode 100644 index 455e8b8492..0000000000 --- a/bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_main.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2006-2021, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2021-12-10 Meco Man first version - */ -#include - -void setup(void) -{ - // put your setup code here, to run once: - pinMode(LED_BUILTIN, OUTPUT); -} - -void loop(void) -{ - // put your main code here, to run repeatedly: - digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); - delay(200); -} diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_pinout.c b/bsp/stm32/stm32l475-atk-pandora/applications/arduino/pins_arduino.c similarity index 98% rename from bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_pinout.c rename to bsp/stm32/stm32l475-atk-pandora/applications/arduino/pins_arduino.c index bf9eb45c84..38c08af4f3 100644 --- a/bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_pinout.c +++ b/bsp/stm32/stm32l475-atk-pandora/applications/arduino/pins_arduino.c @@ -9,7 +9,7 @@ */ #include #include -#include "arduino_pinout.h" +#include "pins_arduino.h" const pin_map_t pin_map_table[ARDUINO_PINOUT_PIN_MAX]= { diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_pinout.h b/bsp/stm32/stm32l475-atk-pandora/applications/arduino/pins_arduino.h similarity index 88% rename from bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_pinout.h rename to bsp/stm32/stm32l475-atk-pandora/applications/arduino/pins_arduino.h index 1ec160b9d7..1b0d5170ca 100644 --- a/bsp/stm32/stm32l475-atk-pandora/applications/arduino/arduino_pinout.h +++ b/bsp/stm32/stm32l475-atk-pandora/applications/arduino/pins_arduino.h @@ -7,8 +7,8 @@ * Date Author Notes * 2021-12-10 Meco Man first version */ -#ifndef __UNO_PINOUT_H__ -#define __UNO_PINOUT_H__ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h #define LED_BUILTIN 13 /* Built-in LED */ @@ -25,4 +25,4 @@ #define A4 (18) #define A5 (19) -#endif /* __UNO_PINOUT_H__ */ +#endif /* Pins_Arduino_h */