Fix RTC code : return correct value on first call where it is valid.
authorNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 27 Sep 2016 21:12:40 +0000 (23:12 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000 (17:03 +0100)
drivers/rtc.c

index 0a6325a..f43163e 100644 (file)
@@ -61,7 +61,7 @@ uint32_t rtc_get_count(void)
                        return 0;
                }
                rtc_start_ok = 1;
-               return 0;
+               return rtc->data;
        }
 }