Rev 116 | Blame | Last modification | View Log | RSS feed
@@@ Copyright 2010 TheSeven@@@ This file is part of emBIOS.@@ emBIOS is free software: you can redistribute it and/or@ modify it under the terms of the GNU General Public License as@ published by the Free Software Foundation, either version 2 of the@ License, or (at your option) any later version.@@ emBIOS is distributed in the hope that it will be useful,@ but WITHOUT ANY WARRANTY; without even the implied warranty of@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.@ See the GNU General Public License for more details.@@ You should have received a copy of the GNU General Public License@ along with emBIOS. If not, see <http://www.gnu.org/licenses/>.@@.section .initcode.lcd_init, "ax", %progbits.align 2.global lcd_init.type lcd_init, %functionlcd_init:mov pc, lr.size lcd_init, .-lcd_init.section .text.lcd_get_width, "ax", %progbits.align 2.global lcd_get_width.type lcd_get_width, %functionlcd_get_width:mov r0, #176mov pc, lr.size lcd_get_width, .-lcd_get_width.section .text.lcd_get_height, "ax", %progbits.align 2.global lcd_get_height.type lcd_get_height, %functionlcd_get_height:mov r0, #132mov pc, lr.size lcd_get_hright, .-lcd_get_height.section .text.lcd_get_bytes_per_pixel, "ax", %progbits.align 2.global lcd_get_bytes_per_pixel.type lcd_get_heightbytes_per_pixel, %functionlcd_get_bytes_per_pixel:mov r0, #2mov pc, lr.size lcd_get_bytes_per_pixel, .-lcd_get_bytes_per_pixel.section .icode.displaylcd, "ax", %progbits.align 2.global displaylcd.type displaylcd, %functiondisplaylcd:stmfd sp!, {r0,r1,r4,lr}mov r12, #0x38000000orr r12, r12, #0x300000mov r0, #0x2abl displaylcd_sendlcdcldr r0, [sp]bl displaylcd_sendlcddldr r0, [sp,#0x04]bl displaylcd_sendlcddmov r0, #0x2bbl displaylcd_sendlcdcmov r0, r2tst r0, #0x100eorne r0, #0x300bl displaylcd_sendlcddmov r0, r3tst r0, #0x100eorne r0, #0x300bl displaylcd_sendlcddmov r0, #0x2cbl displaylcd_sendlcdcldmia sp, {r0,r1}sub r1, r0add r1, r1, #1sub r3, r2add r3, r3, #1mul r2, r1, r3ldr r1, [sp,#0x10]cmp r1, #-1bne displaylcd_framebufdisplaylcd_color:ldr r0, [sp,#0x14]bl displaylcd_sendlcddsubs r2, r2, #1bne displaylcd_colorldmfd sp!, {r4-r6,pc}displaylcd_framebuf:ldrh r0, [r1], #2bl displaylcd_sendlcddsubs r2, r2, #1bne displaylcd_framebufldmfd sp!, {r0,r1,r4,pc}displaylcd_sendlcdc:ldrh r4, [r12,#0x1c]tst r4, #0x10bne displaylcd_sendlcdcstrh r0, [r12,#0x04]mov pc, lrdisplaylcd_sendlcdd:ldrh r4, [r12,#0x1c]tst r4, #0x10bne displaylcd_sendlcddstrh r0, [r12,#0x40]mov pc, lr.size displaylcd, .-displaylcd.section .icode.displaylcd_sync, "ax", %progbits.align 2.global displaylcd_sync.type displaylcd_sync, %functiondisplaylcd_sync:mov pc, lr.size displaylcd_sync, .-displaylcd_sync.section .icode.displaylcd_busy, "ax", %progbits.align 2.global displaylcd_busy.type displaylcd_busy, %functiondisplaylcd_busy:mov r0, #0mov pc, lr.size displaylcd_busy, .-displaylcd_busy.section .icode.displaylcd_safe, "ax", %progbits.align 2.global displaylcd_safe.type displaylcd_safe, %functiondisplaylcd_safe:mov r0, #1mov pc, lr.size displaylcd_safe, .-displaylcd_safe.section .icode.lcd_translate_color, "ax", %progbits.align 2.global lcd_translate_color.type lcd_translate_color, %functionlcd_translate_color:cmp r0, #0xffmoveq r0, #-1moveq pc, lrcmp r0, #0movne r0, #0xff000000orrne r0, r0, #0xff0000mov r2, r2,lsr#2mov r1, r1,lsr#3orr r0, r0, r3,lsr#3orr r0, r0, r2,lsl#5orr r0, r0, r1,lsl#11mov pc, lr.size lcd_translate_color, .-lcd_translate_color