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 .global lcd_write_data
30 .type lcd_write_data,%function
39 tst r3, #LCD1_BUSY_MASK
47 .size lcd_write_data,.-lcd_write_data
51 .type lcd_grey_data,%function
53 /* A high performance function to write grey phase data to the display,
54 * one or multiple pixels.
57 * r0 - pixel value data address
58 * r1 - pixel phase data address
59 * r2 - pixel block count
62 * r3/r4 - current block of phases
63 * r5/r6 - current block of values
64 * r7 - lcd data accumulator
65 * r12 - phase signs mask
66 * lr - lcd bridge address
70 stmfd sp!, {r4-r7, lr}
72 orr r12, r12, r12, lsl #8
73 orr r12, r12, r12, lsl #16
79 and r5, r12, r3 /* r5 = 3.......2.......1.......0....... */
80 and r6, r12, r4 /* r6 = 7.......6.......5.......4....... */
81 orr r5, r5, r6, lsr #4 /* r5 = 3...7...2...6...1...5...0...4... */
82 orr r5, r5, r5, lsr #9 /* r5 = 3...7...23..67..12..56..01..45.. */
83 orr r5, r5, r5, lsr #9 /* r5 = 3...7...23..67..123.567.012.456. */
84 orr r5, r5, r5, lsr #9 /* r5 = 3...7...23..67..123.567.01234567 */
95 tst r6, #LCD1_BUSY_MASK
103 .size lcd_grey_data,.-lcd_grey_data