fixed drive strength

Dependents:   capstone_i2c

Fork of mbed-dev by mbed official

Revision:
18:da299f395b9e
Parent:
15:a81a8d6c1dfe
Child:
64:41a834223ea3
--- a/targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/rtc_api.c	Thu Nov 05 09:00:10 2015 +0000
+++ b/targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/rtc_api.c	Mon Nov 09 13:30:11 2015 +0000
@@ -21,6 +21,11 @@
 
 #include "rtc_count.h"
 
+#if !defined(RTC_CLOCK_SOURCE)
+#  warning  RTC_CLOCK_SOURCE is not defined, assuming RTC_CLOCK_SELECTION_ULP1K.
+#  define RTC_CLOCK_SOURCE RTC_CLOCK_SELECTION_ULP1K
+#endif
+
 /* Global RTC instance*/
 static struct rtc_module rtc_instance;
 
@@ -67,7 +72,11 @@
         /* Disable the RTC module */
         rtc_count_disable(&rtc_instance);
         /* Disable the RTC clock */
+#if (SAMD21) || (SAMR21)
         system_gclk_chan_disable(RTC_GCLK_ID);
+#elif (SAML21)
+        system_gclk_chan_disable(RTC_CLOCK_SOURCE);
+#endif
         rtc_inited = 0;
     }
 }