Updated Hardware API (markdown)

Daniel Campora 2015-09-16 12:37:07 +02:00
parent 6db1e6eae8
commit e0e3a1d25e
1 changed files with 1 additions and 1 deletions

@ -307,7 +307,7 @@ Methods:
- `rtc.init()` re-init - `rtc.init()` re-init
- `rtc.now()` returns a `datetime` tuple with the current time and date. - `rtc.now()` returns a `datetime` tuple with the current time and date.
- `rtc.alarm(alarm_id, [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(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()` 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.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(*, handler, priority, wake)` calls the handler function once the alarm expires. See the IRQ section for details.