From 3a62a0af0c882b6ba60661d197dd46fe24e8b2f8 Mon Sep 17 00:00:00 2001 From: UncleRus Date: Tue, 22 Mar 2016 01:51:50 +0500 Subject: [PATCH] esp/gpio.h c++ compatibility --- core/include/esp/gpio.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/include/esp/gpio.h b/core/include/esp/gpio.h index 01fe144..c6fa42f 100644 --- a/core/include/esp/gpio.h +++ b/core/include/esp/gpio.h @@ -13,6 +13,10 @@ #include "esp/iomux.h" #include "esp/interrupts.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { GPIO_INPUT, GPIO_OUTPUT, /* "Standard" push-pull output */ @@ -139,4 +143,8 @@ static inline gpio_inttype_t gpio_get_interrupt(const uint8_t gpio_num) return (gpio_inttype_t)FIELD2VAL(GPIO_CONF_INTTYPE, GPIO.CONF[gpio_num]); } +#ifdef __cplusplus +} +#endif + #endif