altos: Declare stm DMA address registers as volatile void *
authorKeith Packard <keithp@keithp.com>
Sat, 7 Apr 2012 05:40:17 +0000 (22:40 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 7 Apr 2012 05:40:17 +0000 (22:40 -0700)
Eliminates a cast when assigning to them.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/stm/stm32l.h

index b40ec0eeb49bff868553a284471fe14f26dbb321..e03556b0ea7f5faad6e35ad8e5a9c179f11e7c7a 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdint.h>
 
 typedef volatile uint32_t      vuint32_t;
+typedef volatile void *                vvoid_t;
 
 struct stm_gpio {
        vuint32_t       moder;
@@ -851,8 +852,8 @@ isr(tim7)
 struct stm_dma_channel {
        vuint32_t       ccr;
        vuint32_t       cndtr;
-       vuint32_t       cpar;
-       vuint32_t       cmar;
+       vvoid_t         cpar;
+       vvoid_t         cmar;
        vuint32_t       reserved;
 };