mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
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.
This commit is contained in:
parent
855ef72202
commit
1657606092
33
sys/arduino/include/Arduino.h
Normal file
33
sys/arduino/include/Arduino.h
Normal file
@ -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 <gunar@schorcht.net>
|
||||
* @file
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef ARDUINO_H
|
||||
#define ARDUINO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "arduino.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ARDUINO_H */
|
||||
/** @} */
|
@ -18,8 +18,8 @@
|
||||
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
*/
|
||||
|
||||
#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 */
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user