mirror of
https://github.com/micropython/micropython.git
synced 2026-06-11 17:15:16 +02:00
alif/machine_rtc: Add machine_rtc_cancel_wakeup() helper function.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -120,6 +120,10 @@ void machine_rtc_set_wakeup(uint32_t seconds) {
|
||||
MICROPY_END_ATOMIC_SECTION(atomic_state);
|
||||
}
|
||||
|
||||
void machine_rtc_cancel_wakeup(void) {
|
||||
lprtc_interrupt_disable(machine_rtc.rtc);
|
||||
}
|
||||
|
||||
static mp_obj_t machine_rtc_datetime(mp_uint_t n_args, const mp_obj_t *args) {
|
||||
if (n_args == 1) {
|
||||
// Get datetime.
|
||||
|
||||
@@ -28,5 +28,6 @@
|
||||
|
||||
void machine_rtc_init(void);
|
||||
void machine_rtc_set_wakeup(uint32_t seconds);
|
||||
void machine_rtc_cancel_wakeup(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_ALIF_MODMACHINE_H
|
||||
|
||||
Reference in New Issue
Block a user