Damien George
860805aae7
unix: Remove unnecessary #defines from config.
2014-09-29 19:41:49 +01:00
Damien George
41249e17c3
stmhal, fatfs: Use stdlib for string fns; make all private fns static.
...
We save some code bytes by using builtin string functions.
2014-09-29 15:26:46 +01:00
Damien George
3a2795e200
stmhal: Add label to internal flash drive on creation.
2014-09-29 15:26:11 +01:00
Damien George
f042d7a4d7
stmhal: Fix edge case for timer PWM of 100%.
...
Also improve precision of calculating PWM percent in integer mode.
Also update teensy with edge case fix.
2014-09-29 14:15:01 +01:00
Damien George
853708738e
Merge pull request #881 from dhylands/elapsed
...
Added pyb.elapsed_millis and pyb.elapsed_micros
2014-09-29 12:42:31 +01:00
Damien George
6e2051377f
Merge pull request #880 from dhylands/irq-align
...
teensy: Enable 8-byte stack alignment for IRQ Handlers.
2014-09-29 12:22:53 +01:00
Damien George
305c4d49be
Merge pull request #878 from bvernoux/master
...
Fix error: unknown type name 'size_t'
2014-09-29 12:22:16 +01:00
Damien George
bf683e6b32
Merge pull request #877 from dhylands/timer-overflow
...
Fix timer overflow code.
2014-09-29 12:18:48 +01:00
Dave Hylands
a21f56b2d5
Added pyb.elapsed_millis and pyb.elapsed_micros
...
tested using:
stmhal: https://github.com/dhylands/upy-examples/blob/master/elapsed.py
teensy: https://github.com/dhylands/upy-examples/blob/master/teensy/elapsed.py
2014-09-28 11:24:44 -07:00
Dave Hylands
ada691e704
teensy: Enable 8-byte stack alignment for IRQ Handlers.
2014-09-28 10:17:44 -07:00
bvernoux
f6f248b464
Fix error: unknown type name 'size_t'
2014-09-28 09:54:35 +02:00
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.
2014-09-27 19:40:37 -07:00
Damien George
f90b59e610
stmhal, modcc3k: Add ioctl to cc3k sockets so select works.
2014-09-26 13:52:41 +00:00
Damien George
133b083b89
py: Clean up nlr*.S to make it easier to read; fix clang .bss error.
...
It seems that newer versions of clang don't like the .bss directive, so
we don't use it for OSX.
Addressing issues #865 and #875 .
2014-09-26 13:07:26 +00:00
Damien George
b766e79510
stmhal: Initial implementation of cc3k module and driver.
...
Pulled in and modified work done by mux/iabdalkader on cc3k driver, from
iabdalkader-cc3k-update branch. That branch was terribly messy and had
too many conflicts to merge neatly.
2014-09-26 00:57:26 +01:00
Damien George
f996d8854f
drivers, cc3k: Move cc3000 driver from stmhal to drivers directory.
2014-09-26 00:56:45 +01:00
Damien George
55a5b80793
docs: Make images and youtube video links work for LCD and AMP docs.
...
Images are currently served from micropython.org/static. I don't know
if there is a better way to handle images.
2014-09-25 19:42:27 +01:00
Damien George
cde0ca21bf
py: Simplify JSON str printing (while still conforming to JSON spec).
...
The JSON specs are relatively flexible and allow us to use one function
to print strings, be they ascii, bytes or utf-8 encoded.
2014-09-25 17:35:56 +01:00
Damien George
d19c256656
docs: Imported tutorials from previous documentation system.
2014-09-25 17:23:06 +01:00
Damien George
6162bea5b2
docs: Initial commit of Sphinx documentation framework.
2014-09-25 17:23:06 +01:00
blmorris
4f449120e1
Change allows tests/unix/ffi_float.py to pass on OSX
2014-09-25 16:31:30 +01:00
Damien George
2234c3f23d
tests: Add test for exception matching of a tuple of exceptions.
2014-09-25 15:49:26 +01:00
Damien George
4bcd04bcad
py: Tidy up exception matching; allow matching of tuple of exceptions.
...
Addresses issue #864 .
2014-09-25 15:49:26 +01:00
Damien George
16ef60fba6
Updated CODECONVENTIONS to clarify use of integer types.
2014-09-25 15:49:26 +01:00
Damien George
b0261341d3
py: For malloc and vstr functions, use size_t exclusively for int type.
...
It seems most sensible to use size_t for measuring "number of bytes" in
malloc and vstr functions (since that's what size_t is for). We don't
use mp_uint_t because malloc and vstr are not Micro Python specific.
2014-09-25 15:49:26 +01:00