[riot-notifications] [RIOT-OS/RIOT] cpu/sam0_common: move PWM to common code, add support for saml21, samd5x (#14007)

Dylan Laduranty notifications at github.com
Sun May 3 20:53:53 CEST 2020


@dylad commented on this pull request.



> +                      | GCLK_CLKCTRL_GEN(cfg->gclk_src)
+                      | GCLK_CLKCTRL_ID(cfg->tim.gclk_id);
+    PM->APBCMASK.reg |= cfg->tim.pm_mask;
+#endif
+}
+
+static void poweroff(pwm_t dev)
+{
+    const pwm_conf_t *cfg = &pwm_config[dev];
+
+#ifdef MCLK
+    GCLK->PCHCTRL[cfg->tim.gclk_id].reg = 0;
+    *cfg->tim.mclk &= ~cfg->tim.mclk_mask;
+#else
+    PM->APBCMASK.reg &= ~cfg->tim.pm_mask;
+    GCLK->CLKCTRL.reg = GCLK_CLKCTRL_GEN_GCLK7

Why GEN_GCLK7 ?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14007#pullrequestreview-404646913
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200503/c90bef4c/attachment-0001.htm>


More information about the notifications mailing list