mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user