extmod/moduos_dupterm: Make mp_uos_dupterm_tx_strn() function reusable.

Function to actually spool output terminal data to dupterm object.
This commit is contained in:
Paul Sokolovsky
2016-01-01 16:41:26 +02:00
parent 00ee84e1e1
commit 30b7344eb0
5 changed files with 20 additions and 20 deletions

View File

@@ -45,6 +45,7 @@
#include "py/gc.h"
#include "py/stackctrl.h"
#include "py/mphal.h"
#include "extmod/misc.h"
#include "genhdr/mpversion.h"
#include "input.h"
@@ -61,7 +62,7 @@ long heap_size = 1024*1024 * (sizeof(mp_uint_t) / 4);
STATIC void stderr_print_strn(void *env, const char *str, size_t len) {
(void)env;
ssize_t dummy = write(STDERR_FILENO, str, len);
mp_hal_dupterm_tx_strn(str, len);
mp_uos_dupterm_tx_strn(str, len);
(void)dummy;
}