20130503-181002

This commit is contained in:
BlubbFish 2013-05-03 16:09:54 +00:00
parent 95be6912a5
commit 538bd24ac1
7 changed files with 506 additions and 147 deletions

Binary file not shown.

View File

@ -2,7 +2,7 @@
:100010001AC019C018C017C016C015C014C013C02C :100010001AC019C018C017C016C015C014C013C02C
:1000200012C011C010C00FC00EC011241FBECFEDF2 :1000200012C011C010C00FC00EC011241FBECFEDF2
:10003000CDBF20E0A0E6B0E001C01D92A336B2071C :10003000CDBF20E0A0E6B0E001C01D92A336B2071C
:10004000E1F7BAD0BEC0DCCF6770772780FF06C06B :10004000E1F78FD194C1DCCF6770772780FF06C0BE
:1000500098B3987F98BB98B3962B98BB81FF0DC03F :1000500098B3987F98BB98B3962B98BB81FF0DC03F
:1000600098B3977C98BB98B39B01220F331F220F44 :1000600098B3977C98BB98B39B01220F331F220F44
:10007000331F220F331F292B28BB82FF06C092B3E8 :10007000331F220F331F292B28BB82FF06C092B3E8
@ -15,16 +15,43 @@
:1000E000C301BC01CC15DD050CF46260CE15DF0543 :1000E000C301BC01CC15DD050CF46260CE15DF0543
:1000F0000CF46460C401A8DF2196CF3FD10561F7FD :1000F0000CF46460C401A8DF2196CF3FD10561F7FD
:10010000DF91CF911F910F91FF90EF90DF90CF90F3 :10010000DF91CF911F910F91FF90EF90DF90CF90F3
:10011000BF90AF909F908F907F906F90089560E018 :10011000BF90AF909F908F907F906F9008952F9297
:1001200070E08FE090E090DFB7990EC080916200A0 :100120003F924F925F926F927F928F929F92AF9287
:100130008F5F809362002FE78AE196E02150804034 :10013000BF92CF92DF92EF92FF920F931F93CF93D4
:100140009040E1F700C00000B6990EC080916000B9 :10014000DF938C014B016A013901E12CF12C312C38
:100150008F5F809360002FE78AE196E02150804016 :10015000212C2CC0C42DD52DB401C80175DF2196EA
:100160009040E1F700C0000086990EC080916100C8 :10016000CF3FD105C9F71E141F044CF4C32DD22D67
:100170008F5F809361002FE78AE196E021508040F5 :10017000B601C80169DF2196CE15DF05C9F78FEFFB
:100180009040E1F700C000002091610040916000C4 :10018000A81AB80AA614B70429F409C0A12CB12CE6
:100190006091620030E050E070E08FE090E084DF3A :100190004E2C5F2C8FEFE816F104E4F2E4CF8FEFE2
:1001A000C3CF88B3806C88BB969A8FE493EC019799 :1001A000E81AF80A8FEFE816F10421F01614170484
:1001B000F1F700C0000008958FE387BB81BBF1DF3A :1001B0006CF3F5CFDF91CF911F910F91FF90EF90EE
:0601C000AEDFF894FFCF52 :1001C000DF90CF90BF90AF909F908F907F906F9077
:1001D0005F904F903F902F90089566E070E085E02B
:1001E00090E032DF2FE788E391E02150804090409B
:1001F000E1F700C0000060E070E085E090E024DFFF
:100200002FE784E89EE1215080409040E1F700C054
:10021000000066E070E08FE090E016DF8FE493EC82
:100220000197F1F700C0000060E070E08FE090E01F
:100230000BDF9FE72AE186E0915020408040E1F704
:1002400000C0000066E070E08FE090E0FDDE9FE718
:1002500028E381E0915020408040E1F700C0000099
:1002600060E070E08FE090E0EFDE9FE72AE186E05B
:10027000915020408040E1F700C0000066E070E04F
:100280008FE090E0E1DE9FEB24ED81E09150204093
:100290008040E1F700C0000060E070E08FE090E097
:1002A000D3DE9FEF28E08DE3915020408040E1F7BE
:1002B00000C0000024E130E047E050E066E070E07C
:1002C0008FE090E02CDF089560E070E08FE090E038
:1002D000BBDEB7990EC0809162008F5F8093620091
:1002E0002FE78AE196E0215080409040E1F700C07E
:1002F0000000B6990EC0809160008F5F809360000F
:100300002FE78AE196E0215080409040E1F700C05D
:10031000000086990EC0809161008F5F809361001C
:100320002FE78AE196E0215080409040E1F700C03D
:10033000000020916100409160006091620030E017
:1003400050E070E08FE090E0AFDEC3CF88B3806C08
:1003500088BB969A8FE493EC0197F1F700C00000F8
:1003600008958FE387BB81BBF1DF37DFADDFF89402
:02037000FFCFBD
:00000001FF :00000001FF

View File

