summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--cc3200/bootmgr/bootmgr.h7
-rw-r--r--cc3200/bootmgr/flc.h7
-rw-r--r--cc3200/ftp/ftp.h7
-rw-r--r--cc3200/ftp/updater.h8
-rw-r--r--cc3200/hal/cc3200_hal.h5
-rw-r--r--cc3200/misc/antenna.h7
-rw-r--r--cc3200/misc/mperror.h7
-rw-r--r--cc3200/misc/mpexception.h7
-rw-r--r--cc3200/misc/mpirq.h7
-rw-r--r--cc3200/mods/modnetwork.h7
-rw-r--r--cc3200/mods/modubinascii.h7
-rw-r--r--cc3200/mods/moduos.h7
-rw-r--r--cc3200/mods/modusocket.h7
-rw-r--r--cc3200/mods/modwlan.h7
-rw-r--r--cc3200/mods/pybadc.h7
-rw-r--r--cc3200/mods/pybi2c.h7
-rw-r--r--cc3200/mods/pybpin.h7
-rw-r--r--cc3200/mods/pybrtc.h7
-rw-r--r--cc3200/mods/pybsd.h6
-rw-r--r--cc3200/mods/pybsleep.h7
-rw-r--r--cc3200/mods/pybspi.h7
-rw-r--r--cc3200/mods/pybtimer.h3
-rw-r--r--cc3200/mods/pybuart.h7
-rw-r--r--cc3200/mods/pybwdt.h7
-rw-r--r--cc3200/mpconfigport.h5
-rw-r--r--cc3200/mptask.h7
-rw-r--r--cc3200/mpthreadport.h4
-rw-r--r--cc3200/serverstask.h7
-rw-r--r--cc3200/telnet/telnet.h7
-rw-r--r--cc3200/util/cryptohash.h7
-rw-r--r--cc3200/util/fifo.h7
-rw-r--r--cc3200/util/gccollect.h4
-rw-r--r--cc3200/util/gchelper.h7
-rw-r--r--cc3200/util/random.h7
-rw-r--r--cc3200/util/sleeprestore.h7
-rw-r--r--cc3200/util/socketfifo.h7
-rw-r--r--cc3200/version.h7
-rw-r--r--drivers/dht/dht.h5
-rw-r--r--drivers/memory/spiflash.h1
-rw-r--r--esp8266/esp_mphal.h5
-rw-r--r--esp8266/espapa102.h4
-rw-r--r--esp8266/espneopixel.h5
-rw-r--r--esp8266/esppwm.h6
-rw-r--r--esp8266/ets_alt_task.h5
-rw-r--r--esp8266/etshal.h6
-rw-r--r--esp8266/gccollect.h4
-rw-r--r--esp8266/modmachine.h6
-rw-r--r--esp8266/uart.h6
-rw-r--r--esp8266/xtirq.h7
-rw-r--r--extmod/lwip-include/arch/cc.h6
-rw-r--r--extmod/lwip-include/arch/perf.h6
-rw-r--r--extmod/lwip-include/lwipopts.h7
-rw-r--r--extmod/machine_i2c.h7
-rw-r--r--extmod/machine_mem.h8
-rw-r--r--extmod/machine_pinbase.h8
-rw-r--r--extmod/machine_pulse.h7
-rw-r--r--extmod/machine_signal.h8
-rw-r--r--extmod/machine_spi.h1
-rw-r--r--extmod/misc.h4
-rw-r--r--extmod/modubinascii.h7
-rw-r--r--extmod/modwebsocket.h5
-rw-r--r--extmod/utime_mphal.h4
-rw-r--r--extmod/vfs.h1
-rw-r--r--extmod/vfs_fat.h4
-rw-r--r--extmod/virtpin.h4
-rw-r--r--lib/mp-readline/readline.h4
-rw-r--r--lib/netutils/netutils.h6
-rw-r--r--lib/timeutils/timeutils.h7
-rw-r--r--lib/utils/interrupt_char.h4
-rw-r--r--lib/utils/pyexec.h6
-rw-r--r--pic16bit/board.h6
-rw-r--r--pic16bit/modpyb.h6
-rw-r--r--pic16bit/pic16bit_mphal.h4
-rw-r--r--pic16bit/unistd.h5
-rw-r--r--py/asmarm.h6
-rw-r--r--py/asmthumb.h6
-rw-r--r--py/asmx64.h6
-rw-r--r--py/asmx86.h6
-rw-r--r--py/bc.h6
-rw-r--r--py/bc0.h6
-rw-r--r--py/binary.h6
-rw-r--r--py/builtin.h6
-rw-r--r--py/compile.h6
-rw-r--r--py/emit.h7
-rw-r--r--py/emitglue.h6
-rw-r--r--py/formatfloat.h6
-rw-r--r--py/frozenmod.h6
-rw-r--r--py/gc.h6
-rw-r--r--py/lexer.h6
-rw-r--r--py/misc.h6
-rw-r--r--py/mpconfig.h6
-rw-r--r--py/mperrno.h7
-rw-r--r--py/mphal.h6
-rw-r--r--py/mpprint.h6
-rw-r--r--py/mpstate.h6
-rw-r--r--py/mpthread.h6
-rw-r--r--py/mpz.h6
-rw-r--r--py/nlr.h6
-rw-r--r--py/obj.h6
-rw-r--r--py/objarray.h7
-rw-r--r--py/objexcept.h6
-rw-r--r--py/objfun.h6
-rw-r--r--py/objgenerator.h6
-rw-r--r--py/objint.h6
-rw-r--r--py/objlist.h6
-rw-r--r--py/objmodule.h6
-rw-r--r--py/objstr.h6
-rw-r--r--py/objtuple.h6
-rw-r--r--py/objtype.h6
-rw-r--r--py/parse.h6
-rw-r--r--py/parsenum.h6
-rw-r--r--py/parsenumbase.h6
-rw-r--r--py/qstr.h6
-rw-r--r--py/repl.h6
-rw-r--r--py/ringbuf.h6
-rw-r--r--py/runtime.h6
-rw-r--r--py/runtime0.h6
-rw-r--r--py/scope.h6
-rw-r--r--py/smallint.h6
-rw-r--r--py/stackctrl.h6
-rw-r--r--py/stream.h6
-rw-r--r--py/unicode.h6
-rw-r--r--stmhal/accel.h4
-rw-r--r--stmhal/adc.h4
-rw-r--r--stmhal/bufhelper.h4
-rw-r--r--stmhal/can.h4
-rw-r--r--stmhal/dac.h4
-rw-r--r--stmhal/dma.h7
-rw-r--r--stmhal/extint.h4
-rw-r--r--stmhal/flash.h4
-rw-r--r--stmhal/font_petme128_8x8.h4
-rw-r--r--stmhal/gccollect.h4
-rw-r--r--stmhal/i2c.h4
-rw-r--r--stmhal/irq.h1
-rw-r--r--stmhal/lcd.h4
-rw-r--r--stmhal/led.h4
-rw-r--r--stmhal/modmachine.h7
-rw-r--r--stmhal/modnetwork.h4
-rw-r--r--stmhal/mpconfigport.h6
-rw-r--r--stmhal/mpthreadport.h4
-rw-r--r--stmhal/pendsv.h4
-rw-r--r--stmhal/pin.h7
-rw-r--r--stmhal/portmodules.h4
-rw-r--r--stmhal/pybthread.h1
-rw-r--r--stmhal/rng.h4
-rw-r--r--stmhal/rtc.h4
-rw-r--r--stmhal/sdcard.h4
-rw-r--r--stmhal/servo.h4
-rw-r--r--stmhal/spi.h4
-rw-r--r--stmhal/stm32_it.h4
-rw-r--r--stmhal/storage.h4
-rw-r--r--stmhal/systick.h4
-rw-r--r--stmhal/timer.h4
-rw-r--r--stmhal/uart.h4
-rw-r--r--stmhal/usb.h4
-rw-r--r--stmhal/usbd_cdc_interface.h4
-rw-r--r--stmhal/usbd_desc.h4
-rw-r--r--stmhal/usbd_hid_interface.h4
-rw-r--r--stmhal/usbd_msc_storage.h4
-rw-r--r--stmhal/usbdev/class/inc/usbd_cdc_msc_hid0.h7
-rw-r--r--stmhal/usrsw.h4
-rw-r--r--stmhal/wdt.h4
-rw-r--r--teensy/hal_ftm.h4
-rw-r--r--teensy/led.h5
-rw-r--r--teensy/lexermemzip.h4
-rw-r--r--teensy/reg.h5
-rw-r--r--teensy/servo.h4
-rw-r--r--teensy/std.h5
-rw-r--r--teensy/timer.h4
-rw-r--r--teensy/usb.h5
-rw-r--r--unix/fdfile.h7
-rw-r--r--unix/input.h5
-rw-r--r--unix/mpthreadport.h4
-rw-r--r--windows/fmode.h7
-rw-r--r--windows/init.h4
-rw-r--r--windows/msvc/dirent.h4
-rw-r--r--windows/msvc/sys/time.h4
-rw-r--r--windows/msvc/unistd.h4
-rw-r--r--windows/realpath.h4
-rw-r--r--windows/sleep.h4
-rw-r--r--zephyr/modmachine.h6
181 files changed, 574 insertions, 414 deletions
diff --git a/cc3200/bootmgr/bootmgr.h b/cc3200/bootmgr/bootmgr.h
index 4b314335c0..e5285d4e46 100644
--- a/cc3200/bootmgr/bootmgr.h
+++ b/cc3200/bootmgr/bootmgr.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __BOOTMGR_H__
-#define __BOOTMGR_H__
+#ifndef MICROPY_INCLUDED_CC3200_BOOTMGR_BOOTMGR_H
+#define MICROPY_INCLUDED_CC3200_BOOTMGR_BOOTMGR_H
//****************************************************************************
//
@@ -66,4 +65,4 @@ extern void Run(unsigned long);
}
#endif
-#endif //__BOOTMGR_H__
+#endif // MICROPY_INCLUDED_CC3200_BOOTMGR_BOOTMGR_H
diff --git a/cc3200/bootmgr/flc.h b/cc3200/bootmgr/flc.h
index 4b2aca9ac5..7c04c7b054 100644
--- a/cc3200/bootmgr/flc.h
+++ b/cc3200/bootmgr/flc.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __FLC_H__
-#define __FLC_H__
+#ifndef MICROPY_INCLUDED_CC3200_BOOTMGR_FLC_H
+#define MICROPY_INCLUDED_CC3200_BOOTMGR_FLC_H
/******************************************************************************
@@ -93,4 +92,4 @@ typedef struct _sBootInfo_t
}
#endif
-#endif /* __FLC_H__ */
+#endif // MICROPY_INCLUDED_CC3200_BOOTMGR_FLC_H
diff --git a/cc3200/ftp/ftp.h b/cc3200/ftp/ftp.h
index 13b044dcfa..7d16002e46 100644
--- a/cc3200/ftp/ftp.h
+++ b/cc3200/ftp/ftp.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef FTP_H_
-#define FTP_H_
+#ifndef MICROPY_INCLUDED_CC3200_FTP_FTP_H
+#define MICROPY_INCLUDED_CC3200_FTP_FTP_H
/******************************************************************************
DECLARE EXPORTED FUNCTIONS
@@ -36,4 +35,4 @@ extern void ftp_enable (void);
extern void ftp_disable (void);
extern void ftp_reset (void);
-#endif /* FTP_H_ */
+#endif // MICROPY_INCLUDED_CC3200_FTP_FTP_H
diff --git a/cc3200/ftp/updater.h b/cc3200/ftp/updater.h
index b581d0fc8a..dcca704728 100644
--- a/cc3200/ftp/updater.h
+++ b/cc3200/ftp/updater.h
@@ -23,10 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-
-#ifndef UPDATER_H_
-#define UPDATER_H_
+#ifndef MICROPY_INCLUDED_CC3200_FTP_UPDATER_H
+#define MICROPY_INCLUDED_CC3200_FTP_UPDATER_H
extern void updater_pre_init (void);
extern bool updater_check_path (void *path);
@@ -35,4 +33,4 @@ extern bool updater_write (uint8_t *buf, uint32_t len);
extern void updater_finnish (void);
extern bool updater_verify (uint8_t *rbuff, uint8_t *hasbuff);
-#endif /* UPDATER_H_ */
+#endif // MICROPY_INCLUDED_CC3200_FTP_UPDATER_H
diff --git a/cc3200/hal/cc3200_hal.h b/cc3200/hal/cc3200_hal.h
index fcb85b2928..9953f0e5a2 100644
--- a/cc3200/hal/cc3200_hal.h
+++ b/cc3200/hal/cc3200_hal.h
@@ -24,9 +24,6 @@
* THE SOFTWARE.
*/
-#ifndef CC3200_LAUNCHXL_HAL_CC3200_HAL_H_
-#define CC3200_LAUNCHXL_HAL_CC3200_HAL_H_
-
#include <stdint.h>
#include <stdbool.h>
@@ -69,5 +66,3 @@ extern void mp_hal_set_interrupt_char (int c);
#define mp_hal_delay_us(usec) UtilsDelay(UTILS_DELAY_US_TO_COUNT(usec))
#define mp_hal_ticks_cpu() (SysTickPeriodGet() - SysTickValueGet())
-
-#endif /* CC3200_LAUNCHXL_HAL_CC3200_HAL_H_ */
diff --git a/cc3200/misc/antenna.h b/cc3200/misc/antenna.h
index b3b1c61624..3bb87e32b9 100644
--- a/cc3200/misc/antenna.h
+++ b/cc3200/misc/antenna.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef _ANTENNA_H_
-#define _ANTENNA_H_
+#ifndef MICROPY_INCLUDED_CC3200_MISC_ANTENNA_H
+#define MICROPY_INCLUDED_CC3200_MISC_ANTENNA_H
typedef enum {
ANTENNA_TYPE_INTERNAL = 0,
@@ -35,4 +34,4 @@ typedef enum {
extern void antenna_init0 (void);
extern void antenna_select (antenna_type_t antenna_type);
-#endif /* _ANTENNA_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MISC_ANTENNA_H
diff --git a/cc3200/misc/mperror.h b/cc3200/misc/mperror.h
index e38d129db0..46a9b8cb04 100644
--- a/cc3200/misc/mperror.h
+++ b/cc3200/misc/mperror.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MPERROR_H_
-#define MPERROR_H_
+#ifndef MICROPY_INCLUDED_CC3200_MISC_MPERROR_H
+#define MICROPY_INCLUDED_CC3200_MISC_MPERROR_H
extern void NORETURN __fatal_error(const char *msg);
@@ -39,4 +38,4 @@ void mperror_heartbeat_signal (void);
void mperror_enable_heartbeat (bool enable);
bool mperror_is_heartbeat_enabled (void);
-#endif // MPERROR_H_
+#endif // MICROPY_INCLUDED_CC3200_MISC_MPERROR_H
diff --git a/cc3200/misc/mpexception.h b/cc3200/misc/mpexception.h
index 2f9d1877c8..d23381cafc 100644
--- a/cc3200/misc/mpexception.h
+++ b/cc3200/misc/mpexception.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MPEXCEPTION_H_
-#define MPEXCEPTION_H_
+#ifndef MICROPY_INCLUDED_CC3200_MISC_MPEXCEPTION_H
+#define MICROPY_INCLUDED_CC3200_MISC_MPEXCEPTION_H
extern const char mpexception_value_invalid_arguments[];
extern const char mpexception_num_type_invalid_arguments[];
@@ -40,4 +39,4 @@ extern void mpexception_set_interrupt_char (int c);
extern void mpexception_nlr_jump (void *o);
extern void mpexception_keyboard_nlr_jump (void);
-#endif /* MPEXCEPTION_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MISC_MPEXCEPTION_H
diff --git a/cc3200/misc/mpirq.h b/cc3200/misc/mpirq.h
index 3fd21ee094..8b4ab2f1b8 100644
--- a/cc3200/misc/mpirq.h
+++ b/cc3200/misc/mpirq.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MPIRQ_H_
-#define MPIRQ_H_
+#ifndef MICROPY_INCLUDED_CC3200_MISC_MPIRQ_H
+#define MICROPY_INCLUDED_CC3200_MISC_MPIRQ_H
/******************************************************************************
DEFINE CONSTANTS
@@ -72,4 +71,4 @@ void mp_irq_remove (const mp_obj_t parent);
void mp_irq_handler (mp_obj_t self_in);
uint mp_irq_translate_priority (uint priority);
-#endif /* MPIRQ_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MISC_MPIRQ_H
diff --git a/cc3200/mods/modnetwork.h b/cc3200/mods/modnetwork.h
index 8a886c3e40..8e1196e868 100644
--- a/cc3200/mods/modnetwork.h
+++ b/cc3200/mods/modnetwork.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MODNETWORK_H_
-#define MODNETWORK_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_MODNETWORK_H
+#define MICROPY_INCLUDED_CC3200_MODS_MODNETWORK_H
/******************************************************************************
DEFINE CONSTANTS
@@ -71,4 +70,4 @@ extern const mod_network_nic_type_t mod_network_nic_type_wlan;
******************************************************************************/
void mod_network_init0(void);
-#endif // MODNETWORK_H_
+#endif // MICROPY_INCLUDED_CC3200_MODS_MODNETWORK_H
diff --git a/cc3200/mods/modubinascii.h b/cc3200/mods/modubinascii.h
index c04b70021f..3e784e9aec 100644
--- a/cc3200/mods/modubinascii.h
+++ b/cc3200/mods/modubinascii.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_CC3200_MODS_MODUBINASCII_H
+#define MICROPY_INCLUDED_CC3200_MODS_MODUBINASCII_H
-#ifndef MODUBINASCII_H_
-#define MODUBINASCII_H_
-
-#endif /* MODUBINASCII_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MODS_MODUBINASCII_H
diff --git a/cc3200/mods/moduos.h b/cc3200/mods/moduos.h
index 4c8bc96595..148cddf2e2 100644
--- a/cc3200/mods/moduos.h
+++ b/cc3200/mods/moduos.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MODUOS_H_
-#define MODUOS_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_MODUOS_H
+#define MICROPY_INCLUDED_CC3200_MODS_MODUOS_H
#include "py/obj.h"
@@ -45,4 +44,4 @@ typedef struct _os_term_dup_obj_t {
******************************************************************************/
void osmount_unmount_all (void);
-#endif // MODUOS_H_
+#endif // MICROPY_INCLUDED_CC3200_MODS_MODUOS_H
diff --git a/cc3200/mods/modusocket.h b/cc3200/mods/modusocket.h
index 851f8e5be7..80c1f24cd8 100644
--- a/cc3200/mods/modusocket.h
+++ b/cc3200/mods/modusocket.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MODUSOCKET_H_
-#define MODUSOCKET_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_MODUSOCKET_H
+#define MICROPY_INCLUDED_CC3200_MODS_MODUSOCKET_H
extern const mp_obj_dict_t socket_locals_dict;
extern const mp_stream_p_t socket_stream_p;
@@ -36,4 +35,4 @@ extern void modusocket_socket_delete (int16_t sd);
extern void modusocket_enter_sleep (void);
extern void modusocket_close_all_user_sockets (void);
-#endif /* MODUSOCKET_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MODS_MODUSOCKET_H
diff --git a/cc3200/mods/modwlan.h b/cc3200/mods/modwlan.h
index 3bfd1fbbf9..d37d276e8c 100644
--- a/cc3200/mods/modwlan.h
+++ b/cc3200/mods/modwlan.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MODWLAN_H_
-#define MODWLAN_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_MODWLAN_H
+#define MICROPY_INCLUDED_CC3200_MODS_MODWLAN_H
/******************************************************************************
DEFINE CONSTANTS
@@ -97,4 +96,4 @@ extern bool wlan_is_connected (void);
extern void wlan_set_current_time (uint32_t seconds_since_2000);
extern void wlan_off_on (void);
-#endif /* MODWLAN_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MODS_MODWLAN_H
diff --git a/cc3200/mods/pybadc.h b/cc3200/mods/pybadc.h
index b77c4af422..50640ee603 100644
--- a/cc3200/mods/pybadc.h
+++ b/cc3200/mods/pybadc.h
@@ -24,10 +24,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef PYBADC_H_
-#define PYBADC_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBADC_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBADC_H
extern const mp_obj_type_t pyb_adc_type;
-#endif /* PYBADC_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBADC_H
diff --git a/cc3200/mods/pybi2c.h b/cc3200/mods/pybi2c.h
index 7adffb2d99..d547f6330e 100644
--- a/cc3200/mods/pybi2c.h
+++ b/cc3200/mods/pybi2c.h
@@ -24,10 +24,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef PYBI2C_H_
-#define PYBI2C_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBI2C_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBI2C_H
extern const mp_obj_type_t pyb_i2c_type;
-#endif // PYBI2C_H_
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBI2C_H
diff --git a/cc3200/mods/pybpin.h b/cc3200/mods/pybpin.h
index ad02cc777a..6b4b7b1ed8 100644
--- a/cc3200/mods/pybpin.h
+++ b/cc3200/mods/pybpin.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef PYBPIN_H_
-#define PYBPIN_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBPIN_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBPIN_H
enum {
PORT_A0 = GPIOA0_BASE,
@@ -138,4 +137,4 @@ uint8_t pin_find_peripheral_unit (const mp_obj_t pin, uint8_t fn, uint8_t type);
uint8_t pin_find_peripheral_type (const mp_obj_t pin, uint8_t fn, uint8_t unit);
int8_t pin_find_af_index (const pin_obj_t* pin, uint8_t fn, uint8_t unit, uint8_t type);;
-#endif // PYBPIN_H_
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBPIN_H
diff --git a/cc3200/mods/pybrtc.h b/cc3200/mods/pybrtc.h
index 5111b78f7c..3fd11ecd60 100644
--- a/cc3200/mods/pybrtc.h
+++ b/cc3200/mods/pybrtc.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef PYBRTC_H_
-#define PYBRTC_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBRTC_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBRTC_H
// RTC triggers
#define PYB_RTC_ALARM0 (0x01)
@@ -56,4 +55,4 @@ extern void pyb_rtc_calc_future_time (uint32_t a_mseconds, uint32_t *f_seconds,
extern void pyb_rtc_repeat_alarm (pyb_rtc_obj_t *self);
extern void pyb_rtc_disable_alarm (void);
-#endif // PYBRTC_H_
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBRTC_H
diff --git a/cc3200/mods/pybsd.h b/cc3200/mods/pybsd.h
index a06df6d8d1..084d7caaf2 100644
--- a/cc3200/mods/pybsd.h
+++ b/cc3200/mods/pybsd.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef PYBSD_H_
-#define PYBSD_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBSD_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBSD_H
/******************************************************************************
DEFINE PUBLIC TYPES
@@ -41,4 +41,4 @@ typedef struct {
extern pybsd_obj_t pybsd_obj;
extern const mp_obj_type_t pyb_sd_type;
-#endif // PYBSD_H_
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBSD_H
diff --git a/cc3200/mods/pybsleep.h b/cc3200/mods/pybsleep.h
index d34895ae0d..513e6fa951 100644
--- a/cc3200/mods/pybsleep.h
+++ b/cc3200/mods/pybsleep.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef PYBSLEEP_H_
-#define PYBSLEEP_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBSLEEP_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBSLEEP_H
/******************************************************************************
DEFINE CONSTANTS
@@ -70,4 +69,4 @@ void pyb_sleep_deepsleep (void);
pybsleep_reset_cause_t pyb_sleep_get_reset_cause (void);
pybsleep_wake_reason_t pyb_sleep_get_wake_reason (void);
-#endif /* PYBSLEEP_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBSLEEP_H
diff --git a/cc3200/mods/pybspi.h b/cc3200/mods/pybspi.h
index 48e0edd613..b533b6056e 100644
--- a/cc3200/mods/pybspi.h
+++ b/cc3200/mods/pybspi.h
@@ -24,10 +24,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef PYBSPI_H_
-#define PYBSPI_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBSPI_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBSPI_H
extern const mp_obj_type_t pyb_spi_type;
-#endif // PYBSPI_H_
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBSPI_H
diff --git a/cc3200/mods/pybtimer.h b/cc3200/mods/pybtimer.h
index 4e9de138d8..a1b30cd2b0 100644
--- a/cc3200/mods/pybtimer.h
+++ b/cc3200/mods/pybtimer.h
@@ -24,6 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBTIMER_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBTIMER_H
/******************************************************************************
DECLARE EXPORTED DATA
@@ -35,3 +37,4 @@ extern const mp_obj_type_t pyb_timer_type;
******************************************************************************/
void timer_init0 (void);
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBTIMER_H
diff --git a/cc3200/mods/pybuart.h b/cc3200/mods/pybuart.h
index 19bc93607d..56440987f6 100644
--- a/cc3200/mods/pybuart.h
+++ b/cc3200/mods/pybuart.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef PYBUART_H_
-#define PYBUART_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBUART_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBUART_H
typedef enum {
PYB_UART_0 = 0,
@@ -43,4 +42,4 @@ int uart_rx_char(pyb_uart_obj_t *uart_obj);
bool uart_tx_char(pyb_uart_obj_t *self, int c);
bool uart_tx_strn(pyb_uart_obj_t *uart_obj, const char *str, uint len);
-#endif // PYBUART_H_
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBUART_H
diff --git a/cc3200/mods/pybwdt.h b/cc3200/mods/pybwdt.h
index f87f0a7738..2844587cb3 100644
--- a/cc3200/mods/pybwdt.h
+++ b/cc3200/mods/pybwdt.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef PYBWDT_H_
-#define PYBWDT_H_
+#ifndef MICROPY_INCLUDED_CC3200_MODS_PYBWDT_H
+#define MICROPY_INCLUDED_CC3200_MODS_PYBWDT_H
#include "py/obj.h"
@@ -36,4 +35,4 @@ void pybwdt_srv_alive (void);
void pybwdt_srv_sleeping (bool state);
void pybwdt_sl_alive (void);
-#endif /* PYBWDT_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MODS_PYBWDT_H
diff --git a/cc3200/mpconfigport.h b/cc3200/mpconfigport.h
index 4bd583a4b8..78f8c09480 100644
--- a/cc3200/mpconfigport.h
+++ b/cc3200/mpconfigport.h
@@ -25,9 +25,6 @@
* THE SOFTWARE.
*/
-#ifndef __INCLUDED_MPCONFIGPORT_H
-#define __INCLUDED_MPCONFIGPORT_H
-
#include <stdint.h>
#ifndef BOOTLOADER
@@ -235,5 +232,3 @@ typedef long mp_off_t;
#define MICROPY_PORT_WLAN_AP_KEY "www.wipy.io"
#define MICROPY_PORT_WLAN_AP_SECURITY SL_SEC_TYPE_WPA_WPA2
#define MICROPY_PORT_WLAN_AP_CHANNEL 5
-
-#endif // __INCLUDED_MPCONFIGPORT_H
diff --git a/cc3200/mptask.h b/cc3200/mptask.h
index e0d2f0eec1..9276cfc3ed 100644
--- a/cc3200/mptask.h
+++ b/cc3200/mptask.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MPTASK_H_
-#define MPTASK_H_
+#ifndef MICROPY_INCLUDED_CC3200_MPTASK_H
+#define MICROPY_INCLUDED_CC3200_MPTASK_H
/******************************************************************************
DEFINE CONSTANTS
@@ -44,4 +43,4 @@ extern StackType_t mpTaskStack[];
******************************************************************************/
extern void TASK_Micropython (void *pvParameters);
-#endif /* MPTASK_H_ */
+#endif // MICROPY_INCLUDED_CC3200_MPTASK_H
diff --git a/cc3200/mpthreadport.h b/cc3200/mpthreadport.h
index 2b49232ddf..dc9ba99204 100644
--- a/cc3200/mpthreadport.h
+++ b/cc3200/mpthreadport.h
@@ -23,8 +23,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_CC3200_MPTHREADPORT_H__
-#define __MICROPY_INCLUDED_CC3200_MPTHREADPORT_H__
#ifndef BOOTLOADER
#include "FreeRTOS.h"
@@ -39,5 +37,3 @@ typedef struct _mp_thread_mutex_t {
void mp_thread_init(void);
void mp_thread_gc_others(void);
-
-#endif // __MICROPY_INCLUDED_CC3200_MPTHREADPORT_H__
diff --git a/cc3200/serverstask.h b/cc3200/serverstask.h
index 2786ff6976..77a3af2f3d 100644
--- a/cc3200/serverstask.h
+++ b/cc3200/serverstask.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef SERVERSTASK_H_
-#define SERVERSTASK_H_
+#ifndef MICROPY_INCLUDED_CC3200_SERVERSTASK_H
+#define MICROPY_INCLUDED_CC3200_SERVERSTASK_H
/******************************************************************************
DEFINE CONSTANTS
@@ -73,4 +72,4 @@ extern void server_sleep_sockets (void);
extern void servers_set_timeout (uint32_t timeout);
extern uint32_t servers_get_timeout (void);
-#endif /* SERVERSTASK_H_ */
+#endif // MICROPY_INCLUDED_CC3200_SERVERSTASK_H
diff --git a/cc3200/telnet/telnet.h b/cc3200/telnet/telnet.h
index aa55313940..1e3173b11a 100644
--- a/cc3200/telnet/telnet.h
+++ b/cc3200/telnet/telnet.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef TELNET_H_
-#define TELNET_H_
+#ifndef MICROPY_INCLUDED_CC3200_TELNET_TELNET_H
+#define MICROPY_INCLUDED_CC3200_TELNET_TELNET_H
/******************************************************************************
DECLARE EXPORTED FUNCTIONS
@@ -39,4 +38,4 @@ extern void telnet_enable (void);
extern void telnet_disable (void);
extern void telnet_reset (void);
-#endif /* TELNET_H_ */
+#endif // MICROPY_INCLUDED_CC3200_TELNET_TELNET_H
diff --git a/cc3200/util/cryptohash.h b/cc3200/util/cryptohash.h
index d9f624d192..df3a8475c9 100644
--- a/cc3200/util/cryptohash.h
+++ b/cc3200/util/cryptohash.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef CRYPTOHASH_H_
-#define CRYPTOHASH_H_
+#ifndef MICROPY_INCLUDED_CC3200_UTIL_CRYPTOHASH_H
+#define MICROPY_INCLUDED_CC3200_UTIL_CRYPTOHASH_H
/******************************************************************************
DECLARE PUBLIC FUNCTIONS
@@ -35,4 +34,4 @@ extern void CRYPTOHASH_SHAMD5Start (uint32_t algo, uint32_t blocklen);
extern void CRYPTOHASH_SHAMD5Update (uint8_t *data, uint32_t datalen);
extern void CRYPTOHASH_SHAMD5Read (uint8_t *hash);
-#endif /* CRYPTOHASH_H_ */
+#endif // MICROPY_INCLUDED_CC3200_UTIL_CRYPTOHASH_H
diff --git a/cc3200/util/fifo.h b/cc3200/util/fifo.h
index c8590f5c2c..ee7571c265 100644
--- a/cc3200/util/fifo.h
+++ b/cc3200/util/fifo.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef FIFO_H_
-#define FIFO_H_
+#ifndef MICROPY_INCLUDED_CC3200_UTIL_FIFO_H
+#define MICROPY_INCLUDED_CC3200_UTIL_FIFO_H
typedef struct {
void *pvElements;
@@ -47,4 +46,4 @@ extern bool FIFO_IsEmpty (FIFO_t *fifo);
extern bool FIFO_IsFull (FIFO_t *fifo);
extern void FIFO_Flush (FIFO_t *fifo);
-#endif /* FIFO_H_ */
+#endif // MICROPY_INCLUDED_CC3200_UTIL_FIFO_H
diff --git a/cc3200/util/gccollect.h b/cc3200/util/gccollect.h
index 281e84aa83..3c4232b847 100644
--- a/cc3200/util/gccollect.h
+++ b/cc3200/util/gccollect.h
@@ -24,6 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_CC3200_UTIL_GCCOLLECT_H
+#define MICROPY_INCLUDED_CC3200_UTIL_GCCOLLECT_H
// variables defining memory layout
extern uint32_t _etext;
@@ -39,3 +41,5 @@ extern uint32_t _stack;
extern uint32_t _estack;
void gc_collect(void);
+
+#endif // MICROPY_INCLUDED_CC3200_UTIL_GCCOLLECT_H
diff --git a/cc3200/util/gchelper.h b/cc3200/util/gchelper.h
index 1f7d2fece4..0277a754b1 100644
--- a/cc3200/util/gchelper.h
+++ b/cc3200/util/gchelper.h
@@ -24,11 +24,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef GC_HELPER_H_
-#define GC_HELPER_H_
+#ifndef MICROPY_INCLUDED_CC3200_UTIL_GCHELPER_H
+#define MICROPY_INCLUDED_CC3200_UTIL_GCHELPER_H
extern mp_uint_t gc_helper_get_sp(void);
extern mp_uint_t gc_helper_get_regs_and_sp(mp_uint_t *regs);
-#endif /* GC_HELPER_H_ */
+#endif // MICROPY_INCLUDED_CC3200_UTIL_GCHELPER_H
diff --git a/cc3200/util/random.h b/cc3200/util/random.h
index 67fd1ff855..60b0b86639 100644
--- a/cc3200/util/random.h
+++ b/cc3200/util/random.h
@@ -23,13 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __RANDOM_H
-#define __RANDOM_H
+#ifndef MICROPY_INCLUDED_CC3200_UTIL_RANDOM_H
+#define MICROPY_INCLUDED_CC3200_UTIL_RANDOM_H
void rng_init0 (void);
uint32_t rng_get (void);
MP_DECLARE_CONST_FUN_OBJ_0(machine_rng_get_obj);
-#endif // __RANDOM_H
+#endif // MICROPY_INCLUDED_CC3200_UTIL_RANDOM_H
diff --git a/cc3200/util/sleeprestore.h b/cc3200/util/sleeprestore.h
index 51416f0fce..1c5509db05 100644
--- a/cc3200/util/sleeprestore.h
+++ b/cc3200/util/sleeprestore.h
@@ -23,11 +23,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef SLEEPRESTORE_H_
-#define SLEEPRESTORE_H_
+#ifndef MICROPY_INCLUDED_CC3200_UTIL_SLEEPRESTORE_H
+#define MICROPY_INCLUDED_CC3200_UTIL_SLEEPRESTORE_H
extern void sleep_store(void);
extern void sleep_restore(void);
-#endif /* SLEEPRESTORE_H_ */
+#endif // MICROPY_INCLUDED_CC3200_UTIL_SLEEPRESTORE_H
diff --git a/cc3200/util/socketfifo.h b/cc3200/util/socketfifo.h
index 69b17658ff..1309201eec 100644
--- a/cc3200/util/socketfifo.h
+++ b/cc3200/util/socketfifo.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef SOCKETFIFO_H_
-#define SOCKETFIFO_H_
+#ifndef MICROPY_INCLUDED_CC3200_UTIL_SOCKETFIFO_H
+#define MICROPY_INCLUDED_CC3200_UTIL_SOCKETFIFO_H
/*----------------------------------------------------------------------------
** Imports
@@ -60,4 +59,4 @@ extern bool SOCKETFIFO_IsFull (void);
extern void SOCKETFIFO_Flush (void);
extern unsigned int SOCKETFIFO_Count (void);
-#endif /* SOCKETFIFO_H_ */
+#endif // MICROPY_INCLUDED_CC3200_UTIL_SOCKETFIFO_H
diff --git a/cc3200/version.h b/cc3200/version.h
index c8315d771c..83e3f8c075 100644
--- a/cc3200/version.h
+++ b/cc3200/version.h
@@ -23,10 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef VERSION_H_
-#define VERSION_H_
+#ifndef MICROPY_INCLUDED_CC3200_VERSION_H
+#define MICROPY_INCLUDED_CC3200_VERSION_H
#define WIPY_SW_VERSION_NUMBER "1.2.0"
-#endif /* VERSION_H_ */
+#endif // MICROPY_INCLUDED_CC3200_VERSION_H
diff --git a/drivers/dht/dht.h b/drivers/dht/dht.h
index 20954036df..883e077961 100644
--- a/drivers/dht/dht.h
+++ b/drivers/dht/dht.h
@@ -1,3 +1,8 @@
+#ifndef MICROPY_INCLUDED_DRIVERS_DHT_DHT_H
+#define MICROPY_INCLUDED_DRIVERS_DHT_DHT_H
+
#include "py/obj.h"
MP_DECLARE_CONST_FUN_OBJ_2(dht_readinto_obj);
+
+#endif // MICROPY_INCLUDED_DRIVERS_DHT_DHT_H
diff --git a/drivers/memory/spiflash.h b/drivers/memory/spiflash.h
index d2e817450c..967352b04e 100644
--- a/drivers/memory/spiflash.h
+++ b/drivers/memory/spiflash.h
@@ -23,7 +23,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
#ifndef MICROPY_INCLUDED_DRIVERS_MEMORY_SPIFLASH_H
#define MICROPY_INCLUDED_DRIVERS_MEMORY_SPIFLASH_H
diff --git a/esp8266/esp_mphal.h b/esp8266/esp_mphal.h
index d783f1f09a..1d1d6de3fb 100644
--- a/esp8266/esp_mphal.h
+++ b/esp8266/esp_mphal.h
@@ -24,9 +24,6 @@
* THE SOFTWARE.
*/
-#ifndef _INCLUDED_MPHAL_H_
-#define _INCLUDED_MPHAL_H_
-
#include "py/ringbuf.h"
#include "lib/utils/interrupt_char.h"
#include "xtirq.h"
@@ -96,5 +93,3 @@ void mp_hal_pin_open_drain(mp_hal_pin_obj_t pin);
void *ets_get_esf_buf_ctlblk(void);
int ets_esf_free_bufs(int idx);
-
-#endif // _INCLUDED_MPHAL_H_
diff --git a/esp8266/espapa102.h b/esp8266/espapa102.h
index 82c92025d3..dd7c5ab729 100644
--- a/esp8266/espapa102.h
+++ b/esp8266/espapa102.h
@@ -23,5 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_ESP8266_ESPAPA102_H
+#define MICROPY_INCLUDED_ESP8266_ESPAPA102_H
void esp_apa102_write(uint8_t clockPin, uint8_t dataPin, uint8_t *pixels, uint32_t numBytes);
+
+#endif // MICROPY_INCLUDED_ESP8266_ESPAPA102_H
diff --git a/esp8266/espneopixel.h b/esp8266/espneopixel.h
index 4b20afda58..c444740ff9 100644
--- a/esp8266/espneopixel.h
+++ b/esp8266/espneopixel.h
@@ -1 +1,6 @@
+#ifndef MICROPY_INCLUDED_ESP8266_ESPNEOPIXEL_H
+#define MICROPY_INCLUDED_ESP8266_ESPNEOPIXEL_H
+
void esp_neopixel_write(uint8_t pin, uint8_t *pixels, uint32_t numBytes, bool is800KHz);
+
+#endif // MICROPY_INCLUDED_ESP8266_ESPNEOPIXEL_H
diff --git a/esp8266/esppwm.h b/esp8266/esppwm.h
index 242a9a2a6f..1ee4a2f55a 100644
--- a/esp8266/esppwm.h
+++ b/esp8266/esppwm.h
@@ -1,5 +1,5 @@
-#ifndef __ESPPWM_H__
-#define __ESPPWM_H__
+#ifndef MICROPY_INCLUDED_ESP8266_ESPPWM_H
+#define MICROPY_INCLUDED_ESP8266_ESPPWM_H
#include <stdbool.h>
#include <stdint.h>
@@ -14,4 +14,4 @@ uint16_t pwm_get_freq(uint8_t channel);
int pwm_add(uint8_t pin_id, uint32_t pin_mux, uint32_t pin_func);
bool pwm_delete(uint8_t channel);
-#endif
+#endif // MICROPY_INCLUDED_ESP8266_ESPPWM_H
diff --git a/esp8266/ets_alt_task.h b/esp8266/ets_alt_task.h
index dba0c5fa64..33a9d3a002 100644
--- a/esp8266/ets_alt_task.h
+++ b/esp8266/ets_alt_task.h
@@ -1,4 +1,9 @@
+#ifndef MICROPY_INCLUDED_ESP8266_ETS_ALT_TASK_H
+#define MICROPY_INCLUDED_ESP8266_ETS_ALT_TASK_H
+
extern int ets_loop_iter_disable;
extern uint32_t system_time_high_word;
bool ets_loop_iter(void);
+
+#endif // MICROPY_INCLUDED_ESP8266_ETS_ALT_TASK_H
diff --git a/esp8266/etshal.h b/esp8266/etshal.h
index 90af63ba2d..34787779f9 100644
--- a/esp8266/etshal.h
+++ b/esp8266/etshal.h
@@ -1,5 +1,5 @@
-#ifndef _INCLUDED_ETSHAL_H_
-#define _INCLUDED_ETSHAL_H_
+#ifndef MICROPY_INCLUDED_ESP8266_ETSHAL_H
+#define MICROPY_INCLUDED_ESP8266_ETSHAL_H
#include <os_type.h>
@@ -42,4 +42,4 @@ uint32_t SPIRead(uint32_t offset, void *buf, uint32_t len);
uint32_t SPIWrite(uint32_t offset, const void *buf, uint32_t len);
uint32_t SPIEraseSector(int sector);
-#endif // _INCLUDED_ETSHAL_H_
+#endif // MICROPY_INCLUDED_ESP8266_ETSHAL_H
diff --git a/esp8266/gccollect.h b/esp8266/gccollect.h
index d81cba12c4..0aee427711 100644
--- a/esp8266/gccollect.h
+++ b/esp8266/gccollect.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_ESP8266_GCCOLLECT_H
+#define MICROPY_INCLUDED_ESP8266_GCCOLLECT_H
extern uint32_t _text_start;
extern uint32_t _text_end;
@@ -39,3 +41,5 @@ extern uint32_t _heap_end;
void gc_collect(void);
void esp_native_code_gc_collect(void);
+
+#endif // MICROPY_INCLUDED_ESP8266_GCCOLLECT_H
diff --git a/esp8266/modmachine.h b/esp8266/modmachine.h
index 414aaa85b0..eae351f68d 100644
--- a/esp8266/modmachine.h
+++ b/esp8266/modmachine.h
@@ -1,5 +1,5 @@
-#ifndef __MICROPY_INCLUDED_ESP8266_MODPYB_H__
-#define __MICROPY_INCLUDED_ESP8266_MODPYB_H__
+#ifndef MICROPY_INCLUDED_ESP8266_MODMACHINE_H
+#define MICROPY_INCLUDED_ESP8266_MODMACHINE_H
#include "py/obj.h"
@@ -38,4 +38,4 @@ void pyb_rtc_set_us_since_2000(uint64_t nowus);
uint64_t pyb_rtc_get_us_since_2000();
void rtc_prepare_deepsleep(uint64_t sleep_us);
-#endif // __MICROPY_INCLUDED_ESP8266_MODPYB_H__
+#endif // MICROPY_INCLUDED_ESP8266_MODMACHINE_H
diff --git a/esp8266/uart.h b/esp8266/uart.h
index f6850c42db..ebcd8b051a 100644
--- a/esp8266/uart.h
+++ b/esp8266/uart.h
@@ -1,5 +1,5 @@
-#ifndef _INCLUDED_UART_H_
-#define _INCLUDED_UART_H_
+#ifndef MICROPY_INCLUDED_ESP8266_UART_H
+#define MICROPY_INCLUDED_ESP8266_UART_H
#include <eagle_soc.h>
@@ -103,4 +103,4 @@ void uart_setup(uint8 uart);
int uart_rx_any(uint8 uart);
int uart_tx_any_room(uint8 uart);
-#endif // _INCLUDED_UART_H_
+#endif // MICROPY_INCLUDED_ESP8266_UART_H
diff --git a/esp8266/xtirq.h b/esp8266/xtirq.h
index 856ff075ac..595052fc73 100644
--- a/esp8266/xtirq.h
+++ b/esp8266/xtirq.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_ESP8266_XTIRQ_H__
-#define __MICROPY_INCLUDED_ESP8266_XTIRQ_H__
+#ifndef MICROPY_INCLUDED_ESP8266_XTIRQ_H
+#define MICROPY_INCLUDED_ESP8266_XTIRQ_H
#include <stdint.h>
@@ -57,4 +56,4 @@ static inline void enable_irq(uint32_t irq_state) {
restore_irq_pri(irq_state);
}
-#endif // __MICROPY_INCLUDED_ESP8266_XTIRQ_H__
+#endif // MICROPY_INCLUDED_ESP8266_XTIRQ_H
diff --git a/extmod/lwip-include/arch/cc.h b/extmod/lwip-include/arch/cc.h
index 0a7907d347..400dc6ec75 100644
--- a/extmod/lwip-include/arch/cc.h
+++ b/extmod/lwip-include/arch/cc.h
@@ -1,5 +1,5 @@
-#ifndef __CC_H__
-#define __CC_H__
+#ifndef MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_CC_H
+#define MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_CC_H
#include <stdint.h>
@@ -38,4 +38,4 @@ typedef u32_t mem_ptr_t;
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_END
-#endif /* __ARCH_CC_H__ */
+#endif // MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_CC_H
diff --git a/extmod/lwip-include/arch/perf.h b/extmod/lwip-include/arch/perf.h
index 51710701a2..d310fc339f 100644
--- a/extmod/lwip-include/arch/perf.h
+++ b/extmod/lwip-include/arch/perf.h
@@ -1,7 +1,7 @@
-#ifndef __PERF_H__
-#define __PERF_H__
+#ifndef MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_PERF_H
+#define MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_PERF_H
#define PERF_START /* null definition */
#define PERF_STOP(x) /* null definition */
-#endif /* __PERF_H__ */
+#endif // MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_ARCH_PERF_H
diff --git a/extmod/lwip-include/lwipopts.h b/extmod/lwip-include/lwipopts.h
index e4a33b2381..2122f30f04 100644
--- a/extmod/lwip-include/lwipopts.h
+++ b/extmod/lwip-include/lwipopts.h
@@ -1,5 +1,5 @@
-#ifndef __LWIPOPTS_H__
-#define __LWIPOPTS_H__
+#ifndef MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_LWIPOPTS_H
+#define MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_LWIPOPTS_H
#include <py/mpconfig.h>
#include <py/misc.h>
@@ -32,5 +32,4 @@ typedef uint32_t sys_prot_t;
// things like this into a port-provided header file.
#define sys_now mp_hal_ticks_ms
-#endif
-
+#endif // MICROPY_INCLUDED_EXTMOD_LWIP_INCLUDE_LWIPOPTS_H
diff --git a/extmod/machine_i2c.h b/extmod/machine_i2c.h
index d49ff01e46..f5af6656f5 100644
--- a/extmod/machine_i2c.h
+++ b/extmod/machine_i2c.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H__
-#define __MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H__
+#ifndef MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H
+#define MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H
#include "py/obj.h"
@@ -54,4 +53,4 @@ extern const mp_obj_dict_t mp_machine_soft_i2c_locals_dict;
int mp_machine_soft_i2c_readfrom(mp_obj_base_t *self_in, uint16_t addr, uint8_t *dest, size_t len, bool stop);
int mp_machine_soft_i2c_writeto(mp_obj_base_t *self_in, uint16_t addr, const uint8_t *src, size_t len, bool stop);
-#endif // __MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H__
+#endif // MICROPY_INCLUDED_EXTMOD_MACHINE_I2C_H
diff --git a/extmod/machine_mem.h b/extmod/machine_mem.h
index fddd7d46c1..4bc9ac127e 100644
--- a/extmod/machine_mem.h
+++ b/extmod/machine_mem.h
@@ -23,10 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-
-#ifndef __MICROPY_INCLUDED_EXTMOD_MACHINE_MEM_H__
-#define __MICROPY_INCLUDED_EXTMOD_MACHINE_MEM_H__
+#ifndef MICROPY_INCLUDED_EXTMOD_MACHINE_MEM_H
+#define MICROPY_INCLUDED_EXTMOD_MACHINE_MEM_H
#include "py/obj.h"
@@ -48,4 +46,4 @@ uintptr_t MICROPY_MACHINE_MEM_GET_READ_ADDR(mp_obj_t addr_o, uint align);
uintptr_t MICROPY_MACHINE_MEM_GET_WRITE_ADDR(mp_obj_t addr_o, uint align);
#endif
-#endif // __MICROPY_INCLUDED_EXTMOD_MACHINE_MEM_H__
+#endif // MICROPY_INCLUDED_EXTMOD_MACHINE_MEM_H
diff --git a/extmod/machine_pinbase.h b/extmod/machine_pinbase.h
index ece3384cc6..c96abbc46c 100644
--- a/extmod/machine_pinbase.h
+++ b/extmod/machine_pinbase.h
@@ -23,13 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-
-#ifndef __MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H__
-#define __MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H__
+#ifndef MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H
+#define MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H
#include "py/obj.h"
extern const mp_obj_type_t machine_pinbase_type;
-#endif // __MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H__
+#endif // MICROPY_INCLUDED_EXTMOD_MACHINE_PINBASE_H
diff --git a/extmod/machine_pulse.h b/extmod/machine_pulse.h
index cc1c4eda5f..e303dca02e 100644
--- a/extmod/machine_pulse.h
+++ b/extmod/machine_pulse.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_EXTMOD_MACHINE_PULSE_H__
-#define __MICROPY_INCLUDED_EXTMOD_MACHINE_PULSE_H__
+#ifndef MICROPY_INCLUDED_EXTMOD_MACHINE_PULSE_H
+#define MICROPY_INCLUDED_EXTMOD_MACHINE_PULSE_H
#include "py/obj.h"
#include "py/mphal.h"
@@ -34,4 +33,4 @@ mp_uint_t machine_time_pulse_us(mp_hal_pin_obj_t pin, int pulse_level, mp_uint_t
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_time_pulse_us_obj);
-#endif // __MICROPY_INCLUDED_EXTMOD_MACHINE_PULSE_H__
+#endif // MICROPY_INCLUDED_EXTMOD_MACHINE_PULSE_H
diff --git a/extmod/machine_signal.h b/extmod/machine_signal.h
index 7f88cbaa87..df1c3e2e90 100644
--- a/extmod/machine_signal.h
+++ b/extmod/machine_signal.h
@@ -23,13 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-
-#ifndef __MICROPY_INCLUDED_EXTMOD_MACHINE_SIGNAL_H__
-#define __MICROPY_INCLUDED_EXTMOD_MACHINE_SIGNAL_H__
+#ifndef MICROPY_INCLUDED_EXTMOD_MACHINE_SIGNAL_H
+#define MICROPY_INCLUDED_EXTMOD_MACHINE_SIGNAL_H
#include "py/obj.h"
extern const mp_obj_type_t machine_signal_type;
-#endif // __MICROPY_INCLUDED_EXTMOD_MACHINE_SIGNAL_H__
+#endif // MICROPY_INCLUDED_EXTMOD_MACHINE_SIGNAL_H
diff --git a/extmod/machine_spi.h b/extmod/machine_spi.h
index 88a3e19f41..e24e41eb3d 100644
--- a/extmod/machine_spi.h
+++ b/extmod/machine_spi.h
@@ -23,7 +23,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
#ifndef MICROPY_INCLUDED_EXTMOD_MACHINE_SPI_H
#define MICROPY_INCLUDED_EXTMOD_MACHINE_SPI_H
diff --git a/extmod/misc.h b/extmod/misc.h
index d7ead06549..6c13592c75 100644
--- a/extmod/misc.h
+++ b/extmod/misc.h
@@ -24,6 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_EXTMOD_MISC_H
+#define MICROPY_INCLUDED_EXTMOD_MISC_H
// This file contains cumulative declarations for extmod/ .
@@ -38,3 +40,5 @@ void mp_uos_deactivate(const char *msg, mp_obj_t exc);
#else
#define mp_uos_dupterm_tx_strn(s, l)
#endif
+
+#endif // MICROPY_INCLUDED_EXTMOD_MISC_H
diff --git a/extmod/modubinascii.h b/extmod/modubinascii.h
index 33d0f1cbd8..6c0156fc4e 100644
--- a/extmod/modubinascii.h
+++ b/extmod/modubinascii.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef MICROPY_EXTMOD_MODUBINASCII
-#define MICROPY_EXTMOD_MODUBINASCII
+#ifndef MICROPY_INCLUDED_EXTMOD_MODUBINASCII_H
+#define MICROPY_INCLUDED_EXTMOD_MODUBINASCII_H
extern mp_obj_t mod_binascii_hexlify(size_t n_args, const mp_obj_t *args);
extern mp_obj_t mod_binascii_unhexlify(mp_obj_t data);
@@ -39,4 +38,4 @@ MP_DECLARE_CONST_FUN_OBJ_1(mod_binascii_a2b_base64_obj);
MP_DECLARE_CONST_FUN_OBJ_1(mod_binascii_b2a_base64_obj);
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mod_binascii_crc32_obj);
-#endif /* MICROPY_EXTMOD_MODUBINASCII */
+#endif // MICROPY_INCLUDED_EXTMOD_MODUBINASCII_H
diff --git a/extmod/modwebsocket.h b/extmod/modwebsocket.h
index 7da147561c..2720147dfd 100644
--- a/extmod/modwebsocket.h
+++ b/extmod/modwebsocket.h
@@ -1,5 +1,10 @@
+#ifndef MICROPY_INCLUDED_EXTMOD_MODWEBSOCKET_H
+#define MICROPY_INCLUDED_EXTMOD_MODWEBSOCKET_H
+
#define FRAME_OPCODE_MASK 0x0f
enum {
FRAME_CONT, FRAME_TXT, FRAME_BIN,
FRAME_CLOSE = 0x8, FRAME_PING, FRAME_PONG
};
+
+#endif // MICROPY_INCLUDED_EXTMOD_MODWEBSOCKET_H
diff --git a/extmod/utime_mphal.h b/extmod/utime_mphal.h
index 644387b676..88a9ed4d37 100644
--- a/extmod/utime_mphal.h
+++ b/extmod/utime_mphal.h
@@ -24,6 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_EXTMOD_UTIME_MPHAL_H
+#define MICROPY_INCLUDED_EXTMOD_UTIME_MPHAL_H
#include "py/obj.h"
@@ -35,3 +37,5 @@ MP_DECLARE_CONST_FUN_OBJ_0(mp_utime_ticks_us_obj);
MP_DECLARE_CONST_FUN_OBJ_0(mp_utime_ticks_cpu_obj);
MP_DECLARE_CONST_FUN_OBJ_2(mp_utime_ticks_diff_obj);
MP_DECLARE_CONST_FUN_OBJ_2(mp_utime_ticks_add_obj);
+
+#endif // MICROPY_INCLUDED_EXTMOD_UTIME_MPHAL_H
diff --git a/extmod/vfs.h b/extmod/vfs.h
index edaeb53496..f2efdbe795 100644
--- a/extmod/vfs.h
+++ b/extmod/vfs.h
@@ -23,7 +23,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
#ifndef MICROPY_INCLUDED_EXTMOD_VFS_H
#define MICROPY_INCLUDED_EXTMOD_VFS_H
diff --git a/extmod/vfs_fat.h b/extmod/vfs_fat.h
index 6c7c05a9ac..63c4abb826 100644
--- a/extmod/vfs_fat.h
+++ b/extmod/vfs_fat.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_EXTMOD_VFS_FAT_H
+#define MICROPY_INCLUDED_EXTMOD_VFS_FAT_H
#include "py/lexer.h"
#include "py/obj.h"
@@ -58,3 +60,5 @@ mp_obj_t fatfs_builtin_open_self(mp_obj_t self_in, mp_obj_t path, mp_obj_t mode)
MP_DECLARE_CONST_FUN_OBJ_KW(mp_builtin_open_obj);
mp_obj_t fat_vfs_ilistdir2(struct _fs_user_mount_t *vfs, const char *path, bool is_str_type);
+
+#endif // MICROPY_INCLUDED_EXTMOD_VFS_FAT_H
diff --git a/extmod/virtpin.h b/extmod/virtpin.h
index 0410103505..706affc192 100644
--- a/extmod/virtpin.h
+++ b/extmod/virtpin.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_EXTMOD_VIRTPIN_H
+#define MICROPY_INCLUDED_EXTMOD_VIRTPIN_H
#include "py/obj.h"
@@ -41,3 +43,5 @@ void mp_virtual_pin_write(mp_obj_t pin, int value);
// If a port exposes a Pin object, it's constructor should be like this
mp_obj_t mp_pin_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args);
+
+#endif // MICROPY_INCLUDED_EXTMOD_VIRTPIN_H
diff --git a/lib/mp-readline/readline.h b/lib/mp-readline/readline.h
index f73934d237..f53fdeaa85 100644
--- a/lib/mp-readline/readline.h
+++ b/lib/mp-readline/readline.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_LIB_MP_READLINE_READLINE_H
+#define MICROPY_INCLUDED_LIB_MP_READLINE_READLINE_H
#define CHAR_CTRL_A (1)
#define CHAR_CTRL_B (2)
@@ -42,3 +44,5 @@ void readline_push_history(const char *line);
void readline_init(vstr_t *line, const char *prompt);
void readline_note_newline(const char *prompt);
int readline_process_char(int c);
+
+#endif // MICROPY_INCLUDED_LIB_MP_READLINE_READLINE_H
diff --git a/lib/netutils/netutils.h b/lib/netutils/netutils.h
index 45e0216402..1e147afa95 100644
--- a/lib/netutils/netutils.h
+++ b/lib/netutils/netutils.h
@@ -24,8 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_LIB_NETUTILS_H__
-#define __MICROPY_INCLUDED_LIB_NETUTILS_H__
+#ifndef MICROPY_INCLUDED_LIB_NETUTILS_NETUTILS_H
+#define MICROPY_INCLUDED_LIB_NETUTILS_NETUTILS_H
#define NETUTILS_IPV4ADDR_BUFSIZE 4
@@ -47,4 +47,4 @@ void netutils_parse_ipv4_addr(mp_obj_t addr_in, uint8_t *out_ip, netutils_endian
// puts IP in out_ip (which must take at least IPADDR_BUF_SIZE bytes).
mp_uint_t netutils_parse_inet_addr(mp_obj_t addr_in, uint8_t *out_ip, netutils_endian_t endian);
-#endif // __MICROPY_INCLUDED_LIB_NETUTILS_H__
+#endif // MICROPY_INCLUDED_LIB_NETUTILS_NETUTILS_H
diff --git a/lib/timeutils/timeutils.h b/lib/timeutils/timeutils.h
index c3f1fc2db1..1dc486e2e4 100644
--- a/lib/timeutils/timeutils.h
+++ b/lib/timeutils/timeutils.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_LIB_TIMEUTILS_H__
-#define __MICROPY_INCLUDED_LIB_TIMEUTILS_H__
+#ifndef MICROPY_INCLUDED_LIB_TIMEUTILS_TIMEUTILS_H
+#define MICROPY_INCLUDED_LIB_TIMEUTILS_TIMEUTILS_H
typedef struct _timeutils_struct_time_t {
uint16_t tm_year; // i.e. 2014
@@ -52,4 +51,4 @@ mp_uint_t timeutils_seconds_since_2000(mp_uint_t year, mp_uint_t month,
mp_uint_t timeutils_mktime(mp_uint_t year, mp_int_t month, mp_int_t mday,
mp_int_t hours, mp_int_t minutes, mp_int_t seconds);
-#endif // __MICROPY_INCLUDED_LIB_TIMEUTILS_H__
+#endif // MICROPY_INCLUDED_LIB_TIMEUTILS_TIMEUTILS_H
diff --git a/lib/utils/interrupt_char.h b/lib/utils/interrupt_char.h
index ae0bf57e8a..ca50d4d567 100644
--- a/lib/utils/interrupt_char.h
+++ b/lib/utils/interrupt_char.h
@@ -23,7 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_LIB_UTILS_INTERRUPT_CHAR_H
+#define MICROPY_INCLUDED_LIB_UTILS_INTERRUPT_CHAR_H
extern int mp_interrupt_char;
void mp_hal_set_interrupt_char(int c);
void mp_keyboard_interrupt(void);
+
+#endif // MICROPY_INCLUDED_LIB_UTILS_INTERRUPT_CHAR_H
diff --git a/lib/utils/pyexec.h b/lib/utils/pyexec.h
index 0c7567e273..69cdb47620 100644
--- a/lib/utils/pyexec.h
+++ b/lib/utils/pyexec.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_LIB_UTILS_PYEXEC_H__
-#define __MICROPY_INCLUDED_LIB_UTILS_PYEXEC_H__
+#ifndef MICROPY_INCLUDED_LIB_UTILS_PYEXEC_H
+#define MICROPY_INCLUDED_LIB_UTILS_PYEXEC_H
typedef enum {
PYEXEC_MODE_RAW_REPL,
@@ -51,4 +51,4 @@ extern uint8_t pyexec_repl_active;
MP_DECLARE_CONST_FUN_OBJ_1(pyb_set_repl_info_obj);
-#endif // __MICROPY_INCLUDED_LIB_UTILS_PYEXEC_H__
+#endif // MICROPY_INCLUDED_LIB_UTILS_PYEXEC_H
diff --git a/pic16bit/board.h b/pic16bit/board.h
index 0eb022436b..f79dd34973 100644
--- a/pic16bit/board.h
+++ b/pic16bit/board.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PIC16BIT_BOARD_H__
-#define __MICROPY_INCLUDED_PIC16BIT_BOARD_H__
+#ifndef MICROPY_INCLUDED_PIC16BIT_BOARD_H
+#define MICROPY_INCLUDED_PIC16BIT_BOARD_H
void cpu_init(void);
@@ -40,4 +40,4 @@ int uart_rx_any(void);
int uart_rx_char(void);
void uart_tx_char(int chr);
-#endif // __MICROPY_INCLUDED_PIC16BIT_BOARD_H__
+#endif // MICROPY_INCLUDED_PIC16BIT_BOARD_H
diff --git a/pic16bit/modpyb.h b/pic16bit/modpyb.h
index 6c68cbdfdd..910ec1b6e2 100644
--- a/pic16bit/modpyb.h
+++ b/pic16bit/modpyb.h
@@ -23,11 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PIC16BIT_MODPYB_H__
-#define __MICROPY_INCLUDED_PIC16BIT_MODPYB_H__
+#ifndef MICROPY_INCLUDED_PIC16BIT_MODPYB_H
+#define MICROPY_INCLUDED_PIC16BIT_MODPYB_H
extern const mp_obj_type_t pyb_led_type;
extern const mp_obj_type_t pyb_switch_type;
extern const mp_obj_module_t pyb_module;
-#endif // __MICROPY_INCLUDED_PIC16BIT_MODPYB_H__
+#endif // MICROPY_INCLUDED_PIC16BIT_MODPYB_H
diff --git a/pic16bit/pic16bit_mphal.h b/pic16bit/pic16bit_mphal.h
index a858f7e0fd..ffcca41bfd 100644
--- a/pic16bit/pic16bit_mphal.h
+++ b/pic16bit/pic16bit_mphal.h
@@ -23,13 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PIC16BIT_PIC16BIT_MPHAL_H__
-#define __MICROPY_INCLUDED_PIC16BIT_PIC16BIT_MPHAL_H__
#include "py/mpstate.h"
void mp_hal_init(void);
void mp_hal_set_interrupt_char(int c);
-
-#endif // __MICROPY_INCLUDED_PIC16BIT_PIC16BIT_MPHAL_H__
diff --git a/pic16bit/unistd.h b/pic16bit/unistd.h
index cdd9fe0616..5b60c8a626 100644
--- a/pic16bit/unistd.h
+++ b/pic16bit/unistd.h
@@ -1,5 +1,10 @@
+#ifndef MICROPY_INCLUDED_PIC16BIT_UNISTD_H
+#define MICROPY_INCLUDED_PIC16BIT_UNISTD_H
+
// XC16 compiler doesn't seem to have unistd.h file
#define SEEK_CUR 1
typedef int ssize_t;
+
+#endif // MICROPY_INCLUDED_PIC16BIT_UNISTD_H
diff --git a/py/asmarm.h b/py/asmarm.h
index e273b98d73..c5900925f6 100644
--- a/py/asmarm.h
+++ b/py/asmarm.h
@@ -24,8 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_ASMARM_H__
-#define __MICROPY_INCLUDED_PY_ASMARM_H__
+#ifndef MICROPY_INCLUDED_PY_ASMARM_H
+#define MICROPY_INCLUDED_PY_ASMARM_H
#include "py/misc.h"
#include "py/asmbase.h"
@@ -202,4 +202,4 @@ void asm_arm_bl_ind(asm_arm_t *as, void *fun_ptr, uint fun_id, uint reg_temp);
#endif // GENERIC_ASM_API
-#endif // __MICROPY_INCLUDED_PY_ASMARM_H__
+#endif // MICROPY_INCLUDED_PY_ASMARM_H
diff --git a/py/asmthumb.h b/py/asmthumb.h
index 52e663b3bd..589c481cd5 100644
--- a/py/asmthumb.h
+++ b/py/asmthumb.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_ASMTHUMB_H__
-#define __MICROPY_INCLUDED_PY_ASMTHUMB_H__
+#ifndef MICROPY_INCLUDED_PY_ASMTHUMB_H
+#define MICROPY_INCLUDED_PY_ASMTHUMB_H
#include "py/misc.h"
#include "py/asmbase.h"
@@ -318,4 +318,4 @@ void asm_thumb_bl_ind(asm_thumb_t *as, void *fun_ptr, uint fun_id, uint reg_temp
#endif // GENERIC_ASM_API
-#endif // __MICROPY_INCLUDED_PY_ASMTHUMB_H__
+#endif // MICROPY_INCLUDED_PY_ASMTHUMB_H
diff --git a/py/asmx64.h b/py/asmx64.h
index 4499c53c32..a384cca007 100644
--- a/py/asmx64.h
+++ b/py/asmx64.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_ASMX64_H__
-#define __MICROPY_INCLUDED_PY_ASMX64_H__
+#ifndef MICROPY_INCLUDED_PY_ASMX64_H
+#define MICROPY_INCLUDED_PY_ASMX64_H
#include "py/mpconfig.h"
#include "py/misc.h"
@@ -197,4 +197,4 @@ void asm_x64_call_ind(asm_x64_t* as, void* ptr, int temp_r32);
#endif // GENERIC_ASM_API
-#endif // __MICROPY_INCLUDED_PY_ASMX64_H__
+#endif // MICROPY_INCLUDED_PY_ASMX64_H
diff --git a/py/asmx86.h b/py/asmx86.h
index 0b44af6639..fd34228d10 100644
--- a/py/asmx86.h
+++ b/py/asmx86.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_ASMX86_H__
-#define __MICROPY_INCLUDED_PY_ASMX86_H__
+#ifndef MICROPY_INCLUDED_PY_ASMX86_H
+#define MICROPY_INCLUDED_PY_ASMX86_H
#include "py/mpconfig.h"
#include "py/misc.h"
@@ -195,4 +195,4 @@ void asm_x86_call_ind(asm_x86_t* as, void* ptr, mp_uint_t n_args, int temp_r32);
#endif // GENERIC_ASM_API
-#endif // __MICROPY_INCLUDED_PY_ASMX86_H__
+#endif // MICROPY_INCLUDED_PY_ASMX86_H
diff --git a/py/bc.h b/py/bc.h
index 88045dc55b..c55d31fe4c 100644
--- a/py/bc.h
+++ b/py/bc.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_BC_H__
-#define __MICROPY_INCLUDED_PY_BC_H__
+#ifndef MICROPY_INCLUDED_PY_BC_H
+#define MICROPY_INCLUDED_PY_BC_H
#include "py/runtime.h"
#include "py/obj.h"
@@ -119,4 +119,4 @@ uint mp_opcode_format(const byte *ip, size_t *opcode_size);
#endif
-#endif // __MICROPY_INCLUDED_PY_BC_H__
+#endif // MICROPY_INCLUDED_PY_BC_H
diff --git a/py/bc0.h b/py/bc0.h
index b5650abe41..be8ac6c15c 100644
--- a/py/bc0.h
+++ b/py/bc0.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_BC0_H__
-#define __MICROPY_INCLUDED_PY_BC0_H__
+#ifndef MICROPY_INCLUDED_PY_BC0_H
+#define MICROPY_INCLUDED_PY_BC0_H
// Micro Python byte-codes.
// The comment at the end of the line (if it exists) tells the arguments to the byte-code.
@@ -116,4 +116,4 @@
#define MP_BC_UNARY_OP_MULTI (0xd0) // + op(7)
#define MP_BC_BINARY_OP_MULTI (0xd7) // + op(36)
-#endif // __MICROPY_INCLUDED_PY_BC0_H__
+#endif // MICROPY_INCLUDED_PY_BC0_H
diff --git a/py/binary.h b/py/binary.h
index 997d878c81..04cc6d83be 100644
--- a/py/binary.h
+++ b/py/binary.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_BINARY_H__
-#define __MICROPY_INCLUDED_PY_BINARY_H__
+#ifndef MICROPY_INCLUDED_PY_BINARY_H
+#define MICROPY_INCLUDED_PY_BINARY_H
#include "py/obj.h"
@@ -41,4 +41,4 @@ void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte **
long long mp_binary_get_int(mp_uint_t size, bool is_signed, bool big_endian, const byte *src);
void mp_binary_set_int(mp_uint_t val_sz, bool big_endian, byte *dest, mp_uint_t val);
-#endif // __MICROPY_INCLUDED_PY_BINARY_H__
+#endif // MICROPY_INCLUDED_PY_BINARY_H
diff --git a/py/builtin.h b/py/builtin.h
index ec326d037b..4915383f25 100644
--- a/py/builtin.h
+++ b/py/builtin.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_BUILTIN_H__
-#define __MICROPY_INCLUDED_PY_BUILTIN_H__
+#ifndef MICROPY_INCLUDED_PY_BUILTIN_H
+#define MICROPY_INCLUDED_PY_BUILTIN_H
#include "py/obj.h"
@@ -120,4 +120,4 @@ extern const mp_obj_module_t mp_module_btree;
extern const char *MICROPY_PY_BUILTINS_HELP_TEXT;
-#endif // __MICROPY_INCLUDED_PY_BUILTIN_H__
+#endif // MICROPY_INCLUDED_PY_BUILTIN_H
diff --git a/py/compile.h b/py/compile.h
index 45a98588d8..f6b262d18c 100644
--- a/py/compile.h
+++ b/py/compile.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_COMPILE_H__
-#define __MICROPY_INCLUDED_PY_COMPILE_H__
+#ifndef MICROPY_INCLUDED_PY_COMPILE_H
+#define MICROPY_INCLUDED_PY_COMPILE_H
#include "py/lexer.h"
#include "py/parse.h"
@@ -51,4 +51,4 @@ mp_raw_code_t *mp_compile_to_raw_code(mp_parse_tree_t *parse_tree, qstr source_f
// this is implemented in runtime.c
mp_obj_t mp_parse_compile_execute(mp_lexer_t *lex, mp_parse_input_kind_t parse_input_kind, mp_obj_dict_t *globals, mp_obj_dict_t *locals);
-#endif // __MICROPY_INCLUDED_PY_COMPILE_H__
+#endif // MICROPY_INCLUDED_PY_COMPILE_H
diff --git a/py/emit.h b/py/emit.h
index 0236a9b8d0..a58e20e3d7 100644
--- a/py/emit.h
+++ b/py/emit.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_PY_EMIT_H__
-#define __MICROPY_INCLUDED_PY_EMIT_H__
+#ifndef MICROPY_INCLUDED_PY_EMIT_H
+#define MICROPY_INCLUDED_PY_EMIT_H
#include "py/lexer.h"
#include "py/scope.h"
@@ -284,4 +283,4 @@ void mp_emitter_warning(pass_kind_t pass, const char *msg);
#define mp_emitter_warning(pass, msg)
#endif
-#endif // __MICROPY_INCLUDED_PY_EMIT_H__
+#endif // MICROPY_INCLUDED_PY_EMIT_H
diff --git a/py/emitglue.h b/py/emitglue.h
index 37c4f1b18f..3099965966 100644
--- a/py/emitglue.h
+++ b/py/emitglue.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_EMITGLUE_H__
-#define __MICROPY_INCLUDED_PY_EMITGLUE_H__
+#ifndef MICROPY_INCLUDED_PY_EMITGLUE_H
+#define MICROPY_INCLUDED_PY_EMITGLUE_H
#include "py/obj.h"
@@ -74,4 +74,4 @@ void mp_emit_glue_assign_native(mp_raw_code_t *rc, mp_raw_code_kind_t kind, void
mp_obj_t mp_make_function_from_raw_code(const mp_raw_code_t *rc, mp_obj_t def_args, mp_obj_t def_kw_args);
mp_obj_t mp_make_closure_from_raw_code(const mp_raw_code_t *rc, mp_uint_t n_closed_over, const mp_obj_t *args);
-#endif // __MICROPY_INCLUDED_PY_EMITGLUE_H__
+#endif // MICROPY_INCLUDED_PY_EMITGLUE_H
diff --git a/py/formatfloat.h b/py/formatfloat.h
index 0196034471..9c8d137bb1 100644
--- a/py/formatfloat.h
+++ b/py/formatfloat.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_FORMATFLOAT_H__
-#define __MICROPY_INCLUDED_PY_FORMATFLOAT_H__
+#ifndef MICROPY_INCLUDED_PY_FORMATFLOAT_H
+#define MICROPY_INCLUDED_PY_FORMATFLOAT_H
#include "py/mpconfig.h"
@@ -32,4 +32,4 @@
int mp_format_float(mp_float_t f, char *buf, size_t bufSize, char fmt, int prec, char sign);
#endif
-#endif // __MICROPY_INCLUDED_PY_FORMATFLOAT_H__
+#endif // MICROPY_INCLUDED_PY_FORMATFLOAT_H
diff --git a/py/frozenmod.h b/py/frozenmod.h
index 7c1299b2c5..6993167ac4 100644
--- a/py/frozenmod.h
+++ b/py/frozenmod.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_FROZENMOD_H__
-#define __MICROPY_INCLUDED_PY_FROZENMOD_H__
+#ifndef MICROPY_INCLUDED_PY_FROZENMOD_H
+#define MICROPY_INCLUDED_PY_FROZENMOD_H
#include "py/lexer.h"
@@ -38,4 +38,4 @@ int mp_find_frozen_module(const char *str, size_t len, void **data);
const char *mp_find_frozen_str(const char *str, size_t *len);
mp_import_stat_t mp_frozen_stat(const char *str);
-#endif // __MICROPY_INCLUDED_PY_FROZENMOD_H__
+#endif // MICROPY_INCLUDED_PY_FROZENMOD_H
diff --git a/py/gc.h b/py/gc.h
index 7d8fe2bf8c..1366955170 100644
--- a/py/gc.h
+++ b/py/gc.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_GC_H__
-#define __MICROPY_INCLUDED_PY_GC_H__
+#ifndef MICROPY_INCLUDED_PY_GC_H
+#define MICROPY_INCLUDED_PY_GC_H
#include <stdint.h>
@@ -64,4 +64,4 @@ void gc_info(gc_info_t *info);
void gc_dump_info(void);
void gc_dump_alloc_table(void);
-#endif // __MICROPY_INCLUDED_PY_GC_H__
+#endif // MICROPY_INCLUDED_PY_GC_H
diff --git a/py/lexer.h b/py/lexer.h
index 5d998b3521..435aa096b1 100644
--- a/py/lexer.h
+++ b/py/lexer.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_LEXER_H__
-#define __MICROPY_INCLUDED_PY_LEXER_H__
+#ifndef MICROPY_INCLUDED_PY_LEXER_H
+#define MICROPY_INCLUDED_PY_LEXER_H
#include <stdint.h>
@@ -192,4 +192,4 @@ mp_lexer_t *mp_lexer_new_from_file(const char *filename);
mp_lexer_t *mp_lexer_new_from_fd(qstr filename, int fd, bool close_fd);
#endif
-#endif // __MICROPY_INCLUDED_PY_LEXER_H__
+#endif // MICROPY_INCLUDED_PY_LEXER_H
diff --git a/py/misc.h b/py/misc.h
index 5ac0f933a3..cebbd38ea0 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_MISC_H__
-#define __MICROPY_INCLUDED_PY_MISC_H__
+#ifndef MICROPY_INCLUDED_PY_MISC_H
+#define MICROPY_INCLUDED_PY_MISC_H
// a mini library of useful types and functions
@@ -223,4 +223,4 @@ static inline mp_uint_t count_lead_ones(byte val) {
#define MP_FLOAT_EXP_BIAS ((1 << (MP_FLOAT_EXP_BITS - 1)) - 1)
#endif // MICROPY_PY_BUILTINS_FLOAT
-#endif // __MICROPY_INCLUDED_PY_MISC_H__
+#endif // MICROPY_INCLUDED_PY_MISC_H
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 32d64828d1..fb507a503e 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_MPCONFIG_H__
-#define __MICROPY_INCLUDED_PY_MPCONFIG_H__
+#ifndef MICROPY_INCLUDED_PY_MPCONFIG_H
+#define MICROPY_INCLUDED_PY_MPCONFIG_H
// This file contains default configuration settings for MicroPython.
// You can override any of the options below using mpconfigport.h file
@@ -1253,4 +1253,4 @@ typedef double mp_float_t;
#define MP_UNLIKELY(x) __builtin_expect((x), 0)
#endif
-#endif // __MICROPY_INCLUDED_PY_MPCONFIG_H__
+#endif // MICROPY_INCLUDED_PY_MPCONFIG_H
diff --git a/py/mperrno.h b/py/mperrno.h
index 6ea99ae227..c515ed4888 100644
--- a/py/mperrno.h
+++ b/py/mperrno.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_PY_MPERRNO_H__
-#define __MICROPY_INCLUDED_PY_MPERRNO_H__
+#ifndef MICROPY_INCLUDED_PY_MPERRNO_H
+#define MICROPY_INCLUDED_PY_MPERRNO_H
#if MICROPY_USE_INTERNAL_ERRNO
@@ -142,4 +141,4 @@
qstr mp_errno_to_str(mp_obj_t errno_val);
#endif
-#endif // __MICROPY_INCLUDED_PY_MPERRNO_H__
+#endif // MICROPY_INCLUDED_PY_MPERRNO_H
diff --git a/py/mphal.h b/py/mphal.h
index 8d5654f9e3..93a0a40ced 100644
--- a/py/mphal.h
+++ b/py/mphal.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_MPHAL_H__
-#define __MICROPY_INCLUDED_PY_MPHAL_H__
+#ifndef MICROPY_INCLUDED_PY_MPHAL_H
+#define MICROPY_INCLUDED_PY_MPHAL_H
#include "py/mpconfig.h"
@@ -80,4 +80,4 @@ mp_uint_t mp_hal_ticks_cpu(void);
#include "extmod/virtpin.h"
#endif
-#endif // __MICROPY_INCLUDED_PY_MPHAL_H__
+#endif // MICROPY_INCLUDED_PY_MPHAL_H
diff --git a/py/mpprint.h b/py/mpprint.h
index 4fc904a20a..20bd875b4a 100644
--- a/py/mpprint.h
+++ b/py/mpprint.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_MPPRINT_H__
-#define __MICROPY_INCLUDED_PY_MPPRINT_H__
+#ifndef MICROPY_INCLUDED_PY_MPPRINT_H
+#define MICROPY_INCLUDED_PY_MPPRINT_H
#include "py/mpconfig.h"
@@ -71,4 +71,4 @@ int mp_printf(const mp_print_t *print, const char *fmt, ...);
int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args);
#endif
-#endif // __MICROPY_INCLUDED_PY_MPPRINT_H__
+#endif // MICROPY_INCLUDED_PY_MPPRINT_H
diff --git a/py/mpstate.h b/py/mpstate.h
index 2b8f29a6ae..b09ba08cfe 100644
--- a/py/mpstate.h
+++ b/py/mpstate.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_MPSTATE_H__
-#define __MICROPY_INCLUDED_PY_MPSTATE_H__
+#ifndef MICROPY_INCLUDED_PY_MPSTATE_H
+#define MICROPY_INCLUDED_PY_MPSTATE_H
#include <stdint.h>
@@ -248,4 +248,4 @@ extern mp_state_thread_t *mp_thread_get_state(void);
#define MP_STATE_THREAD(x) (mp_state_ctx.thread.x)
#endif
-#endif // __MICROPY_INCLUDED_PY_MPSTATE_H__
+#endif // MICROPY_INCLUDED_PY_MPSTATE_H
diff --git a/py/mpthread.h b/py/mpthread.h
index 04d4f19684..602df830c4 100644
--- a/py/mpthread.h
+++ b/py/mpthread.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_MPTHREAD_H__
-#define __MICROPY_INCLUDED_PY_MPTHREAD_H__
+#ifndef MICROPY_INCLUDED_PY_MPTHREAD_H
+#define MICROPY_INCLUDED_PY_MPTHREAD_H
#include "py/mpconfig.h"
@@ -58,4 +58,4 @@ void mp_thread_mutex_unlock(mp_thread_mutex_t *mutex);
#define MP_THREAD_GIL_EXIT()
#endif
-#endif // __MICROPY_INCLUDED_PY_MPTHREAD_H__
+#endif // MICROPY_INCLUDED_PY_MPTHREAD_H
diff --git a/py/mpz.h b/py/mpz.h
index 5c88227223..878febf8b4 100644
--- a/py/mpz.h
+++ b/py/mpz.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_MPZ_H__
-#define __MICROPY_INCLUDED_PY_MPZ_H__
+#ifndef MICROPY_INCLUDED_PY_MPZ_H
+#define MICROPY_INCLUDED_PY_MPZ_H
#include <stdint.h>
@@ -139,4 +139,4 @@ mp_float_t mpz_as_float(const mpz_t *z);
#endif
size_t mpz_as_str_inpl(const mpz_t *z, unsigned int base, const char *prefix, char base_char, char comma, char *str);
-#endif // __MICROPY_INCLUDED_PY_MPZ_H__
+#endif // MICROPY_INCLUDED_PY_MPZ_H
diff --git a/py/nlr.h b/py/nlr.h
index 7a71ef34bd..624e973070 100644
--- a/py/nlr.h
+++ b/py/nlr.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_NLR_H__
-#define __MICROPY_INCLUDED_PY_NLR_H__
+#ifndef MICROPY_INCLUDED_PY_NLR_H
+#define MICROPY_INCLUDED_PY_NLR_H
// non-local return
// exception handling, basically a stack of setjmp/longjmp buffers
@@ -112,4 +112,4 @@ NORETURN void nlr_jump_fail(void *val);
#endif
-#endif // __MICROPY_INCLUDED_PY_NLR_H__
+#endif // MICROPY_INCLUDED_PY_NLR_H
diff --git a/py/obj.h b/py/obj.h
index a3c06a261a..f88c100047 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJ_H__
-#define __MICROPY_INCLUDED_PY_OBJ_H__
+#ifndef MICROPY_INCLUDED_PY_OBJ_H
+#define MICROPY_INCLUDED_PY_OBJ_H
#include "py/mpconfig.h"
#include "py/misc.h"
@@ -864,4 +864,4 @@ mp_obj_t mp_seq_extract_slice(size_t len, const mp_obj_t *seq, mp_bound_slice_t
memmove(((char*)dest) + (beg + slice_len) * (item_sz), ((char*)dest) + (end) * (item_sz), ((dest_len) + (len_adj) - ((beg) + (slice_len))) * (item_sz)); \
memmove(((char*)dest) + (beg) * (item_sz), slice, slice_len * (item_sz));
-#endif // __MICROPY_INCLUDED_PY_OBJ_H__
+#endif // MICROPY_INCLUDED_PY_OBJ_H
diff --git a/py/objarray.h b/py/objarray.h
index 06a2a07efb..0389668458 100644
--- a/py/objarray.h
+++ b/py/objarray.h
@@ -24,9 +24,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_PY_OBJARRAY_H__
-#define __MICROPY_INCLUDED_PY_OBJARRAY_H__
+#ifndef MICROPY_INCLUDED_PY_OBJARRAY_H
+#define MICROPY_INCLUDED_PY_OBJARRAY_H
#include "py/obj.h"
@@ -40,4 +39,4 @@ typedef struct _mp_obj_array_t {
void *items;
} mp_obj_array_t;
-#endif // __MICROPY_INCLUDED_PY_OBJARRAY_H__
+#endif // MICROPY_INCLUDED_PY_OBJARRAY_H
diff --git a/py/objexcept.h b/py/objexcept.h
index 3128fded79..2232e1e214 100644
--- a/py/objexcept.h
+++ b/py/objexcept.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJEXCEPT_H__
-#define __MICROPY_INCLUDED_PY_OBJEXCEPT_H__
+#ifndef MICROPY_INCLUDED_PY_OBJEXCEPT_H
+#define MICROPY_INCLUDED_PY_OBJEXCEPT_H
#include "py/obj.h"
#include "py/objtuple.h"
@@ -37,4 +37,4 @@ typedef struct _mp_obj_exception_t {
mp_obj_tuple_t *args;
} mp_obj_exception_t;
-#endif // __MICROPY_INCLUDED_PY_OBJEXCEPT_H__
+#endif // MICROPY_INCLUDED_PY_OBJEXCEPT_H
diff --git a/py/objfun.h b/py/objfun.h
index d02fada9b1..450c98f765 100644
--- a/py/objfun.h
+++ b/py/objfun.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJFUN_H__
-#define __MICROPY_INCLUDED_PY_OBJFUN_H__
+#ifndef MICROPY_INCLUDED_PY_OBJFUN_H
+#define MICROPY_INCLUDED_PY_OBJFUN_H
#include "py/obj.h"
@@ -41,4 +41,4 @@ typedef struct _mp_obj_fun_bc_t {
mp_obj_t extra_args[];
} mp_obj_fun_bc_t;
-#endif // __MICROPY_INCLUDED_PY_OBJFUN_H__
+#endif // MICROPY_INCLUDED_PY_OBJFUN_H
diff --git a/py/objgenerator.h b/py/objgenerator.h
index d1b9be4780..d61332a206 100644
--- a/py/objgenerator.h
+++ b/py/objgenerator.h
@@ -23,12 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJGENERATOR_H__
-#define __MICROPY_INCLUDED_PY_OBJGENERATOR_H__
+#ifndef MICROPY_INCLUDED_PY_OBJGENERATOR_H
+#define MICROPY_INCLUDED_PY_OBJGENERATOR_H
#include "py/obj.h"
#include "py/runtime.h"
mp_vm_return_kind_t mp_obj_gen_resume(mp_obj_t self_in, mp_obj_t send_val, mp_obj_t throw_val, mp_obj_t *ret_val);
-#endif // __MICROPY_INCLUDED_PY_OBJGENERATOR_H__
+#endif // MICROPY_INCLUDED_PY_OBJGENERATOR_H
diff --git a/py/objint.h b/py/objint.h
index da56c18624..f341306ed7 100644
--- a/py/objint.h
+++ b/py/objint.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJINT_H__
-#define __MICROPY_INCLUDED_PY_OBJINT_H__
+#ifndef MICROPY_INCLUDED_PY_OBJINT_H
+#define MICROPY_INCLUDED_PY_OBJINT_H
#include "py/mpz.h"
#include "py/obj.h"
@@ -63,4 +63,4 @@ mp_obj_t mp_obj_int_binary_op(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in);
mp_obj_t mp_obj_int_binary_op_extra_cases(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in);
mp_obj_t mp_obj_int_pow3(mp_obj_t base, mp_obj_t exponent, mp_obj_t modulus);
-#endif // __MICROPY_INCLUDED_PY_OBJINT_H__
+#endif // MICROPY_INCLUDED_PY_OBJINT_H
diff --git a/py/objlist.h b/py/objlist.h
index 5b2d216fc2..740ba9fda9 100644
--- a/py/objlist.h
+++ b/py/objlist.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJLIST_H__
-#define __MICROPY_INCLUDED_PY_OBJLIST_H__
+#ifndef MICROPY_INCLUDED_PY_OBJLIST_H
+#define MICROPY_INCLUDED_PY_OBJLIST_H
#include "py/obj.h"
@@ -35,4 +35,4 @@ typedef struct _mp_obj_list_t {
mp_obj_t *items;
} mp_obj_list_t;
-#endif // __MICROPY_INCLUDED_PY_OBJLIST_H__
+#endif // MICROPY_INCLUDED_PY_OBJLIST_H
diff --git a/py/objmodule.h b/py/objmodule.h
index 4e6612adc7..5bfbe51d5f 100644
--- a/py/objmodule.h
+++ b/py/objmodule.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJMODULE_H__
-#define __MICROPY_INCLUDED_PY_OBJMODULE_H__
+#ifndef MICROPY_INCLUDED_PY_OBJMODULE_H
+#define MICROPY_INCLUDED_PY_OBJMODULE_H
#include "py/obj.h"
@@ -34,4 +34,4 @@ extern const mp_map_t mp_builtin_module_weak_links_map;
mp_obj_t mp_module_get(qstr module_name);
void mp_module_register(qstr qstr, mp_obj_t module);
-#endif // __MICROPY_INCLUDED_PY_OBJMODULE_H__
+#endif // MICROPY_INCLUDED_PY_OBJMODULE_H
diff --git a/py/objstr.h b/py/objstr.h
index e92832d106..6fbed405a7 100644
--- a/py/objstr.h
+++ b/py/objstr.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJSTR_H__
-#define __MICROPY_INCLUDED_PY_OBJSTR_H__
+#ifndef MICROPY_INCLUDED_PY_OBJSTR_H
+#define MICROPY_INCLUDED_PY_OBJSTR_H
#include "py/obj.h"
@@ -102,4 +102,4 @@ MP_DECLARE_CONST_FUN_OBJ_1(str_isdigit_obj);
MP_DECLARE_CONST_FUN_OBJ_1(str_isupper_obj);
MP_DECLARE_CONST_FUN_OBJ_1(str_islower_obj);
-#endif // __MICROPY_INCLUDED_PY_OBJSTR_H__
+#endif // MICROPY_INCLUDED_PY_OBJSTR_H
diff --git a/py/objtuple.h b/py/objtuple.h
index 555c3b3c2c..6867023959 100644
--- a/py/objtuple.h
+++ b/py/objtuple.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJTUPLE_H__
-#define __MICROPY_INCLUDED_PY_OBJTUPLE_H__
+#ifndef MICROPY_INCLUDED_PY_OBJTUPLE_H
+#define MICROPY_INCLUDED_PY_OBJTUPLE_H
#include "py/obj.h"
@@ -61,4 +61,4 @@ void mp_obj_attrtuple_print_helper(const mp_print_t *print, const qstr *fields,
mp_obj_t mp_obj_new_attrtuple(const qstr *fields, size_t n, const mp_obj_t *items);
-#endif // __MICROPY_INCLUDED_PY_OBJTUPLE_H__
+#endif // MICROPY_INCLUDED_PY_OBJTUPLE_H
diff --git a/py/objtype.h b/py/objtype.h
index 61efd00c05..104b20aab1 100644
--- a/py/objtype.h
+++ b/py/objtype.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_OBJTYPE_H__
-#define __MICROPY_INCLUDED_PY_OBJTYPE_H__
+#ifndef MICROPY_INCLUDED_PY_OBJTYPE_H
+#define MICROPY_INCLUDED_PY_OBJTYPE_H
#include "py/obj.h"
@@ -49,4 +49,4 @@ mp_obj_t mp_obj_instance_call(mp_obj_t self_in, size_t n_args, size_t n_kw, cons
// this needs to be exposed for the above macros to work correctly
mp_obj_t mp_obj_instance_make_new(const mp_obj_type_t *self_in, size_t n_args, size_t n_kw, const mp_obj_t *args);
-#endif // __MICROPY_INCLUDED_PY_OBJTYPE_H__
+#endif // MICROPY_INCLUDED_PY_OBJTYPE_H
diff --git a/py/parse.h b/py/parse.h
index 769f5a8757..fec18825b8 100644
--- a/py/parse.h
+++ b/py/parse.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_PARSE_H__
-#define __MICROPY_INCLUDED_PY_PARSE_H__
+#ifndef MICROPY_INCLUDED_PY_PARSE_H
+#define MICROPY_INCLUDED_PY_PARSE_H
#include <stddef.h>
#include <stdint.h>
@@ -104,4 +104,4 @@ typedef struct _mp_parse_t {
mp_parse_tree_t mp_parse(struct _mp_lexer_t *lex, mp_parse_input_kind_t input_kind);
void mp_parse_tree_clear(mp_parse_tree_t *tree);
-#endif // __MICROPY_INCLUDED_PY_PARSE_H__
+#endif // MICROPY_INCLUDED_PY_PARSE_H
diff --git a/py/parsenum.h b/py/parsenum.h
index f140cfc85e..77fd0f4a50 100644
--- a/py/parsenum.h
+++ b/py/parsenum.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_PARSENUM_H__
-#define __MICROPY_INCLUDED_PY_PARSENUM_H__
+#ifndef MICROPY_INCLUDED_PY_PARSENUM_H
+#define MICROPY_INCLUDED_PY_PARSENUM_H
#include "py/mpconfig.h"
#include "py/lexer.h"
@@ -34,4 +34,4 @@
mp_obj_t mp_parse_num_integer(const char *restrict str, size_t len, int base, mp_lexer_t *lex);
mp_obj_t mp_parse_num_decimal(const char *str, size_t len, bool allow_imag, bool force_complex, mp_lexer_t *lex);
-#endif // __MICROPY_INCLUDED_PY_PARSENUM_H__
+#endif // MICROPY_INCLUDED_PY_PARSENUM_H
diff --git a/py/parsenumbase.h b/py/parsenumbase.h
index 9da9db8412..143796df48 100644
--- a/py/parsenumbase.h
+++ b/py/parsenumbase.h
@@ -23,11 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_PARSENUMBASE_H__
-#define __MICROPY_INCLUDED_PY_PARSENUMBASE_H__
+#ifndef MICROPY_INCLUDED_PY_PARSENUMBASE_H
+#define MICROPY_INCLUDED_PY_PARSENUMBASE_H
#include "py/mpconfig.h"
size_t mp_parse_num_base(const char *str, size_t len, int *base);
-#endif // __MICROPY_INCLUDED_PY_PARSENUMBASE_H__
+#endif // MICROPY_INCLUDED_PY_PARSENUMBASE_H
diff --git a/py/qstr.h b/py/qstr.h
index 8c63fbbc8d..4116eb81d4 100644
--- a/py/qstr.h
+++ b/py/qstr.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_QSTR_H__
-#define __MICROPY_INCLUDED_PY_QSTR_H__
+#ifndef MICROPY_INCLUDED_PY_QSTR_H
+#define MICROPY_INCLUDED_PY_QSTR_H
#include "py/mpconfig.h"
#include "py/misc.h"
@@ -76,4 +76,4 @@ const byte *qstr_data(qstr q, size_t *len);
void qstr_pool_info(size_t *n_pool, size_t *n_qstr, size_t *n_str_data_bytes, size_t *n_total_bytes);
void qstr_dump_data(void);
-#endif // __MICROPY_INCLUDED_PY_QSTR_H__
+#endif // MICROPY_INCLUDED_PY_QSTR_H
diff --git a/py/repl.h b/py/repl.h
index 048b0de0f9..c2499a270a 100644
--- a/py/repl.h
+++ b/py/repl.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_REPL_H__
-#define __MICROPY_INCLUDED_PY_REPL_H__
+#ifndef MICROPY_INCLUDED_PY_REPL_H
+#define MICROPY_INCLUDED_PY_REPL_H
#include "py/mpconfig.h"
#include "py/misc.h"
@@ -35,4 +35,4 @@ bool mp_repl_continue_with_input(const char *input);
size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print, const char **compl_str);
#endif
-#endif // __MICROPY_INCLUDED_PY_REPL_H__
+#endif // MICROPY_INCLUDED_PY_REPL_H
diff --git a/py/ringbuf.h b/py/ringbuf.h
index 5e108afad7..b416927060 100644
--- a/py/ringbuf.h
+++ b/py/ringbuf.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_RINGBUF_H__
-#define __MICROPY_INCLUDED_PY_RINGBUF_H__
+#ifndef MICROPY_INCLUDED_PY_RINGBUF_H
+#define MICROPY_INCLUDED_PY_RINGBUF_H
typedef struct _ringbuf_t {
uint8_t *buf;
@@ -69,4 +69,4 @@ static inline int ringbuf_put(ringbuf_t *r, uint8_t v) {
return 0;
}
-#endif // __MICROPY_INCLUDED_PY_RINGBUF_H__
+#endif // MICROPY_INCLUDED_PY_RINGBUF_H
diff --git a/py/runtime.h b/py/runtime.h
index d75d23ff18..0add564cc6 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_RUNTIME_H__
-#define __MICROPY_INCLUDED_PY_RUNTIME_H__
+#ifndef MICROPY_INCLUDED_PY_RUNTIME_H
+#define MICROPY_INCLUDED_PY_RUNTIME_H
#include "py/mpstate.h"
#include "py/obj.h"
@@ -178,4 +178,4 @@ void mp_warning(const char *msg, ...);
#define mp_warning(msg, ...)
#endif
-#endif // __MICROPY_INCLUDED_PY_RUNTIME_H__
+#endif // MICROPY_INCLUDED_PY_RUNTIME_H
diff --git a/py/runtime0.h b/py/runtime0.h
index 720fe6a23b..060ee8c0ad 100644
--- a/py/runtime0.h
+++ b/py/runtime0.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_RUNTIME0_H__
-#define __MICROPY_INCLUDED_PY_RUNTIME0_H__
+#ifndef MICROPY_INCLUDED_PY_RUNTIME0_H
+#define MICROPY_INCLUDED_PY_RUNTIME0_H
// These must fit in 8 bits; see scope.h
#define MP_SCOPE_FLAG_VARARGS (0x01)
@@ -151,4 +151,4 @@ typedef enum {
extern void *const mp_fun_table[MP_F_NUMBER_OF];
-#endif // __MICROPY_INCLUDED_PY_RUNTIME0_H__
+#endif // MICROPY_INCLUDED_PY_RUNTIME0_H
diff --git a/py/scope.h b/py/scope.h
index 826064d7ef..4d0c1b1d9b 100644
--- a/py/scope.h
+++ b/py/scope.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_SCOPE_H__
-#define __MICROPY_INCLUDED_PY_SCOPE_H__
+#ifndef MICROPY_INCLUDED_PY_SCOPE_H
+#define MICROPY_INCLUDED_PY_SCOPE_H
#include "py/parse.h"
#include "py/emitglue.h"
@@ -94,4 +94,4 @@ id_info_t *scope_find(scope_t *scope, qstr qstr);
id_info_t *scope_find_global(scope_t *scope, qstr qstr);
void scope_find_local_and_close_over(scope_t *scope, id_info_t *id, qstr qst);
-#endif // __MICROPY_INCLUDED_PY_SCOPE_H__
+#endif // MICROPY_INCLUDED_PY_SCOPE_H
diff --git a/py/smallint.h b/py/smallint.h
index b9686be30a..b2bfc6df91 100644
--- a/py/smallint.h
+++ b/py/smallint.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_SMALLINT_H__
-#define __MICROPY_INCLUDED_PY_SMALLINT_H__
+#ifndef MICROPY_INCLUDED_PY_SMALLINT_H
+#define MICROPY_INCLUDED_PY_SMALLINT_H
#include "py/mpconfig.h"
#include "py/misc.h"
@@ -65,4 +65,4 @@ bool mp_small_int_mul_overflow(mp_int_t x, mp_int_t y);
mp_int_t mp_small_int_modulo(mp_int_t dividend, mp_int_t divisor);
mp_int_t mp_small_int_floor_divide(mp_int_t num, mp_int_t denom);
-#endif // __MICROPY_INCLUDED_PY_SMALLINT_H__
+#endif // MICROPY_INCLUDED_PY_SMALLINT_H
diff --git a/py/stackctrl.h b/py/stackctrl.h
index e915f5000f..84c0e1427e 100644
--- a/py/stackctrl.h
+++ b/py/stackctrl.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_STACKCTRL_H__
-#define __MICROPY_INCLUDED_PY_STACKCTRL_H__
+#ifndef MICROPY_INCLUDED_PY_STACKCTRL_H
+#define MICROPY_INCLUDED_PY_STACKCTRL_H
#include "py/mpconfig.h"
@@ -45,4 +45,4 @@ void mp_stack_check(void);
#endif
-#endif // __MICROPY_INCLUDED_PY_STACKCTRL_H__
+#endif // MICROPY_INCLUDED_PY_STACKCTRL_H
diff --git a/py/stream.h b/py/stream.h
index 01199ab601..0b5fd7cc09 100644
--- a/py/stream.h
+++ b/py/stream.h
@@ -23,8 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_STREAM_H__
-#define __MICROPY_INCLUDED_PY_STREAM_H__
+#ifndef MICROPY_INCLUDED_PY_STREAM_H
+#define MICROPY_INCLUDED_PY_STREAM_H
#include "py/obj.h"
#include "py/mperrno.h"
@@ -103,4 +103,4 @@ int mp_stream_posix_fsync(mp_obj_t stream);
#define mp_is_nonblocking_error(errno) (0)
#endif
-#endif // __MICROPY_INCLUDED_PY_STREAM_H__
+#endif // MICROPY_INCLUDED_PY_STREAM_H
diff --git a/py/unicode.h b/py/unicode.h
index 89c28ed0ec..f99c9705d5 100644
--- a/py/unicode.h
+++ b/py/unicode.h
@@ -23,12 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_PY_UNICODE_H__
-#define __MICROPY_INCLUDED_PY_UNICODE_H__
+#ifndef MICROPY_INCLUDED_PY_UNICODE_H
+#define MICROPY_INCLUDED_PY_UNICODE_H
#include "py/mpconfig.h"
#include "py/misc.h"
mp_uint_t utf8_ptr_to_index(const byte *s, const byte *ptr);
-#endif // __MICROPY_INCLUDED_PY_UNICODE_H__
+#endif // MICROPY_INCLUDED_PY_UNICODE_H
diff --git a/stmhal/accel.h b/stmhal/accel.h
index 10b095f799..42b1563292 100644
--- a/stmhal/accel.h
+++ b/stmhal/accel.h
@@ -23,7 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_ACCEL_H
+#define MICROPY_INCLUDED_STMHAL_ACCEL_H
extern const mp_obj_type_t pyb_accel_type;
void accel_init(void);
+
+#endif // MICROPY_INCLUDED_STMHAL_ACCEL_H
diff --git a/stmhal/adc.h b/stmhal/adc.h
index ebaccbee3d..6ec5584643 100644
--- a/stmhal/adc.h
+++ b/stmhal/adc.h
@@ -23,6 +23,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_ADC_H
+#define MICROPY_INCLUDED_STMHAL_ADC_H
extern const mp_obj_type_t pyb_adc_type;
extern const mp_obj_type_t pyb_adc_all_type;
+
+#endif // MICROPY_INCLUDED_STMHAL_ADC_H
diff --git a/stmhal/bufhelper.h b/stmhal/bufhelper.h
index abdeea6a80..55f57be8e4 100644
--- a/stmhal/bufhelper.h
+++ b/stmhal/bufhelper.h
@@ -23,6 +23,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_BUFHELPER_H
+#define MICROPY_INCLUDED_STMHAL_BUFHELPER_H
void pyb_buf_get_for_send(mp_obj_t o, mp_buffer_info_t *bufinfo, byte *tmp_data);
mp_obj_t pyb_buf_get_for_recv(mp_obj_t o, vstr_t *vstr);
+
+#endif // MICROPY_INCLUDED_STMHAL_BUFHELPER_H
diff --git a/stmhal/can.h b/stmhal/can.h
index 4d4b1bb833..7c40e9bf99 100644
--- a/stmhal/can.h
+++ b/stmhal/can.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_CAN_H
+#define MICROPY_INCLUDED_STMHAL_CAN_H
#define PYB_CAN_1 (1)
#define PYB_CAN_2 (2)
@@ -32,3 +34,5 @@ extern const mp_obj_type_t pyb_can_type;
void can_init0(void);
void can_deinit(void);
void can_rx_irq_handler(uint can_id, uint fifo_id);
+
+#endif // MICROPY_INCLUDED_STMHAL_CAN_H
diff --git a/stmhal/dac.h b/stmhal/dac.h
index ba44158f39..93192c0fee 100644
--- a/stmhal/dac.h
+++ b/stmhal/dac.h
@@ -23,7 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_DAC_H
+#define MICROPY_INCLUDED_STMHAL_DAC_H
void dac_init(void);
extern const mp_obj_type_t pyb_dac_type;
+
+#endif // MICROPY_INCLUDED_STMHAL_DAC_H
diff --git a/stmhal/dma.h b/stmhal/dma.h
index 57b8f866d9..d8b11ca3a9 100644
--- a/stmhal/dma.h
+++ b/stmhal/dma.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_STMHAL_DMA_H__
-#define __MICROPY_INCLUDED_STMHAL_DMA_H__
+#ifndef MICROPY_INCLUDED_STMHAL_DMA_H
+#define MICROPY_INCLUDED_STMHAL_DMA_H
typedef struct _dma_descr_t dma_descr_t;
@@ -101,4 +100,4 @@ void dma_deinit(const dma_descr_t *dma_descr);
void dma_invalidate_channel(const dma_descr_t *dma_descr);
void dma_idle_handler(int controller);
-#endif //__MICROPY_INCLUDED_STMHAL_DMA_H__
+#endif // MICROPY_INCLUDED_STMHAL_DMA_H
diff --git a/stmhal/extint.h b/stmhal/extint.h
index b04224c401..0eae8942ce 100644
--- a/stmhal/extint.h
+++ b/stmhal/extint.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_EXTINT_H
+#define MICROPY_INCLUDED_STMHAL_EXTINT_H
// Vectors 0-15 are for regular pins
// Vectors 16-22 are for internal sources.
@@ -61,3 +63,5 @@ void extint_swint(uint line);
void Handle_EXTI_Irq(uint32_t line);
extern const mp_obj_type_t extint_type;
+
+#endif // MICROPY_INCLUDED_STMHAL_EXTINT_H
diff --git a/stmhal/flash.h b/stmhal/flash.h
index 007155ecb5..c5b5bf3522 100644
--- a/stmhal/flash.h
+++ b/stmhal/flash.h
@@ -23,7 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_FLASH_H
+#define MICROPY_INCLUDED_STMHAL_FLASH_H
uint32_t flash_get_sector_info(uint32_t addr, uint32_t *start_addr, uint32_t *size);
void flash_erase(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32);
void flash_write(uint32_t flash_dest, const uint32_t *src, uint32_t num_word32);
+
+#endif // MICROPY_INCLUDED_STMHAL_FLASH_H
diff --git a/stmhal/font_petme128_8x8.h b/stmhal/font_petme128_8x8.h
index 7f928edda4..f27277760f 100644
--- a/stmhal/font_petme128_8x8.h
+++ b/stmhal/font_petme128_8x8.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_FONT_PETME128_8X8_H
+#define MICROPY_INCLUDED_STMHAL_FONT_PETME128_8X8_H
static const uint8_t font_petme128_8x8[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 32=
@@ -122,3 +124,5 @@ static const uint8_t font_petme128_8x8[] = {
0x00,0x02,0x03,0x01,0x03,0x02,0x03,0x01, // 126=~
0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55, // 127
};
+
+#endif // MICROPY_INCLUDED_STMHAL_FONT_PETME128_8X8_H
diff --git a/stmhal/gccollect.h b/stmhal/gccollect.h
index 07797be7e4..2cb32a8d45 100644
--- a/stmhal/gccollect.h
+++ b/stmhal/gccollect.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_GCCOLLECT_H
+#define MICROPY_INCLUDED_STMHAL_GCCOLLECT_H
// variables defining memory layout
// (these probably belong somewhere else...)
@@ -37,3 +39,5 @@ extern uint32_t _heap_start;
extern uint32_t _heap_end;
extern uint32_t _estack;
extern uint32_t _ram_end;
+
+#endif // MICROPY_INCLUDED_STMHAL_GCCOLLECT_H
diff --git a/stmhal/i2c.h b/stmhal/i2c.h
index fc7a6f613e..eda076e829 100644
--- a/stmhal/i2c.h
+++ b/stmhal/i2c.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_I2C_H
+#define MICROPY_INCLUDED_STMHAL_I2C_H
#include "dma.h"
@@ -49,3 +51,5 @@ void i2c_init_freq(const pyb_i2c_obj_t *self, mp_int_t freq);
uint32_t i2c_get_baudrate(I2C_InitTypeDef *init);
void i2c_ev_irq_handler(mp_uint_t i2c_id);
void i2c_er_irq_handler(mp_uint_t i2c_id);
+
+#endif // MICROPY_INCLUDED_STMHAL_I2C_H
diff --git a/stmhal/irq.h b/stmhal/irq.h
index 35187520a0..8d44b50edf 100644
--- a/stmhal/irq.h
+++ b/stmhal/irq.h
@@ -23,7 +23,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
#ifndef MICROPY_INCLUDED_STMHAL_IRQ_H
#define MICROPY_INCLUDED_STMHAL_IRQ_H
diff --git a/stmhal/lcd.h b/stmhal/lcd.h
index 6a4b004bd9..be4f6ed251 100644
--- a/stmhal/lcd.h
+++ b/stmhal/lcd.h
@@ -23,5 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_LCD_H
+#define MICROPY_INCLUDED_STMHAL_LCD_H
extern const mp_obj_type_t pyb_lcd_type;
+
+#endif // MICROPY_INCLUDED_STMHAL_LCD_H
diff --git a/stmhal/led.h b/stmhal/led.h
index f4cd673362..fc93481818 100644
--- a/stmhal/led.h
+++ b/stmhal/led.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_LED_H
+#define MICROPY_INCLUDED_STMHAL_LED_H
typedef enum {
// PYBv3
@@ -48,3 +50,5 @@ void led_toggle(pyb_led_t led);
void led_debug(int value, int delay);
extern const mp_obj_type_t pyb_led_type;
+
+#endif // MICROPY_INCLUDED_STMHAL_LED_H
diff --git a/stmhal/modmachine.h b/stmhal/modmachine.h
index 164c5cfda2..ac39f854ed 100644
--- a/stmhal/modmachine.h
+++ b/stmhal/modmachine.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_STMHAL_MODMACHINE_H__
-#define __MICROPY_INCLUDED_STMHAL_MODMACHINE_H__
+#ifndef MICROPY_INCLUDED_STMHAL_MODMACHINE_H
+#define MICROPY_INCLUDED_STMHAL_MODMACHINE_H
#include "py/mpstate.h"
#include "py/nlr.h"
@@ -41,4 +40,4 @@ MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(machine_freq_obj);
MP_DECLARE_CONST_FUN_OBJ_0(machine_sleep_obj);
MP_DECLARE_CONST_FUN_OBJ_0(machine_deepsleep_obj);
-#endif // __MICROPY_INCLUDED_STMHAL_MODMACHINE_H__
+#endif // MICROPY_INCLUDED_STMHAL_MODMACHINE_H
diff --git a/stmhal/modnetwork.h b/stmhal/modnetwork.h
index d3bc5674de..83e4255d5a 100644
--- a/stmhal/modnetwork.h
+++ b/stmhal/modnetwork.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_MODNETWORK_H
+#define MICROPY_INCLUDED_STMHAL_MODNETWORK_H
#define MOD_NETWORK_IPADDR_BUF_SIZE (4)
@@ -77,3 +79,5 @@ extern const mod_network_nic_type_t mod_network_nic_type_cc3k;
void mod_network_init(void);
void mod_network_register_nic(mp_obj_t nic);
mp_obj_t mod_network_find_nic(const uint8_t *ip);
+
+#endif // MICROPY_INCLUDED_STMHAL_MODNETWORK_H
diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h
index d3ce11e02d..a8ea2f02aa 100644
--- a/stmhal/mpconfigport.h
+++ b/stmhal/mpconfigport.h
@@ -27,10 +27,6 @@
// Options to control how MicroPython is built for this port,
// overriding defaults in py/mpconfig.h.
-#pragma once
-#ifndef __INCLUDED_MPCONFIGPORT_H
-#define __INCLUDED_MPCONFIGPORT_H
-
// board specific definitions
#include "mpconfigboard.h"
@@ -350,5 +346,3 @@ static inline mp_uint_t disable_irq(void) {
#include <alloca.h>
#define MICROPY_PIN_DEFS_PORT_H "pin_defs_stmhal.h"
-
-#endif // __INCLUDED_MPCONFIGPORT_H
diff --git a/stmhal/mpthreadport.h b/stmhal/mpthreadport.h
index 3d8b4ef011..8e2372dcb4 100644
--- a/stmhal/mpthreadport.h
+++ b/stmhal/mpthreadport.h
@@ -23,8 +23,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_STMHAL_MPTHREADPORT_H__
-#define __MICROPY_INCLUDED_STMHAL_MPTHREADPORT_H__
#include "py/mpthread.h"
#include "pybthread.h"
@@ -53,5 +51,3 @@ static inline int mp_thread_mutex_lock(mp_thread_mutex_t *m, int wait) {
static inline void mp_thread_mutex_unlock(mp_thread_mutex_t *m) {
pyb_mutex_unlock(m);
}
-
-#endif // __MICROPY_INCLUDED_STMHAL_MPTHREADPORT_H__
diff --git a/stmhal/pendsv.h b/stmhal/pendsv.h
index 77c78d4c18..b64e61386d 100644
--- a/stmhal/pendsv.h
+++ b/stmhal/pendsv.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_PENDSV_H
+#define MICROPY_INCLUDED_STMHAL_PENDSV_H
void pendsv_init(void);
void pendsv_kbd_intr(void);
@@ -30,3 +32,5 @@ void pendsv_kbd_intr(void);
// since we play tricks with the stack, the compiler must not generate a
// prelude for this function
void pendsv_isr_handler(void) __attribute__((naked));
+
+#endif // MICROPY_INCLUDED_STMHAL_PENDSV_H
diff --git a/stmhal/pin.h b/stmhal/pin.h
index a11b0a0f8e..1ec4bd6b87 100644
--- a/stmhal/pin.h
+++ b/stmhal/pin.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_STMHAL_PIN_H__
-#define __MICROPY_INCLUDED_STMHAL_PIN_H__
+#ifndef MICROPY_INCLUDED_STMHAL_PIN_H
+#define MICROPY_INCLUDED_STMHAL_PIN_H
// This file requires pin_defs_xxx.h (which has port specific enums and
// defines, so we include it here. It should never be included directly
@@ -98,4 +97,4 @@ const pin_af_obj_t *pin_find_af(const pin_obj_t *pin, uint8_t fn, uint8_t unit);
const pin_af_obj_t *pin_find_af_by_index(const pin_obj_t *pin, mp_uint_t af_idx);
const pin_af_obj_t *pin_find_af_by_name(const pin_obj_t *pin, const char *name);
-#endif // __MICROPY_INCLUDED_STMHAL_PIN_H__
+#endif // MICROPY_INCLUDED_STMHAL_PIN_H
diff --git a/stmhal/portmodules.h b/stmhal/portmodules.h
index 0b460f38c2..4e892da963 100644
--- a/stmhal/portmodules.h
+++ b/stmhal/portmodules.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_PORTMODULES_H
+#define MICROPY_INCLUDED_STMHAL_PORTMODULES_H
extern const mp_obj_module_t pyb_module;
extern const mp_obj_module_t stm_module;
@@ -37,3 +39,5 @@ MP_DECLARE_CONST_FUN_OBJ_1(time_sleep_us_obj);
MP_DECLARE_CONST_FUN_OBJ_0(mod_os_sync_obj);
MP_DECLARE_CONST_FUN_OBJ_VAR_BETWEEN(mod_os_dupterm_obj);
+
+#endif // MICROPY_INCLUDED_STMHAL_PORTMODULES_H
diff --git a/stmhal/pybthread.h b/stmhal/pybthread.h
index 6edb2400e2..f628f934bc 100644
--- a/stmhal/pybthread.h
+++ b/stmhal/pybthread.h
@@ -23,7 +23,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
#ifndef MICROPY_INCLUDED_STMHAL_PYBTHREAD_H
#define MICROPY_INCLUDED_STMHAL_PYBTHREAD_H
diff --git a/stmhal/rng.h b/stmhal/rng.h
index ce1833e80b..f022f3a677 100644
--- a/stmhal/rng.h
+++ b/stmhal/rng.h
@@ -23,8 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_RNG_H
+#define MICROPY_INCLUDED_STMHAL_RNG_H
void rng_init0(void);
uint32_t rng_get(void);
MP_DECLARE_CONST_FUN_OBJ_0(pyb_rng_get_obj);
+
+#endif // MICROPY_INCLUDED_STMHAL_RNG_H
diff --git a/stmhal/rtc.h b/stmhal/rtc.h
index 69d64c778a..f382fa6b63 100644
--- a/stmhal/rtc.h
+++ b/stmhal/rtc.h
@@ -23,9 +23,13 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_RTC_H
+#define MICROPY_INCLUDED_STMHAL_RTC_H
extern RTC_HandleTypeDef RTCHandle;
extern const mp_obj_type_t pyb_rtc_type;
void rtc_init_start(bool force_init);
void rtc_init_finalise(void);
+
+#endif // MICROPY_INCLUDED_STMHAL_RTC_H
diff --git a/stmhal/sdcard.h b/stmhal/sdcard.h
index 237e48d8b9..d595f0f1af 100644
--- a/stmhal/sdcard.h
+++ b/stmhal/sdcard.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_SDCARD_H
+#define MICROPY_INCLUDED_STMHAL_SDCARD_H
// this is a fixed size and should not be changed
#define SDCARD_BLOCK_SIZE (512)
@@ -42,3 +44,5 @@ extern const struct _mp_obj_base_t pyb_sdcard_obj;
struct _fs_user_mount_t;
void sdcard_init_vfs(struct _fs_user_mount_t *vfs, int part);
+
+#endif // MICROPY_INCLUDED_STMHAL_SDCARD_H
diff --git a/stmhal/servo.h b/stmhal/servo.h
index 0fca8fea17..18fd493d52 100644
--- a/stmhal/servo.h
+++ b/stmhal/servo.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_SERVO_H
+#define MICROPY_INCLUDED_STMHAL_SERVO_H
void servo_init(void);
void servo_timer_irq_callback(void);
@@ -31,3 +33,5 @@ extern const mp_obj_type_t pyb_servo_type;
MP_DECLARE_CONST_FUN_OBJ_2(pyb_servo_set_obj);
MP_DECLARE_CONST_FUN_OBJ_2(pyb_pwm_set_obj);
+
+#endif // MICROPY_INCLUDED_STMHAL_SERVO_H
diff --git a/stmhal/spi.h b/stmhal/spi.h
index 5686bde649..e6752fdd18 100644
--- a/stmhal/spi.h
+++ b/stmhal/spi.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_SPI_H
+#define MICROPY_INCLUDED_STMHAL_SPI_H
extern SPI_HandleTypeDef SPIHandle1;
extern SPI_HandleTypeDef SPIHandle2;
@@ -37,3 +39,5 @@ extern const mp_obj_type_t machine_hard_spi_type;
void spi_init0(void);
void spi_init(SPI_HandleTypeDef *spi, bool enable_nss_pin);
SPI_HandleTypeDef *spi_get_handle(mp_obj_t o);
+
+#endif // MICROPY_INCLUDED_STMHAL_SPI_H
diff --git a/stmhal/stm32_it.h b/stmhal/stm32_it.h
index a168cda838..d6ed1b2b9b 100644
--- a/stmhal/stm32_it.h
+++ b/stmhal/stm32_it.h
@@ -25,6 +25,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_STM32_IT_H
+#define MICROPY_INCLUDED_STMHAL_STM32_IT_H
/**
******************************************************************************
@@ -80,3 +82,5 @@ void OTG_FS_IRQHandler(void);
#ifdef USE_USB_HS
void OTG_HS_IRQHandler(void);
#endif
+
+#endif // MICROPY_INCLUDED_STMHAL_STM32_IT_H
diff --git a/stmhal/storage.h b/stmhal/storage.h
index 4d3de77eda..0ecb5715a2 100644
--- a/stmhal/storage.h
+++ b/stmhal/storage.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_STORAGE_H
+#define MICROPY_INCLUDED_STMHAL_STORAGE_H
#define FLASH_BLOCK_SIZE (512)
@@ -45,3 +47,5 @@ extern const struct _mp_obj_type_t pyb_flash_type;
struct _fs_user_mount_t;
void pyb_flash_init_vfs(struct _fs_user_mount_t *vfs);
+
+#endif // MICROPY_INCLUDED_STMHAL_STORAGE_H
diff --git a/stmhal/systick.h b/stmhal/systick.h
index 1e7f623355..524afae40e 100644
--- a/stmhal/systick.h
+++ b/stmhal/systick.h
@@ -23,6 +23,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_SYSTICK_H
+#define MICROPY_INCLUDED_STMHAL_SYSTICK_H
void sys_tick_wait_at_least(uint32_t stc, uint32_t delay_ms);
bool sys_tick_has_passed(uint32_t stc, uint32_t delay_ms);
+
+#endif // MICROPY_INCLUDED_STMHAL_SYSTICK_H
diff --git a/stmhal/timer.h b/stmhal/timer.h
index a18d7cf104..72e461f2f1 100644
--- a/stmhal/timer.h
+++ b/stmhal/timer.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_TIMER_H
+#define MICROPY_INCLUDED_STMHAL_TIMER_H
extern TIM_HandleTypeDef TIM5_Handle;
@@ -36,3 +38,5 @@ uint32_t timer_get_source_freq(uint32_t tim_id);
void timer_irq_handler(uint tim_id);
TIM_HandleTypeDef *pyb_timer_get_handle(mp_obj_t timer);
+
+#endif // MICROPY_INCLUDED_STMHAL_TIMER_H
diff --git a/stmhal/uart.h b/stmhal/uart.h
index 7fdc59de75..7495309542 100644
--- a/stmhal/uart.h
+++ b/stmhal/uart.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_UART_H
+#define MICROPY_INCLUDED_STMHAL_UART_H
typedef enum {
PYB_UART_NONE = 0,
@@ -47,3 +49,5 @@ mp_uint_t uart_rx_any(pyb_uart_obj_t *uart_obj);
int uart_rx_char(pyb_uart_obj_t *uart_obj);
void uart_tx_strn(pyb_uart_obj_t *uart_obj, const char *str, uint len);
void uart_tx_strn_cooked(pyb_uart_obj_t *uart_obj, const char *str, uint len);
+
+#endif // MICROPY_INCLUDED_STMHAL_UART_H
diff --git a/stmhal/usb.h b/stmhal/usb.h
index 42e6c76f81..e04fe70d77 100644
--- a/stmhal/usb.h
+++ b/stmhal/usb.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_USB_H
+#define MICROPY_INCLUDED_STMHAL_USB_H
#include "usbd_cdc_msc_hid0.h"
@@ -67,3 +69,5 @@ void usb_vcp_send_strn_cooked(const char *str, int len);
void pyb_usb_host_init(void);
void pyb_usb_host_process(void);
uint pyb_usb_host_get_keyboard(void);
+
+#endif // MICROPY_INCLUDED_STMHAL_USB_H
diff --git a/stmhal/usbd_cdc_interface.h b/stmhal/usbd_cdc_interface.h
index d96861a7e5..6f9a1e8a3f 100644
--- a/stmhal/usbd_cdc_interface.h
+++ b/stmhal/usbd_cdc_interface.h
@@ -1,6 +1,8 @@
/*
* This file is part of the Micro Python project, http://micropython.org/
*/
+#ifndef MICROPY_INCLUDED_STMHAL_USBD_CDC_INTERFACE_H
+#define MICROPY_INCLUDED_STMHAL_USBD_CDC_INTERFACE_H
/**
******************************************************************************
@@ -39,3 +41,5 @@ void USBD_CDC_TxAlways(const uint8_t *buf, uint32_t len);
int USBD_CDC_RxNum(void);
int USBD_CDC_Rx(uint8_t *buf, uint32_t len, uint32_t timeout);
+
+#endif // MICROPY_INCLUDED_STMHAL_USBD_CDC_INTERFACE_H
diff --git a/stmhal/usbd_desc.h b/stmhal/usbd_desc.h
index 93e222fc93..f48e364e1f 100644
--- a/stmhal/usbd_desc.h
+++ b/stmhal/usbd_desc.h
@@ -23,7 +23,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_USBD_DESC_H
+#define MICROPY_INCLUDED_STMHAL_USBD_DESC_H
extern const USBD_DescriptorsTypeDef USBD_Descriptors;
void USBD_SetVIDPIDRelease(uint16_t vid, uint16_t pid, uint16_t device_release_num, int cdc_only);
+
+#endif // MICROPY_INCLUDED_STMHAL_USBD_DESC_H
diff --git a/stmhal/usbd_hid_interface.h b/stmhal/usbd_hid_interface.h
index fbc874796e..b2ff75fa13 100644
--- a/stmhal/usbd_hid_interface.h
+++ b/stmhal/usbd_hid_interface.h
@@ -1,6 +1,8 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*/
+#ifndef MICROPY_INCLUDED_STMHAL_USBD_HID_INTERFACE_H
+#define MICROPY_INCLUDED_STMHAL_USBD_HID_INTERFACE_H
#include "usbd_cdc_msc_hid.h"
@@ -8,3 +10,5 @@ extern const USBD_HID_ItfTypeDef USBD_HID_fops;
int USBD_HID_RxNum(void);
int USBD_HID_Rx(USBD_HandleTypeDef *pdev, uint8_t *buf, uint32_t len, uint32_t timeout);
+
+#endif // MICROPY_INCLUDED_STMHAL_USBD_HID_INTERFACE_H
diff --git a/stmhal/usbd_msc_storage.h b/stmhal/usbd_msc_storage.h
index 4a0d28ca82..a4bc8004af 100644
--- a/stmhal/usbd_msc_storage.h
+++ b/stmhal/usbd_msc_storage.h
@@ -23,6 +23,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_USBD_MSC_STORAGE_H
+#define MICROPY_INCLUDED_STMHAL_USBD_MSC_STORAGE_H
extern const USBD_StorageTypeDef USBD_FLASH_STORAGE_fops;
extern const USBD_StorageTypeDef USBD_SDCARD_STORAGE_fops;
+
+#endif // MICROPY_INCLUDED_STMHAL_USBD_MSC_STORAGE_H
diff --git a/stmhal/usbdev/class/inc/usbd_cdc_msc_hid0.h b/stmhal/usbdev/class/inc/usbd_cdc_msc_hid0.h
index bc9d0d21a6..ec03c860a4 100644
--- a/stmhal/usbdev/class/inc/usbd_cdc_msc_hid0.h
+++ b/stmhal/usbdev/class/inc/usbd_cdc_msc_hid0.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_STMHAL_USB_CDC_MSC_HID0_H__
-#define __MICROPY_INCLUDED_STMHAL_USB_CDC_MSC_HID0_H__
+#ifndef MICROPY_INCLUDED_STMHAL_USBDEV_CLASS_INC_USBD_CDC_MSC_HID0_H
+#define MICROPY_INCLUDED_STMHAL_USBDEV_CLASS_INC_USBD_CDC_MSC_HID0_H
// these are exports for the CDC/MSC/HID interface that are independent
// from any other definitions/declarations
@@ -49,4 +48,4 @@ typedef struct _USBD_HID_ModeInfoTypeDef {
const uint8_t *report_desc;
} USBD_HID_ModeInfoTypeDef;
-#endif // __MICROPY_INCLUDED_STMHAL_USB_CDC_MSC_HID0_H__
+#endif // MICROPY_INCLUDED_STMHAL_USBDEV_CLASS_INC_USBD_CDC_MSC_HID0_H
diff --git a/stmhal/usrsw.h b/stmhal/usrsw.h
index b6dff2c431..9fbe6109d6 100644
--- a/stmhal/usrsw.h
+++ b/stmhal/usrsw.h
@@ -23,8 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_USRSW_H
+#define MICROPY_INCLUDED_STMHAL_USRSW_H
void switch_init0(void);
int switch_get(void);
extern const mp_obj_type_t pyb_switch_type;
+
+#endif // MICROPY_INCLUDED_STMHAL_USRSW_H
diff --git a/stmhal/wdt.h b/stmhal/wdt.h
index 362d6ef68b..0a486f704d 100644
--- a/stmhal/wdt.h
+++ b/stmhal/wdt.h
@@ -23,5 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_WDT_H
+#define MICROPY_INCLUDED_STMHAL_WDT_H
extern const mp_obj_type_t pyb_wdt_type;
+
+#endif // MICROPY_INCLUDED_STMHAL_WDT_H
diff --git a/teensy/hal_ftm.h b/teensy/hal_ftm.h
index 3dc15300d7..ad627358b6 100644
--- a/teensy/hal_ftm.h
+++ b/teensy/hal_ftm.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_TEENSY_HAL_FTM_H
+#define MICROPY_INCLUDED_TEENSY_HAL_FTM_H
#define FTM0 ((FTM_TypeDef *)&FTM0_SC)
#define FTM1 ((FTM_TypeDef *)&FTM1_SC)
@@ -181,4 +183,4 @@ void HAL_FTM_IC_Start(FTM_HandleTypeDef *hftm, uint32_t channel);
void HAL_FTM_IC_Start_IT(FTM_HandleTypeDef *hftm, uint32_t channel);
void HAL_FTM_IC_DeInit(FTM_HandleTypeDef *hftm);
-
+#endif // MICROPY_INCLUDED_TEENSY_HAL_FTM_H
diff --git a/teensy/led.h b/teensy/led.h
index 7f4ba18f26..5c45166ef2 100644
--- a/teensy/led.h
+++ b/teensy/led.h
@@ -1,3 +1,6 @@
+#ifndef MICROPY_INCLUDED_TEENSY_LED_H
+#define MICROPY_INCLUDED_TEENSY_LED_H
+
typedef enum {
PYB_LED_BUILTIN = 1,
} pyb_led_t;
@@ -7,3 +10,5 @@ void led_state(pyb_led_t led, int state);
void led_toggle(pyb_led_t led);
extern const mp_obj_type_t pyb_led_type;
+
+#endif // MICROPY_INCLUDED_TEENSY_LED_H
diff --git a/teensy/lexermemzip.h b/teensy/lexermemzip.h
index e5d4be5eae..cd7326a435 100644
--- a/teensy/lexermemzip.h
+++ b/teensy/lexermemzip.h
@@ -1,2 +1,6 @@
+#ifndef MICROPY_INCLUDED_TEENSY_LEXERMEMZIP_H
+#define MICROPY_INCLUDED_TEENSY_LEXERMEMZIP_H
+
mp_lexer_t *mp_lexer_new_from_memzip_file(const char *filename);
+#endif // MICROPY_INCLUDED_TEENSY_LEXERMEMZIP_H
diff --git a/teensy/reg.h b/teensy/reg.h
index 5d1d27443b..0da6378ee7 100644
--- a/teensy/reg.h
+++ b/teensy/reg.h
@@ -1,3 +1,6 @@
+#ifndef MICROPY_INCLUDED_TEENSY_REG_H
+#define MICROPY_INCLUDED_TEENSY_REG_H
+
typedef struct {
const char *name;
mp_uint_t offset;
@@ -6,3 +9,5 @@ typedef struct {
#define REG_ENTRY(st, name) { #name, offsetof(st, name) }
mp_obj_t reg_cmd(void *base, reg_t *reg, mp_uint_t num_reg, uint n_args, const mp_obj_t *args);
+
+#endif // MICROPY_INCLUDED_TEENSY_REG_H
diff --git a/teensy/servo.h b/teensy/servo.h
index 5f1c87b693..1ad34353d9 100644
--- a/teensy/servo.h
+++ b/teensy/servo.h
@@ -1,3 +1,6 @@
+#ifndef MICROPY_INCLUDED_TEENSY_SERVO_H
+#define MICROPY_INCLUDED_TEENSY_SERVO_H
+
void servo_init(void);
extern const mp_obj_type_t pyb_servo_type;
@@ -5,3 +8,4 @@ extern const mp_obj_type_t pyb_servo_type;
MP_DECLARE_CONST_FUN_OBJ_2(pyb_servo_set_obj);
MP_DECLARE_CONST_FUN_OBJ_2(pyb_pwm_set_obj);
+#endif // MICROPY_INCLUDED_TEENSY_SERVO_H
diff --git a/teensy/std.h b/teensy/std.h
index 42791877a3..ef55d22ddc 100644
--- a/teensy/std.h
+++ b/teensy/std.h
@@ -1,3 +1,6 @@
+#ifndef MICROPY_INCLUDED_TEENSY_STD_H
+#define MICROPY_INCLUDED_TEENSY_STD_H
+
typedef unsigned int size_t;
void __assert_func(void);
@@ -18,3 +21,5 @@ char *strcat(char *dest, const char *src);
int printf(const char *fmt, ...);
int snprintf(char *str, size_t size, const char *fmt, ...);
+
+#endif // MICROPY_INCLUDED_TEENSY_STD_H
diff --git a/teensy/timer.h b/teensy/timer.h
index bfa7636f49..89095b0764 100644
--- a/teensy/timer.h
+++ b/teensy/timer.h
@@ -23,8 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_TEENSY_TIMER_H
+#define MICROPY_INCLUDED_TEENSY_TIMER_H
extern const mp_obj_type_t pyb_timer_type;
void timer_init0(void);
void timer_deinit(void);
+
+#endif // MICROPY_INCLUDED_TEENSY_TIMER_H
diff --git a/teensy/usb.h b/teensy/usb.h
index 949d7a59c0..50fb3ff90d 100644
--- a/teensy/usb.h
+++ b/teensy/usb.h
@@ -1,3 +1,6 @@
+#ifndef MICROPY_INCLUDED_TEENSY_USB_H
+#define MICROPY_INCLUDED_TEENSY_USB_H
+
bool usb_vcp_is_connected(void);
bool usb_vcp_is_enabled(void);
int usb_vcp_rx_num(void);
@@ -5,3 +8,5 @@ int usb_vcp_recv_byte(uint8_t *ptr);
void usb_vcp_send_str(const char* str);
void usb_vcp_send_strn(const char* str, int len);
void usb_vcp_send_strn_cooked(const char *str, int len);
+
+#endif // MICROPY_INCLUDED_TEENSY_USB_H
diff --git a/unix/fdfile.h b/unix/fdfile.h
index 8e8e97c795..591159deb5 100644
--- a/unix/fdfile.h
+++ b/unix/fdfile.h
@@ -24,12 +24,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_UNIX_FDFILE_H
+#define MICROPY_INCLUDED_UNIX_FDFILE_H
#include "py/obj.h"
-#ifndef __MICROPY_INCLUDED_UNIX_FILE_H__
-#define __MICROPY_INCLUDED_UNIX_FILE_H__
-
typedef struct _mp_obj_fdfile_t {
mp_obj_base_t base;
int fd;
@@ -38,4 +37,4 @@ typedef struct _mp_obj_fdfile_t {
extern const mp_obj_type_t mp_type_fileio;
extern const mp_obj_type_t mp_type_textio;
-#endif // __MICROPY_INCLUDED_UNIX_FILE_H__
+#endif // MICROPY_INCLUDED_UNIX_FDFILE_H
diff --git a/unix/input.h b/unix/input.h
index 7cbee33c5d..a76b87e644 100644
--- a/unix/input.h
+++ b/unix/input.h
@@ -1,3 +1,8 @@
+#ifndef MICROPY_INCLUDED_UNIX_INPUT_H
+#define MICROPY_INCLUDED_UNIX_INPUT_H
+
char *prompt(char *p);
void prompt_read_history(void);
void prompt_write_history(void);
+
+#endif // MICROPY_INCLUDED_UNIX_INPUT_H
diff --git a/unix/mpthreadport.h b/unix/mpthreadport.h
index 51cf8d7860..b158ed5bcc 100644
--- a/unix/mpthreadport.h
+++ b/unix/mpthreadport.h
@@ -23,8 +23,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef __MICROPY_INCLUDED_UNIX_MPTHREADPORT_H__
-#define __MICROPY_INCLUDED_UNIX_MPTHREADPORT_H__
#include <pthread.h>
@@ -32,5 +30,3 @@ typedef pthread_mutex_t mp_thread_mutex_t;
void mp_thread_init(void);
void mp_thread_gc_others(void);
-
-#endif // __MICROPY_INCLUDED_UNIX_MPTHREADPORT_H__
diff --git a/windows/fmode.h b/windows/fmode.h
index 23d6d3d54d..c661c84d0c 100644
--- a/windows/fmode.h
+++ b/windows/fmode.h
@@ -23,9 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-#ifndef __MICROPY_INCLUDED_WINDOWS_FMODE_H__
-#define __MICROPY_INCLUDED_WINDOWS_FMODE_H__
+#ifndef MICROPY_INCLUDED_WINDOWS_FMODE_H
+#define MICROPY_INCLUDED_WINDOWS_FMODE_H
// Treat files opened by open() as binary. No line ending translation is done.
void set_fmode_binary(void);
@@ -35,4 +34,4 @@ void set_fmode_binary(void);
// When writing to the file \n will be converted into \r\n.
void set_fmode_text(void);
-#endif
+#endif // MICROPY_INCLUDED_WINDOWS_FMODE_H
diff --git a/windows/init.h b/windows/init.h
index 69e577689e..480befef66 100644
--- a/windows/init.h
+++ b/windows/init.h
@@ -23,6 +23,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_WINDOWS_INIT_H
+#define MICROPY_INCLUDED_WINDOWS_INIT_H
void init(void);
void deinit(void);
+
+#endif // MICROPY_INCLUDED_WINDOWS_INIT_H
diff --git a/windows/msvc/dirent.h b/windows/msvc/dirent.h
index 6172913ee1..fca06785a6 100644
--- a/windows/msvc/dirent.h
+++ b/windows/msvc/dirent.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_WINDOWS_MSVC_DIRENT_H
+#define MICROPY_INCLUDED_WINDOWS_MSVC_DIRENT_H
// dirent.h implementation for msvc
@@ -42,3 +44,5 @@ typedef struct dirent {
DIR *opendir(const char *name);
int closedir(DIR *dir);
struct dirent *readdir(DIR *dir);
+
+#endif // MICROPY_INCLUDED_WINDOWS_MSVC_DIRENT_H
diff --git a/windows/msvc/sys/time.h b/windows/msvc/sys/time.h
index 96bca1ccbe..a36648beb7 100644
--- a/windows/msvc/sys/time.h
+++ b/windows/msvc/sys/time.h
@@ -23,6 +23,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_WINDOWS_MSVC_SYS_TIME_H
+#define MICROPY_INCLUDED_WINDOWS_MSVC_SYS_TIME_H
// Get the definitions for timeval etc
#include <Winsock2.h>
+
+#endif // MICROPY_INCLUDED_WINDOWS_MSVC_SYS_TIME_H
diff --git a/windows/msvc/unistd.h b/windows/msvc/unistd.h
index add10c8843..87787c3d8d 100644
--- a/windows/msvc/unistd.h
+++ b/windows/msvc/unistd.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_WINDOWS_MSVC_UNISTD_H
+#define MICROPY_INCLUDED_WINDOWS_MSVC_UNISTD_H
// There's no unistd.h, but this is the equivalent
#include <io.h>
@@ -38,3 +40,5 @@
#define SEEK_CUR 1
#define SEEK_END 2
#define SEEK_SET 0
+
+#endif // MICROPY_INCLUDED_WINDOWS_MSVC_UNISTD_H
diff --git a/windows/realpath.h b/windows/realpath.h
index 6f0a29a7e1..c7bb3acd7e 100644
--- a/windows/realpath.h
+++ b/windows/realpath.h
@@ -23,5 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_WINDOWS_REALPATH_H
+#define MICROPY_INCLUDED_WINDOWS_REALPATH_H
extern char *realpath(const char *path, char *resolved_path);
+
+#endif // MICROPY_INCLUDED_WINDOWS_REALPATH_H
diff --git a/windows/sleep.h b/windows/sleep.h
index 09ad4afdca..6c0c003321 100644
--- a/windows/sleep.h
+++ b/windows/sleep.h
@@ -23,6 +23,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_WINDOWS_SLEEP_H
+#define MICROPY_INCLUDED_WINDOWS_SLEEP_H
void init_sleep(void);
void deinit_sleep(void);
@@ -30,3 +32,5 @@ void msec_sleep(double msec);
#ifdef _MSC_VER
int usleep(__int64 usec);
#endif
+
+#endif // MICROPY_INCLUDED_WINDOWS_SLEEP_H
diff --git a/zephyr/modmachine.h b/zephyr/modmachine.h
index 596c59b178..84e4d10a88 100644
--- a/zephyr/modmachine.h
+++ b/zephyr/modmachine.h
@@ -1,5 +1,5 @@
-#ifndef __MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H__
-#define __MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H__
+#ifndef MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
+#define MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H
#include "py/obj.h"
@@ -13,4 +13,4 @@ typedef struct _machine_pin_obj_t {
uint32_t pin;
} machine_pin_obj_t;
-#endif // __MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H__
+#endif // MICROPY_INCLUDED_ZEPHYR_MODMACHINE_H