From 41311818099ecb455825397b0d8befaa57b4b211 Mon Sep 17 00:00:00 2001 From: Daniel Campora Date: Tue, 22 Sep 2015 22:13:33 +0200 Subject: [PATCH] Add rtc.alarm_cancel() --- Hardware-API.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Hardware-API.md b/Hardware-API.md index bd059e0..bc59fd7 100644 --- a/Hardware-API.md +++ b/Hardware-API.md @@ -309,8 +309,13 @@ Methods: - `rtc.now()` returns a `datetime` tuple with the current time and date. - `rtc.alarm(alarm_id, time=time_ms or datetime_tuple, *, repeat=False)` sets the RTC alarm. If the alarm has already expired the returned value will be 0. An alarm can be set both via passing an integer with the number of milliseconds or a `datetime` tuple with a future time. If the `datetime` tuple contains a past time, the alarm will expire immediately triggering any enabled IRQ. The same applies when passing a 0 or negative `time_ms` value. - `rtc.alarm_left(alarm_id)` get the number of milliseconds left before the alarm expires. Returns 0 if the alarm is already expired. +- `rtc.alarm_cancel(alarm_id)` cancel a running alarm. - `rtc.calibration([cal_value])` get or set the RTC calibration value. Platform dependent. -- `rtc.irq(*, handler, priority, wake)` calls the handler function once the alarm expires. See the IRQ section for details. +- `rtc.irq(*, trigger, handler, priority, wake)` calls the handler function once the alarm expires. See the IRQ section for details. + +Constants: + +- `RTC.ALARM0` ## The WDT class