micropython/stmhal
Damien George 7f9d1d6ab9 py: Overhaul and simplify printf/pfenv mechanism.
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-04-16 14:30:16 +00:00
..
boards stmhal: Expose all PYBv1.0 pins, include SD and USB pins. 2015-03-22 17:57:09 +00:00
cmsis
hal
usbdev stmhal: In USB HID driver, make polling interval configurable. 2015-04-13 16:59:05 +01:00
usbhost
.gitignore
Makefile string0.c: Move from stmhal/ to lib/. 2015-04-05 21:57:55 +03:00
accel.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
accel.h
adc.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
adc.h
autoflash
bufhelper.c py: Remove mp_obj_str_builder and use vstr instead. 2015-01-21 23:18:02 +00:00
bufhelper.h py: Remove mp_obj_str_builder and use vstr instead. 2015-01-21 23:18:02 +00:00
can.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
can.h stmhal: Add support for CAN rx callbacks. 2015-02-15 03:10:53 +00:00
dac.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
dac.h
diskio.c stmhal: Include fatfs headers using lib/fatfs prefix. 2015-03-04 20:35:41 +00:00
extint.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
extint.h stmhal: Collect all root pointers together in 1 place. 2015-01-07 23:38:50 +00:00
ffconf.c stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
ffconf.h lib: Update FatFs to R0.11. 2015-03-29 22:12:14 +01:00
file.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
file.h stmhal: Declare variables extern in include files 2014-11-05 22:52:51 +00:00
flash.c
flash.h
font_petme128_8x8.h
fsusermount.c stmhal: Include fatfs headers using lib/fatfs prefix. 2015-03-04 20:35:41 +00:00
fsusermount.h stmhal: Add ability to mount custom block device. 2014-12-27 20:20:51 +00:00
gccollect.c stmhal: Collect all root pointers together in 1 place. 2015-01-07 23:38:50 +00:00
gccollect.h stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
gchelper.s
help.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
i2c.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
i2c.h
import.c stmhal: Include fatfs headers using lib/fatfs prefix. 2015-03-04 20:35:41 +00:00
input.c stmhal: Make pybstdio usable by other ports, and use it. 2015-02-13 15:04:53 +00:00
irq.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
irq.h stmhal: Make pyb.[u]delay use systick with IRQs, busy loop otherwise. 2014-11-30 21:23:25 +00:00
lcd.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
lcd.h
led.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
led.h
lexerfatfs.c stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
main.c stmhal: Include fatfs headers using lib/fatfs prefix. 2015-03-04 20:35:41 +00:00
make-stmconst.py stmhal: Add I2S2EXT and I2S3EXT constants to stm module. 2015-03-01 12:32:44 +00:00
memory.h stmhal: Enable uhashlib module; add heapq, hashlib weak links. 2014-11-27 17:54:37 +00:00
modnetwork.c stmhal: Put mod_network_nic_list in global root-pointer state. 2015-01-22 00:16:41 +00:00
modnetwork.h stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
modnwcc3k.c stmhal: Make CC3K object static, so it's only registered once as NIC. 2015-01-22 00:17:40 +00:00
modnwwiznet5k.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
modpyb.c stmhal: Correctly clear wake-up flag before entering standby mode. 2015-03-22 21:52:20 +00:00
modstm.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
modstmconst.gen.c stmhal: Add I2S2EXT and I2S3EXT constants to stm module. 2015-03-01 12:32:44 +00:00
moduos.c stmhal: Make os.sync use disk_ioctl exclusively; reuse os.sync in pyb. 2015-03-04 20:38:28 +00:00
moduselect.c py, unix, stmhal: Allow to compile with -Wshadow. 2015-01-20 11:55:10 +00:00
modusocket.c py: Change vstr so that it doesn't null terminate buffer by default. 2015-01-28 23:43:01 +00:00
modutime.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
mpconfigport.h py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
mpconfigport.mk
mphal.c stmhal: Make pybstdio usable by other ports, and use it. 2015-02-13 15:04:53 +00:00
mphal.h stmhal: Make pybstdio usable by other ports, and use it. 2015-02-13 15:04:53 +00:00
pendsv.c stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
pendsv.h stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
pin.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
pin.h
pin_defs_stmhal.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
pin_defs_stmhal.h
pin_named_pins.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
portmodules.h stmhal: Make os.sync use disk_ioctl exclusively; reuse os.sync in pyb. 2015-03-04 20:38:28 +00:00
printf.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
pybcdc.inf_template
pybioctl.h
pybstdio.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
pyexec.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
pyexec.h pyexec: Add event-driven variant pyexec_friendly_repl(). 2015-01-16 01:30:42 +02:00
qstrdefsport.h stmhal: Add rtc.wakeup method, to set wakeup timer. 2015-03-15 17:15:55 +00:00
rng.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
rng.h
rtc.c stmhal: Add config option to use LSE/LSI for RTC. 2015-03-16 22:54:44 +00:00
rtc.h
sdcard.c stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
sdcard.h
servo.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
servo.h
spi.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
spi.h
startup_stm32f40xx.s
std.h
stm32f4xx_it.c stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
stm32f4xx_it.h
stm32f405.ld stmhal: Set entry point for ELF binary debugging 2014-10-21 16:48:32 +02:00
storage.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
storage.h
system_stm32f4xx.c
systick.c stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
systick.h stmhal: Make pyb.[u]delay use systick with IRQs, busy loop otherwise. 2014-11-30 21:23:25 +00:00
timer.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
timer.h
uart.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
uart.h stmhal: Overhaul UART class to use read/write, and improve it. 2014-10-21 22:15:20 +01:00
usb.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
usb.h stmhal: Properly define pyb.usb_mode() semantics. 2015-02-13 14:02:51 +00:00
usbd_cdc_interface.c stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
usbd_cdc_interface.h stmhal: Remove some unnecessary declarations, purely for cleanup. 2015-03-20 22:27:34 +00:00
usbd_conf.c py, unix, stmhal: Allow to compile with -Wshadow. 2015-01-20 11:55:10 +00:00
usbd_conf.h stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
usbd_desc.c stmhal: Fix setting of VID. 2015-02-13 22:25:55 +00:00
usbd_desc.h stmhal: Properly define pyb.usb_mode() semantics. 2015-02-13 14:02:51 +00:00
usbd_msc_storage.c stmhal: Include fatfs headers using lib/fatfs prefix. 2015-03-04 20:35:41 +00:00
usbd_msc_storage.h
usrsw.c py: Overhaul and simplify printf/pfenv mechanism. 2015-04-16 14:30:16 +00:00
usrsw.h