| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
There is no need to take src_len and dest_len arguments. The case of
reading-only with a single output byte (originally src_len=1, dest_len>1)
is now handled by using the output buffer as the input buffer, and using
memset to fill the output byte into this buffer. This simplifies the
implementations of the spi_transfer protocol function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Fixes for more pedantic warnings.
|
|
|
|
|
| |
This uses extension introduced in CPython 3.5: if wbits (dictionary size
code) has value 16 + 8..15, it means that gzip-formatted stream expected.
|
| |
|
|
|
|
|
| |
In CPython, module-level .wrap_socket() function actually doesn't accept
(or document) this param, only SSLContext.wrap_socket() has.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the clock is too fast for the i2c slave, it can temporarily hold
down the scl line to signal to the master that it needs to wait. The
master should check the scl line when it is releasing it after
transmitting data, and wait for it to be released.
This change has been tested with a logic analyzer and an i2c slace
implemented on an atmega328p using its twi peripheral, clocked at 8Mhz.
Without the change, the i2c communication works up to aboy 150kHz
frequency, and above that results in the slave stuck in an unresponsive
state. With this change, communication has been tested to work up to
400kHz.
|
|
|
|
|
| |
This is required to use mbedTLS versions from various sources, e.g.
mainline vs embedded into Zephyr RTOS.
|
|
|
|
|
| |
Unlike standard keyfile= and certfile=, these accept byte buffer objects
(to not depend on FS implementation).
|
| |
|
|
|
|
|
| |
Use mp_obj_int_get_truncated to allow the full 32-bit address range
as first parameter.
|
| |
|
|
|
|
| |
One can instead lookup __name__ in the modules dict to get the value.
|
|
|
|
|
|
|
| |
Adds horizontal scrolling. Right now, I'm just leaving the margins
created by the scrolling as they were -- so they will repeat the
edge of the framebuf. This is fast, and the user can always fill
the margins themselves.
|
| |
|
|
|
|
|
| |
So that users of framebuf don't need to have stmhal directory in their
path. (Eventually the font can be moved elsewhere.)
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
This is an object-oriented approach, where uos is only a proxy for the
methods on the vfs object. Some internals had to be exposed (the STATIC
keyword removed) for this to work.
Fixes #2338.
|
|
|
|
| |
Disable by default, enable in unix port.
|
| |
|
|
|
|
|
|
|
| |
In `btree_seq()`, when `__bt_seq()` gets called with invalid
`flags` argument it will return `RET_ERROR` and it won't
initialize `val`. If field `data` of uninitialized `val`
is passed to `mp_obj_new_bytes()` it causes a segfault.
|
|
|
|
| |
Consistently use stdint types. Fixes stmhal build.
|
|
|
|
| |
Fixes for pedantic compiler warnings.
|
| |
|
|
|
|
| |
New API supporting stream decompression.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This goes bit against websocket nature (message-based communication),
as it ignores boundaries bertween messages, but may be very practical
to do simple things with websockets.
|
|
|
|
| |
Namely: flags, cachesize, pagesize, minkeypage.
|
|
|
|
|
|
| |
In the sense that while GET_FILE transfers its data, REPL still works.
This is done by requiring client to send 1-byte block before WebREPL
server transfers next block of data.
|
| |
|
| |
|
|
|
|
| |
Requires "embedded" BerkeleyDB BTree implementation.
|
|
|
|
|
| |
Previoussly such read() and write() methods were used by modussl_axtls,
move to py/stream for reuse.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Shares the code with remove() method due to the same underlying f_unlink()
FatFs operation.
|
|
|
|
| |
Accepts only value of True.
|
|
|
|
|
| |
Make variable MICROPY_SSL_AXTLS=1 should be defined to activate modussl_axtls
and link with -laxtls.
|
| |
|
|
|
|
|
| |
Instead of allocating new array object header again and again, causing
memory fragmentation.
|
|
|
|
|
| |
Allocating it for each read/write operation is a memory fragmentation
hazard.
|