Updated Hardware API (markdown)

master
Daniel Campora 2015-09-22 20:29:33 +02:00
rodzic 5c8cc66082
commit 23817fd612
1 zmienionych plików z 1 dodań i 1 usunięć

@ -308,7 +308,7 @@ Methods:
- `rtc.init()` re-init
- `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()` get the number of milliseconds left before the alarm expires. Returns 0 if the alarm is already expired.
- `rtc.alarm_left(alarm_id)` get the number of milliseconds left before the alarm expires. Returns 0 if the alarm is already expired.
- `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.