@@ -168,6 +168,24 @@ STATIC mp_obj_t supervisor_runtime_get_ble_workflow(mp_obj_t self) {
168
168
}
169
169
MP_DEFINE_CONST_FUN_OBJ_1 (supervisor_runtime_get_ble_workflow_obj , supervisor_runtime_get_ble_workflow );
170
170
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
+
171
189
//| next_stack_limit: int
172
190
//| """The size of the stack for the next vm run. If its too large, the default will be used."""
173
191
//|
@@ -188,24 +206,6 @@ MP_PROPERTY_GETSET(supervisor_runtime_next_stack_limit_obj,
188
206
(mp_obj_t )& supervisor_runtime_get_next_stack_limit_obj ,
189
207
(mp_obj_t )& supervisor_runtime_set_next_stack_limit_obj );
190
208
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
-
209
209
//| rgb_status_brightness: int
210
210
//| """Set brightness of status RGB LED from 0-255. This will take effect
211
211
//| 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[] = {
239
239
{ MP_ROM_QSTR (MP_QSTR_safe_mode_reason ), MP_ROM_PTR (& supervisor_runtime_safe_mode_reason_obj ) },
240
240
{ MP_ROM_QSTR (MP_QSTR_autoreload ), MP_ROM_PTR (& supervisor_runtime_autoreload_obj ) },
241
241
{ 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 ) },
243
243
{ MP_ROM_QSTR (MP_QSTR_rgb_status_brightness ), MP_ROM_PTR (& supervisor_runtime_rgb_status_brightness_obj ) },
244
244
};
245
245
0 commit comments