1.1 --- a/pkg/landfall-examples/hw_info/hw_info.c Sat May 04 22:53:28 2024 +0200
1.2 +++ b/pkg/landfall-examples/hw_info/hw_info.c Tue May 14 19:14:59 2024 +0200
1.3 @@ -1369,19 +1369,17 @@
1.4 printf("RTC frequency: %lld\n", cpm_get_frequency(cpm, clock));
1.5 }
1.6
1.7 -static void rtc_reset(void *rtc, void *cpm)
1.8 +static void rtc_reset(void *rtc)
1.9 {
1.10 unsigned int seconds;
1.11
1.12 if (!read_number("Seconds", &seconds))
1.13 return;
1.14
1.15 - enum Clock_identifiers clock = rtc_get_clock(rtc);
1.16 uint32_t rtc_seconds = rtc_get_seconds(rtc);
1.17 - uint32_t value = seconds * cpm_get_frequency(cpm, clock);
1.18
1.19 rtc_alarm_disable(rtc);
1.20 - rtc_set_alarm_seconds(rtc, rtc_seconds + value);
1.21 + rtc_set_alarm_seconds(rtc, rtc_seconds + seconds);
1.22 rtc_hibernate(rtc);
1.23 }
1.24
1.25 @@ -1928,7 +1926,7 @@
1.26 else if (!strcmp(token, "p") || !strcmp(token, "power-down"))
1.27 rtc_power_down(rtc);
1.28 else if (!strcmp(token, "r") || !strcmp(token, "reset"))
1.29 - rtc_reset(rtc, cpm);
1.30 + rtc_reset(rtc);
1.31 else if (!strcmp(token, "s") || !strcmp(token, "set"))
1.32 _rtc_set_seconds(rtc, 0);
1.33 else if (!strcmp(token, "sa") || !strcmp(token, "set-alarm"))