33
33
#include "shared/runtime/interrupt_char.h"
34
34
#include "supervisor/shared/autoreload.h"
35
35
#include "supervisor/shared/bluetooth/bluetooth.h"
36
+ #include "supervisor/shared/display.h"
36
37
#include "supervisor/shared/status_leds.h"
37
38
#include "supervisor/shared/stack.h"
38
39
#include "supervisor/shared/traceback.h"
@@ -299,6 +300,17 @@ STATIC mp_obj_t supervisor_disable_ble_workflow(void) {
299
300
}
300
301
MP_DEFINE_CONST_FUN_OBJ_0 (supervisor_disable_ble_workflow_obj , supervisor_disable_ble_workflow );
301
302
303
+ //| def reset_terminal(x_pixels: int, y_pixels: int) -> None:
304
+ //| """Adjust the pixel dimensions of the REPL console."""
305
+ //| ...
306
+ //|
307
+ STATIC mp_obj_t supervisor_reset_terminal (mp_obj_t x_pixels , mp_obj_t y_pixels ) {
308
+ supervisor_stop_terminal ();
309
+ supervisor_start_terminal (mp_obj_get_int (x_pixels ), mp_obj_get_int (y_pixels ));
310
+ return mp_const_none ;
311
+ }
312
+ MP_DEFINE_CONST_FUN_OBJ_2 (supervisor_reset_terminal_obj , supervisor_reset_terminal );
313
+
302
314
STATIC const mp_rom_map_elem_t supervisor_module_globals_table [] = {
303
315
{ MP_ROM_QSTR (MP_QSTR___name__ ), MP_ROM_QSTR (MP_QSTR_supervisor ) },
304
316
{ MP_ROM_QSTR (MP_QSTR_enable_autoreload ), MP_ROM_PTR (& supervisor_enable_autoreload_obj ) },
@@ -312,6 +324,8 @@ STATIC const mp_rom_map_elem_t supervisor_module_globals_table[] = {
312
324
{ MP_ROM_QSTR (MP_QSTR_ticks_ms ), MP_ROM_PTR (& supervisor_ticks_ms_obj ) },
313
325
{ MP_ROM_QSTR (MP_QSTR_get_previous_traceback ), MP_ROM_PTR (& supervisor_get_previous_traceback_obj ) },
314
326
{ MP_ROM_QSTR (MP_QSTR_disable_ble_workflow ), MP_ROM_PTR (& supervisor_disable_ble_workflow_obj ) },
327
+ { MP_ROM_QSTR (MP_QSTR_splash ), MP_ROM_PTR (& circuitpython_splash ) },
328
+ { MP_ROM_QSTR (MP_QSTR_reset_terminal ), MP_ROM_PTR (& supervisor_reset_terminal_obj ) },
315
329
};
316
330
317
331
STATIC MP_DEFINE_CONST_DICT (supervisor_module_globals , supervisor_module_globals_table );
0 commit comments