summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-04-12 13:53:04 +0100
committerDamien George <damien.p.george@gmail.com>2016-04-12 14:06:54 +0100
commit1a65ff1b72f4cccecc797902d9713bce57b17588 (patch)
tree785df76c4685adab41f83fa2995da2f6aacb8a2e /esp8266
parent67a327cb9bfc727872e49f1c652541d256ee6097 (diff)
downloadmicropython-1a65ff1b72f4cccecc797902d9713bce57b17588.tar.gz
micropython-1a65ff1b72f4cccecc797902d9713bce57b17588.zip
esp8266: Protect modpyb.h header file from multiple inclusions.
Also include py/obj.h so the header is self contained.
Diffstat (limited to 'esp8266')
-rw-r--r--esp8266/modpyb.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/esp8266/modpyb.h b/esp8266/modpyb.h
index 3ac9f2f15f..eb67d5cd50 100644
--- a/esp8266/modpyb.h
+++ b/esp8266/modpyb.h
@@ -1,3 +1,8 @@
+#ifndef __MICROPY_INCLUDED_ESP8266_MODPYB_H__
+#define __MICROPY_INCLUDED_ESP8266_MODPYB_H__
+
+#include "py/obj.h"
+
extern const mp_obj_type_t pyb_pin_type;
extern const mp_obj_type_t pyb_pwm_type;
extern const mp_obj_type_t pyb_adc_type;
@@ -18,3 +23,5 @@ uint mp_obj_get_pin(mp_obj_t pin_in);
pyb_pin_obj_t *mp_obj_get_pin_obj(mp_obj_t pin_in);
int pin_get(uint pin);
void pin_set(uint pin, int value);
+
+#endif // __MICROPY_INCLUDED_ESP8266_MODPYB_H__