From c24fb242efbbf956a4be4d98d2a6c53c03b21324 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 29 Jan 2020 19:47:16 +0100 Subject: [PATCH] cpu/lpc2387: rtc: set rtc callback arg `_cb_arg` was never set, it was simply ignored in `rtc_set_alarm()`. The fix is trivial: just set `_cb_arg` to the assigned argument. --- cpu/lpc2387/periph/rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/lpc2387/periph/rtc.c b/cpu/lpc2387/periph/rtc.c index 165cc1edc9..e17f24291c 100644 --- a/cpu/lpc2387/periph/rtc.c +++ b/cpu/lpc2387/periph/rtc.c @@ -114,7 +114,6 @@ int rtc_get_time(struct tm *localt) int rtc_set_alarm(struct tm *localt, rtc_alarm_cb_t cb, void *arg) { - (void) arg; if (localt != NULL) { /* normalize input */ rtc_tm_normalize(localt); @@ -132,6 +131,7 @@ int rtc_set_alarm(struct tm *localt, rtc_alarm_cb_t cb, void *arg) RTC_ALDOM, RTC_ALMON, RTC_ALYEAR, RTC_ALHOUR, RTC_ALMIN, RTC_ALSEC); _cb = cb; + _cb_arg = arg; return 0; } else if (cb == NULL) {