Subversion Repositories freemyipod

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 theseven 1
@
2
@
3
@    Copyright 2010 TheSeven
4
@
5
@
6
@    This file is part of emBIOS.
7
@
8
@    emBIOS is free software: you can redistribute it and/or
9
@    modify it under the terms of the GNU General Public License as
10
@    published by the Free Software Foundation, either version 2 of the
11
@    License, or (at your option) any later version.
12
@
13
@    emBIOS is distributed in the hope that it will be useful,
14
@    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
@    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
@    See the GNU General Public License for more details.
17
@
18
@    You should have received a copy of the GNU General Public License
19
@    along with emBIOS.  If not, see <http://www.gnu.org/licenses/>.
20
@
21
@
22
 
23
 
85 theseven 24
.section .initcode.lcd_init, "ax", %progbits
25
.align 2
26
.global lcd_init
27
.type lcd_init, %function
28
lcd_init:
29
	mov	pc, lr
30
.size lcd_init, .-lcd_init
31
 
10 theseven 32
.section .icode.displaylcd, "ax", %progbits
33
.align 2
34
.global displaylcd
35
.type displaylcd, %function
36
displaylcd:
37
	stmfd	sp!, {r0,r1,r4,lr}
38
	mov	r12, #0x38000000
39
	orr	r12, r12, #0x300000
40
	mov	r0, #0x2a
41
	bl	displaylcd_sendlcdc
42
	ldr	r0, [sp]
43
	bl	displaylcd_sendlcdd
44
	ldr	r0, [sp,#0x04]
45
	bl	displaylcd_sendlcdd
46
	mov	r0, #0x2b
47
	bl	displaylcd_sendlcdc
48
	mov	r0, r2
49
	tst	r0, #0x100
50
	eorne	r0, #0x300
51
	bl	displaylcd_sendlcdd
52
	mov	r0, r3
53
	tst	r0, #0x100
54
	eorne	r0, #0x300
55
	bl	displaylcd_sendlcdd
56
	mov	r0, #0x2c
57
	bl	displaylcd_sendlcdc
58
	ldmia	sp, {r0,r1}
59
	sub	r1, r0
60
	add	r1, r1, #1
61
	sub	r3, r2
62
	add	r3, r3, #1
63
	mul	r2, r1, r3
64
	ldr	r1, [sp,#0x10]
65
	cmp	r1, #0x40000000
66
	bne	displaylcd_framebuf
67
displaylcd_color:
68
	ldr	r0, [sp,#0x14]
69
	bl	displaylcd_sendlcdd
70
	subs	r2, r2, #1
71
	bne	displaylcd_color
72
	ldmfd	sp!, {r4-r6,pc}
73
displaylcd_framebuf:
74
	ldrh	r0, [r1], #2
75
	bl	displaylcd_sendlcdd
76
	subs	r2, r2, #1
77
	bne	displaylcd_framebuf
78
	ldmfd	sp!, {r0,r1,r4,pc}
79
 
80
displaylcd_sendlcdc:
81
	ldrh	r4, [r12,#0x1c]
82
	tst	r4, #0x10
83
	bne	displaylcd_sendlcdc
84
	strh	r0, [r12,#0x04]
85
	mov	pc, lr
86
displaylcd_sendlcdd:
87
	ldrh	r4, [r12,#0x1c]
88
	tst	r4, #0x10
89
	bne	displaylcd_sendlcdd
90
	strh	r0, [r12,#0x40]
91
	mov	pc, lr
92
.size displaylcd, .-displaylcd
93
 
94
.section .icode.displaylcd_sync, "ax", %progbits
95
.align 2
96
.global displaylcd_sync
97
.type displaylcd_sync, %function
98
displaylcd_sync:
99
	mov	pc, lr
100
.size displaylcd_sync, .-displaylcd_sync
85 theseven 101
 
102
.section .icode.displaylcd_busy, "ax", %progbits
103
.align 2
104
.global displaylcd_busy
105
.type displaylcd_busy, %function
106
displaylcd_busy:
107
	mov	r0, #0
108
	mov	pc, lr
109
.size displaylcd_busy, .-displaylcd_busy
110
 
111
.section .icode.displaylcd_safe, "ax", %progbits
112
.align 2
113
.global displaylcd_safe
114
.type displaylcd_safe, %function
115
displaylcd_safe:
116
	mov	r0, #1
117
	mov	pc, lr
118
.size displaylcd_safe, .-displaylcd_safe
119