1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 by Jens Arnold
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
28 .type lcd_grey_data,%function
30 /* A high performance function to write grey phase data to the display,
31 * one or multiple pixels.
34 * r0 - pixel value data address
35 * r1 - pixel phase data address
36 * r2 - pixel block count
39 * r3/r4 - current block of phases
40 * r5/r6 - current block of values
41 * r7 - lcd data accumulator
42 * r12 - phase signs mask
43 * lr - lcd bridge address
47 stmfd sp!, {r4-r7, lr}
49 orr r12, r12, r12, lsl #8
50 orr r12, r12, r12, lsl #16
54 str r3, [lr, #(4*(1<<2))] @ set pin D/C# of LCD controller (data)
59 ldmia r1, {r3-r4} /* Fetch 8 pixel phases */
60 ldmia r0!, {r5-r6} /* Fetch 8 pixel values */
90 strb r7, [lr, #0x10] @ DBOP_DOUT
93 ldr r5, [lr, #0xC] @ DBOP_STAT
94 ands r5, r5, #(1<<6) @ wait until push fifo is full
101 ldr r5, [lr, #0xC] @ DBOP_STAT
102 ands r5, r5, #(1<<10) @ wait until push fifo empties
105 ldmfd sp!, {r4-r7, pc}
106 .size lcd_grey_data,.-lcd_grey_data