Skip to content

Commit adcf566

Browse files
authored
Merge pull request #85 from SummerGGift/add_complete
【添加】 WDT TIMER 自动补全
2 parents f36f9ad + 532422f commit adcf566

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

docs/code-completion/machine.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,12 +676,18 @@ def __init__(self, id: int) -> None:
676676
:param id: Timer ID.
677677
"""
678678

679+
def init(mode : Timer.PERIODIC, period : int, callback : func) -> None:
680+
"""
681+
Init the timer. Start the timer, and enable the timer peripheral.
682+
"""
683+
...
684+
679685
def deinit(self) -> None:
680686
"""
681687
Deinitialises the timer. Stops the timer, and disables the timer peripheral.
682688
"""
683689
...
684-
690+
685691
class ADC(object):
686692
"""
687693
- id:使用的 ADC 设备编号,id = 1 表示编号为 1 的 ADC 设备;
@@ -823,6 +829,20 @@ def circle(x1, y1, r) -> None:
823829
"""
824830
...
825831

832+
833+
class WDT(object):
834+
835+
def __init__(self) -> None:
836+
"""
837+
Construct a new watchdog object.
838+
"""
839+
840+
def feed(self) -> None:
841+
"""
842+
Perform the dog feed operation and clear the watchdog counter.
843+
"""
844+
...
845+
826846
def reset() -> None:
827847
"""Resets the device in a manner similar to pushing the external RESET button."""
828848
...
@@ -931,3 +951,4 @@ def time_pulse_us(pin: Pin, pulse_level: int, timeout_us: int = 1000000) -> int:
931951
:return: Result code (-1 or -2)
932952
"""
933953
...
954+

0 commit comments

Comments
 (0)