- 10 Apr, 2017 3 commits
-
-
Paul Sokolovsky authored
This implements the orginal idea is that Signal is a subclass of Pin, and thus can accept all the same argument as Pin, and additionally, "inverted" param. On the practical side, it allows to avoid many enclosed parenses for a typical declararion, e.g. for Zephyr: Signal(Pin(("GPIO_0", 1))). Of course, passing a Pin to Signal constructor is still supported and is the most generic form (e.g. Unix port will only support such form, as it doesn't have "builtin" Pins), what's introduces here is just practical readability optimization. "value" kwarg is treated as applying to a Signal (i.e. accounts for possible inversion).
-
Damien George authored
-
Damien George authored
This buffer is used to allocate objects temporarily, and such objects require that their underlying memory be correctly aligned for their data type. Aligning for mp_obj_t should be sufficient for emergency exceptions, but in general the memory buffer should aligned to the maximum alignment of the machine (eg on a 32-bit machine with mp_obj_t being 4 bytes, a double may not be correctly aligned). This patch fixes a bug for certain nan-boxing builds, where mp_obj_t is 8 bytes and must be aligned to 8 bytes (even though the machine is 32 bit).
-
- 08 Apr, 2017 7 commits
-
-
Paul Sokolovsky authored
Notes on WiPy incompatibilities with the standard module API are moved under "Known issues" to its documentation.
-
Paul Sokolovsky authored
Notes on WiPy incompatibilities with the standard socket module API are moved under "Known issues" to its documentation.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
parity=0 means even parity, parity=1 - odd.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 07 Apr, 2017 7 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
For stream sockets, next exected operation is listen().
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
Changes made are: - Use the time module in place of the pyb module for delays. - Use spi.read/spi.write instead of spi.send/spi.receive. - Drop some non-portable parameters to spi and pin initialization. Thanks to @deshipu for the original patch.
-
- 06 Apr, 2017 2 commits
-
-
Paul Sokolovsky authored
When trying to execute a command via raw REPL and expected "OK" reply not received, show what was received instead.
-
Paul Sokolovsky authored
In this case, we can mark socket as closed directly.
-
- 05 Apr, 2017 12 commits
-
-
Paul Sokolovsky authored
Internal structure of k_fifo changed between 1.7 and 1.8, so we need to abstract it away. This adds more functions than currently used, for future work.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
When working with a "virtual" port, like PTY. The issue described in http://stackoverflow.com/questions/34831131/pyserial-does-not-play-well-with-virtual-port
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
It's a standard function, and it's already described (in the library intro) that for any given port, any function may be missing.
-
Paul Sokolovsky authored
These are basic MicroPython API, and all ports should implement them.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Following CPython. Otherwise one gets either an infinite loop (if code is optimised by the uPy compiler) or possibly a divide-by-zero CPU exception.
-
- 04 Apr, 2017 9 commits
-
-
Paul Sokolovsky authored
Without this, Zephyr's port "make test" doesn't work.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
This allows to execute a command and communicate with its stdin/stdout via pipes ("exec") or with command-created pseudo-terminal ("execpty"), to emulate serial access. Immediate usecase is controlling a QEMU process which emulates board's serial via normal console, but it could be used e.g. with helper binaries to access real board over other hadware protocols, etc. An example of device specification for these cases is: --device exec:../zephyr/qemu.sh --device execpty:../zephyr/qemu2.sh Where qemu.sh contains long-long qemu startup line, or calls another command. There's a special support in this patch for running the command in a new terminal session, to support shell wrappers like that (without new terminal session, only wrapper script would be terminated, but its child processes would continue to run).
-
Paul Sokolovsky authored
Without this, if there's a large chunk of data coming from hardware (e.g. clipboard paste, or fed programmatically from the other side of the console), there's a behavior of initial mass fill-in of the buffer without any consumption, which starts much later and doesn't catch up with further filling, leading to buffer overflow.
-
Peter Hinch authored
MONO_xxx is much easier to read if you're not familiar with the code. MVLSB is deprecated but kept for backwards compatibility, for the time being. This patch also updates the associated docs and tests.
-
Damien George authored
This reduces code duplication and allows to make mp_classify_fp_as_int static, which reduces code size.
-
Damien George authored
This should be a little more efficient (since we anyway scan the input packet for the interrupt char), and it should also fix any non-atomic read issues with the buffer state being changed during an interrupt. Throughput tests show that RX rate is unchanged by this patch.
-
Damien George authored
The previous timeout value of 150ms could lead to data being lost (ie never received by the host) in some rare cases, eg when the host is under load. A value of 500ms is quite conservative and allows the host plenty of time to read our data.
-
Paul Sokolovsky authored
It will be reused e.g. for accept() implementation.
-