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
..
2015-01-20 11:55:10 +00:00
2015-04-09 15:29:54 +00:00
2015-01-01 18:07:43 +00:00
2015-04-07 22:43:28 +01:00
2015-04-07 22:43:28 +01:00
2015-04-09 15:29:54 +00:00
2015-04-07 22:43:28 +01:00
2015-04-07 22:43:28 +01:00
2015-04-07 22:43:28 +01:00
2015-02-08 01:57:40 +00:00
2015-04-07 22:43:28 +01:00
2015-04-03 00:03:07 +03:00
2015-03-05 22:58:31 +02:00
2015-01-01 20:32:09 +00:00
2015-02-14 23:35:00 +00:00
2015-02-15 00:02:27 +00:00
2015-02-16 12:11:34 +02:00
2015-04-11 21:52:27 +01:00
2015-02-07 18:33:58 +00:00
2015-03-26 16:52:45 +00:00
2015-04-09 15:31:53 +00:00
2015-03-26 16:52:45 +00:00
2015-03-26 16:52:45 +00:00
2015-04-07 22:43:28 +01:00
2015-04-07 22:43:28 +01:00
2015-04-11 21:53:39 +01:00
2015-04-07 22:43:28 +01:00
2015-04-12 13:06:20 +01:00
2015-01-01 20:32:09 +00:00
2015-01-20 11:52:12 +02:00
2015-01-20 11:52:12 +02:00
2015-04-03 14:11:13 +01:00
2015-01-07 20:33:00 +00:00
2015-02-08 01:57:40 +00:00
2015-03-19 00:25:33 +00:00
2015-03-19 00:25:33 +00:00
2015-02-27 09:34:51 +00:00
2015-01-01 20:32:09 +00:00
2015-04-02 01:10:11 +03:00
2015-03-03 21:23:13 +00:00
2015-04-04 15:53:11 +01:00
2015-04-16 14:30:16 +00:00
2014-06-07 13:14:45 +01:00
2014-11-06 18:48:38 +00:00
2015-01-01 20:32:09 +00:00
2015-04-16 14:30:16 +00:00
2015-02-02 12:52:14 +00:00
2015-03-20 17:26:10 +00:00
2015-02-07 17:24:10 +00:00
2015-02-15 13:17:11 +00:00
2015-02-22 14:48:18 +00:00
2015-02-15 13:17:11 +00:00
2015-02-08 01:57:40 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-01-07 20:33:00 +00:00
2015-02-07 17:24:10 +00:00
2015-04-09 15:29:54 +00:00
2015-04-03 14:11:13 +01:00
2015-04-07 22:43:28 +01:00
2015-03-03 14:34:40 +00:00
2015-01-07 20:33:00 +00:00
2015-01-07 20:33:00 +00:00
2015-01-08 16:24:44 +00:00
2015-01-07 20:33:00 +00:00
2015-01-07 20:33:00 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-06 23:51:29 +03:00
2015-04-16 14:30:16 +00:00
2015-02-27 00:36:39 +00:00
2015-01-20 14:11:27 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-01-01 20:32:09 +00:00
2015-04-16 14:30:16 +00:00
2015-01-01 20:32:09 +00:00
2015-04-04 15:53:11 +01:00
2015-03-14 22:07:30 +00:00
2015-03-14 22:07:30 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-02-27 00:36:39 +00:00
2015-01-20 14:11:27 +00:00
2015-04-16 14:30:16 +00:00
2015-01-01 20:32:09 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-01-20 14:11:27 +00:00
2015-01-20 12:47:20 +00:00
2015-04-16 14:30:16 +00:00
2015-04-07 00:17:11 +03:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-16 14:30:16 +00:00
2015-04-11 16:54:37 +01:00
2015-01-20 12:47:20 +00:00
2015-01-01 20:32:09 +00:00
2015-02-23 21:36:05 +00:00
2015-02-13 02:29:46 +00:00
2015-03-16 10:42:50 +00:00
2015-02-08 01:57:40 +00:00
2015-02-08 01:57:40 +00:00
2015-01-01 20:32:09 +00:00
2014-06-07 09:16:42 +02:00
2015-04-16 14:30:16 +00:00
2015-02-10 11:02:28 +00:00
2015-04-09 15:29:54 +00:00
2015-04-04 20:15:31 +01:00
2015-01-01 20:32:09 +00:00
2015-01-01 20:32:09 +00:00
2015-04-07 22:43:28 +01:00
2015-04-11 16:54:37 +01:00
2015-04-16 14:30:16 +00:00
2015-01-01 20:32:09 +00:00
2015-01-01 20:32:09 +00:00
2015-01-20 12:47:20 +00:00
2015-04-07 00:08:17 +01:00
2015-01-01 20:32:09 +00:00
2015-04-03 14:11:13 +01:00
2015-04-03 00:26:47 +03:00
2015-01-01 20:32:09 +00:00
2015-01-28 23:43:01 +00:00
2015-01-01 20:32:09 +00:00
2015-04-09 15:29:54 +00:00
2015-01-01 20:32:09 +00:00
2015-04-11 16:54:37 +01:00
2015-02-08 01:57:40 +00:00
2015-04-16 14:30:16 +00:00
2015-01-12 22:30:49 +00:00