Skip to content

Commit ea1c055

Browse files
czietzdpgeorge
authored andcommitted
esp8266/machine_wdt: Remove deinit method for watchdog.
Reasons for removal: - It did not work properly because it stopped the hardware watchdog timer while keeping the software watchdog running (issue micropython#8597). - There isn't a deinit method for the WDT in any other port. - "The watchdog is not intended to be stopped. That is a feature." (See micropython#8600.)
1 parent 8b201dc commit ea1c055

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

ports/esp8266/machine_wdt.c

-8
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,8 @@ STATIC mp_obj_t machine_wdt_feed(mp_obj_t self_in) {
6464
}
6565
STATIC MP_DEFINE_CONST_FUN_OBJ_1(machine_wdt_feed_obj, machine_wdt_feed);
6666

67-
STATIC mp_obj_t machine_wdt_deinit(mp_obj_t self_in) {
68-
(void)self_in;
69-
ets_wdt_disable();
70-
return mp_const_none;
71-
}
72-
STATIC MP_DEFINE_CONST_FUN_OBJ_1(machine_wdt_deinit_obj, machine_wdt_deinit);
73-
7467
STATIC const mp_rom_map_elem_t machine_wdt_locals_dict_table[] = {
7568
{ MP_ROM_QSTR(MP_QSTR_feed), MP_ROM_PTR(&machine_wdt_feed_obj) },
76-
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&machine_wdt_deinit_obj) },
7769
};
7870
STATIC MP_DEFINE_CONST_DICT(machine_wdt_locals_dict, machine_wdt_locals_dict_table);
7971

0 commit comments

Comments
 (0)