Dave Hylands
ea8bf81058
stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.
9 years ago
Josef Gajdusek
1db4253886
lib: Move time utility functions to common library.
10 years ago
Damien George
2cf6dfa280
stmhal: Prefix includes with py/; remove need for -I../py.
10 years ago
Damien George
3b603f29ec
Use MP_DEFINE_CONST_DICT macro to define module dicts.
This is just a clean-up of the code. Generated code is exactly the
same.
10 years ago
Damien George
136b5cbd76
stmhal: Rename module files to keep consistency with module name.
10 years ago
Damien George
0107e90328
stmhal: Enable module weak links.
os, time, select modules are now prefixed with u, but are still
available (via weak links) as their original names.
ure and ujson now available as re and json via weak links.
10 years ago
Damien George
d03c681608
stmhal: Use mp_uint_t where appropriate.
Found these by compiling stmhal with mp_uint_t of type uint32_t instead
of unsigned int. This actually makes a difference to the code, but just
a curiosity.
10 years ago
Damien George
ecc88e949c
Change some parts of the core API to use mp_uint_t instead of uint/int.
Addressing issue #50 , still some way to go yet.
10 years ago
Damien George
8ba832456e
stmhal, modtime: Small changes, reduced code size by around 80 bytes.
Also added test for modtime.
10 years ago
Dave Hylands
6678595e7e
Add time.mktime and enhance time.localtime (for stmhal)
Now you can use time.localtime on the timestamps presented by os.stat
10 years ago
Damien George
ea439e59d9
stmhal: Start of documentation for modos and modtime.
10 years ago
Damien George
02bc882c3d
stmhal: Add file.flush and os.stat.
10 years ago
Emmanuel Blot
f6932d6506
Prefix ARRAY_SIZE with micropython prefix MP_
11 years ago
Damien George
fb510b3bf9
Rename bultins config variables to MICROPY_PY_BUILTINS_*.
This renames:
MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET
MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY
MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE
MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT
See issue #35 for discussion.
11 years ago
Damien George
d6cbbc51ab
stmhal: Add time.time() and time.localtime().
time.time: returns seconds since 1/1/2000, as an integer.
time.localtime: Returns 8-tuple: (year, month, date, hour, minute,
second, weekday, yearday).
11 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
11 years ago
Paul Sokolovsky
9b71b16a94
unix,stmhal: Make "mpconfig.h" be first included, as other headers depend on it.
11 years ago
Damien George
6d3c5e4301
Add ARRAY_SIZE macro, and use it where possible.
11 years ago
Damien George
8b0535e23f
py: Change module globals from mp_map_t* to mp_obj_dict_t*.
Towards addressing issue #424 .
Had a small increase to ROM usage (order 60 bytes).
11 years ago
Damien George
df6567e634
Merge map.h into obj.h.
Pretty much everyone needs to include map.h, since it's such an integral
part of the Micro Python object implementation. Thus, the definitions
are now in obj.h instead. map.h is removed.
11 years ago
Damien George
caac542b23
Proper support for registering builtin modules in ROM.
Comes with some refactoring of code and renaming of files. All modules
are now named mod*.[ch].
11 years ago
Damien George
d311655655
stmhal: Add time module with sleep function.
11 years ago