[riot-notifications] [RIOT-OS/RIOT] cpu/stm32: cleanup timer structure in vendor headers (#14144)

Alexandre Abadie notifications at github.com
Wed May 27 08:53:21 CEST 2020


@aabadie commented on this pull request.



> @@ -53,7 +53,7 @@ uint32_t pwm_init(pwm_t pwm, pwm_mode_t mode, uint32_t freq, uint16_t res)
     dev(pwm)->CR1 = 0;
     dev(pwm)->CR2 = 0;
     for (unsigned i = 0; i < TIMER_CHAN; ++i) {
-        dev(pwm)->CCR[i] = 0;
+        *(uint32_t *)(&dev(pwm)->CCR1 + i) = 0;

I added the macro definition in `periph_cpu.h` and now it's used in timer.c, pwm.c and qdec.c.

-- 
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/14144#discussion_r430894143
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200526/fb18fc84/attachment.htm>


More information about the notifications mailing list