Revert next_stack_size
This commit is contained in:
parent
b4ff08d185
commit
30a8e8bbcd
@ -168,6 +168,26 @@ STATIC mp_obj_t supervisor_runtime_get_ble_workflow(mp_obj_t self) {
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_ble_workflow_obj, supervisor_runtime_get_ble_workflow);
|
||||
|
||||
//| next_stack_limit: int
|
||||
//| """The size of the stack for the next vm run. If its too large, the default will be used."""
|
||||
//|
|
||||
STATIC mp_obj_t supervisor_runtime_get_next_stack_limit(mp_obj_t self) {
|
||||
return mp_obj_new_int(get_next_stack_size());
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_next_stack_limit_obj, supervisor_runtime_get_next_stack_limit);
|
||||
|
||||
STATIC mp_obj_t supervisor_runtime_set_next_stack_limit(mp_obj_t self, mp_obj_t size_obj) {
|
||||
mp_int_t size = mp_obj_get_int(size_obj);
|
||||
mp_arg_validate_int_min(size, 256, MP_QSTR_size);
|
||||
set_next_stack_size(size);
|
||||
return mp_const_none;
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(supervisor_runtime_set_next_stack_limit_obj, supervisor_runtime_set_next_stack_limit);
|
||||
|
||||
MP_PROPERTY_GETSET(supervisor_runtime_next_stack_limit_obj,
|
||||
(mp_obj_t)&supervisor_runtime_get_next_stack_limit_obj,
|
||||
(mp_obj_t)&supervisor_runtime_set_next_stack_limit_obj);
|
||||
|
||||
STATIC mp_obj_t supervisor_runtime_set_ble_workflow(mp_obj_t self, mp_obj_t state_in) {
|
||||
#if CIRCUITPY_BLE_FILE_SERVICE && CIRCUITPY_SERIAL_BLE
|
||||
if (mp_obj_is_true(state_in)) {
|
||||
@ -219,6 +239,7 @@ STATIC const mp_rom_map_elem_t supervisor_runtime_locals_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_safe_mode_reason), MP_ROM_PTR(&supervisor_runtime_safe_mode_reason_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_autoreload), MP_ROM_PTR(&supervisor_runtime_autoreload_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_ble_workflow), MP_ROM_PTR(&supervisor_runtime_ble_workflow_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_next_stack_limit), MP_ROM_PTR(&supervisor_runtime_next_stack_limit_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_rgb_status_brightness), MP_ROM_PTR(&supervisor_runtime_rgb_status_brightness_obj) },
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user