Paul Sokolovsky
63e02e8cc0
moduhashlib: Add sha256 implementation from "crypto-algorithms" project.
https://github.com/B-Con/crypto-algorithms revision 100f4ff
10 years ago
Paul Sokolovsky
f4b19c873f
moduhashlib: Initial module skeleton.
10 years ago
stijn
b89eaaa2e2
windows: Update config with latest features
- update mpconfigport.h to reflect latest unix version
- fix compilation error in modure due to msvc not allowing dynamic arrays
10 years ago
Paul Sokolovsky
8bb71f0b06
moductypes: Make .sizeof() work with bytearrays.
10 years ago
Paul Sokolovsky
6d287a6a02
moductypes: When dereferencing a field which is array of uint8, use bytearray.
Because bytearrays are much friendlier to work with, e.g. they can be printed
easily.
10 years ago
Paul Sokolovsky
2559e13957
moductypes: Make sure we can apply .sizeof() to all aggregate types.
Before, sizeof() could be applied to a structure field only if that field
was itself a structure. Now it can be applied to PTR and ARRAY fields too.
It's not possible to apply it to scalar fields though, because as soon as
scalar field (int or float) is dereferenced, its value is converted into
Python int/float value, and all original type info is lost. Moreover, we
allow sizeof of type definitions too, and there int is used to represent
(scalar) types. So, we have ambiguity what int may be - either dereferenced
scalar structure field, or encoded scalar type. So, rather throw an error
if user tries to apply sizeof() to int.
10 years ago
Damien George
f5d69794a8
extmod: Add uheapq module.
10 years ago
Paul Sokolovsky
297d8469b8
modure: Update to re1.5 v0.6.1, fixed and extended character class support.
10 years ago
Paul Sokolovsky
95908b0f50
modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]).
10 years ago
Paul Sokolovsky
911c00bbc5
modzlibd: Remove, superceded by moduzlib.
10 years ago
Damien George
4b71c056ef
moduzlib: Fix fn prototype and some code style; use it in stmhal port.
10 years ago
Paul Sokolovsky
bfb6af857a
moduzlib: Import uzlib v1.1.
https://github.com/pfalcon/uzlib
10 years ago
Paul Sokolovsky
426bb58b23
moduzlib: New zlib-like module, based on uzlib.
10 years ago
Paul Sokolovsky
1606607bd4
modure: Make sure that re1.5 compiled in only of modure itself is enabled.
This is achieved by including re1.5 *.c files straight from modure.c .
10 years ago
Paul Sokolovsky
457c0a606c
modure: Upgrade re1.5 to 0.5.1
Changes include:
regexp.h: Add double-include protection.
10 years ago
Paul Sokolovsky
5edbadefc1
modure: Import needed files from re1.5 v0.5.
https://github.com/pfalcon/re1.5
10 years ago
Paul Sokolovsky
c71e045165
modure: Initial module, using re1.5 (which is based on re1 codebase).
https://github.com/pfalcon/re1.5
10 years ago
Damien George
9336ee320a
py: Make mp_binary_set_val work on big endian machine.
10 years ago
Dave Hylands
39296b40d4
Fix timer overflow code.
Teensy doesn't need to worry about overflows since all of
its timers are only 16-bit.
For PWM, the pulse width needs to be able to vary from 0..period+1
(pulse-width == period+1 corresponds to 100% PWM)
I couldn't test the 0xffffffff cases since we can't currently get a
period that big in python. With a prescaler of 0, that corresponds
to a freq of 0.039 (i.e. cycle every 25.56 seconds), and we can't
set that using freq or period.
I also tested both stmhal and teensy with floats disabled, which
required a few other code changes to compile.
10 years ago
Damien George
2c180f7ccc
extmod, ujson: Add test and comment for loads.
10 years ago
Damien George
df1e92ba3a
extmod, ujson: Add \uxxxx parsing in json strings.
10 years ago
Damien George
fa2f1f72e0
extmod, ujson: Slight reduction in code size.
10 years ago
Damien George
89e4657c69
extmod: Add loads to ujson module.
10 years ago
Damien George
612045f53f
py: Add native json printing using existing print framework.
Also add start of ujson module with dumps implemented. Enabled in unix
and stmhal ports. Test passes on both.
10 years ago
Damien George
013d53c0b4
Remove skeletal modselect from extmod and just put it in stmhal.
10 years ago
Damien George
6c9c7bc75a
stmhal: Implement generic select.select and select.poll.
10 years ago
Damien George
c8c44a4c2e
py: Add ioctl method to stream protocol; add initial modselect.
10 years ago
Damien George
e875e3882d
extmod: Fix type-punned-ptr error.
10 years ago
stijn
759138caee
msvc: Exclude modtermios, include extmod and fix compilation error
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
72b115cbaa
extmod, zlibd: Make some simple ROM and RAM savings.
ROM down by 320 bytes on stmhal. RAM down by 5.5k for a decompression
object.
10 years ago
Damien George
1ddd844815
extmod: Finish rename of zlib to zlibd; enable zlibd on stmhal.
10 years ago
Paul Sokolovsky
8882c20b8f
modzlibd: Add tinfl.c from miniz SVN repo, r63.
The only change is line-ending convesion to LF.
10 years ago
Paul Sokolovsky
510296f25a
modzlibd: Decompress part of "zlib" module, based on miniz tinfl.c .
10 years ago
Damien George
105e32f1a5
stmhal: Enable moductypes by default.
Also fixes compiler error in moductypes when compiled without debugging.
Addresses issue #778 .
10 years ago
Paul Sokolovsky
5f47ebbf82
moductypes: Remove debug inclusion of stdio.h .
10 years ago
Damien George
bb4c6f35c6
py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself.
Addresses issue #724 .
10 years ago
Paul Sokolovsky
2097c8b1e1
moductypes: Add symbolic constants to specify bitfield position/length.
10 years ago
Paul Sokolovsky
8215847b4d
moductypes: Foreign data interface module, roughly based on ctype ideas.
But much smaller and memory-efficient. Uses Python builtin data structures
(dict, tuple, int) to describe structure layout.
11 years ago