1. from usr.bin.third_party.ql_interrupter import WatchDog
    2. from machine import Pin, ExtInt
    3. import sys_bus
    4. # 初始化watch dog
    5. wd = WatchDog(Pin.GPIO15, 1, 10000)
    6. wd.start()
    7. def topic1_cb(topic, msg):
    8. pass
    9. def topic2_cb(topic, msg):
    10. pass
    11. # 订阅喂狗后,硬件狗拉GPIO 告知模块喂狗成功
    12. sys_bus.subscribe("WDT_KICK_TOPIC", topic1_cb)
    13. # 订阅喂狗后的回调
    14. sys_bus.subscribe("WDT_KICK_TOPIC_FEED", topic2_cb)