From ff6395fa4eaf531abdf68719663895f4f2bf1870 Mon Sep 17 00:00:00 2001 From: Nick Moore Date: Tue, 12 Feb 2019 13:09:39 +1100 Subject: workaround for problem with adafruit/circuitpython#1046 the __weak linking works fine so long as these functions are not identical. I have not yet worked out why. --- shared-bindings/rtc/RTC.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'shared-bindings/rtc') diff --git a/shared-bindings/rtc/RTC.c b/shared-bindings/rtc/RTC.c index 97265d601..7c85f328c 100644 --- a/shared-bindings/rtc/RTC.c +++ b/shared-bindings/rtc/RTC.c @@ -36,13 +36,12 @@ #include "shared-bindings/time/__init__.h" #include "supervisor/shared/translate.h" -/* void MP_WEAK common_hal_rtc_get_time(timeutils_struct_time_t *tm) { - mp_raise_NotImplementedError(translate("RTC is not supported on this board")); + mp_raise_NotImplementedError(translate("RTC get is not supported on this board")); } void MP_WEAK common_hal_rtc_set_time(timeutils_struct_time_t *tm) { - mp_raise_NotImplementedError(translate("RTC is not supported on this board")); + mp_raise_NotImplementedError(translate("RTC set is not supported on this board")); } int MP_WEAK common_hal_rtc_get_calibration(void) { @@ -52,7 +51,7 @@ int MP_WEAK common_hal_rtc_get_calibration(void) { void MP_WEAK common_hal_rtc_set_calibration(int calibration) { mp_raise_NotImplementedError(translate("RTC calibration is not supported on this board")); } -*/ + const rtc_rtc_obj_t rtc_rtc_obj = {{&rtc_rtc_type}}; -- cgit v1.2.3