[riot-notifications] [RIOT-OS/RIOT] cpu/samd21: PWM don't hard-code number of channels to 3 (#13957)

benpicco notifications at github.com
Sat May 2 20:33:17 CEST 2020


@benpicco commented on this pull request.



> @@ -151,7 +151,7 @@ uint32_t pwm_init(pwm_t dev, pwm_mode_t mode, uint32_t freq, uint16_t res)
     f_real = (CLOCK_CORECLOCK / (scale * res));
 
     /* configure the used pins */
-    for (unsigned i = 0; i < PWM_MAX_CHANNELS; i++) {
+    for (unsigned i = 0; i < pwm_config[dev].chan_numof; i++) {

Why though? 

-- 
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/13957#discussion_r418992181
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200502/b1e60c31/attachment.htm>


More information about the notifications mailing list