From 7d00c19e810a98962dbf46f008c9d0c71eb6fb02 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 27 Jan 2016 15:36:32 +0100 Subject: [PATCH] arduino: add C++ protection --- platforms/arduino/BTstack.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/platforms/arduino/BTstack.h b/platforms/arduino/BTstack.h index ccb398afa..40d741592 100644 --- a/platforms/arduino/BTstack.h +++ b/platforms/arduino/BTstack.h @@ -1,7 +1,12 @@ /** * Arduino Wrapper for BTstack */ -#pragma once +#ifndef __ARDUINO_BTSTACK_H +#define __ARDUINO_BTSTACK_H + +#if defined __cplusplus +extern "C" { +#endif #include "att.h" #include @@ -187,4 +192,10 @@ public: uint16_t addGATTCharacteristicDynamic(UUID * uuid, uint16_t flags, uint16_t characteristic_id); }; - extern BTstackManager BTstack; \ No newline at end of file +extern BTstackManager BTstack; + +#if defined __cplusplus +} +#endif + +#endif // __ARDUINO_BTSTACK_H \ No newline at end of file