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
 
116 theseven 32
.section .text.lcd_get_width, "ax", %progbits
33
.align 2
34
.global lcd_get_width
35
.type lcd_get_width, %function
36
lcd_get_width:
37
	mov	r0, #176
38
	mov	pc, lr
39
.size lcd_get_width, .-lcd_get_width
40
 
41
.section .text.lcd_get_height, "ax", %progbits
42
.align 2
43
.global lcd_get_height
44
.type lcd_get_height, %function
45
lcd_get_height:
46
	mov	r0, #132
47
	mov	pc, lr
48
.size lcd_get_hright, .-lcd_get_height
49
 
50
.section .text.lcd_get_bytes_per_pixel, "ax", %progbits
51
.align 2
52
.global lcd_get_bytes_per_pixel
53
.type lcd_get_heightbytes_per_pixel, %function
54
lcd_get_bytes_per_pixel:
55
	mov	r0, #2
56
	mov	pc, lr
57
.size lcd_get_bytes_per_pixel, .-lcd_get_bytes_per_pixel
58
 
10 theseven 59
.section .icode.displaylcd, "ax", %progbits
60
.align 2
61
.global displaylcd
62
.type displaylcd, %function
63
displaylcd:
64
	stmfd	sp!, {r0,r1,r4,lr}
65
	mov	r12, #0x38000000
66
	orr	r12, r12, #0x300000
67
	mov	r0, #0x2a
68
	bl	displaylcd_sendlcdc
69
	ldr	r0, [sp]
70
	bl	displaylcd_sendlcdd
71
	ldr	r0, [sp,#0x04]
72
	bl	displaylcd_sendlcdd
73
	mov	r0, #0x2b
74
	bl	displaylcd_sendlcdc
75
	mov	r0, r2
76
	tst	r0, #0x100
77
	eorne	r0, #0x300
78
	bl	displaylcd_sendlcdd
79
	mov	r0, r3
80
	tst	r0, #0x100
81
	eorne	r0, #0x300
82
	bl	displaylcd_sendlcdd
83
	mov	r0, #0x2c
84
	bl	displaylcd_sendlcdc
85
	ldmia	sp, {r0,r1}
86
	sub	r1, r0
87
	add	r1, r1, #1
88
	sub	r3, r2
89
	add	r3, r3, #1
90
	mul	r2, r1, r3
91
	ldr	r1, [sp,#0x10]
92
	cmp	r1, #0x40000000
93
	bne	displaylcd_framebuf
94
displaylcd_color:
95
	ldr	r0, [sp,#0x14]
96
	bl	displaylcd_sendlcdd
97
	subs	r2, r2, #1
98
	bne	displaylcd_color
99
	ldmfd	sp!, {r4-r6,pc}
100
displaylcd_framebuf:
101
	ldrh	r0, [r1], #2
102
	bl	displaylcd_sendlcdd
103
	subs	r2, r2, #1
104
	bne	displaylcd_framebuf
105
	ldmfd	sp!, {r0,r1,r4,pc}
106
 
107
displaylcd_sendlcdc:
108
	ldrh	r4, [r12,#0x1c]
109
	tst	r4, #0x10
110
	bne	displaylcd_sendlcdc
111
	strh	r0, [r12,#0x04]
112
	mov	pc, lr
113
displaylcd_sendlcdd:
114
	ldrh	r4, [r12,#0x1c]
115
	tst	r4, #0x10
116
	bne	displaylcd_sendlcdd
117
	strh	r0, [r12,#0x40]
118
	mov	pc, lr
119
.size displaylcd, .-displaylcd
120
 
121
.section .icode.displaylcd_sync, "ax", %progbits
122
.align 2
123
.global displaylcd_sync
124
.type displaylcd_sync, %function
125
displaylcd_sync:
126
	mov	pc, lr
127
.size displaylcd_sync, .-displaylcd_sync
85 theseven 128
 
129
.section .icode.displaylcd_busy, "ax", %progbits
130
.align 2
131
.global displaylcd_busy
132
.type displaylcd_busy, %function
133
displaylcd_busy:
134
	mov	r0, #0
135
	mov	pc, lr
136
.size displaylcd_busy, .-displaylcd_busy
137
 
138
.section .icode.displaylcd_safe, "ax", %progbits
139
.align 2
140
.global displaylcd_safe
141
.type displaylcd_safe, %function
142
displaylcd_safe:
143
	mov	r0, #1
144
	mov	pc, lr
145
.size displaylcd_safe, .-displaylcd_safe
146