Commit Graph

276 Commits

Author SHA1 Message Date
Damien George
27c149efe0 stmhal: Add pyb.fault_debug() function, to control hard-fault behaviour.
This new function controls what happens on a hard-fault:
- debugging disabled: board will do a reset
- debugging enabled: board will print registers and stack and flash LEDs

The default is disabled, ie to do a reset.  This is different to previous
behaviour which flashed the LEDs and waited indefinitely.
2017-02-06 13:22:17 +11:00
Paul Sokolovsky
d5e9ab6e61 extmod/machine_pulse: Make time_pulse_us() not throw exceptions.
machine.time_pulse_us() is intended to provide very fine timing, including
while working with signal bursts, where each transition is tracked in row.
Throwing and handling an exception may take too much time and "signal loss".
So instead, in case of a timeout, just return negative value. Cases of
timeout while waiting for initial signal stabilization, and during actual
timing, are recognized.

The documentation is updated accordingly, and rewritten somewhat to clarify
the function behavior.
2017-02-05 14:20:17 +03:00
Damien George
50a9dd59f5 docs: For LCD160CR driver and tutorial, add link to positioning image. 2017-02-03 12:48:54 +11:00
Paul Sokolovsky
0ddeedfc73 docs/uio: Typo fixes/lexical improvements. 2017-01-29 16:18:33 +03:00
Paul Sokolovsky
ef6fb66d23 docs/uio: Describe differences between uPy an CPy stream hierarchy. 2017-01-28 16:35:40 +03:00
Paul Sokolovsky
6947a7f6a9 docs/usocket: Dedent Methods section.
This was apparently of an ::only directive which was later removed.
2017-01-28 15:49:54 +03:00
Paul Sokolovsky
f23c47fea7 docs/usocket: Clarify description of various methods. 2017-01-28 15:39:18 +03:00
Paul Sokolovsky
74fcb122f0 docs/usocket: Elaborate "Constants" section. 2017-01-28 14:46:58 +03:00
Paul Sokolovsky
59540dccf1 docs/usocket: Clarify exceptions used. 2017-01-28 13:55:51 +03:00
Paul Sokolovsky
0aa83142a4 docs/machine: Add explicit note on machine module level and scope.
It's very low, hardware level, with associated constraints on operations
and callbacks.
2017-01-28 12:08:25 +03:00
Paul Sokolovsky
56e7ebf07a docs/machine.Timer: Move WiPy adhoc parts to its documentation. 2017-01-28 12:08:00 +03:00
Damien George
c707668d9e docs/library/lcd160cr: Fix set_brightness range, should be 0..31. 2017-01-24 00:17:39 +11:00
Damien George
e72e343908 docs: Add documentation for lcd160cr module. 2017-01-23 14:37:10 +11:00
Mike Causer
a79f6676c3 docs: Fix some minor spelling mistakes.
paramter -> parameter
send a receive -> send and receive
repsonse -> response
particualr -> particular
constructore -> constructor
2017-01-18 15:30:31 +11:00
Paul Sokolovsky
a1a8f01799 docs/usocket: Clarify that socket timeout raises OSError exception. 2017-01-07 14:23:33 +03:00
Damien George
36ec5c8f27 docs/library/esp: Remove para and add further warning about flash.
There is no longer space reserved by default for native code.
2017-01-06 18:32:49 +11:00
Damien George
c3f70c603e docs/library/esp: Document esp.set_native_code_location() function. 2017-01-04 23:48:19 +11:00
Damien George
d377c83794 docs/library/machine.I2C: Fix I2C constructor docs to match impl. 2016-12-30 15:25:48 +11:00
Lorenz Schmid
a5b3c7e7f9 docs/library/pyb.UART: Moved writechar doc to sit with other writes. 2016-12-15 09:59:45 +11:00
Lorenz Schmid
0caac94b98 docs/library/pyb.UART: Added clarification about timeouts. 2016-12-15 09:59:32 +11:00
Peter Hinch
46e59c52af docs/library/pyb.Accel: Add hardware note about pins used by accel. 2016-12-02 17:39:13 +11:00
Damien George
63a5df3cb4 docs/library/machine.I2C: Refine definitions of I2C methods. 2016-11-23 17:05:02 +11:00
Paul Sokolovsky
64db4080ce docs/library/index: Elaborate on u-modules.
Also, remove an "only" directive in u-modules description.
2016-11-16 01:18:19 +03:00
Damien George
a392b3aa75 docs: Remove references to readall() and update stream read() docs. 2016-11-14 23:31:40 +11:00
Damien George
c4e58eaa98 stmhal/i2c: Add option to I2C to enable/disable use of DMA transfers.
New keyword option in constructor and init() method is "dma=<bool>".
DMA is now disabled by default for I2C transfers because it currently does
not handle I2C bus errors very well (eg if slave device doesn't ACK or
NACK correctly during a transfer).
2016-11-11 17:36:19 +11:00
Damien George
3e5e4f95b2 docs/library/machine.Pin: Update Pin docs to align with new HW API. 2016-11-09 11:08:01 +11:00
Paul Sokolovsky
805f7ea2f2 docs/utime: Add docs for ticks_add(), improvements for other ticks_*(). 2016-11-01 00:14:12 +03:00
Paul Sokolovsky
8679d9e6a6 docs/utime: Remove only:: for ticks_diff().
It's mandatory function which should be present in every port. Even if
it's not, in the stdlib intro we waarn users that a particular port can
lack anything of described in the docs.
2016-11-01 00:03:40 +03:00
Paul Sokolovsky
d60ad5cf53 docs/utime: Describe new semantics of ticks_diff() (signed ring arithmetics). 2016-10-31 00:17:56 +03:00
Paul Sokolovsky
153665f159 docs/utime: Document ticks_cpu() in more detail.
Also, drop ::only directive.
2016-10-30 23:15:28 +03:00
Paul Sokolovsky
7219a18d17 docs/library/index: Update TOCs so builtins sorted before modules. 2016-10-30 23:13:52 +03:00
Paul Sokolovsky
c28f9df63a docs/library/network: Typo fixes, consistent acronym capitalization. 2016-10-28 12:03:35 +03:00
Paul Sokolovsky
b9a88683a4 docs/library/network: Reword intro paragraph. 2016-10-28 04:42:27 +03:00
Paul Sokolovsky
67c91df7e8 docs/machine.SPI.rst: Fix typos and formatting, clarify.
Clarify the class implements master side of the protocol, also put adhoc
WiPy paramter after the generic, described in the current Hardware API
version.
2016-10-25 17:03:35 +03:00
Damien George
f1b2b1b600 docs/library/builtins: Add docs for delattr and slice. 2016-10-25 11:02:47 +11:00
Damien George
266e4acdc2 docs/library/machine.SPI: Remove spurious "of". 2016-10-24 14:41:21 +11:00
Damien George
f12047f66d docs/machine.SPI: Improve descriptions of xfer methods.
In particular remove the "*" because not all ports support keyword
arguments.
2016-10-18 10:14:26 +11:00
Paul Sokolovsky
a0b2f48c2f docs/machine.SPI: Bring up to date with Hardware API, make vendor-neutral. 2016-10-17 18:05:16 +03:00
Alex March
00c1fc6d77 docs/uos: Add uos.statvfs() documentation. 2016-10-07 13:16:54 +11:00
Philip Potter
eb239b8398 stmhal/usb: Add support to receive USB HID messages from host. 2016-10-04 15:38:01 +11:00
Radomir Dopieralski
219245e10f extmod/machine_i2c: Add support for the addrsize parameter in mem xfers.
The memory read/write I2C functions now take an optional keyword-only
parameter that specifies the number of bits in the memory address.
Only mem-addrs that are a multiple of 8-bits are supported (otherwise
the behaviour is undefined).

