Damien George
5fc400ccdb
stmhal: Document physical pins for SPI, I2C, UART busses.
2014-05-04 14:28:11 +01:00
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/.
2014-05-03 23:27:38 +01:00
Damien George
d5f5b2f766
py, stream: Implement readlines for a stream.
2014-05-03 22:01:32 +01:00
Craig Barnes
c9f9e547d6
Add device ID to deploy make target for stmhal.
2014-05-03 19:51:47 +01:00
Damien George
6ec835dfef
Don't print git hash as well as git tag in banner.
2014-05-03 19:08:02 +01:00
Damien George
977a0ce287
py: Print tag/version/git describe in uPy banner.
2014-05-03 19:02:14 +01:00
Damien George
b4bb3fdb9c
Merge pull request #555 from lurch/patch-1
...
RTC doc fix
2014-05-03 18:44:02 +01:00
Damien George
93e51b594a
stmhal: Enable cmath module.
2014-05-03 18:40:50 +01:00
Andrew Scheller
86a9a88632
Fix incorrect fix ;)
2014-05-03 18:28:11 +01:00
Damien George
bb8ba7fc90
stmhal: Add .gitignore to ignore the new build dir names.
2014-05-03 18:26:03 +01:00
Andrew Scheller
e9ff5570c3
Updated doc fix
2014-05-03 17:50:46 +01:00
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.
2014-05-03 17:46:45 +01:00
Damien George
51315614e1
stmhal: Default build directory now includes board name.
...
BUILD is build-$(BOARD) by default.
2014-05-03 17:39:07 +01:00
Andrew Scheller
b569d690f5
RTC doc fix
2014-05-03 17:34:19 +01:00
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.
2014-05-03 17:32:55 +01:00
Damien George
baa2afbb58
stmhal: Fix typos in class documentation.
2014-05-03 16:42:27 +01:00
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.
2014-05-03 14:11:56 +01:00
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.
2014-05-03 13:24:21 +01:00
Damien George
ffaf8be1c6
stmhal: Add example use to RTC doc; add rtc.c to gendoc.py.
2014-05-03 12:02:21 +00:00
Damien George
451f78d156
stmhal: Add documentation for RTC class.
2014-05-03 12:40:53 +01:00
Damien George
8f472ad577
Merge pull request #548 from dhylands/fix-pin-defn
...
Fix PB0 ADC typo.
2014-05-03 00:16:48 +01:00
Craig Barnes
a0ddae86e5
Add device ID to autoflash script.
2014-05-02 23:03:23 +01:00
Dave Hylands
5788485cca
Fix PB0 ADC typo.
...
This also adds a bunch of slashes separating pin that have multiple functions.
2014-05-02 14:01:23 -07:00
Damien George
003977a70b
Merge branch 'master' of github.com:micropython/micropython
2014-05-02 16:58:32 +01:00
Damien George
3eb8163b16
stmhal: Add documentation for DAC and Timer classes.
2014-05-02 16:58:15 +01:00
Paul Sokolovsky
9b71b16a94
unix,stmhal: Make "mpconfig.h" be first included, as other headers depend on it.
2014-05-02 18:08:16 +03:00
Damien George
ba742ed639
Add shell script to automatically build stmhal/ for all pyboards.
2014-05-02 13:49:44 +00:00
Damien George
f2021ffe0f
Merge pull request #542 from dhylands/fix-pin
...
Fix pin initialization when a mode argument is provided
2014-05-01 23:26:28 +01:00
Dave Hylands
e911cfdb22
Fix pin initialization when a mode argument is provided
2014-05-01 12:15:37 -07:00
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
2014-05-01 02:51:29 +01:00
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/
2014-04-30 23:33:30 +01:00
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.
2014-04-30 20:47:50 +01:00
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 .
2014-04-30 19:23:21 +01:00
Damien George
da9f27103d
stmhal: Oops, typo.
2014-04-29 23:00:48 +01:00
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.
2014-04-29 22:55:34 +01:00
Damien George
dbc81df5d4
Simplify names for argcheck.c / arg parsing.
2014-04-26 11:19:17 +01:00
Damien George
6d3c5e4301
Add ARRAY_SIZE macro, and use it where possible.
2014-04-26 10:47:29 +01:00
Damien George
5ea69859c9
stmhal: Update help text.
2014-04-21 20:18:22 +01:00
Damien George
350cb6bf20
stmhal: Fix bug with pin GPIO reading.
2014-04-21 20:18:06 +01:00
Damien George
ef255e47c1
stmhal, usrsw: Wrap usrsw.c in #if, for when switch is not available.
2014-04-21 18:31:40 +01:00
Damien George
b97c2f4c14
stmhal, accel: Add TODO comment.
2014-04-21 18:30:38 +01:00
Damien George
46e1f26615
stmhal, usrsw: Update comments for new switch API.
2014-04-21 18:28:23 +01:00
Damien George
6125ba4a7f
stmhal: Make switch a class, to follow suit of all other modules.
...
Instead of pyb.switch() as a function, it's more consistent (with
respect to all the other modules and peripherals) to have
pyb.Switch() create a switch object. This then generalises to having
multiple switches. Call the object to get its state. Use sw.callback
to set the callback function for when the switch is pressed.
2014-04-21 18:23:50 +01:00
Damien George
af797f476f
stmhal, servo: Rename calibrate method to calibration.
...
It should be a noun, since it supports getting and setting depending on
the number of arguments given.
2014-04-21 18:21:07 +01:00
Damien George
6691c9e655
stmhal, timer: Remove obsolete global variable.
2014-04-21 18:19:50 +01:00
Damien George
7fdfa93700
stmhal: Add Timer class: simple TIM control, incl callback on IRQ.
...
Simple but functional timer control. More sophistication will
eventually be added, or for now just use direct register access :)
Also added pyb.freq() function to get MCU clock frequencies.
2014-04-21 16:48:16 +01:00
Damien George
764af4b7c5
stmhal: Make DAC dynamically allocate instances; rename dma->write_timed.
2014-04-21 13:06:19 +01:00
Damien George
83407ad082
stmhal: Clean up rtc.c a bit.
2014-04-21 12:45:59 +01:00
Damien George
7533700393
stmhal: Rename USART to UART.
...
It's really a UART because there is no external clock line (and hence no
synchronous ability, at least in the implementation of this module).
USART should be reserved for a module that has "S"ynchronous capabilities.
Also, UART is shorter and easier to type :)
2014-04-21 12:03:09 +01:00
Damien George
34f01c2ca1
stmhal: Add some documentation to I2C, SPI and USART modules.
2014-04-21 01:59:43 +01:00