kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Badger2040: Attempt to power off on soft reset
rodzic
2e92f85588
commit
40616f9795
|
@ -54,6 +54,8 @@ void Badger2040_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
|
|||
/***** Destructor ******/
|
||||
mp_obj_t Badger2040___del__(mp_obj_t self_in) {
|
||||
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t);
|
||||
// Try to ensure power is cut off when soft reset (IE: "Stop" in Thonny)
|
||||
self->badger2040->power_off();
|
||||
delete self->badger2040;
|
||||
return mp_const_none;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue