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

benpicco notifications at github.com
Thu May 28 21:56:09 CEST 2020


@benpicco approved this pull request.

I ran some tests on `nucleo-l031k6`, looking good!
+24 bytes of ROM, but we can take that.

> @@ -83,6 +83,11 @@ extern "C" {
  */
 #define TIMER_CHAN          (4U)
 
+/**
+ * @brief   Define a macro for accessing a timer channel
+ */
+#define TIM_CHAN(tim, chan) *(uint32_t *)(&dev(tim)->CCR1 + chan)

```suggestion
#define TIM_CHAN(tim, chan) *(&dev(tim)->CCR1 + chan)
```
You can drop the cast - just squash directly if you decide so.

-- 
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#pullrequestreview-420440433
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200528/534ee35d/attachment.htm>


More information about the notifications mailing list