freemyipod r20 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r19‎ | r20 | r21 >
Date:23:06, 4 August 2010
Author:theseven
Status:new
Tags:
Comment:
Remove orphaned i2c.S
Modified paths:
  • /embios/trunk/target/ipodnano2g/i2c.S (deleted) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano2g/i2c.S
@@ -1,135 +0,0 @@
2 -@
3 -@
4 -@ Copyright 2010 TheSeven
5 -@
6 -@
7 -@ This file is part of emBIOS.
8 -@
9 -@ emBIOS is free software: you can redistribute it and/or
10 -@ modify it under the terms of the GNU General Public License as
11 -@ published by the Free Software Foundation, either version 2 of the
12 -@ License, or (at your option) any later version.
13 -@
14 -@ emBIOS is distributed in the hope that it will be useful,
15 -@ but WITHOUT ANY WARRANTY; without even the implied warranty of
16 -@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 -@ See the GNU General Public License for more details.
18 -@
19 -@ You should have received a copy of the GNU General Public License
20 -@ along with emBIOS. If not, see <http://www.gnu.org/licenses/>.
21 -@
22 -@
23 -
24 -
25 -.section .icode.i2csend, "ax", %progbits
26 -.align 2
27 -.global i2csendbyte
28 -.global i2csend
29 -.type i2csendbyte, %function
30 -.type i2csend, %function
31 -i2csendbyte:
32 - mov r3, #0
33 -@fallthrough
34 -
35 -i2csend:
36 - stmfd sp!, {r4,lr}
37 - mov r12, #0x3C000000
38 - add r12, r12, #0x00900000
39 - mov r4, #0
40 - str r4, [r12,#0x08]
41 - str r0, [r12,#0x0c]
42 - mov r4, #0xf0
43 - str r4, [r12,#0x04]
44 - mov r4, #0xf3
45 - str r4, [r12]
46 - bl i2cwait
47 - str r1, [r12,#0x0c]
48 - str r4, [r12]
49 - bl i2cwait
50 - movs r3, r3
51 - moveq r0, r2
52 -i2csend_write:
53 - ldrne r0, [r2], #1
54 - str r0, [r12,#0x0c]
55 - str r4, [r12]
56 - bl i2cwait
57 - subs r3, r3, #1
58 - bhi i2csend_write
59 - mov r0, #0xd0
60 - str r0, [r12,#0x04]
61 - str r4, [r12]
62 -i2csend_wait:
63 - ldr r0, [r12,#0x04]
64 - tst r0, #0x20
65 - bne i2csend_wait
66 - ldmfd sp!, {r4,pc}
67 -.size i2csendbyte, .-i2csendbyte
68 -.size i2csend, .-i2csend
69 -
70 -
71 -.section .icode.i2crecv, "ax", %progbits
72 -.align 2
73 -.global i2crecvbyte
74 -.global i2crecv
75 -.type i2crecvbyte, %function
76 -.type i2crecv, %function
77 -i2crecvbyte:
78 - mov r2, #0
79 - mov r3, #1
80 -@fallthrough
81 -
82 -i2crecv:
83 - stmfd sp!, {r0,r4,lr}
84 - mov r12, #0x3C000000
85 - add r12, r12, #0x00900000
86 - mov r4, #0
87 - str r4, [r12,#0x08]
88 - str r0, [r12,#0x0c]
89 - mov r4, #0xf0
90 - str r4, [r12,#0x04]
91 - mov r4, #0xf3
92 - str r4, [r12]
93 - bl i2cwait
94 - str r1, [r12,#0x0c]
95 - str r4, [r12]
96 - bl i2cwait
97 - ldr r0, [sp]
98 - orr r0, r0, #1
99 - str r1, [r12,#0x0c]
100 - mov r0, #0xb0
101 - str r0, [r12,#0x04]
102 - str r4, [r12]
103 - bl i2cwait
104 -i2crecv_read:
105 - subs r3, r3, #1
106 - moveq r4, #0x73
107 - str r4, [r12]
108 - bl i2cwait
109 - ldr r0, [r12,#0x0c]
110 - movs r2, r2
111 - strne r0, [r2], #1
112 - movs r3, r3
113 - bne i2crecv_read
114 - mov r1, #0x90
115 - str r1, [r12,#0x04]
116 - mov r1, #0xf3
117 - str r1, [r12]
118 -i2crecv_wait:
119 - ldr r1, [r12,#0x04]
120 - tst r1, #0x20
121 - bne i2crecv_wait
122 - ldmfd sp!, {r0,r4,pc}
123 -.size i2crecvbyte, .-i2crecvbyte
124 -.size i2crecv, .-i2crecv
125 -
126 -
127 -.section .icode.i2cwait, "ax", %progbits
128 -.align 2
129 -.global i2cwait
130 -.type i2cwait, %function
131 -i2cwait:
132 - ldr r0, [r12]
133 - tst r0, #0x10
134 - beq i2cwait
135 - mov pc, lr
136 -.size i2cwait, .-i2cwait