| Age | Commit message (Collapse) | Author |
|
This is to keep the top-level directory clean, to make it clear what is
core and what is a port, and to allow the repository to grow with new ports
in a sustainable way.
|
|
|
|
|
|
There were several different spellings of MicroPython present in comments,
when there should be only one.
|
|
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
|
|
|
|
It can still be overwritten by a port in mpconfigport.h but for almost
all cases one can use the provided default.
|
|
socket.timeout is a subclass of OSError, and using the latter is more
efficient than having a dedicated class. The argument of OSError is
ETIMEDOUT so the error can be distinguished from other kinds of
OSErrors. This follows how the esp8266 port does it.
|
|
Since we recently replaced the OSError string messages with simple error
codes, having the uerrno module gets back some user friendly error
messages. The total code size (after removing strings, replacing with
uerrno module) is decreased.
|
|
|
|
The port now uses the common mp_utime_ticks_{ms,us,cpu,add,diff} functions
from extmod/utime_mphal.c.
The mp_utime_sleep_XXX functions are still cc3200-specific because they
handle the GIL differently to the ones in extmod.
The files misc/mpsystick.[ch] have been removed because they contain 2
unused functions, and the other remaining function is renamed to
mp_hal_ticks_us and moved to hal/cc3200_hal.c.
|
|
Everyone should now be using the new ooFatFs library. The old one is no
longer supported and will be removed.
|
|
|
|
|
|
To make moduselect be usable by any port.
|
|
|
|
Implementations of persistent-code reader are provided for POSIX systems
and systems using FatFS. Macros to use these are MICROPY_READER_POSIX and
MICROPY_READER_FATFS respectively. If an alternative implementation is
needed then a port can define the function mp_reader_new_file.
|
|
Adds 1072 bytes to the code size.
|
|
This type was used only for the typedef of mp_obj_t, which is now defined
by the object representation. So we can now remove this unused typedef,
to simplify the mpconfigport.h file.
|
|
These macros are broken and are anyway unused on these two ports. If they
are ever needed in the future then their implementation can be taken from
either stmhal (working macros in mpconfigport.h) or esp8266 (functions).
|
|
|
|
Can create a new thread and run it. Does not use the GIL at this point.
|
|
These are *defined* per-port, but why redeclare them again and again.
|
|
It costs 1188 bytes of code on Thumb 2 archs.
|
|
|
|
|
|
To let unix port implement "machine" functionality on Python level, and
keep consistent naming in other ports (baremetal ports will use magic
module "symlinking" to still load it on "import machine").
Fixes #1701.
|
|
Port specific settinigs defined in mpconfigport. FreeRTOS and semphr
headers added to define SemaphoreHandle_t for the SYNC_T.
|
|
py/mphal.h contains declarations for generic mp_hal_XXX functions, such
as stdio and delay/ticks, which ports should provide definitions for. A
port will also provide mphalport.h with further HAL declarations.
|
|
|
|
|
|
The heartbeat is now controllable via a single function within the
wipy module.
|
|
Those two are rarely used features and better to have the extra heap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stream methods were added to normal sockets as in the unix port.
|
|
|
|
|
|
|
|
The reason to have our owm ubinascii module is so that later we
can add crc32 support using the hardware engine.
|
|
|
|
|
|
Can be enabled by defining MICROPY_PORT_WLAN_URN=1 in mpconfigport.h.
|