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 ****************************************************************************/
29 .type lcd_grey_data,%function
31 /* A high performance function to write grey phase data to the display,
32 * one or multiple pixels.
35 * r0 - pixel value data address
36 * r1 - pixel phase data address
37 * r2 - pixel block count
40 * r3/r4 - current block of phases
41 * r5/r6 - current block of values
42 * r7 - lcd data accumulator
43 * r12 - phase signs mask
44 * lr - lcd bridge address
48 stmfd sp!, {r4-r7, lr}
50 orr r12, r12, r12, lsl #8
51 orr r12, r12, r12, lsl #16
55 str r3, [lr, #(4*(1<<5))] @ set pin D/C# of LCD controller (data)
63 and r5, r12, r3 @ r5 = 3.......2.......1.......0.......
64 and r6, r12, r4 @ r6 = 7.......6.......5.......4.......
65 orr r5, r5, r6, lsr #4 @ r5 = 3...7...2...6...1...5...0...4...
66 orr r5, r5, r5, lsr #9 @ r5 = 3...7...23..67..12..56..01..45..
67 orr r5, r5, r5, lsr #9 @ r5 = 3...7...23..67..123.567.012.456.
68 orr r5, r5, r5, lsr #9 @ r5 = 3...7...23..67..123.567.01234567
70 orr r5, r5, r5, lsl #8 @ post processing for clipv1 LCD */
79 strh r5, [lr, #0x10] @ DBOP_DOUT
82 ldr r6, [lr, #0xC] @ DBOP_STAT
83 ands r6, r6, #(1<<6) @ wait until push fifo is full
90 ldr r5, [lr, #0xC] @ DBOP_STAT
91 ands r5, r5, #(1<<10) @ wait until push fifo empties
95 .size lcd_grey_data,.-lcd_grey_data