Dave Hylands
becbc87fd7
Add Timer support (PWM, OC, IC) for stmhal and teensy
2014-09-19 09:26:13 -07:00
Damien George
2842945e76
stmhal: Fix bugs in documentation so it compiles.
2014-09-17 23:27:42 +00:00
Damien George
8bb44f69f2
lib: Add basic README.
2014-09-18 00:13:03 +01:00
Damien George
3d61528fe7
py: Add 'builtins' module.
2014-09-17 23:17:26 +01:00
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.
2014-09-17 22:56:34 +01:00
Damien George
8a9b999f1c
py: Make dict use a bit less RAM when iterating; properly del values.
...
Heap RAM was being allocated to print dicts and do some other types of
iterating. Now these iterations use 1 word of state on the stack.
Deleting elements from a dict was not allowing the value to be reclaimed
by the GC. This is now fixed.
2014-09-17 15:53:03 +01:00
Damien George
1d7fb82f0a
stmhal: Change 64-bit arithmetic to 32-bit for SD card block addressing.
...
By measuring SD card addresses in blocks and not bytes, one can get away
with using 32-bit numbers.
This patch also uses proper atomic lock/unlock around SD card
read/write, adds SD.info() function, and gives error code for failed
read/writes.
2014-09-15 23:49:57 +01:00
Felix Domke
6ff42c54bb
stmhal/sdcard.c: add pyb.SD.write
2014-09-15 22:34:16 +01:00
Felix Domke
09de030651
stmhal/hal/src/stm32f4xx_hal_sd.c: fix SDHC card capacity
2014-09-15 22:34:07 +01:00
Damien George
d4a799f152
py: Make asm_arm_less_op take destination register as first arg.
...
This gets ARM native emitter working againg and addresses issue #858 .
2014-09-15 16:39:24 +01:00
Damien George
b92cbe6129
py: Move definition of mp_sys_exit to core.
...
sys.exit always raises SystemExit so doesn't need a special
implementation for each port. If C exit() is really needed, use the
standard os._exit function.
Also initialise mp_sys_path and mp_sys_argv in teensy port.
2014-09-15 15:53:09 +01:00
Damien George
83695596ed
py: Fix build error when float disabled; add test for divmod.
2014-09-13 19:58:18 +01:00
Damien George
8594ce2280
py: Implement divmod, % and proper // for floating point.
...
Tested and working on unix and pyboard.
2014-09-13 18:43:09 +01:00
Damien George
5c6783496d
Merge branch 'iabdalkader-memcpy'
2014-09-13 00:13:28 +01:00
Damien George
32781cce6d
stmhal: Slightly improved memcpy; memset uses word store when aligned.
2014-09-13 00:12:41 +01:00
Damien George
5792500ccc
Merge branch 'memcpy' of github.com:iabdalkader/micropython into iabdalkader-memcpy
2014-09-12 23:23:49 +01:00
Damien George
bb29546868
py: Load strings as objects when compiling viper.
...
Eventually, viper wants to be able to use raw pointers to strings and
arrays for efficient access. But for now, let's just load strings as a
Python object so they can be used as normal. This will anyway be
compatible with eventual intended viper behaviour.
Addresses issue #857 .
2014-09-12 23:15:06 +01:00
Damien George
89ab3be0b1
Merge branch 'master' of github.com:micropython/micropython
2014-09-11 22:28:58 +01:00
Damien George
20beff9ae3
py and libm: Add asinf,acosf; print higher precision for float.
...
Also use less stack space when printing single precision float.
Addition of asinf and acosf addresses issue #851 .
2014-09-11 22:24:45 +01:00
Damien George
5f0c18e583
Merge pull request #852 from techno/staccel_LIS3DSH
...
Add LIS3DSH accelometer support to staccel.py
2014-09-11 20:36:44 +01:00
iabdalkader
d60580eb5e
Optimize memcpy more
2014-09-11 19:01:48 +02:00
Hirotaka Kawata
2b4af54992
Add LIS3DSH accelometer support to staccel.py
2014-09-11 16:40:53 +09:00
iabdalkader
81b2ddf5d1
Memcpy: copy words
2014-09-11 07:49:21 +02:00
Damien George
953074315e
py: Enable struct/binary-helper to parse q and Q sized ints.
...
Addresses issue #848 .
2014-09-10 22:10:33 +01:00
Damien George
6eae861685
py: Put define of x86 argument registers in asmx86.h.
2014-09-08 22:16:35 +00:00