@ -3,33 +3,33 @@ Leuchtklotz.elf: file format elf32-avr
Sections: Sections:
Idx Name Size VMA LMA File off Algn Idx Name Size VMA LMA File off Algn
0 .text 000001c6 00000000 00000000 00000094 2**1 0 .text 00000372 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00800060 000001c6 0000025a 2**0 1 .data 00000000 00800060 00000372 00000406 2**0
CONTENTS, ALLOC, LOAD, DATA CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000003 00800060 00800060 0000025a 2**0 2 .bss 00000003 00800060 00800060 00000406 2**0
ALLOC ALLOC
3 .stab 000006b4 00000000 00000000 0000025c 2**2 3 .stab 000006b4 00000000 00000000 00000408 2**2
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
4 .stabstr 00000082 00000000 00000000 00000910 2**0 4 .stabstr 00000082 00000000 00000000 00000abc 2**0
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
5 .comment 0000002f 00000000 00000000 00000992 2**0 5 .comment 0000002f 00000000 00000000 00000b3e 2**0
CONTENTS, READONLY CONTENTS, READONLY
6 .debug_aranges 00000068 00000000 00000000 000009c1 2**0 6 .debug_aranges 00000068 00000000 00000000 00000b6d 2**0
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
7 .debug_info 00000f11 00000000 00000000 00000a29 2**0 7 .debug_info 00000f1a 00000000 00000000 00000bd5 2**0
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
8 .debug_abbrev 000001dd 00000000 00000000 0000193a 2**0 8 .debug_abbrev 000001dd 00000000 00000000 00001aef 2**0
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
9 .debug_line 000003f7 00000000 00000000 00001b17 2**0 9 .debug_line 000003f8 00000000 00000000 00001ccc 2**0
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
10 .debug_frame 00000158 00000000 00000000 00001f10 2**2 10 .debug_frame 00000158 00000000 00000000 000020c4 2**2
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
11 .debug_str 00000182 00000000 00000000 00002068 2**0 11 .debug_str 00000182 00000000 00000000 0000221c 2**0
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
12 .debug_loc 000005fd 00000000 00000000 000021ea 2**0 12 .debug_loc 000005fd 00000000 00000000 0000239e 2**0
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
13 .debug_ranges 000000b8 00000000 00000000 000027e7 2**0 13 .debug_ranges 000000b8 00000000 00000000 0000299b 2**0
CONTENTS, READONLY, DEBUGGING CONTENTS, READONLY, DEBUGGING
Disassembly of section .text: Disassembly of section .text:
@ -76,8 +76,8 @@ Disassembly of section .text:
3c: a3 36 cpi r26, 0x63 ; 99 3c: a3 36 cpi r26, 0x63 ; 99
3e: b2 07 cpc r27, r18 3e: b2 07 cpc r27, r18
40: e1 f7 brne .-8 ; 0x3a <.do_clear_bss_loop> 40: e1 f7 brne .-8 ; 0x3a <.do_clear_bss_loop>
42: ba d0 rcall .+372 ; 0x1b8 <main> 42: 8f d1 rcall .+798 ; 0x362 <main>
44: be c0 rjmp .+380 ; 0x1c2 <_exit> 44: 94 c1 rjmp .+808 ; 0x36e <_exit>
00000046 <__bad_interrupt>: 00000046 <__bad_interrupt>:
46: dc cf rjmp .-72 ; 0x0 <__vectors> 46: dc cf rjmp .-72 ; 0x0 <__vectors>
@ -295,151 +295,454 @@ Disassembly of section .text:
11a: 6f 90 pop r6 11a: 6f 90 pop r6
11c: 08 95 ret 11c: 08 95 ret
0000011e <programColorFull>: 0000011e <fade>:
11e: 60 e0 ldi r22, 0x00 ; 0 11e: 2f 92 push r2
120: 70 e0 ldi r23, 0x00 ; 0 120: 3f 92 push r3
} }
for (int i=0;i<80;i++) for (int i=0;i<80;i++)
{ {
rgbl(LED2, 0, 0, 0); rgbl(LED2, 0, 0, 0);
} }
for (int i=0;i<80;i++) for (int i=0;i<80;i++)
122: 8f e0 ldi r24, 0x0F ; 15 122: 4f 92 push r4
124: 90 e0 ldi r25, 0x00 ; 0 124: 5f 92 push r5
126: 90 df rcall .-224 ; 0x48 <ledg> 126: 6f 92 push r6
{ {
rgbl(LED2, 200, 10, 0); rgbl(LED2, 200, 10, 0);
} }
for (int i=0;i<80;i++) for (int i=0;i<80;i++)
{ {
rgbl(LED2, 0, 0, 0); rgbl(LED2, 0, 0, 0);
128: b7 99 sbic 0x16, 7 ; 22 128: 7f 92 push r7
12a: 0e c0 rjmp .+28 ; 0x148 <programColorFull+0x2a> 12a: 8f 92 push r8
12c: 80 91 62 00 lds r24, 0x0062 12c: 9f 92 push r9
130: 8f 5f subi r24, 0xFF ; 255 12e: af 92 push r10
132: 80 93 62 00 sts 0x0062, r24 130: bf 92 push r11
136: 2f e7 ldi r18, 0x7F ; 127 132: cf 92 push r12
138: 8a e1 ldi r24, 0x1A ; 26 134: df 92 push r13
13a: 96 e0 ldi r25, 0x06 ; 6 136: ef 92 push r14
138: ff 92 push r15
13a: 0f 93 push r16
} }
for (int i=0;i<80;i++) for (int i=0;i<80;i++)
{ {
rgbl(LED2, 200, 10, 0); rgbl(LED2, 200, 10, 0);
} }
for (int i=0;i<80;i++) for (int i=0;i<80;i++)
13c: 21 50 subi r18, 0x01 ; 1 13c: 1f 93 push r17
} }
void programCop() void programCop()
{ {
while(1) { while(1) {
for (int i=0;i<80;i++) for (int i=0;i<80;i++)
13e: 80 40 sbci r24, 0x00 ; 0 13e: cf 93 push r28
140: 90 40 sbci r25, 0x00 ; 0 140: df 93 push r29
142: e1 f7 brne .-8 ; 0x13c <programColorFull+0x1e> 142: 8c 01 movw r16, r24
}
ledg(led,rgb);
}
}
void fade(int led, int from, int to, int dur) {
144: 4b 01 movw r8, r22
146: 6a 01 movw r12, r20
148: 39 01 movw r6, r18
for (int i=0;i<0xFF;i++)
14a: e1 2c mov r14, r1
14c: f1 2c mov r15, r1
for(int k=0;k<dur;k++) {
for (int j=i;j<0xFF;j++)
{
ledg(led,from);
}
for (int j=0;j<i;j++)
14e: 31 2c mov r3, r1
150: 21 2c mov r2, r1
152: 2c c0 rjmp .+88 ; 0x1ac <fade+0x8e>
void fade(int led, int from, int to, int dur) {
for (int i=0;i<0xFF;i++)
{
for(int k=0;k<dur;k++) {
for (int j=i;j<0xFF;j++)
154: c4 2d mov r28, r4
156: d5 2d mov r29, r5
{
ledg(led,from);
158: b4 01 movw r22, r8
15a: c8 01 movw r24, r16
15c: 75 df rcall .-278 ; 0x48 <ledg>
void fade(int led, int from, int to, int dur) {
for (int i=0;i<0xFF;i++)
{
for(int k=0;k<dur;k++) {
for (int j=i;j<0xFF;j++)
15e: 21 96 adiw r28, 0x01 ; 1
160: cf 3f cpi r28, 0xFF ; 255
162: d1 05 cpc r29, r1
164: c9 f7 brne .-14 ; 0x158 <fade+0x3a>
{
ledg(led,from);
}
for (int j=0;j<i;j++)
166: 1e 14 cp r1, r14
168: 1f 04 cpc r1, r15
16a: 4c f4 brge .+18 ; 0x17e <fade+0x60>
16c: c3 2d mov r28, r3
16e: d2 2d mov r29, r2
{
ledg(led,to);
170: b6 01 movw r22, r12
172: c8 01 movw r24, r16
174: 69 df rcall .-302 ; 0x48 <ledg>
for(int k=0;k<dur;k++) {
for (int j=i;j<0xFF;j++)
{
ledg(led,from);
}
for (int j=0;j<i;j++)
176: 21 96 adiw r28, 0x01 ; 1
178: ce 15 cp r28, r14
17a: df 05 cpc r29, r15
17c: c9 f7 brne .-14 ; 0x170 <fade+0x52>
}
void fade(int led, int from, int to, int dur) {
for (int i=0;i<0xFF;i++)
{
for(int k=0;k<dur;k++) {
17e: 8f ef ldi r24, 0xFF ; 255
180: a8 1a sub r10, r24
182: b8 0a sbc r11, r24
184: a6 14 cp r10, r6
186: b7 04 cpc r11, r7
188: 29 f4 brne .+10 ; 0x194 <fade+0x76>
18a: 09 c0 rjmp .+18 ; 0x19e <fade+0x80>
18c: a1 2c mov r10, r1
18e: b1 2c mov r11, r1
for (int j=i;j<0xFF;j++)
190: 4e 2c mov r4, r14
192: 5f 2c mov r5, r15
194: 8f ef ldi r24, 0xFF ; 255
196: e8 16 cp r14, r24
198: f1 04 cpc r15, r1
19a: e4 f2 brlt .-72 ; 0x154 <fade+0x36>
19c: e4 cf rjmp .-56 ; 0x166 <fade+0x48>
ledg(led,rgb);
}
}
void fade(int led, int from, int to, int dur) {
for (int i=0;i<0xFF;i++)
19e: 8f ef ldi r24, 0xFF ; 255
1a0: e8 1a sub r14, r24
1a2: f8 0a sbc r15, r24
1a4: 8f ef ldi r24, 0xFF ; 255
1a6: e8 16 cp r14, r24
1a8: f1 04 cpc r15, r1
1aa: 21 f0 breq .+8 ; 0x1b4 <fade+0x96>
{
for(int k=0;k<dur;k++) {
1ac: 16 14 cp r1, r6
1ae: 17 04 cpc r1, r7
1b0: 6c f3 brlt .-38 ; 0x18c <fade+0x6e>
1b2: f5 cf rjmp .-22 ; 0x19e <fade+0x80>
{
ledg(led,to);
}
}
}
}
1b4: df 91 pop r29
1b6: cf 91 pop r28
1b8: 1f 91 pop r17
1ba: 0f 91 pop r16
1bc: ff 90 pop r15
1be: ef 90 pop r14
1c0: df 90 pop r13
1c2: cf 90 pop r12
1c4: bf 90 pop r11
1c6: af 90 pop r10
1c8: 9f 90 pop r9
1ca: 8f 90 pop r8
1cc: 7f 90 pop r7
1ce: 6f 90 pop r6
1d0: 5f 90 pop r5
1d2: 4f 90 pop r4
1d4: 3f 90 pop r3
1d6: 2f 90 pop r2
1d8: 08 95 ret
000001da <initleds>:
void initleds() {
ledg(LED1 | LED3, CYAN);
1da: 66 e0 ldi r22, 0x06 ; 6
1dc: 70 e0 ldi r23, 0x00 ; 0
1de: 85 e0 ldi r24, 0x05 ; 5
1e0: 90 e0 ldi r25, 0x00 ; 0
1e2: 32 df rcall .-412 ; 0x48 <ledg>
#else #else
//round up by default //round up by default
__ticks_dc = (uint32_t)(ceil(fabs(__tmp))); __ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
#endif #endif
__builtin_avr_delay_cycles(__ticks_dc); __builtin_avr_delay_cycles(__ticks_dc);
144: 00 c0 rjmp .+0 ; 0x146 <programColorFull+0x28> 1e4: 2f e7 ldi r18, 0x7F ; 127
146: 00 00 nop 1e6: 88 e3 ldi r24, 0x38 ; 56
1e8: 91 e0 ldi r25, 0x01 ; 1
1ea: 21 50 subi r18, 0x01 ; 1
1ec: 80 40 sbci r24, 0x00 ; 0
1ee: 90 40 sbci r25, 0x00 ; 0
1f0: e1 f7 brne .-8 ; 0x1ea <initleds+0x10>
1f2: 00 c0 rjmp .+0 ; 0x1f4 <initleds+0x1a>
1f4: 00 00 nop
_delay_ms(20);
ledg(LED1 | LED3, BLACK);
1f6: 60 e0 ldi r22, 0x00 ; 0
1f8: 70 e0 ldi r23, 0x00 ; 0
1fa: 85 e0 ldi r24, 0x05 ; 5
1fc: 90 e0 ldi r25, 0x00 ; 0
1fe: 24 df rcall .-440 ; 0x48 <ledg>
200: 2f e7 ldi r18, 0x7F ; 127
202: 84 e8 ldi r24, 0x84 ; 132
204: 9e e1 ldi r25, 0x1E ; 30
206: 21 50 subi r18, 0x01 ; 1
208: 80 40 sbci r24, 0x00 ; 0
20a: 90 40 sbci r25, 0x00 ; 0
20c: e1 f7 brne .-8 ; 0x206 <initleds+0x2c>
20e: 00 c0 rjmp .+0 ; 0x210 <initleds+0x36>
210: 00 00 nop
_delay_ms(500);
ledg(LED1 | LED2 | LED3 | LED4, CYAN);
212: 66 e0 ldi r22, 0x06 ; 6
214: 70 e0 ldi r23, 0x00 ; 0
216: 8f e0 ldi r24, 0x0F ; 15
218: 90 e0 ldi r25, 0x00 ; 0
21a: 16 df rcall .-468 ; 0x48 <ledg>
21c: 8f e4 ldi r24, 0x4F ; 79
21e: 93 ec ldi r25, 0xC3 ; 195
220: 01 97 sbiw r24, 0x01 ; 1
222: f1 f7 brne .-4 ; 0x220 <initleds+0x46>
224: 00 c0 rjmp .+0 ; 0x226 <initleds+0x4c>
226: 00 00 nop
_delay_ms(10);
ledg(LED1 | LED2 | LED3 | LED4, BLACK);
228: 60 e0 ldi r22, 0x00 ; 0
22a: 70 e0 ldi r23, 0x00 ; 0
22c: 8f e0 ldi r24, 0x0F ; 15
22e: 90 e0 ldi r25, 0x00 ; 0
230: 0b df rcall .-490 ; 0x48 <ledg>
232: 9f e7 ldi r25, 0x7F ; 127
234: 2a e1 ldi r18, 0x1A ; 26
236: 86 e0 ldi r24, 0x06 ; 6
238: 91 50 subi r25, 0x01 ; 1
23a: 20 40 sbci r18, 0x00 ; 0
23c: 80 40 sbci r24, 0x00 ; 0
23e: e1 f7 brne .-8 ; 0x238 <initleds+0x5e>
240: 00 c0 rjmp .+0 ; 0x242 <initleds+0x68>
242: 00 00 nop
_delay_ms(100);
ledg(LED1 | LED2 | LED3 | LED4, CYAN);
244: 66 e0 ldi r22, 0x06 ; 6
246: 70 e0 ldi r23, 0x00 ; 0
248: 8f e0 ldi r24, 0x0F ; 15
24a: 90 e0 ldi r25, 0x00 ; 0
24c: fd de rcall .-518 ; 0x48 <ledg>
24e: 9f e7 ldi r25, 0x7F ; 127
250: 28 e3 ldi r18, 0x38 ; 56
252: 81 e0 ldi r24, 0x01 ; 1
254: 91 50 subi r25, 0x01 ; 1
256: 20 40 sbci r18, 0x00 ; 0
258: 80 40 sbci r24, 0x00 ; 0
25a: e1 f7 brne .-8 ; 0x254 <initleds+0x7a>
25c: 00 c0 rjmp .+0 ; 0x25e <initleds+0x84>
25e: 00 00 nop
_delay_ms(20);
ledg(LED1 | LED2 | LED3 | LED4, BLACK);
260: 60 e0 ldi r22, 0x00 ; 0
262: 70 e0 ldi r23, 0x00 ; 0
264: 8f e0 ldi r24, 0x0F ; 15
266: 90 e0 ldi r25, 0x00 ; 0
268: ef de rcall .-546 ; 0x48 <ledg>
26a: 9f e7 ldi r25, 0x7F ; 127
26c: 2a e1 ldi r18, 0x1A ; 26
26e: 86 e0 ldi r24, 0x06 ; 6
270: 91 50 subi r25, 0x01 ; 1
272: 20 40 sbci r18, 0x00 ; 0
274: 80 40 sbci r24, 0x00 ; 0
276: e1 f7 brne .-8 ; 0x270 <initleds+0x96>
278: 00 c0 rjmp .+0 ; 0x27a <initleds+0xa0>
27a: 00 00 nop
_delay_ms(100);
ledg(LED1 | LED2 | LED3 | LED4, CYAN);
27c: 66 e0 ldi r22, 0x06 ; 6
27e: 70 e0 ldi r23, 0x00 ; 0
280: 8f e0 ldi r24, 0x0F ; 15
282: 90 e0 ldi r25, 0x00 ; 0
284: e1 de rcall .-574 ; 0x48 <ledg>
286: 9f eb ldi r25, 0xBF ; 191
288: 24 ed ldi r18, 0xD4 ; 212
28a: 81 e0 ldi r24, 0x01 ; 1
28c: 91 50 subi r25, 0x01 ; 1
28e: 20 40 sbci r18, 0x00 ; 0
290: 80 40 sbci r24, 0x00 ; 0
292: e1 f7 brne .-8 ; 0x28c <initleds+0xb2>
294: 00 c0 rjmp .+0 ; 0x296 <initleds+0xbc>
296: 00 00 nop
_delay_ms(30);
ledg(LED1 | LED2 | LED3 | LED4, BLACK);
298: 60 e0 ldi r22, 0x00 ; 0
29a: 70 e0 ldi r23, 0x00 ; 0
29c: 8f e0 ldi r24, 0x0F ; 15
29e: 90 e0 ldi r25, 0x00 ; 0
2a0: d3 de rcall .-602 ; 0x48 <ledg>
2a2: 9f ef ldi r25, 0xFF ; 255
2a4: 28 e0 ldi r18, 0x08 ; 8
2a6: 8d e3 ldi r24, 0x3D ; 61
2a8: 91 50 subi r25, 0x01 ; 1
2aa: 20 40 sbci r18, 0x00 ; 0
2ac: 80 40 sbci r24, 0x00 ; 0
2ae: e1 f7 brne .-8 ; 0x2a8 <initleds+0xce>
2b0: 00 c0 rjmp .+0 ; 0x2b2 <initleds+0xd8>
2b2: 00 00 nop
_delay_ms(1000);
fade(LED1 | LED2 | LED3 | LED4, CYAN, WHITE, 20);
2b4: 24 e1 ldi r18, 0x14 ; 20
2b6: 30 e0 ldi r19, 0x00 ; 0
2b8: 47 e0 ldi r20, 0x07 ; 7
2ba: 50 e0 ldi r21, 0x00 ; 0
2bc: 66 e0 ldi r22, 0x06 ; 6
2be: 70 e0 ldi r23, 0x00 ; 0
2c0: 8f e0 ldi r24, 0x0F ; 15
2c2: 90 e0 ldi r25, 0x00 ; 0
2c4: 2c df rcall .-424 ; 0x11e <fade>
2c6: 08 95 ret
000002c8 <programColorFull>:
volatile uint8_t rgb_r = 0;
volatile uint8_t rgb_b = 0;
volatile uint8_t rgb_g = 0;
void programColorFull() {
ledg(LED1 | LED2 | LED3 | LED4, BLACK);
2c8: 60 e0 ldi r22, 0x00 ; 0
2ca: 70 e0 ldi r23, 0x00 ; 0
2cc: 8f e0 ldi r24, 0x0F ; 15
2ce: 90 e0 ldi r25, 0x00 ; 0
2d0: bb de rcall .-650 ; 0x48 <ledg>
while(1) { while(1) {
if(!(PINB & (1<<PINB7))) { if(!(PINB & (1<<PINB7))) {
2d2: b7 99 sbic 0x16, 7 ; 22
2d4: 0e c0 rjmp .+28 ; 0x2f2 <programColorFull+0x2a>
rgb_r++; rgb_r++;
2d6: 80 91 62 00 lds r24, 0x0062
2da: 8f 5f subi r24, 0xFF ; 255
2dc: 80 93 62 00 sts 0x0062, r24
2e0: 2f e7 ldi r18, 0x7F ; 127
2e2: 8a e1 ldi r24, 0x1A ; 26
2e4: 96 e0 ldi r25, 0x06 ; 6
2e6: 21 50 subi r18, 0x01 ; 1
2e8: 80 40 sbci r24, 0x00 ; 0
2ea: 90 40 sbci r25, 0x00 ; 0
2ec: e1 f7 brne .-8 ; 0x2e6 <programColorFull+0x1e>
2ee: 00 c0 rjmp .+0 ; 0x2f0 <programColorFull+0x28>
2f0: 00 00 nop
_delay_ms(100); _delay_ms(100);
} }
if(!(PINB & (1<<PINB6))) { if(!(PINB & (1<<PINB6))) {
148: b6 99 sbic 0x16, 6 ; 22 2f2: b6 99 sbic 0x16, 6 ; 22
14a: 0e c0 rjmp .+28 ; 0x168 <programColorFull+0x4a> 2f4: 0e c0 rjmp .+28 ; 0x312 <programColorFull+0x4a>
rgb_g++; rgb_g++;
14c: 80 91 60 00 lds r24, 0x0060 2f6: 80 91 60 00 lds r24, 0x0060
150: 8f 5f subi r24, 0xFF ; 255 2fa: 8f 5f subi r24, 0xFF ; 255
152: 80 93 60 00 sts 0x0060, r24 2fc: 80 93 60 00 sts 0x0060, r24
156: 2f e7 ldi r18, 0x7F ; 127 300: 2f e7 ldi r18, 0x7F ; 127
158: 8a e1 ldi r24, 0x1A ; 26 302: 8a e1 ldi r24, 0x1A ; 26
15a: 96 e0 ldi r25, 0x06 ; 6 304: 96 e0 ldi r25, 0x06 ; 6
15c: 21 50 subi r18, 0x01 ; 1 306: 21 50 subi r18, 0x01 ; 1
15e: 80 40 sbci r24, 0x00 ; 0 308: 80 40 sbci r24, 0x00 ; 0
160: 90 40 sbci r25, 0x00 ; 0 30a: 90 40 sbci r25, 0x00 ; 0
162: e1 f7 brne .-8 ; 0x15c <programColorFull+0x3e> 30c: e1 f7 brne .-8 ; 0x306 <programColorFull+0x3e>
164: 00 c0 rjmp .+0 ; 0x166 <programColorFull+0x48> 30e: 00 c0 rjmp .+0 ; 0x310 <programColorFull+0x48>
166: 00 00 nop 310: 00 00 nop
_delay_ms(100); _delay_ms(100);
} }
if(!(PIND & (1<<PIND6))) { if(!(PIND & (1<<PIND6))) {
168: 86 99 sbic 0x10, 6 ; 16 312: 86 99 sbic 0x10, 6 ; 16
16a: 0e c0 rjmp .+28 ; 0x188 <programColorFull+0x6a> 314: 0e c0 rjmp .+28 ; 0x332 <programColorFull+0x6a>
rgb_b++; rgb_b++;
16c: 80 91 61 00 lds r24, 0x0061 316: 80 91 61 00 lds r24, 0x0061
170: 8f 5f subi r24, 0xFF ; 255 31a: 8f 5f subi r24, 0xFF ; 255
172: 80 93 61 00 sts 0x0061, r24 31c: 80 93 61 00 sts 0x0061, r24
176: 2f e7 ldi r18, 0x7F ; 127 320: 2f e7 ldi r18, 0x7F ; 127
178: 8a e1 ldi r24, 0x1A ; 26 322: 8a e1 ldi r24, 0x1A ; 26
17a: 96 e0 ldi r25, 0x06 ; 6 324: 96 e0 ldi r25, 0x06 ; 6
17c: 21 50 subi r18, 0x01 ; 1 326: 21 50 subi r18, 0x01 ; 1
17e: 80 40 sbci r24, 0x00 ; 0 328: 80 40 sbci r24, 0x00 ; 0
180: 90 40 sbci r25, 0x00 ; 0 32a: 90 40 sbci r25, 0x00 ; 0
182: e1 f7 brne .-8 ; 0x17c <programColorFull+0x5e> 32c: e1 f7 brne .-8 ; 0x326 <programColorFull+0x5e>
184: 00 c0 rjmp .+0 ; 0x186 <programColorFull+0x68> 32e: 00 c0 rjmp .+0 ; 0x330 <programColorFull+0x68>
186: 00 00 nop 330: 00 00 nop
_delay_ms(100); _delay_ms(100);
} }
rgbl(LED1 | LED2 | LED3 | LED4, rgb_r, rgb_g, rgb_b); rgbl(LED1 | LED2 | LED3 | LED4, rgb_r, rgb_g, rgb_b);
188: 20 91 61 00 lds r18, 0x0061 332: 20 91 61 00 lds r18, 0x0061
18c: 40 91 60 00 lds r20, 0x0060 336: 40 91 60 00 lds r20, 0x0060
190: 60 91 62 00 lds r22, 0x0062 33a: 60 91 62 00 lds r22, 0x0062
194: 30 e0 ldi r19, 0x00 ; 0 33e: 30 e0 ldi r19, 0x00 ; 0
196: 50 e0 ldi r21, 0x00 ; 0 340: 50 e0 ldi r21, 0x00 ; 0
198: 70 e0 ldi r23, 0x00 ; 0 342: 70 e0 ldi r23, 0x00 ; 0
19a: 8f e0 ldi r24, 0x0F ; 15 344: 8f e0 ldi r24, 0x0F ; 15
19c: 90 e0 ldi r25, 0x00 ; 0 346: 90 e0 ldi r25, 0x00 ; 0
19e: 84 df rcall .-248 ; 0xa8 <rgbl> 348: af de rcall .-674 ; 0xa8 <rgbl>
} }
1a0: c3 cf rjmp .-122 ; 0x128 <programColorFull+0xa> 34a: c3 cf rjmp .-122 ; 0x2d2 <programColorFull+0xa>
000001a2 <initschalter>: 0000034c <initschalter>:
} }
void initschalter() void initschalter()
{ {
PORTB |= ((1<<PINB7) | (1<<PINB6)); PORTB |= ((1<<PINB7) | (1<<PINB6));
1a2: 88 b3 in r24, 0x18 ; 24 34c: 88 b3 in r24, 0x18 ; 24
1a4: 80 6c ori r24, 0xC0 ; 192 34e: 80 6c ori r24, 0xC0 ; 192
1a6: 88 bb out 0x18, r24 ; 24 350: 88 bb out 0x18, r24 ; 24
PORTD |= (1<<PIND6); PORTD |= (1<<PIND6);
1a8: 96 9a sbi 0x12, 6 ; 18 352: 96 9a sbi 0x12, 6 ; 18
1aa: 8f e4 ldi r24, 0x4F ; 79 354: 8f e4 ldi r24, 0x4F ; 79
1ac: 93 ec ldi r25, 0xC3 ; 195 356: 93 ec ldi r25, 0xC3 ; 195
1ae: 01 97 sbiw r24, 0x01 ; 1 358: 01 97 sbiw r24, 0x01 ; 1
1b0: f1 f7 brne .-4 ; 0x1ae <initschalter+0xc> 35a: f1 f7 brne .-4 ; 0x358 <initschalter+0xc>
1b2: 00 c0 rjmp .+0 ; 0x1b4 <initschalter+0x12> 35c: 00 c0 rjmp .+0 ; 0x35e <initschalter+0x12>
1b4: 00 00 nop 35e: 00 00 nop
1b6: 08 95 ret 360: 08 95 ret
000001b8 <main>: 00000362 <main>:
} }
} }
int main(void) int main(void)
{ {
DDRB = 0b00111111; DDRB = 0b00111111;
1b8: 8f e3 ldi r24, 0x3F ; 63 362: 8f e3 ldi r24, 0x3F ; 63
1ba: 87 bb out 0x17, r24 ; 23 364: 87 bb out 0x17, r24 ; 23
DDRD = 0b00111111; DDRD = 0b00111111;
1bc: 81 bb out 0x11, r24 ; 17 366: 81 bb out 0x11, r24 ; 17
initschalter(); initschalter();
1be: f1 df rcall .-30 ; 0x1a2 <initschalter> 368: f1 df rcall .-30 ; 0x34c <initschalter>
//initleds(); initleds();
36a: 37 df rcall .-402 ; 0x1da <initleds>
while(1) while(1)
{ {
programColorFull(); programColorFull();
1c0: ae df rcall .-164 ; 0x11e <programColorFull> 36c: ad df rcall .-166 ; 0x2c8 <programColorFull>
000001c2 <_exit>: 0000036e <_exit>:
1c2: f8 94 cli 36e: f8 94 cli
000001c4 <__stop_program>: 00000370 <__stop_program>:
1c4: ff cf rjmp .-2 ; 0x1c4 <__stop_program> 370: ff cf rjmp .-2 ; 0x370 <__stop_program>

View File

@ -9,9 +9,6 @@ Discarded input sections
.bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o .bss 0x00000000 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o
.text 0x00000000 0x0 Leuchtklotz.o .text 0x00000000 0x0 Leuchtklotz.o
.text.fade 0x00000000 0xbc Leuchtklotz.o
.text.initleds
0x00000000 0xee Leuchtklotz.o
.text.programRainbow .text.programRainbow
0x00000000 0x80 Leuchtklotz.o 0x00000000 0x80 Leuchtklotz.o
.text.programWarnYellow .text.programWarnYellow
@ -158,7 +155,7 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
.rela.plt .rela.plt
*(.rela.plt) *(.rela.plt)
.text 0x00000000 0x1c6 .text 0x00000000 0x372
*(.vectors) *(.vectors)
.vectors 0x00000000 0x2a c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o .vectors 0x00000000 0x2a c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o
0x00000000 __vector_default 0x00000000 __vector_default
@ -239,19 +236,24 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
0x00000048 ledg 0x00000048 ledg
.text.rgbl 0x000000a8 0x76 Leuchtklotz.o .text.rgbl 0x000000a8 0x76 Leuchtklotz.o
0x000000a8 rgbl 0x000000a8 rgbl
.text.fade 0x0000011e 0xbc Leuchtklotz.o
0x0000011e fade
.text.initleds
0x000001da 0xee Leuchtklotz.o
0x000001da initleds
.text.programColorFull .text.programColorFull
0x0000011e 0x84 Leuchtklotz.o 0x000002c8 0x84 Leuchtklotz.o
0x0000011e programColorFull 0x000002c8 programColorFull
.text.initschalter .text.initschalter
0x000001a2 0x16 Leuchtklotz.o 0x0000034c 0x16 Leuchtklotz.o
0x000001a2 initschalter 0x0000034c initschalter
.text.main 0x000001b8 0xa Leuchtklotz.o .text.main 0x00000362 0xc Leuchtklotz.o
0x000001b8 main 0x00000362 main
0x000001c2 . = ALIGN (0x2) 0x0000036e . = ALIGN (0x2)
*(.fini9) *(.fini9)
.fini9 0x000001c2 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) .fini9 0x0000036e 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o)
0x000001c2 _exit 0x0000036e _exit
0x000001c2 exit 0x0000036e exit
*(.fini9) *(.fini9)
*(.fini8) *(.fini8)
*(.fini8) *(.fini8)
@ -270,11 +272,11 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
*(.fini1) *(.fini1)
*(.fini1) *(.fini1)
*(.fini0) *(.fini0)
.fini0 0x000001c2 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o) .fini0 0x0000036e 0x4 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr25/tiny-stack\libgcc.a(_exit.o)
*(.fini0) *(.fini0)
0x000001c6 _etext = . 0x00000372 _etext = .
.data 0x00800060 0x0 load address 0x000001c6 .data 0x00800060 0x0 load address 0x00000372
0x00800060 PROVIDE (__data_start, .) 0x00800060 PROVIDE (__data_start, .)
*(.data) *(.data)
.data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o .data 0x00800060 0x0 c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o
@ -299,8 +301,8 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
*(.bss*) *(.bss*)
*(COMMON) *(COMMON)
0x00800063 PROVIDE (__bss_end, .) 0x00800063 PROVIDE (__bss_end, .)
0x000001c6 __data_load_start = LOADADDR (.data) 0x00000372 __data_load_start = LOADADDR (.data)
0x000001c6 __data_load_end = (__data_load_start + SIZEOF (.data)) 0x00000372 __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x00800063 0x0 .noinit 0x00800063 0x0
0x00800063 PROVIDE (__noinit_start, .) 0x00800063 PROVIDE (__noinit_start, .)
@ -373,18 +375,18 @@ LOAD c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.876/avr8
.debug_pubnames .debug_pubnames
*(.debug_pubnames) *(.debug_pubnames)
.debug_info 0x00000000 0xf11 .debug_info 0x00000000 0xf1a
*(.debug_info) *(.debug_info)
.debug_info 0x00000000 0xf11 Leuchtklotz.o .debug_info 0x00000000 0xf1a Leuchtklotz.o
*(.gnu.linkonce.wi.*) *(.gnu.linkonce.wi.*)
.debug_abbrev 0x00000000 0x1dd .debug_abbrev 0x00000000 0x1dd
*(.debug_abbrev) *(.debug_abbrev)
.debug_abbrev 0x00000000 0x1dd Leuchtklotz.o .debug_abbrev 0x00000000 0x1dd Leuchtklotz.o
.debug_line 0x00000000 0x3f7 .debug_line 0x00000000 0x3f8
*(.debug_line) *(.debug_line)
.debug_line 0x00000000 0x3f7 Leuchtklotz.o .debug_line 0x00000000 0x3f8 Leuchtklotz.o
.debug_frame 0x00000000 0x158 .debug_frame 0x00000000 0x158
*(.debug_frame) *(.debug_frame)

View File

@ -3,7 +3,7 @@ S113000014C021C020C01FC01EC01DC01CC01BC006
S11300101AC019C018C017C016C015C014C013C028 S11300101AC019C018C017C016C015C014C013C028
S113002012C011C010C00FC00EC011241FBECFEDEE S113002012C011C010C00FC00EC011241FBECFEDEE
S1130030CDBF20E0A0E6B0E001C01D92A336B20718 S1130030CDBF20E0A0E6B0E001C01D92A336B20718
S1130040E1F7BAD0BEC0DCCF6770772780FF06C067 S1130040E1F78FD194C1DCCF6770772780FF06C0BA
S113005098B3987F98BB98B3962B98BB81FF0DC03B S113005098B3987F98BB98B3962B98BB81FF0DC03B
S113006098B3977C98BB98B39B01220F331F220F40 S113006098B3977C98BB98B39B01220F331F220F40
S1130070331F220F331F292B28BB82FF06C092B3E4 S1130070331F220F331F292B28BB82FF06C092B3E4
@ -16,16 +16,43 @@ S11300D001E010E0612C712CC801CA15DB050CF09D
S11300E0C301BC01CC15DD050CF46260CE15DF053F S11300E0C301BC01CC15DD050CF46260CE15DF053F
S11300F00CF46460C401A8DF2196CF3FD10561F7F9 S11300F00CF46460C401A8DF2196CF3FD10561F7F9
S1130100DF91CF911F910F91FF90EF90DF90CF90EF S1130100DF91CF911F910F91FF90EF90DF90CF90EF
S1130110BF90AF909F908F907F906F90089560E014 S1130110BF90AF909F908F907F906F9008952F9293
S113012070E08FE090E090DFB7990EC0809162009C S11301203F924F925F926F927F928F929F92AF9283
S11301308F5F809362002FE78AE196E02150804030 S1130130BF92CF92DF92EF92FF920F931F93CF93D0
S11301409040E1F700C00000B6990EC080916000B5 S1130140DF938C014B016A013901E12CF12C312C34
S11301508F5F809360002FE78AE196E02150804012 S1130150212C2CC0C42DD52DB401C80175DF2196E6
S11301609040E1F700C0000086990EC080916100C4 S1130160CF3FD105C9F71E141F044CF4C32DD22D63
S11301708F5F809361002FE78AE196E021508040F1 S1130170B601C80169DF2196CE15DF05C9F78FEFF7
S11301809040E1F700C000002091610040916000C0 S1130180A81AB80AA614B70429F409C0A12CB12CE2
S11301906091620030E050E070E08FE090E084DF36 S11301904E2C5F2C8FEFE816F104E4F2E4CF8FEFDE
S11301A0C3CF88B3806C88BB969A8FE493EC019795 S11301A0E81AF80A8FEFE816F10421F01614170480
S11301B0F1F700C0000008958FE387BB81BBF1DF36 S11301B06CF3F5CFDF91CF911F910F91FF90EF90EA
S10901C0AEDFF894FFCF4E S11301C0DF90CF90BF90AF909F908F907F906F9073
S11301D05F904F903F902F90089566E070E085E027
S11301E090E032DF2FE788E391E021508040904097
S11301F0E1F700C0000060E070E085E090E024DFFB
S11302002FE784E89EE1215080409040E1F700C050
S1130210000066E070E08FE090E016DF8FE493EC7E
S11302200197F1F700C0000060E070E08FE090E01B
S11302300BDF9FE72AE186E0915020408040E1F700
S113024000C0000066E070E08FE090E0FDDE9FE714
S113025028E381E0915020408040E1F700C0000095
S113026060E070E08FE090E0EFDE9FE72AE186E057
S1130270915020408040E1F700C0000066E070E04B
S11302808FE090E0E1DE9FEB24ED81E0915020408F
S11302908040E1F700C0000060E070E08FE090E093
S11302A0D3DE9FEF28E08DE3915020408040E1F7BA
S11302B000C0000024E130E047E050E066E070E078
S11302C08FE090E02CDF089560E070E08FE090E034
S11302D0BBDEB7990EC0809162008F5F809362008D
S11302E02FE78AE196E0215080409040E1F700C07A
S11302F00000B6990EC0809160008F5F809360000B
S11303002FE78AE196E0215080409040E1F700C059
S1130310000086990EC0809161008F5F8093610018
S11303202FE78AE196E0215080409040E1F700C039
S1130330000020916100409160006091620030E013
S113034050E070E08FE090E0AFDEC3CF88B3806C04
S113035088BB969A8FE493EC0197F1F700C00000F4
S113036008958FE387BB81BBF1DF37DFADDFF894FE
S1050370FFCFB9
S9030000FC S9030000FC

View File

@ -219,7 +219,7 @@ int main(void)
DDRB = 0b00111111; DDRB = 0b00111111;
DDRD = 0b00111111; DDRD = 0b00111111;
initschalter(); initschalter();
//initleds(); initleds();
while(1) while(1)
{ {
programColorFull(); programColorFull();