summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
index 3f1e2e0312..ab50769983 100644
--- a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
+++ b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
@@ -77,9 +77,12 @@ void lcd_set_contrast(int val)
77/* Delay loop based on CPU frequency (FREQ>>23 is 3..22 for 32MHz..192MHz) */ 77/* Delay loop based on CPU frequency (FREQ>>23 is 3..22 for 32MHz..192MHz) */
78static void delay_loop(void) 78static void delay_loop(void)
79{ 79{
80 unsigned long x; 80 asm volatile (" mov %[freq], %[freq], asr#23 \n\t"
81 for (x = (unsigned)(FREQ>>23); x; x--); 81 "1: subs %[freq], %[freq], #1 \n\t"
82 " bne 1b"
83 : : [freq] "r" (cpu_frequency) : "memory");
82} 84}
85
83#define DELAY delay_loop() 86#define DELAY delay_loop()
84 87
85static void ltv250qv_write(unsigned int command) 88static void ltv250qv_write(unsigned int command)