From 1657606092cf0e3d3935a330dff6c3ede10c03ba Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Thu, 5 Sep 2019 17:39:32 +0200 Subject: [PATCH] sys/arduino: add Arduino.h for compatibility Arduino libraries often include Arduino.h. For source code compatibility this header file is required. Header guards in file arduino.hpp had to be renamed. --- sys/arduino/include/Arduino.h | 33 +++++++++++++++++++++++++++++++++ sys/arduino/include/arduino.hpp | 6 +++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 sys/arduino/include/Arduino.h diff --git a/sys/arduino/include/Arduino.h b/sys/arduino/include/Arduino.h new file mode 100644 index 0000000000..a151793d6f --- /dev/null +++ b/sys/arduino/include/Arduino.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2018 Gunar Schorcht + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup sys_arduino + * @brief Wrapper to keep source code compatibility for Arduino.h + * @author Gunar Schorcht + * @file + * @{ + */ + +#ifndef ARDUINO_H +#define ARDUINO_H + +#ifdef __cplusplus +#include "arduino.hpp" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* ARDUINO_H */ +/** @} */ diff --git a/sys/arduino/include/arduino.hpp b/sys/arduino/include/arduino.hpp index 536f7fbbf8..6953a694f1 100644 --- a/sys/arduino/include/arduino.hpp +++ b/sys/arduino/include/arduino.hpp @@ -18,8 +18,8 @@ * @author Hauke Petersen */ -#ifndef ARDUINO_H -#define ARDUINO_H +#ifndef ARDUINO_HPP +#define ARDUINO_HPP extern "C" { #include "periph/gpio.h" @@ -122,5 +122,5 @@ unsigned long millis(); int analogRead(int pin); #endif -#endif /* ARDUINO_H */ +#endif /* ARDUINO_HPP */ /** @} */