Merge pull request #118 from UncleRus/core/gpio_cpp_fix

esp/gpio.h c++ linker compatibility
This commit is contained in:
Angus Gratton 2016-03-22 13:27:12 +11:00
commit 02c35d8a71

View file

@ -13,6 +13,10 @@
#include "esp/iomux.h" #include "esp/iomux.h"
#include "esp/interrupts.h" #include "esp/interrupts.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum { typedef enum {
GPIO_INPUT, GPIO_INPUT,
GPIO_OUTPUT, /* "Standard" push-pull output */ 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]); return (gpio_inttype_t)FIELD2VAL(GPIO_CONF_INTTYPE, GPIO.CONF[gpio_num]);
} }
#ifdef __cplusplus
}
#endif
#endif #endif