micropython/extmod
Alexander Steffen 299bc62586 all: Unify header guard usage.
The code conventions suggest using header guards, but do not define how
those should look like and instead point to existing files. However, not
all existing files follow the same scheme, sometimes omitting header guards
altogether, sometimes using non-standard names, making it easy to
accidentally pick a "wrong" example.

This commit ensures that all header files of the MicroPython project (that
were not simply copied from somewhere else) follow the same pattern, that
was already present in the majority of files, especially in the py folder.

The rules are as follows.

Naming convention:
* start with the words MICROPY_INCLUDED
* contain the full path to the file
* replace special characters with _

In addition, there are no empty lines before #ifndef, between #ifndef and
one empty line before #endif. #endif is followed by a comment containing
the name of the guard macro.

py/grammar.h cannot use header guards by design, since it has to be
included multiple times in a single C file. Several other files also do not
need header guards as they are only used internally and guaranteed to be
included only once:
* MICROPY_MPHALPORT_H
* mpconfigboard.h
* mpconfigport.h
* mpthreadport.h
* pin_defs_*.h
* qstrdefs*.h
2017-07-18 11:57:39 +10:00
..
crypto-algorithms extmod/crypto-algorithms/sha256: Remove non-standard memory.h header. 2017-04-27 15:01:01 +03:00
lwip-include all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
re1.5
uzlib
machine_i2c.c
machine_i2c.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_mem.c
machine_mem.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_pinbase.c
machine_pinbase.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_pulse.c
machine_pulse.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_signal.c extmod/machine_signal: Rename "inverted" arg to "invert", it's shorter. 2017-04-15 21:01:47 +03:00
machine_signal.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_spi.c
machine_spi.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
misc.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
modbtree.c
modframebuf.c all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers. 2017-06-15 11:54:41 +10:00
modlwip.c extmod/modlwip: accept: Fix error code for non-blocking mode. 2017-06-04 13:45:37 +03:00
modonewire.c extmmod/modonewire: Rename public module to mp_module_onewire. 2017-06-22 16:17:46 +10:00
modubinascii.c extmod/modubinascii: Add check for empty buffer passed to hexlify. 2017-07-03 14:52:00 +10:00
modubinascii.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
moductypes.c extmod/moductypes: Fix bigint handling for 32-bit ports. 2017-04-21 16:43:21 +03:00
moduhashlib.c
moduheapq.c
modujson.c extmod/modujson: Properly initialise temporary StringIO object. 2017-07-05 10:38:20 +10:00
modurandom.c
modure.c extmod/modure: If input string is bytes, return bytes results too. 2017-07-01 01:25:45 +03:00
moduselect.c extmod/moduselect: Implement ipoll() method for alloc-free polling. 2017-04-29 13:05:44 +03:00
modussl_axtls.c extmod/modussl_axtls: Implement server_hostname arg to wrap_socket(). 2017-06-14 01:01:12 +03:00
modussl_mbedtls.c
modutimeq.c
moduzlib.c extmod/moduzlib: decompress: Remove stale "(void)n_args". 2017-06-24 16:36:05 +03:00
modwebrepl.c
modwebsocket.c various: Spelling fixes 2017-05-29 11:36:05 +03:00
modwebsocket.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
uos_dupterm.c
utime_mphal.c py,extmod: Some casts and minor refactors to quiet compiler warnings. 2017-07-07 11:32:22 +10:00
utime_mphal.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
vfs.c extmod/vfs: Allow "buffering" and "encoding" args to VFS's open(). 2017-06-07 15:29:53 +10:00
vfs.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
vfs_fat.c extmod/vfs: Use MP_S_IFDIR, MP_S_IFREG consts instead of magic numbers. 2017-05-10 12:30:34 +10:00
vfs_fat.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
vfs_fat_diskio.c
vfs_fat_file.c
vfs_fat_misc.c extmod/vfs_fat_misc: Remove dot-dirs filter since FatFS already does it. 2017-05-13 18:58:46 +10:00
vfs_reader.c
virtpin.c
virtpin.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00