summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAndrew Ryabinin <ryabinin.a.a@gmail.com>2012-09-27 12:56:41 +0400
committerAndrew Ryabinin <ryabinin.a.a@gmail.com>2012-09-27 14:26:47 +0400
commit82d882e1e2870871371463025b9d0483da05707b (patch)
treefa0b0080286f3767c72fe5a6b5836bd644372db5 /firmware
parent1e5e022a39b7cff9aecdc3015938c9195b2338bf (diff)
Fix type cast for LCD_BUFF.
We should cast to (volatile uint32_t*) here, because attempt to refer to volatile object through use of an lvalue with non-volatile-qualified type will result in undefined behavior. Change-Id: I1b2e9688af11d3dcba518a5e31865d703b54b635
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/rk27xx/lcdif-rk27xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/arm/rk27xx/lcdif-rk27xx.c b/firmware/target/arm/rk27xx/lcdif-rk27xx.c
index 01b19603fd..d5847392a3 100644
--- a/firmware/target/arm/rk27xx/lcdif-rk27xx.c
+++ b/firmware/target/arm/rk27xx/lcdif-rk27xx.c
@@ -113,7 +113,7 @@ static void lcdctrl_init(void)
* on second lcd_update call
*/
for (i=0; i<2048; i++)
- *((uint32_t *)LCD_BUFF + i) = 0;
+ *((volatile uint32_t *)LCD_BUFF + i) = 0;
/* Setup buffered writes to lcd controler */
MCU_CTRL = MCU_CTRL_RS_HIGH|MCU_CTRL_BUFF_WRITE|MCU_CTRL_BUFF_START;