summaryrefslogtreecommitdiff
path: root/stmhal/uart.c
AgeCommit message (Collapse)Author
2015-07-30stmhal: Add STM32F7DISC and associated changes.Dave Hylands
2015-06-01stmhal: Add support for UART5Dave Hylands
I tested this on my CERB40 board and it seems to be working fine.
2015-05-27stmhal: Remove PYBVxx defines and use config vars for UART/CAN names.Damien George
Now all stmhal-based boards can name their peripherals (if they want) to any string.
2015-05-03stmhal: Allow to configure UART pins completely via mpconfigboard.h.Eero af Heurlin
2015-04-18stmhal: Exclude code for UARTs that don't exist in hardware.Damien George
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
2015-02-22stmhal: For UART, check that baudrate is within 5% of desired value.Damien George
Also includes documentation about minimum baudrate. Addresses issue #1090.
2015-02-13stmhal: Add uart.sendbreak() method, to send a break condition.Damien George
2015-01-07stmhal: Collect all root pointers together in 1 place.Damien George
A GC in stmhal port now only scans true root pointers, not entire BSS. This reduces base GC time from 1700ms to 900ms.
2015-01-01stmhal: Prefix includes with py/; remove need for -I../py.Damien George
2014-11-17stream: Convert .ioctl() to take fixed number of args.Paul Sokolovsky
This is more efficient, as allows to use register calling convention. If needed, a structure pointer can be passed as argument to pass more data.
2014-10-31stmhal: Fix UART so bits counts number of data bits, not incl parity.Damien George
Addresses issue #950.
2014-10-31stmhal: Implement support for RTS/CTS hardware flow control in UART.Damien George
This is experimental support. API is subject to changes. RTS/CTS available on UART(2) and UART(3) only. Use as: uart = pyb.UART(2, 9600, flow=pyb.UART.RTS | pyb.UART.CTS)
2014-10-24stmhal: Use stream's readinto.Damien George
2014-10-23stmhal: Use OSError with POSIX error code for HAL errors.Damien George
Addresses issue #921.
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-10-02stmhal: Set is_enabled=false when creating UART object; fix doc typo.Damien George
2014-09-07stmhal: uart ioctl uses EINVAL, and checks TXE bit for write-ability.Damien George
2014-09-07stmhal: Fix modselect so non-hashable objects can be polled.Damien George
2014-09-07stmhal: Add polling ability to UART object.Damien George
2014-08-30Change some parts of the core API to use mp_uint_t instead of uint/int.Damien George
Addressing issue #50, still some way to go yet.
2014-07-20stmhal: Fix REPL printing by cooking output sent to stdout_obj.Damien George
Recent changes to builtin print meant that print was printing to the mp_sys_stdout_obj, which was sending data raw to the USB CDC device. The data should be cooked so that \n turns into \r\n.
2014-07-03Rename machine_(u)int_t to mp_(u)int_t.Damien George
See discussion in issue #50.
2014-06-19Prefix ARRAY_SIZE with micropython prefix MP_Emmanuel Blot
2014-05-04stmhal: Document physical pins for SPI, I2C, UART busses.Damien George
2014-05-03Add license header to (almost) all files.Damien George
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-05-02unix,stmhal: Make "mpconfig.h" be first included, as other headers depend on it.Paul Sokolovsky
2014-04-29stmhal: Add documentation in comments, and script to generate HTML.Damien George
Decided to write own script to pull documentation from comments in C code. Style for writing auto generated documentation is: start line with /// and then use standard markdown to write the comment. Keywords recognised by the scraper begin with backslash. See code for examples. Running: python gendoc.py modpyb.c accel.c adc.c dac.c extint.c i2c.c led.c pin.c rng.c servo.c spi.c uart.c usrsw.c, will generate a HTML structure in gendoc-out/. gendoc.py is crude but functional. Needed something quick, and this was it.
2014-04-26Simplify names for argcheck.c / arg parsing.Damien George
2014-04-26Add ARRAY_SIZE macro, and use it where possible.Damien George
2014-04-21stmhal: Rename USART to UART.Damien George
It's really a UART because there is no external clock line (and hence no synchronous ability, at least in the implementation of this module). USART should be reserved for a module that has "S"ynchronous capabilities. Also, UART is shorter and easier to type :)