diff options
Diffstat (limited to 'firmware/target/arm/olympus')
-rw-r--r-- | firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S b/firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S index 84f47addd8..2aede6d5e7 100644 --- a/firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S +++ b/firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S | |||
@@ -30,21 +30,20 @@ | |||
30 | .type lcd_write_data,%function | 30 | .type lcd_write_data,%function |
31 | 31 | ||
32 | lcd_write_data: | 32 | lcd_write_data: |
33 | str lr, [sp, #-4]! | 33 | ldr r12, =LCD1_BASE |
34 | ldr lr, =LCD1_BASE | ||
35 | 34 | ||
36 | .loop: | 35 | .loop: |
37 | ldrb r2, [r0], #1 | 36 | ldrb r2, [r0], #1 |
38 | 1: | 37 | 1: |
39 | ldr r3, [lr] | 38 | ldr r3, [r12] |
40 | tst r3, #LCD1_BUSY_MASK | 39 | tst r3, #LCD1_BUSY_MASK |
41 | bne 1b | 40 | bne 1b |
42 | str r2, [lr, #0x10] | 41 | str r2, [r12, #0x10] |
43 | 42 | ||
44 | subs r1, r1, #1 | 43 | subs r1, r1, #1 |
45 | bne .loop | 44 | bne .loop |
46 | 45 | ||
47 | ldr pc, [sp], #4 | 46 | bx lr |
48 | .size lcd_write_data,.-lcd_write_data | 47 | .size lcd_write_data,.-lcd_write_data |
49 | 48 | ||
50 | 49 | ||
@@ -62,16 +61,16 @@ lcd_write_data: | |||
62 | * Register usage: | 61 | * Register usage: |
63 | * r3/r4 - current block of phases | 62 | * r3/r4 - current block of phases |
64 | * r5/r6 - current block of values | 63 | * r5/r6 - current block of values |
65 | * r7 - lcd data accumulator | 64 | * r7 - lcd data accumulator |
66 | * r8 - phase signs mask | 65 | * r12 - phase signs mask |
67 | * lr - lcd bridge address | 66 | * lr - lcd bridge address |
68 | */ | 67 | */ |
69 | 68 | ||
70 | lcd_grey_data: | 69 | lcd_grey_data: |
71 | stmfd sp!, {r4-r8, lr} | 70 | stmfd sp!, {r4-r7, lr} |
72 | mov r8, #0x80 | 71 | mov r12, #0x80 |
73 | orr r8, r8, r8, lsl #8 | 72 | orr r12, r12, r12, lsl #8 |
74 | orr r8, r8, r8, lsl #16 | 73 | orr r12, r12, r12, lsl #16 |
75 | ldr lr, =LCD1_BASE | 74 | ldr lr, =LCD1_BASE |
76 | 75 | ||
77 | .greyloop: | 76 | .greyloop: |
@@ -87,7 +86,7 @@ lcd_grey_data: | |||
87 | biceq r7, r7, #0x20 | 86 | biceq r7, r7, #0x20 |
88 | tst r3, #0x80000000 | 87 | tst r3, #0x80000000 |
89 | biceq r7, r7, #0x10 | 88 | biceq r7, r7, #0x10 |
90 | bic r3, r3, r8 | 89 | bic r3, r3, r12 |
91 | add r3, r3, r5 | 90 | add r3, r3, r5 |
92 | 91 | ||
93 | tst r4, #0x80 | 92 | tst r4, #0x80 |
@@ -98,7 +97,7 @@ lcd_grey_data: | |||
98 | biceq r7, r7, #0x02 | 97 | biceq r7, r7, #0x02 |
99 | tst r4, #0x80000000 | 98 | tst r4, #0x80000000 |
100 | biceq r7, r7, #0x01 | 99 | biceq r7, r7, #0x01 |
101 | bic r4, r4, r8 | 100 | bic r4, r4, r12 |
102 | add r4, r4, r6 | 101 | add r4, r4, r6 |
103 | 102 | ||
104 | stmia r1!, {r3-r4} | 103 | stmia r1!, {r3-r4} |
@@ -112,6 +111,6 @@ lcd_grey_data: | |||
112 | subs r2, r2, #1 | 111 | subs r2, r2, #1 |
113 | bne .greyloop | 112 | bne .greyloop |
114 | 113 | ||
115 | ldmfd sp!, {r4-r8, pc} | 114 | ldmfd sp!, {r4-r7, pc} |
116 | .size lcd_grey_data,.-lcd_grey_data | 115 | .size lcd_grey_data,.-lcd_grey_data |
117 | 116 | ||