Damien George
89755ae67f
py: Rename MICROPY_SYS_EXIT to MICROPY_MOD_SYS_EXIT.
For consistency with MICROPY_MOD_SYS_STDFILES, etc.
11 years ago
Damien George
f92a0d4d16
stmhal: Enable frozenset. Takes 292 text bytes in ROM.
11 years ago
Damien George
a7a1a38df4
stmhal: Update CC3000 driver to newer version.
Still not working properly.
11 years ago
Damien George
50073ed5d6
stmhal/cc3k: Remove spaces and tabs at end of lines.
11 years ago
Damien George
3793830ed9
tools: Move gendoc.py to tools, and make it a little more generic.
11 years ago
Damien George
09bbe7215a
stmhal: Fix USB CDC not flushing packets when an exact multiple of 64.
Need to send a zero-sized packet after sending an exact multiple of 64
bytes (not just after sending 64 bytes exactly).
Addresses issue #494 , part 2.
11 years ago
Damien George
b0edec61ac
stmhal: Improve handling of out-of-memory in REPL.
Addresses issue #558 , but it's likely that other out-of-memory errors
could crash the pyboard. Reason is that qstrs use m_new and can raise
an exception within the parser.
11 years ago
Paul Sokolovsky
deaeaac469
modsys: Enable sys.exit() per port after all.
11 years ago
Paul Sokolovsky
0f14fdea0c
stmhal: Implement draft version of sys.exit().
11 years ago
Damien George
04b7cc4df0
stmhal: Fix setting of RTC: was BCD now BIN encoded.
Addresses issue #592 .
11 years ago
Damien George
8c1c7488b2
Add gc.enable, gc.disable; remove pyb.gc.
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
Dave Hylands
117c46d9eb
Add input command for unix
11 years ago
Damien George
491cbd6a7c
py: Add keyword arg support to enumerate constructor.
Need to have a policy as to how far we go adding keyword support to
built ins. It's nice to have, and gets better CPython compatibility,
but hurts the micro nature of uPy.
Addresses issue #577 .
11 years ago
Paul Sokolovsky
33b3a6905d
stmhal: pyb: Use gc() function as defined by standard module "gc".
TODO: Get rid of this compatibility define and rely on standard module.
11 years ago
Dave Hylands
1145a0706c
Change references (in comments) of pyb.GPIO to be pyb.Pin
The documentation at http://micropython.org/doc/module/pyb/ExtInt should also be
updated.
11 years ago
Damien George
5fc400ccdb
stmhal: Document physical pins for SPI, I2C, UART busses.
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
Damien George
d5f5b2f766
py, stream: Implement readlines for a stream.
11 years ago
Craig Barnes
c9f9e547d6
Add device ID to deploy make target for stmhal.
11 years ago
Damien George
6ec835dfef
Don't print git hash as well as git tag in banner.
11 years ago
Damien George
977a0ce287
py: Print tag/version/git describe in uPy banner.
11 years ago
Damien George
93e51b594a
stmhal: Enable cmath module.
11 years ago
Andrew Scheller
86a9a88632
Fix incorrect fix ;)
11 years ago
Damien George
bb8ba7fc90
stmhal: Add .gitignore to ignore the new build dir names.
11 years ago
Andrew Scheller
e9ff5570c3
Updated doc fix
11 years ago
Damien George
aad1204b8e
stmhal: Change names: flash to firmware, flashboard to deploy.
Since firmware lives in a build directory which already specifies the
board name, no real reason to also have the firmware have the board
name.
11 years ago
Damien George
51315614e1
stmhal: Default build directory now includes board name.
BUILD is build-$(BOARD) by default.
11 years ago
Andrew Scheller
b569d690f5
RTC doc fix
11 years ago
Damien George
ae8feac598
stmhal: Wrap CC3000 driver in MICROPY_HW_ENABLE_CC3K.
This renames MICROPY_HW_HAS_WLAN to MICROPY_HW_ENABLE_CC3K (since it's a
driver, not a board feature) and wraps all CC3000 code in this #if.
It's disabled for all boards.
11 years ago
Damien George
baa2afbb58
stmhal: Fix typos in class documentation.
11 years ago
Damien George
bff1ff28ee
stmhal: Fix bug where negative delay/udelay lead to huge delays.
A negative ms/us is now treated as a delay of 0 ms/us. This patch also
improves the calibration of udelay.
11 years ago
Damien George
5874c1c92b
stmhal: Remove #include <stdint.h> from mpconfigport.h.
Make include dependencies neater, and adheres to the coding convention
that headers should not include headers.
11 years ago
Damien George
ffaf8be1c6
stmhal: Add example use to RTC doc; add rtc.c to gendoc.py.
11 years ago
Damien George
451f78d156
stmhal: Add documentation for RTC class.
11 years ago
Craig Barnes
a0ddae86e5
Add device ID to autoflash script.
11 years ago
Dave Hylands
5788485cca
Fix PB0 ADC typo.
This also adds a bunch of slashes separating pin that have multiple functions.
11 years ago
Damien George
3eb8163b16
stmhal: Add documentation for DAC and Timer classes.
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
ba742ed639
Add shell script to automatically build stmhal/ for all pyboards.
11 years ago
Dave Hylands
e911cfdb22
Fix pin initialization when a mode argument is provided
11 years ago
Andrew Scheller
ed9d8d6354
Add flashboard target to the stmhal Makefile to run dfu-util
Which allows you to run "make -C stmhal flashboard" from the top-level directory.
Also ties in nicely with my configurable BUILD directory from #506
11 years ago
Damien George
f4b7e9bd2e
stmhal, docs: Small changes to URL links; adds list of files if none given.
This documentation is now available at micropython.org/doc/
11 years ago
Damien George
4ae52d454c
stmhal: Reinstate CC3000 driver from old stm/ port.
It's not enabled by default because it doesn't fully work. It can
connect to an AP, get an IP address and do a host-lookup, but not yet do
send or recv on a socket.
11 years ago
Damien George
cab23051d9
stmhal: Make LED.intensity return the same value it was set to.
Also give proper error message when trying to construct a non-existent
LED.
Addresses issue #530 .
11 years ago
Damien George
da9f27103d
stmhal: Oops, typo.
11 years ago
Damien George
8d09640b22
stmhal: Add documentation in comments, and script to generate HTML.
Decided to write own script to pull documentation from comments in C code.
Style for writing auto generated documentation is: start line with ///
and then use standard markdown to write the comment. Keywords
recognised by the scraper begin with backslash. See code for examples.
Running: python gendoc.py modpyb.c accel.c adc.c dac.c extint.c i2c.c
led.c pin.c rng.c servo.c spi.c uart.c usrsw.c, will generate a HTML
structure in gendoc-out/.
gendoc.py is crude but functional. Needed something quick, and this was
it.
11 years ago
Damien George
dbc81df5d4
Simplify names for argcheck.c / arg parsing.
11 years ago
Damien George
6d3c5e4301
Add ARRAY_SIZE macro, and use it where possible.
11 years ago
Damien George
5ea69859c9
stmhal: Update help text.
11 years ago