summaryrefslogtreecommitdiff
path: root/tests/pyb/uart.py
AgeCommit message (Collapse)Author
2024-01-22tests: Move port-specific test directories into tests/ports/ directory.Damien George
To keep them all together, mirroring the top-level directory structure. Signed-off-by: Damien George <damien@micropython.org>
2020-03-30tests: Format all Python code with black, except tests in basics subdir.David Lechner
This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
2019-12-20tests/pyb: Adjust UART and Timer tests to work on PYBD_SF6.Damien George
2019-12-13tests/pyb: Refactor pyboard tests to work on PYBv1, PYBLITEv1 and PYBD.Damien George
2018-12-05stm32/uart: Add rxbuf keyword arg to UART constructor and init method.Damien George
As per the machine.UART documentation, this is used to set the length of the RX buffer. The legacy read_buf_len argument is retained for backwards compatibility, with rxbuf overriding it if provided.
2015-11-30stmhal: Make uart.write() function correctly for timeout=0.Damien George
In non-blocking mode (timeout=0), uart.write() can now transmit all of its data without raising an exception. uart.read() also works correctly in this mode. As part of this patch, timout_char now has a minimum value which is long enough to transfer 1 character. Addresses issue #1533.
2015-05-28tests: Add tests to create valid and invalid UART, I2C, SPI, CAN busses.Damien George
2015-02-27tests: Update pyb/uart.py test since baudrate of 1200 is too low.Damien George
2015-02-13stmhal: Add uart.sendbreak() method, to send a break condition.Damien George
2014-10-21stmhal: Overhaul UART class to use read/write, and improve it.v1.3.4Damien George
UART object now uses a stream-like interface: read, readall, readline, readinto, readchar, write, writechar. Timeouts are configured when the UART object is initialised, using timeout and timeout_char keyword args. The object includes optional read buffering, using interrupts. You can set the buffer size dynamically using read_buf_len keyword arg. A size of 0 disables buffering.
2014-05-03tests: Add a suite of tests specifically for the pyboard.Damien George
In tests/pyb is now a suite of tests that tests the pyb module on the pyboard. They include expected output files because we can't run CPython on the pyboard to compare against. run-tests script has now been updated to allow pyboard tests to be run. Just pass the option --pyboard. This runs all basic, float and pyb tests. Note that float/math-fun.py currently fails because not all math functions are implemented in stmhal/.