@@ -168,6 +168,24 @@ STATIC mp_obj_t supervisor_runtime_get_ble_workflow(mp_obj_t self) {
168168}
169169MP_DEFINE_CONST_FUN_OBJ_1 (supervisor_runtime_get_ble_workflow_obj , supervisor_runtime_get_ble_workflow );
170170
171+ STATIC mp_obj_t supervisor_runtime_set_ble_workflow (mp_obj_t self , mp_obj_t state_in ) {
172+ #if CIRCUITPY_BLE_FILE_SERVICE && CIRCUITPY_SERIAL_BLE
173+ if (mp_obj_is_true (state_in )) {
174+ supervisor_bluetooth_enable_workflow ();
175+ } else {
176+ supervisor_bluetooth_disable_workflow ();
177+ }
178+ #else
179+ mp_raise_NotImplementedError (NULL );
180+ #endif
181+ return mp_const_none ;
182+ }
183+ MP_DEFINE_CONST_FUN_OBJ_2 (supervisor_runtime_set_ble_workflow_obj , supervisor_runtime_set_ble_workflow );
184+
185+ MP_PROPERTY_GETSET (supervisor_runtime_ble_workflow_obj ,
186+ (mp_obj_t )& supervisor_runtime_get_ble_workflow_obj ,
187+ (mp_obj_t )& supervisor_runtime_set_ble_workflow_obj );
188+
171189//| next_stack_limit: int
172190//| """The size of the stack for the next vm run. If its too large, the default will be used."""
173191//|
@@ -188,24 +206,6 @@ MP_PROPERTY_GETSET(supervisor_runtime_next_stack_limit_obj,
188206 (mp_obj_t )& supervisor_runtime_get_next_stack_limit_obj ,
189207 (mp_obj_t )& supervisor_runtime_set_next_stack_limit_obj );
190208
191- STATIC mp_obj_t supervisor_runtime_set_ble_workflow (mp_obj_t self , mp_obj_t state_in ) {
192- #if CIRCUITPY_BLE_FILE_SERVICE && CIRCUITPY_SERIAL_BLE
193- if (mp_obj_is_true (state_in )) {
194- supervisor_bluetooth_enable_workflow ();
195- } else {
196- supervisor_bluetooth_disable_workflow ();
197- }
198- #else
199- mp_raise_NotImplementedError (NULL );
200- #endif
201- return mp_const_none ;
202- }
203- MP_DEFINE_CONST_FUN_OBJ_2 (supervisor_runtime_set_ble_workflow_obj , supervisor_runtime_set_ble_workflow );
204-
205- MP_PROPERTY_GETSET (supervisor_runtime_ble_workflow_obj ,
206- (mp_obj_t )& supervisor_runtime_get_ble_workflow_obj ,
207- (mp_obj_t )& supervisor_runtime_set_ble_workflow_obj );
208-
209209//| rgb_status_brightness: int
210210//| """Set brightness of status RGB LED from 0-255. This will take effect
211211//| after the current code finishes and the status LED is used to show
@@ -239,7 +239,7 @@ STATIC const mp_rom_map_elem_t supervisor_runtime_locals_dict_table[] = {
239239 { MP_ROM_QSTR (MP_QSTR_safe_mode_reason ), MP_ROM_PTR (& supervisor_runtime_safe_mode_reason_obj ) },
240240 { MP_ROM_QSTR (MP_QSTR_autoreload ), MP_ROM_PTR (& supervisor_runtime_autoreload_obj ) },
241241 { MP_ROM_QSTR (MP_QSTR_ble_workflow ), MP_ROM_PTR (& supervisor_runtime_ble_workflow_obj ) },
242- { MP_ROM_QSTR (MP_QSTR_next_stack_limit ), MP_ROM_PTR (& supervisor_runtime_next_stack_limit_obj ) },
242+ { MP_ROM_QSTR (MP_QSTR_next_stack_limit ), MP_ROM_PTR (& supervisor_runtime_next_stack_limit_obj ) },
243243 { MP_ROM_QSTR (MP_QSTR_rgb_status_brightness ), MP_ROM_PTR (& supervisor_runtime_rgb_status_brightness_obj ) },
244244};
245245
0 commit comments