summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/uart.c
Commit message (Collapse)AuthorAge
* stamhal: Add definitions for MCU_SERIES_F4 and MCU_SERIES_F7Dave Hylands2015-08-07
|
* stmhal: Add support for USART1 and conditional pins in make-pins.py.Damien George2015-08-03
| | | | Thanks to Dave Hylands for the patch.
* stmhal: Add better support for UART having Tx and Rx on different ports.Damien George2015-08-03
| | | | Thanks to Dave Hylands for the patch.
* stmhal: Factor GPIO clock enable logic into mp_hal_gpio_clock_enable.Damien George2015-08-03
| | | | | | | | Extracted GPIO clock enable logic into mp_hal_gpio_clock_enable and called from anyplace which might need to use GPIO functions on ports other than A-D. Thanks to Dave Hylands for the patch.
* stmhal: Add STM32F7DISC and associated changes.Dave Hylands2015-07-30
|
* stmhal: Add support for UART5Dave Hylands2015-06-01
| | | | I tested this on my CERB40 board and it seems to be working fine.
* stmhal: Remove PYBVxx defines and use config vars for UART/CAN names.Damien George2015-05-27
| | | | | Now all stmhal-based boards can name their peripherals (if they want) to any string.
* stmhal: Allow to configure UART pins completely via mpconfigboard.h.Eero af Heurlin2015-05-03
|
* stmhal: Exclude code for UARTs that don't exist in hardware.Damien George2015-04-18
|
* py: Overhaul and simplify printf/pfenv mechanism.Damien George2015-04-16
| | | | | | | | | | | | | | | | | | | | | | 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.
* stmhal: For UART, check that baudrate is within 5% of desired value.Damien George2015-02-22
| | | | | | Also includes documentation about minimum baudrate. Addresses issue #1090.
* stmhal: Add uart.sendbreak() method, to send a break condition.Damien George2015-02-13
|
* stmhal: Collect all root pointers together in 1 place.Damien George2015-01-07
| | | | | A GC in stmhal port now only scans true root pointers, not entire BSS. This reduces base GC time from 1700ms to 900ms.
* stmhal: Prefix includes with py/; remove need for -I../py.Damien George2015-01-01
|
* stream: Convert .ioctl() to take fixed number of args.Paul Sokolovsky2014-11-17
| | | | | | 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.
* stmhal: Fix UART so bits counts number of data bits, not incl parity.Damien George2014-10-31
| | | | Addresses issue #950.
* stmhal: Implement support for RTS/CTS hardware flow control in UART.Damien George2014-10-31
| | | | | | | 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)
* stmhal: Use stream's readinto.Damien George2014-10-24
|
* stmhal: Use OSError with POSIX error code for HAL errors.Damien George2014-10-23
| | | | Addresses issue #921.
* stmhal: Overhaul UART class to use read/write, and improve it.v1.3.4Damien George2014-10-21
| | | | | | | | | | | | 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.
* stmhal: Set is_enabled=false when creating UART object; fix doc typo.Damien George2014-10-02
|
* stmhal: uart ioctl uses EINVAL, and checks TXE bit for write-ability.Damien George2014-09-07
|
* stmhal: Fix modselect so non-hashable objects can be polled.Damien George2014-09-07
|
* stmhal: Add polling ability to UART object.Damien George2014-09-07
|
* Change some parts of the core API to use mp_uint_t instead of uint/int.Damien George2014-08-30
| | | | Addressing issue #50, still some way to go yet.
* stmhal: Fix REPL printing by cooking output sent to stdout_obj.Damien George2014-07-20
| | | | | | 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.
* Rename machine_(u)int_t to mp_(u)int_t.Damien George2014-07-03
| | | | See discussion in issue #50.
* Prefix ARRAY_SIZE with micropython prefix MP_Emmanuel Blot2014-06-19
|
* stmhal: Document physical pins for SPI, I2C, UART busses.Damien George2014-05-04
|
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | 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/.
* unix,stmhal: Make "mpconfig.h" be first included, as other headers depend on it.Paul Sokolovsky2014-05-02
|
* stmhal: Add documentation in comments, and script to generate HTML.Damien George2014-04-29
| | | | | | | | | | | | | | 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.
* Simplify names for argcheck.c / arg parsing.Damien George2014-04-26
|
* Add ARRAY_SIZE macro, and use it where possible.Damien George2014-04-26
|
* stmhal: Rename USART to UART.Damien George2014-04-21
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 :)