Due to the integer type used for the address, for values larger than 32
bits, only 32 bits of address will be sent, and the rest will be padded
with 0s. Right now no exception is raised when that happens. For values
smaller than 8, no address is sent. Also no exception then.

Tested with a VL6180 sensor, which has 16-bit register addresses.

Due to code refactoring, this patch reduces stmhal and esp8266 builds
by about 50 bytes.
2016-09-28 14:45:29 +10:00
Damien George
eeb9d99333 docs/library/machine: Update description of disable/enable IRQ funcs. 2016-09-23 13:15:58 +10:00
Paul Sokolovsky
4ab3eef8d7 docs/library/pyb.SPI: init(): Describe "bits" argument.
Based on https://github.com/micropython/micropython/pull/2210 .
2016-09-18 21:41:21 +03:00
Damien George
f3b5480be7 stmhal,cc3200,esp8266: Consistently use PWRON_RESET constant.
machine.POWER_ON is renamed to machine.PWRON_RESET to match other
reset-cause constants that all end in _RESET.  The cc3200 port keeps a
legacy definition of POWER_ON for backwards compatibility.
2016-09-08 12:50:38 +10:00
Damien George
4a9542c0c0 docs/library/machine.WDT: Add that WDT is available on pyboard. 2016-09-06 14:20:52 +10:00
Philip Potter
0f8b1ba8a2 docs/library: Add reference for pyb.usb_mode and pyb.USB_HID. 2016-08-29 15:17:20 +10:00
Damien George
64c5a9435c docs/library/machine.WDT: Add note that WDT is only available on WiPy. 2016-08-17 14:22:39 +10:00
Paul Sokolovsky
5c73de0337 docs/uio: Mention seek()/flush() support for io.BytesIO. 2016-08-09 01:52:56 +03:00
Paul Sokolovsky
fdb411a8c5 docs/library/index: Include array module in ToC. 2016-08-07 00:16:41 +03:00
Paul Sokolovsky
8a0b6f561c docs/array: Document array module. 2016-08-07 00:13:48 +03:00