summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/printf.c
Commit message (Collapse)AuthorAge
* stmhal: Add STM32F7DISC and associated changes.Dave Hylands2015-07-30
|
* 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.
* minimal: Allow to compile without defining MICROPY_HAL_H.Damien George2015-02-13
|
* stmhal: Make pybstdio usable by other ports, and use it.Damien George2015-02-13
| | | | | Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
* py: Can compile with -Wmissing-declarations and -Wmissing-prototypes.Damien George2015-01-12
|
* stmhal: Prefix includes with py/; remove need for -I../py.Damien George2015-01-01
|
* py: Fix some macros defines; cleanup some includes.Damien George2014-11-05
|
* Allow real memory errors (from locked gc) to be reported with traceback.Dave Hylands2014-10-07
|
* stmhal: Use mp_uint_t where appropriate.Damien George2014-10-05
| | | | | | Found these by compiling stmhal with mp_uint_t of type uint32_t instead of unsigned int. This actually makes a difference to the code, but just a curiosity.
* 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.
* stmhal: Change calls to pfenv_printf to pfenv_vprintf.Damien George2014-07-20
| | | | | Fixes printing bugs introduced by cb66f41ebc4980f4e6b7543bece19e3b9daac25c.
* py: Make print() accept "file" argument, and actually print to stream.Paul Sokolovsky2014-07-19
| | | | | And not system printf(), like it was before. For this, move pfenv_printf() from stmhal port to py/.
* stmhal: Include mpconfig.h before all other includes.Paul Sokolovsky2014-06-28
| | | | | | It defines types used by all other headers. Fixes #691.
* stmhal: Fix file print methods to use print instead of printf.Damien George2014-06-15
| | | | | Also make stdout_print_strn static (ultimately this function needs to be merged with stdout_tx_strn).
* stmhal: Update and improve LCD driver.Damien George2014-06-15
| | | | | Still some method names to iron out, and funtionality to add, but this will do for the first, basic version.
* Rename bultins config variables to MICROPY_PY_BUILTINS_*.Damien George2014-06-01
| | | | | | | | | | This renames: MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT See issue #35 for discussion.
* 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/.
* 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 :)
* py: Fix pfenv_print_strn to return correct number of chars printed.Damien George2014-04-17
| | | | With this fix, all tests in tests/basics pass on pyboard.
* Enhance str.format supportDave Hylands2014-04-01
| | | | | | | | | | | This adds support for almost everything (the comma isn't currently supported). The "unspecified" type with floats also doesn't behave exactly like python. Tested under unix with float and double Spot tested on stmhal
* stmhal: Remove unnecessary include.Damien George2014-03-17
|
* stmhal - Add usart supportDave Hylands2014-03-16
|
* stmhal: Get USB CDC REPL working.Damien George2014-03-15
| | | | | | | | New USB HAL is quite a bit improved over previous one. Now has better callbacks and flow control. REPL over USB CDC now works as before, except for soft-reset (since USB driver uses malloc...).
* REPl working on UART6 with STMHALDave Hylands2014-03-12