air153C_wtd - Add software watchdog function to prevent crashes#
Adaptation status unknown
Note
This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!
Example
--local air153C_wtd = require ("air153C_wtd")
-- Usage Examples
-- sys.taskInit(function ()
-- air153C_wtd.init(28)
-- air153C_wtd.feed_dog(28,10)--28 Pins for watchdog, 10 for set feed dog time
-- --air153C_wtd.set_time(1)--Open timer mode and then open this code, otherwise it is invalid
-- end)
air153C_wtd.init(watchdogPin)#
Initialization Pin
Parameters
Incoming Value Type |
Explanation |
---|---|
int |
Watchdog control pin |
return |
nil |
Return Value
None
Examples
air153C_wtd.init(28)
air153C_wtd.feed_dog(watchdogPin)#
Call this function to feed the dog
Parameters
Incoming Value Type |
Explanation |
---|---|
int |
watchdogPin Set watchdog control pin |
return |
nil |
Return Value
None
Examples
air153C_wtd.feed_dog(28)
air153C_wtd.close_watch_dog(watchdogPin)#
Call this function to close the feed dog, use caution!
Parameters
Incoming Value Type |
Explanation |
---|---|
int |
watchdogPin Set watchdog control pin |
return |
nil |
Return Value
None
Examples
air153C_wtd.close_watch_dog(28)