Merge pull request #118 from UncleRus/core/gpio_cpp_fix
esp/gpio.h c++ linker compatibility
This commit is contained in:
commit
02c35d8a71
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue