Paul Sokolovsky
20da9064d7
docs/esp8266/quickref: Update information on SPI classes.
SPI(1) is not used for hardware SPI. Few more details are provided.
8 years ago
Paul Sokolovsky
dba40afa70
esp8266/modmachine: Simplify SPI class implementation multiplexing.
modpybhspi now does the needed multiplexing, calling out to modpybspi
(bitbanging SPI) for suitable peripheral ID's. modmachinespi (previous
multiplexer class) thus not needed and removed.
modpybhspi also updated to following standard SPI peripheral naming:
SPI0 is used for FlashROM and thus not supported so far. SPI1 is available
for users, and thus needs to be instantiated as:
spi = machine.SPI(1, ...)
8 years ago
Paul Sokolovsky
7ddd1a58f6
esp8266/modmachine: Don't expose internal SoftSPI and HSPI classes.
There functionality is available via standard SPI class.
8 years ago
Paul Sokolovsky
1708fe3cc7
esp8266/modmachine: Add WDT_RESET and SOFT_RESET constants.
Both tested to work. (WDT_RESET can be seen by issuing machine.disable_irq()
and waiting for WDT reset, SOFT_RESET - by machine.reset()).
8 years ago
Paul Sokolovsky
61e2dfd97d
tests/extmod/uzlib_decompio: Add zlib bitstream testcases.
8 years ago
Paul Sokolovsky
1bc5cb4312
extmod/moduzlib: Support wbits arg to DecompIO.
8 years ago
Dave Hylands
fedab995ee
stmhal: Set STM32F7DISC CPU Frequency to 216 MHz
This set the CPU frequency to 216 MHz (the max) and
leaves the USB Frequency at 48 MHz.
These settings were copied from one of the HAL examples.
8 years ago
Damien George
2d8740a4d1
tests/extmod: Add a test for framebuf module, tested by coverage build.
8 years ago
Damien George
47899a1ab8
extmod/modframebuf: Include font from stmhal directory explicitly.
So that users of framebuf don't need to have stmhal directory in their
path. (Eventually the font can be moved elsewhere.)
8 years ago
Chris Packham
8c6856d2e7
py/emitglue.c: provide mp_raw_code_load_file for any unix architecture
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
8 years ago
Paul Sokolovsky
015774a04f
esp8266/modmachinewdt: Add .deinit() method.
8 years ago
Paul Sokolovsky
4a33677c97
esp8266/esp8266.ld: Move modmachinewdt to FlashROM.
8 years ago
Damien George
76c366df56
stmhal: Add machine.WDT class.
Usage:
import machine
wdt = machine.WDT(0, 5000) # 5 second timeout
wdt.feed()
Thanks to Moritz for the initial implementation.
8 years ago
Paul Sokolovsky
f7c4611523
extmod/moduzlib: Use mperrno.h for error constants.
8 years ago
Paul Sokolovsky
fafd587514
tests/extmod: Add test for uzlib.DecompIO.
8 years ago
Paul Sokolovsky
a6864a13c7
extmod/moduzlib: Implement zlib stream decompressor class, DecompIO.
8 years ago
Damien George
c51c883cc8
tools/mpy-tool.py: Support freezing of complex numbers.
8 years ago
Radomir Dopieralski
41ec22632d
extmod/modframebuf: Fix fill and scroll when height not divisible by 8.
There was a bug in `framebuf1_fill` function, that makes it leave a few
lines unfilled at the bottom if the height is not divisible by 8.
A similar bug is fixed in the scroll method.
8 years ago
Damien George
b6bdf18deb
tools/mpy-tool.py: Compute the hash value for str/bytes objects.
This makes it more efficient at runtime to hash str/bytes objects.
8 years ago
Damien George
b4790afdaf
tools/mpy-tool.py: Store qstr config values in global config object.
Makes it easier to access them without passing around another dict of the
config values.
8 years ago
Damien George
58f3861358
tests/unix/extra_coverage: Add test for str/bytes with invalid hash.
8 years ago
Damien George
5f3bda422a
py: If str/bytes hash is 0 then explicitly compute it.
8 years ago
Damien George
f127bef3e4
py/makeqstrdata.py: Compute the qstr hash from bytes, not characters.
8 years ago
Delio Brignoli
f98bb2ddcb
py/mpprint: Fail an assertion with unsupported format specifiers.
Arguments of an unknown type cannot be skipped and continuing to parse a
format string after encountering an unknown format specifier leads to
undefined behaviour. This patch helps to find use of unsupported formats.
8 years ago
Radomir Dopieralski
ce1c786297
drivers/sdcard: Port the SDCard driver to new machine API.
With backwards compatibility for pyboard.
8 years ago
Damien George
49406b0ac6
stmhal/spi: Support new machine SPI methods in legacy SPI object.
8 years ago
Damien George
9b64d1966b
stmhal/spi: Factor out SPI transfer code to a single function.
8 years ago
Damien George
3be8b688c0
esp8266/modpybhspi: Simplify HSPI driver by using 1 function for xfers.
8 years ago
Damien George
5863e15a23
esp8266/modpybspi: Use generic SPI helper methods to implement SPI.
8 years ago
Damien George
0823c1baf8
extmod: Add machine_spi with generic SPI C-protocol and helper methods.
The idea is that all ports can use these helper methods and only need to
provide initialisation of the SPI bus, as well as a single transfer
function. The coding pattern follows the stream protocol and helper
methods.
8 years ago
Damien George
9c04ef2a67
unix,stmhal,esp8266: When find'ing frozen files don't use extra slash.
This extra forward slash for the starting-point directory is unnecessary
and leads to additional slashes on Max OS X which mean that the frozen
files cannot be imported.
Fixes #2374 .
8 years ago
Paul Sokolovsky
1f61fe07a2
py/mkrules.mk: Allow to override name of libmicropython.a
Or alternatively, refer to an exact library file, not just phony target
"lib".
8 years ago
Paul Sokolovsky
bae62d9abe
lib/utils/pyexec: qstr_pool_info() requires size_t* parameters.
8 years ago
Damien George
76dcaddc0f
docs/esp8266/quickref: Add internal links to docs for some modules.
8 years ago
Damien George
efc904c41d
docs/pyboard/quickref: Add section on "delay and timing" for utime mod.
And remove reference to deprecated pyb.delay() and pyb.millis().
8 years ago
Damien George
5c3a2f162e
docs/pyboard/quickref: Add links to pinouts for other pyboard variants.
8 years ago
Krzysztof Blazewicz
d1a366fdd4
.gitignore: Add *.pyc, because Python 2 doesn't use __pycache__.
8 years ago
Philip Potter
c777b6950e
stmhal: Update boot.py files to use VCP instead of CDC.
8 years ago
Philip Potter
0f8b1ba8a2
docs/library: Add reference for pyb.usb_mode and pyb.USB_HID.
8 years ago
Philip Potter
f2da6467a9
docs/pyboard: Update USB mouse tutorial to use pyb.USB_HID().
8 years ago
Philip Potter
57c92d90b0
docs/pyboard: Update USB mouse tutorial to use VCP instead of CDC.
8 years ago
Damien George
13c5a228c9
docs/esp8266: Update quickref and tutorial for OneWire/DS18X20 driver.
8 years ago
Damien George
59a9509703
esp8266/modules/ds18x20.py: Add support for DS18S20 devices.
8 years ago
Damien George
8e9b98e974
esp8266/modules/onewire: Change onewire.read() to onewire.readinto().
This allows 1-wire drivers (eg DS18X20) to perform in-place operations and
hence do less memory allocations.
8 years ago
Damien George
9fba618356
esp8266/modules: Split onewire.py into OneWire and DS18X20 driver.
The OneWire class is now in its own onewire.py module, and the temperature
sensor class is in its own ds18x20.py module. The latter is renamed to
DS18X20 to reflect the fact that it will support both the "S" and "B"
variants of the device.
These files are moved to the modules/ subdirectory to take advantage of
frozen bytecode.
8 years ago
Radomir Dopieralski
ed0a06a93f
docs/esp8266/quickref: Fix and update the SPI docs
Use the `SPI` factory function in the examples, and use
proper baud rate of 80 000 000.
8 years ago
Paul Sokolovsky
263aaa7030
esp8266/modmachinewdt: Implement machine.WDT class.
8 years ago
Damien George
8f8f699eb7
tests/run-tests: Disable thread_gc1.py test on Travis.
It has reliability issues (cause unknown at this time).
8 years ago
Damien George
f4ee9f8853
py/bc.h: Rename _mp_code_state to _mp_code_state_t.
This rename was missed in the previous patch.
8 years ago
Damien George
581a59a456
py: Rename struct mp_code_state to mp_code_state_t.
Also at _t to mp_exc_stack pre-declaration in struct typedef.
8 years ago