@@ -124,28 +124,6 @@ STATIC mp_obj_t pyb_elapsed_micros(mp_obj_t start) {
124124}
125125STATIC MP_DEFINE_CONST_FUN_OBJ_1 (pyb_elapsed_micros_obj , pyb_elapsed_micros );
126126
127- /// \function repl_uart(uart)
128- /// Get or set the UART object that the REPL is repeated on.
129- STATIC mp_obj_t pyb_repl_uart (mp_uint_t n_args , const mp_obj_t * args ) {
130- if (n_args == 0 ) {
131- if (MP_STATE_PORT (pyb_stdio_uart ) == NULL ) {
132- return mp_const_none ;
133- } else {
134- return MP_STATE_PORT (pyb_stdio_uart );
135- }
136- } else {
137- if (args [0 ] == mp_const_none ) {
138- MP_STATE_PORT (pyb_stdio_uart ) = NULL ;
139- } else if (mp_obj_get_type (args [0 ]) == & pyb_uart_type ) {
140- MP_STATE_PORT (pyb_stdio_uart ) = args [0 ];
141- } else {
142- nlr_raise (mp_obj_new_exception_msg (& mp_type_ValueError , "need a UART object" ));
143- }
144- return mp_const_none ;
145- }
146- }
147- STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (pyb_repl_uart_obj , 0 , 1 , pyb_repl_uart );
148-
149127MP_DECLARE_CONST_FUN_OBJ (pyb_main_obj ); // defined in main.c
150128
151129STATIC const mp_map_elem_t pyb_module_globals_table [] = {
@@ -165,7 +143,7 @@ STATIC const mp_map_elem_t pyb_module_globals_table[] = {
165143 { MP_OBJ_NEW_QSTR (MP_QSTR_stop ), (mp_obj_t )& machine_sleep_obj },
166144 { MP_OBJ_NEW_QSTR (MP_QSTR_standby ), (mp_obj_t )& machine_deepsleep_obj },
167145 { MP_OBJ_NEW_QSTR (MP_QSTR_main ), (mp_obj_t )& pyb_main_obj },
168- { MP_OBJ_NEW_QSTR (MP_QSTR_repl_uart ), (mp_obj_t )& pyb_repl_uart_obj },
146+ { MP_OBJ_NEW_QSTR (MP_QSTR_repl_uart ), (mp_obj_t )& mod_os_dupterm_obj },
169147
170148 { MP_OBJ_NEW_QSTR (MP_QSTR_usb_mode ), (mp_obj_t )& pyb_usb_mode_obj },
171149 { MP_OBJ_NEW_QSTR (MP_QSTR_hid_mouse ), (mp_obj_t )& pyb_usb_hid_mouse_obj },
0 commit comments