2014-09-05 01:39:40 +02:00
|
|
|
|
|
|
|
|
|
Door.elf: file format elf32-avr
|
|
|
|
|
|
|
|
|
|
Sections:
|
|
|
|
|
Idx Name Size VMA LMA File off Algn
|
2015-02-11 18:10:07 +01:00
|
|
|
|
0 .data 00000084 00800100 0000130e 000013a2 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, ALLOC, LOAD, DATA
|
2015-02-11 18:10:07 +01:00
|
|
|
|
1 .text 0000130e 00000000 00000000 00000094 2**1
|
2014-11-16 18:10:00 +01:00
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
2015-02-11 18:10:07 +01:00
|
|
|
|
2 .bss 00000037 00800184 00800184 00001426 2**0
|
2014-11-19 23:57:35 +01:00
|
|
|
|
ALLOC
|
2015-02-11 18:10:07 +01:00
|
|
|
|
3 .stab 00001968 00000000 00000000 00001428 2**2
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4 .stabstr 000005b5 00000000 00000000 00002d90 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5 .comment 0000002f 00000000 00000000 00003345 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY
|
2015-02-11 18:10:07 +01:00
|
|
|
|
6 .debug_aranges 00000060 00000000 00000000 00003374 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
7 .debug_info 00003ed2 00000000 00000000 000033d4 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8 .debug_abbrev 0000050e 00000000 00000000 000072a6 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9 .debug_line 00000653 00000000 00000000 000077b4 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
10 .debug_frame 000001b8 00000000 00000000 00007e08 2**2
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
11 .debug_str 00001492 00000000 00000000 00007fc0 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
12 .debug_loc 00001d30 00000000 00000000 00009452 2**0
|
2014-11-19 23:57:35 +01:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2015-02-11 18:10:07 +01:00
|
|
|
|
13 .debug_ranges 00000370 00000000 00000000 0000b182 2**0
|
2014-09-05 01:39:40 +02:00
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
|
|
|
|
|
|
00000000 <__vectors>:
|
2015-02-09 18:10:07 +01:00
|
|
|
|
0: 0c 94 35 00 jmp 0x6a ; 0x6a <__ctors_end>
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4: 0c 94 22 07 jmp 0xe44 ; 0xe44 <__vector_1>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
8: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
10: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
14: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
18: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
1c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
20: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
24: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
28: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
2c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
30: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
34: 0c 94 5f 00 jmp 0xbe ; 0xbe <__vector_13>
|
|
|
|
|
38: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
3c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
40: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
44: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
48: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
4c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
50: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
54: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
58: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
5c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
60: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
|
|
|
|
64: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
|
|
|
|
00000068 <__ctors_start>:
|
2015-02-11 18:10:07 +01:00
|
|
|
|
68: da 07 cpc r29, r26
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
|
|
|
|
0000006a <__ctors_end>:
|
2015-02-09 18:10:07 +01:00
|
|
|
|
6a: 11 24 eor r1, r1
|
|
|
|
|
6c: 1f be out 0x3f, r1 ; 63
|
|
|
|
|
6e: cf ef ldi r28, 0xFF ; 255
|
|
|
|
|
70: d4 e0 ldi r29, 0x04 ; 4
|
|
|
|
|
72: de bf out 0x3e, r29 ; 62
|
|
|
|
|
74: cd bf out 0x3d, r28 ; 61
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
|
|
|
|
00000076 <__do_copy_data>:
|
2015-02-09 18:10:07 +01:00
|
|
|
|
76: 11 e0 ldi r17, 0x01 ; 1
|
|
|
|
|
78: a0 e0 ldi r26, 0x00 ; 0
|
|
|
|
|
7a: b1 e0 ldi r27, 0x01 ; 1
|
2015-02-11 18:10:07 +01:00
|
|
|
|
7c: ee e0 ldi r30, 0x0E ; 14
|
|
|
|
|
7e: f3 e1 ldi r31, 0x13 ; 19
|
2015-02-09 18:10:07 +01:00
|
|
|
|
80: 02 c0 rjmp .+4 ; 0x86 <__do_copy_data+0x10>
|
|
|
|
|
82: 05 90 lpm r0, Z+
|
|
|
|
|
84: 0d 92 st X+, r0
|
|
|
|
|
86: a4 38 cpi r26, 0x84 ; 132
|
|
|
|
|
88: b1 07 cpc r27, r17
|
|
|
|
|
8a: d9 f7 brne .-10 ; 0x82 <__do_copy_data+0xc>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
|
|
|
|
0000008c <__do_clear_bss>:
|
2015-02-09 18:10:07 +01:00
|
|
|
|
8c: 21 e0 ldi r18, 0x01 ; 1
|
|
|
|
|
8e: a4 e8 ldi r26, 0x84 ; 132
|
|
|
|
|
90: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
92: 01 c0 rjmp .+2 ; 0x96 <.do_clear_bss_start>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
|
|
|
|
00000094 <.do_clear_bss_loop>:
|
2015-02-09 18:10:07 +01:00
|
|
|
|
94: 1d 92 st X+, r1
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
|
|
|
|
00000096 <.do_clear_bss_start>:
|
2015-02-11 18:10:07 +01:00
|
|
|
|
96: ab 3b cpi r26, 0xBB ; 187
|
2015-02-09 18:10:07 +01:00
|
|
|
|
98: b2 07 cpc r27, r18
|
|
|
|
|
9a: e1 f7 brne .-8 ; 0x94 <.do_clear_bss_loop>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
|
|
|
|
0000009c <__do_global_ctors>:
|
2015-02-09 18:10:07 +01:00
|
|
|
|
9c: 10 e0 ldi r17, 0x00 ; 0
|
|
|
|
|
9e: ca e6 ldi r28, 0x6A ; 106
|
|
|
|
|
a0: d0 e0 ldi r29, 0x00 ; 0
|
|
|
|
|
a2: 04 c0 rjmp .+8 ; 0xac <__do_global_ctors+0x10>
|
|
|
|
|
a4: 22 97 sbiw r28, 0x02 ; 2
|
|
|
|
|
a6: fe 01 movw r30, r28
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a8: 0e 94 81 09 call 0x1302 ; 0x1302 <__tablejump__>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
ac: c8 36 cpi r28, 0x68 ; 104
|
|
|
|
|
ae: d1 07 cpc r29, r17
|
|
|
|
|
b0: c9 f7 brne .-14 ; 0xa4 <__do_global_ctors+0x8>
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b2: 0e 94 21 03 call 0x642 ; 0x642 <main>
|
|
|
|
|
b6: 0c 94 85 09 jmp 0x130a ; 0x130a <_exit>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
|
|
|
|
000000ba <__bad_interrupt>:
|
2015-02-09 18:10:07 +01:00
|
|
|
|
ba: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
2015-02-09 18:10:07 +01:00
|
|
|
|
000000be <__vector_13>:
|
|
|
|
|
|
|
|
|
|
ISR(INT0_vect) {
|
|
|
|
|
ir.interrupt();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ISR(TIMER1_OVF_vect) {
|
|
|
|
|
be: 1f 92 push r1
|
|
|
|
|
c0: 0f 92 push r0
|
|
|
|
|
c2: 0f b6 in r0, 0x3f ; 63
|
|
|
|
|
c4: 0f 92 push r0
|
|
|
|
|
c6: 11 24 eor r1, r1
|
2015-02-10 12:05:04 +01:00
|
|
|
|
c8: 2f 92 push r2
|
|
|
|
|
ca: 3f 92 push r3
|
|
|
|
|
cc: 4f 92 push r4
|
|
|
|
|
ce: 5f 92 push r5
|
|
|
|
|
d0: 6f 92 push r6
|
|
|
|
|
d2: 7f 92 push r7
|
|
|
|
|
d4: 8f 92 push r8
|
|
|
|
|
d6: 9f 92 push r9
|
|
|
|
|
d8: af 92 push r10
|
|
|
|
|
da: bf 92 push r11
|
|
|
|
|
dc: cf 92 push r12
|
|
|
|
|
de: df 92 push r13
|
|
|
|
|
e0: ef 92 push r14
|
|
|
|
|
e2: ff 92 push r15
|
|
|
|
|
e4: 0f 93 push r16
|
|
|
|
|
e6: 1f 93 push r17
|
|
|
|
|
e8: 2f 93 push r18
|
|
|
|
|
ea: 3f 93 push r19
|
|
|
|
|
ec: 4f 93 push r20
|
|
|
|
|
ee: 5f 93 push r21
|
|
|
|
|
f0: 6f 93 push r22
|
|
|
|
|
f2: 7f 93 push r23
|
|
|
|
|
f4: 8f 93 push r24
|
|
|
|
|
f6: 9f 93 push r25
|
|
|
|
|
f8: af 93 push r26
|
|
|
|
|
fa: bf 93 push r27
|
|
|
|
|
fc: cf 93 push r28
|
|
|
|
|
fe: df 93 push r29
|
|
|
|
|
100: ef 93 push r30
|
|
|
|
|
102: ff 93 push r31
|
2015-02-11 18:10:07 +01:00
|
|
|
|
case 2: return OCR2A; //BLAU
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void interrupt() {
|
|
|
|
|
if(this->fade_zylk > 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
104: d0 91 88 01 lds r29, 0x0188
|
|
|
|
|
108: dd 23 and r29, r29
|
2015-02-10 12:05:04 +01:00
|
|
|
|
10a: 09 f4 brne .+2 ; 0x10e <__vector_13+0x50>
|
2015-02-11 18:10:07 +01:00
|
|
|
|
10c: 0b c2 rjmp .+1046 ; 0x524 <__stack+0x25>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
|
|
|
|
10e: 20 e0 ldi r18, 0x00 ; 0
|
|
|
|
|
110: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
112: a9 01 movw r20, r18
|
2015-02-11 18:10:07 +01:00
|
|
|
|
114: 60 91 a1 01 lds r22, 0x01A1
|
|
|
|
|
118: 70 91 a2 01 lds r23, 0x01A2
|
|
|
|
|
11c: 80 91 a3 01 lds r24, 0x01A3
|
|
|
|
|
120: 90 91 a4 01 lds r25, 0x01A4
|
|
|
|
|
124: 0e 94 65 08 call 0x10ca ; 0x10ca <__cmpsf2>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
128: 81 11 cpse r24, r1
|
2015-02-11 18:10:07 +01:00
|
|
|
|
12a: fc c0 rjmp .+504 ; 0x324 <__vector_13+0x266>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
12c: 20 e0 ldi r18, 0x00 ; 0
|
|
|
|
|
12e: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
130: a9 01 movw r20, r18
|
2015-02-11 18:10:07 +01:00
|
|
|
|
132: 60 91 a5 01 lds r22, 0x01A5
|
|
|
|
|
136: 70 91 a6 01 lds r23, 0x01A6
|
|
|
|
|
13a: 80 91 a7 01 lds r24, 0x01A7
|
|
|
|
|
13e: 90 91 a8 01 lds r25, 0x01A8
|
|
|
|
|
142: 0e 94 65 08 call 0x10ca ; 0x10ca <__cmpsf2>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
146: 81 11 cpse r24, r1
|
2015-02-11 18:10:07 +01:00
|
|
|
|
148: f0 c0 rjmp .+480 ; 0x32a <__vector_13+0x26c>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
14a: 20 e0 ldi r18, 0x00 ; 0
|
|
|
|
|
14c: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
14e: a9 01 movw r20, r18
|
2015-02-11 18:10:07 +01:00
|
|
|
|
150: 60 91 a9 01 lds r22, 0x01A9
|
|
|
|
|
154: 70 91 aa 01 lds r23, 0x01AA
|
|
|
|
|
158: 80 91 ab 01 lds r24, 0x01AB
|
|
|
|
|
15c: 90 91 ac 01 lds r25, 0x01AC
|
|
|
|
|
160: 0e 94 65 08 call 0x10ca ; 0x10ca <__cmpsf2>
|
|
|
|
|
164: 81 11 cpse r24, r1
|
|
|
|
|
166: e4 c0 rjmp .+456 ; 0x330 <__vector_13+0x272>
|
|
|
|
|
this->_l = (this->_l + 1 < this->fade_zylk) ? this->_l + 1 : 0;
|
|
|
|
|
168: c0 91 b9 01 lds r28, 0x01B9
|
|
|
|
|
16c: 2c 2f mov r18, r28
|
|
|
|
|
16e: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
170: 2f 5f subi r18, 0xFF ; 255
|
|
|
|
|
172: 3f 4f sbci r19, 0xFF ; 255
|
|
|
|
|
174: 8d 2f mov r24, r29
|
|
|
|
|
176: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
178: 28 17 cp r18, r24
|
|
|
|
|
17a: 39 07 cpc r19, r25
|
|
|
|
|
17c: 14 f4 brge .+4 ; 0x182 <__vector_13+0xc4>
|
|
|
|
|
17e: cf 5f subi r28, 0xFF ; 255
|
|
|
|
|
180: 01 c0 rjmp .+2 ; 0x184 <__vector_13+0xc6>
|
|
|
|
|
182: c0 e0 ldi r28, 0x00 ; 0
|
|
|
|
|
184: c0 93 b9 01 sts 0x01B9, r28
|
|
|
|
|
188: bb 24 eor r11, r11
|
|
|
|
|
18a: b3 94 inc r11
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
|
|
|
|
18c: d0 e0 ldi r29, 0x00 ; 0
|
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
}
|
|
|
|
|
uint8_t gp(uint8_t i) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: return OCR0B; //ROT
|
|
|
|
|
case 1: return OCR2B; //GR<47>N
|
2015-02-11 18:10:07 +01:00
|
|
|
|
18e: 0f 2e mov r0, r31
|
|
|
|
|
190: f4 eb ldi r31, 0xB4 ; 180
|
|
|
|
|
192: cf 2e mov r12, r31
|
|
|
|
|
194: d1 2c mov r13, r1
|
|
|
|
|
196: f0 2d mov r31, r0
|
2015-02-10 12:05:04 +01:00
|
|
|
|
void interrupt() {
|
|
|
|
|
if(this->fade_zylk > 0) {
|
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = (this->_l + 1 < this->fade_zylk) ? this->_l + 1 : 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
|
|
|
|
198: 0f 2e mov r0, r31
|
|
|
|
|
19a: fb e9 ldi r31, 0x9B ; 155
|
|
|
|
|
19c: 6f 2e mov r6, r31
|
|
|
|
|
19e: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
1a0: 7f 2e mov r7, r31
|
|
|
|
|
1a2: f0 2d mov r31, r0
|
|
|
|
|
1a4: 6c 0e add r6, r28
|
|
|
|
|
1a6: 7d 1e adc r7, r29
|
|
|
|
|
1a8: 01 c0 rjmp .+2 ; 0x1ac <__vector_13+0xee>
|
|
|
|
|
1aa: b3 94 inc r11
|
|
|
|
|
1ac: 1b 2d mov r17, r11
|
|
|
|
|
1ae: 11 50 subi r17, 0x01 ; 1
|
|
|
|
|
1b0: e1 2e mov r14, r17
|
|
|
|
|
1b2: f1 2c mov r15, r1
|
|
|
|
|
1b4: 9e 01 movw r18, r28
|
|
|
|
|
1b6: f7 01 movw r30, r14
|
|
|
|
|
1b8: ee 0f add r30, r30
|
|
|
|
|
1ba: ff 1f adc r31, r31
|
|
|
|
|
1bc: ee 0d add r30, r14
|
|
|
|
|
1be: ff 1d adc r31, r15
|
|
|
|
|
1c0: ee 0f add r30, r30
|
|
|
|
|
1c2: ff 1f adc r31, r31
|
|
|
|
|
1c4: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
1c6: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
1c8: ec 0f add r30, r28
|
|
|
|
|
1ca: fd 1f adc r31, r29
|
|
|
|
|
1cc: 81 81 ldd r24, Z+1 ; 0x01
|
|
|
|
|
1ce: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
}
|
|
|
|
|
uint8_t gp(uint8_t i) {
|
|
|
|
|
switch(i) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
1d0: 11 30 cpi r17, 0x01 ; 1
|
|
|
|
|
1d2: 09 f1 breq .+66 ; 0x216 <__vector_13+0x158>
|
|
|
|
|
1d4: 20 f0 brcs .+8 ; 0x1de <__vector_13+0x120>
|
|
|
|
|
1d6: 12 30 cpi r17, 0x02 ; 2
|
|
|
|
|
1d8: 09 f0 breq .+2 ; 0x1dc <__vector_13+0x11e>
|
|
|
|
|
1da: 57 c0 rjmp .+174 ; 0x28a <__vector_13+0x1cc>
|
|
|
|
|
1dc: 39 c0 rjmp .+114 ; 0x250 <__vector_13+0x192>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 0: return OCR0B; //ROT
|
2015-02-11 18:10:07 +01:00
|
|
|
|
1de: 48 b5 in r20, 0x28 ; 40
|
2015-02-10 12:05:04 +01:00
|
|
|
|
void interrupt() {
|
|
|
|
|
if(this->fade_zylk > 0) {
|
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = (this->_l + 1 < this->fade_zylk) ? this->_l + 1 : 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
|
|
|
|
1e0: 97 01 movw r18, r14
|
|
|
|
|
1e2: 22 0f add r18, r18
|
|
|
|
|
1e4: 33 1f adc r19, r19
|
|
|
|
|
1e6: 22 0f add r18, r18
|
|
|
|
|
1e8: 33 1f adc r19, r19
|
|
|
|
|
1ea: 89 01 movw r16, r18
|
|
|
|
|
1ec: 08 57 subi r16, 0x78 ; 120
|
|
|
|
|
1ee: 1e 4f sbci r17, 0xFE ; 254
|
|
|
|
|
1f0: 84 1b sub r24, r20
|
|
|
|
|
1f2: 91 09 sbc r25, r1
|
|
|
|
|
1f4: f3 01 movw r30, r6
|
|
|
|
|
1f6: 60 81 ld r22, Z
|
|
|
|
|
1f8: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
1fa: 0e 94 4b 09 call 0x1296 ; 0x1296 <__divmodhi4>
|
|
|
|
|
1fe: 88 27 eor r24, r24
|
|
|
|
|
200: 77 fd sbrc r23, 7
|
|
|
|
|
202: 80 95 com r24
|
|
|
|
|
204: 98 2f mov r25, r24
|
|
|
|
|
206: 0e 94 97 08 call 0x112e ; 0x112e <__floatsisf>
|
|
|
|
|
20a: f8 01 movw r30, r16
|
|
|
|
|
20c: 61 8f std Z+25, r22 ; 0x19
|
|
|
|
|
20e: 72 8f std Z+26, r23 ; 0x1a
|
|
|
|
|
210: 83 8f std Z+27, r24 ; 0x1b
|
|
|
|
|
212: 94 8f std Z+28, r25 ; 0x1c
|
|
|
|
|
214: 5d c0 rjmp .+186 ; 0x2d0 <__vector_13+0x212>
|
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
}
|
|
|
|
|
uint8_t gp(uint8_t i) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: return OCR0B; //ROT
|
|
|
|
|
case 1: return OCR2B; //GR<47>N
|
2015-02-11 18:10:07 +01:00
|
|
|
|
216: f6 01 movw r30, r12
|
|
|
|
|
218: 40 81 ld r20, Z
|
2015-02-10 12:05:04 +01:00
|
|
|
|
void interrupt() {
|
|
|
|
|
if(this->fade_zylk > 0) {
|
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = (this->_l + 1 < this->fade_zylk) ? this->_l + 1 : 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
|
|
|
|
21a: 97 01 movw r18, r14
|
|
|
|
|
21c: 22 0f add r18, r18
|
|
|
|
|
21e: 33 1f adc r19, r19
|
|
|
|
|
220: 22 0f add r18, r18
|
|
|
|
|
222: 33 1f adc r19, r19
|
|
|
|
|
224: 89 01 movw r16, r18
|
|
|
|
|
226: 08 57 subi r16, 0x78 ; 120
|
|
|
|
|
228: 1e 4f sbci r17, 0xFE ; 254
|
|
|
|
|
22a: 84 1b sub r24, r20
|
|
|
|
|
22c: 91 09 sbc r25, r1
|
|
|
|
|
22e: f3 01 movw r30, r6
|
|
|
|
|
230: 60 81 ld r22, Z
|
|
|
|
|
232: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
234: 0e 94 4b 09 call 0x1296 ; 0x1296 <__divmodhi4>
|
|
|
|
|
238: 88 27 eor r24, r24
|
|
|
|
|
23a: 77 fd sbrc r23, 7
|
|
|
|
|
23c: 80 95 com r24
|
|
|
|
|
23e: 98 2f mov r25, r24
|
|
|
|
|
240: 0e 94 97 08 call 0x112e ; 0x112e <__floatsisf>
|
|
|
|
|
244: f8 01 movw r30, r16
|
|
|
|
|
246: 61 8f std Z+25, r22 ; 0x19
|
|
|
|
|
248: 72 8f std Z+26, r23 ; 0x1a
|
|
|
|
|
24a: 83 8f std Z+27, r24 ; 0x1b
|
|
|
|
|
24c: 94 8f std Z+28, r25 ; 0x1c
|
|
|
|
|
24e: 42 c0 rjmp .+132 ; 0x2d4 <__vector_13+0x216>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
}
|
|
|
|
|
uint8_t gp(uint8_t i) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: return OCR0B; //ROT
|
|
|
|
|
case 1: return OCR2B; //GR<47>N
|
|
|
|
|
case 2: return OCR2A; //BLAU
|
2015-02-11 18:10:07 +01:00
|
|
|
|
250: 40 91 b3 00 lds r20, 0x00B3
|
2015-02-10 12:05:04 +01:00
|
|
|
|
void interrupt() {
|
|
|
|
|
if(this->fade_zylk > 0) {
|
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = (this->_l + 1 < this->fade_zylk) ? this->_l + 1 : 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
|
|
|
|
254: e7 01 movw r28, r14
|
|
|
|
|
256: cc 0f add r28, r28
|
|
|
|
|
258: dd 1f adc r29, r29
|
|
|
|
|
25a: cc 0f add r28, r28
|
|
|
|
|
25c: dd 1f adc r29, r29
|
|
|
|
|
25e: c8 57 subi r28, 0x78 ; 120
|
|
|
|
|
260: de 4f sbci r29, 0xFE ; 254
|
|
|
|
|
262: 84 1b sub r24, r20
|
|
|
|
|
264: 91 09 sbc r25, r1
|
|
|
|
|
266: f9 01 movw r30, r18
|
|
|
|
|
268: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
26a: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
26c: 63 89 ldd r22, Z+19 ; 0x13
|
|
|
|
|
26e: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
270: 0e 94 4b 09 call 0x1296 ; 0x1296 <__divmodhi4>
|
|
|
|
|
274: 88 27 eor r24, r24
|
|
|
|
|
276: 77 fd sbrc r23, 7
|
|
|
|
|
278: 80 95 com r24
|
|
|
|
|
27a: 98 2f mov r25, r24
|
|
|
|
|
27c: 0e 94 97 08 call 0x112e ; 0x112e <__floatsisf>
|
|
|
|
|
280: 69 8f std Y+25, r22 ; 0x19
|
|
|
|
|
282: 7a 8f std Y+26, r23 ; 0x1a
|
|
|
|
|
284: 8b 8f std Y+27, r24 ; 0x1b
|
|
|
|
|
286: 9c 8f std Y+28, r25 ; 0x1c
|
|
|
|
|
288: 28 c0 rjmp .+80 ; 0x2da <__vector_13+0x21c>
|
|
|
|
|
28a: 97 01 movw r18, r14
|
|
|
|
|
28c: 22 0f add r18, r18
|
|
|
|
|
28e: 33 1f adc r19, r19
|
|
|
|
|
290: 22 0f add r18, r18
|
|
|
|
|
292: 33 1f adc r19, r19
|
|
|
|
|
294: 0f 2e mov r0, r31
|
|
|
|
|
296: f8 e8 ldi r31, 0x88 ; 136
|
|
|
|
|
298: 8f 2e mov r8, r31
|
|
|
|
|
29a: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
29c: 9f 2e mov r9, r31
|
|
|
|
|
29e: f0 2d mov r31, r0
|
|
|
|
|
2a0: 82 0e add r8, r18
|
|
|
|
|
2a2: 93 1e adc r9, r19
|
|
|
|
|
2a4: f3 01 movw r30, r6
|
|
|
|
|
2a6: 60 81 ld r22, Z
|
|
|
|
|
2a8: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
2aa: 0e 94 4b 09 call 0x1296 ; 0x1296 <__divmodhi4>
|
|
|
|
|
2ae: 88 27 eor r24, r24
|
|
|
|
|
2b0: 77 fd sbrc r23, 7
|
|
|
|
|
2b2: 80 95 com r24
|
|
|
|
|
2b4: 98 2f mov r25, r24
|
|
|
|
|
2b6: 0e 94 97 08 call 0x112e ; 0x112e <__floatsisf>
|
|
|
|
|
2ba: f4 01 movw r30, r8
|
|
|
|
|
2bc: 61 8f std Z+25, r22 ; 0x19
|
|
|
|
|
2be: 72 8f std Z+26, r23 ; 0x1a
|
|
|
|
|
2c0: 83 8f std Z+27, r24 ; 0x1b
|
|
|
|
|
2c2: 94 8f std Z+28, r25 ; 0x1c
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
}
|
|
|
|
|
uint8_t gp(uint8_t i) {
|
|
|
|
|
switch(i) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
2c4: 11 30 cpi r17, 0x01 ; 1
|
|
|
|
|
2c6: 31 f0 breq .+12 ; 0x2d4 <__vector_13+0x216>
|
|
|
|
|
2c8: 18 f0 brcs .+6 ; 0x2d0 <__vector_13+0x212>
|
|
|
|
|
2ca: 12 30 cpi r17, 0x02 ; 2
|
|
|
|
|
2cc: c9 f4 brne .+50 ; 0x300 <__vector_13+0x242>
|
|
|
|
|
2ce: 05 c0 rjmp .+10 ; 0x2da <__vector_13+0x21c>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 0: return OCR0B; //ROT
|
2015-02-11 18:10:07 +01:00
|
|
|
|
2d0: 68 b5 in r22, 0x28 ; 40
|
|
|
|
|
2d2: 10 c1 rjmp .+544 ; 0x4f4 <__vector_13+0x436>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 1: return OCR2B; //GR<47>N
|
2015-02-11 18:10:07 +01:00
|
|
|
|
2d4: f6 01 movw r30, r12
|
|
|
|
|
2d6: 60 81 ld r22, Z
|
|
|
|
|
2d8: 0d c1 rjmp .+538 ; 0x4f4 <__vector_13+0x436>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 2: return OCR2A; //BLAU
|
2015-02-11 18:10:07 +01:00
|
|
|
|
2da: 60 91 b3 00 lds r22, 0x00B3
|
2015-02-10 12:05:04 +01:00
|
|
|
|
if(this->fade_zylk > 0) {
|
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = (this->_l + 1 < this->fade_zylk) ? this->_l + 1 : 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->virtualcolor[i] = this->gp(i);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
2de: e7 01 movw r28, r14
|
|
|
|
|
2e0: cc 0f add r28, r28
|
|
|
|
|
2e2: dd 1f adc r29, r29
|
|
|
|
|
2e4: cc 0f add r28, r28
|
|
|
|
|
2e6: dd 1f adc r29, r29
|
|
|
|
|
2e8: c8 57 subi r28, 0x78 ; 120
|
|
|
|
|
2ea: de 4f sbci r29, 0xFE ; 254
|
|
|
|
|
2ec: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
2ee: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
|
2f0: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
2f2: 0e 94 95 08 call 0x112a ; 0x112a <__floatunsisf>
|
|
|
|
|
2f6: 6d a3 std Y+37, r22 ; 0x25
|
|
|
|
|
2f8: 7e a3 std Y+38, r23 ; 0x26
|
|
|
|
|
2fa: 8f a3 std Y+39, r24 ; 0x27
|
|
|
|
|
2fc: 98 a7 std Y+40, r25 ; 0x28
|
|
|
|
|
2fe: 12 c1 rjmp .+548 ; 0x524 <__stack+0x25>
|
|
|
|
|
300: f7 01 movw r30, r14
|
|
|
|
|
302: ee 0f add r30, r30
|
|
|
|
|
304: ff 1f adc r31, r31
|
|
|
|
|
306: ee 0f add r30, r30
|
|
|
|
|
308: ff 1f adc r31, r31
|
|
|
|
|
30a: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
30c: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
30e: 15 a2 std Z+37, r1 ; 0x25
|
|
|
|
|
310: 16 a2 std Z+38, r1 ; 0x26
|
|
|
|
|
312: 17 a2 std Z+39, r1 ; 0x27
|
|
|
|
|
314: 10 a6 std Z+40, r1 ; 0x28
|
2015-02-10 12:05:04 +01:00
|
|
|
|
}
|
|
|
|
|
void interrupt() {
|
|
|
|
|
if(this->fade_zylk > 0) {
|
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = (this->_l + 1 < this->fade_zylk) ? this->_l + 1 : 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
316: f2 e0 ldi r31, 0x02 ; 2
|
|
|
|
|
318: fb 15 cp r31, r11
|
|
|
|
|
31a: 08 f0 brcs .+2 ; 0x31e <__vector_13+0x260>
|
|
|
|
|
31c: 46 cf rjmp .-372 ; 0x1aa <__vector_13+0xec>
|
|
|
|
|
31e: 02 c1 rjmp .+516 ; 0x524 <__stack+0x25>
|
|
|
|
|
320: 83 94 inc r8
|
|
|
|
|
322: 14 c0 rjmp .+40 ; 0x34c <__vector_13+0x28e>
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
}
|
|
|
|
|
void interrupt() {
|
|
|
|
|
if(this->fade_zylk > 0) {
|
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
324: 88 24 eor r8, r8
|
|
|
|
|
326: 83 94 inc r8
|
|
|
|
|
328: 05 c0 rjmp .+10 ; 0x334 <__vector_13+0x276>
|
|
|
|
|
32a: 88 24 eor r8, r8
|
|
|
|
|
32c: 83 94 inc r8
|
|
|
|
|
32e: 02 c0 rjmp .+4 ; 0x334 <__vector_13+0x276>
|
|
|
|
|
330: 88 24 eor r8, r8
|
|
|
|
|
332: 83 94 inc r8
|
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
|
|
|
|
this->virtualcolor[i] = this->gp(i);
|
|
|
|
|
}
|
2015-02-09 18:10:07 +01:00
|
|
|
|
} else {
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
if((this->fadesteps[i] > 0 && (this->virtualcolor[i] + this->fadesteps[i]) <= this->fademap[i][this->_l]) || (this->fadesteps[i] < 0 && (this->virtualcolor[i] + this->fadesteps[i]) >= this->fademap[i][this->_l])) {
|
|
|
|
|
334: 09 eb ldi r16, 0xB9 ; 185
|
|
|
|
|
336: 11 e0 ldi r17, 0x01 ; 1
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->color(0, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
void sp(uint8_t i, uint8_t c) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: OCR0B = c; break; //ROT
|
|
|
|
|
case 1: OCR2B = c; break; //GR<47>N
|
2015-02-11 18:10:07 +01:00
|
|
|
|
338: 0f 2e mov r0, r31
|
|
|
|
|
33a: f4 eb ldi r31, 0xB4 ; 180
|
|
|
|
|
33c: af 2e mov r10, r31
|
|
|
|
|
33e: b1 2c mov r11, r1
|
|
|
|
|
340: f0 2d mov r31, r0
|
|
|
|
|
case 2: OCR2A = c; break; //BLAU
|
|
|
|
|
342: 0f 2e mov r0, r31
|
|
|
|
|
344: f3 eb ldi r31, 0xB3 ; 179
|
|
|
|
|
346: 2f 2e mov r2, r31
|
|
|
|
|
348: 31 2c mov r3, r1
|
|
|
|
|
34a: f0 2d mov r31, r0
|
|
|
|
|
34c: 98 2c mov r9, r8
|
|
|
|
|
34e: 9a 94 dec r9
|
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
|
|
|
|
this->virtualcolor[i] = this->gp(i);
|
|
|
|
|
}
|
2015-02-09 18:10:07 +01:00
|
|
|
|
} else {
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
if((this->fadesteps[i] > 0 && (this->virtualcolor[i] + this->fadesteps[i]) <= this->fademap[i][this->_l]) || (this->fadesteps[i] < 0 && (this->virtualcolor[i] + this->fadesteps[i]) >= this->fademap[i][this->_l])) {
|
|
|
|
|
350: c9 2d mov r28, r9
|
|
|
|
|
352: d0 e0 ldi r29, 0x00 ; 0
|
|
|
|
|
354: fe 01 movw r30, r28
|
|
|
|
|
356: ee 0f add r30, r30
|
|
|
|
|
358: ff 1f adc r31, r31
|
|
|
|
|
35a: ee 0f add r30, r30
|
|
|
|
|
35c: ff 1f adc r31, r31
|
|
|
|
|
35e: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
360: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
362: c1 8c ldd r12, Z+25 ; 0x19
|
|
|
|
|
364: d2 8c ldd r13, Z+26 ; 0x1a
|
|
|
|
|
366: e3 8c ldd r14, Z+27 ; 0x1b
|
|
|
|
|
368: f4 8c ldd r15, Z+28 ; 0x1c
|
|
|
|
|
36a: 20 e0 ldi r18, 0x00 ; 0
|
|
|
|
|
36c: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
36e: a9 01 movw r20, r18
|
|
|
|
|
370: c7 01 movw r24, r14
|
|
|
|
|
372: b6 01 movw r22, r12
|
|
|
|
|
374: 0e 94 47 09 call 0x128e ; 0x128e <__gesf2>
|
|
|
|
|
378: 18 16 cp r1, r24
|
|
|
|
|
37a: 64 f5 brge .+88 ; 0x3d4 <__vector_13+0x316>
|
|
|
|
|
37c: fe 01 movw r30, r28
|
|
|
|
|
37e: ee 0f add r30, r30
|
|
|
|
|
380: ff 1f adc r31, r31
|
|
|
|
|
382: ee 0f add r30, r30
|
|
|
|
|
384: ff 1f adc r31, r31
|
|
|
|
|
386: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
388: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
38a: 25 a1 ldd r18, Z+37 ; 0x25
|
|
|
|
|
38c: 36 a1 ldd r19, Z+38 ; 0x26
|
|
|
|
|
38e: 47 a1 ldd r20, Z+39 ; 0x27
|
|
|
|
|
390: 50 a5 ldd r21, Z+40 ; 0x28
|
|
|
|
|
392: c7 01 movw r24, r14
|
|
|
|
|
394: b6 01 movw r22, r12
|
|
|
|
|
396: 0e 94 01 08 call 0x1002 ; 0x1002 <__addsf3>
|
|
|
|
|
39a: 2b 01 movw r4, r22
|
|
|
|
|
39c: 3c 01 movw r6, r24
|
|
|
|
|
39e: f8 01 movw r30, r16
|
|
|
|
|
3a0: 80 81 ld r24, Z
|
|
|
|
|
3a2: fe 01 movw r30, r28
|
|
|
|
|
3a4: ee 0f add r30, r30
|
|
|
|
|
3a6: ff 1f adc r31, r31
|
|
|
|
|
3a8: ec 0f add r30, r28
|
|
|
|
|
3aa: fd 1f adc r31, r29
|
|
|
|
|
3ac: ee 0f add r30, r30
|
|
|
|
|
3ae: ff 1f adc r31, r31
|
|
|
|
|
3b0: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
3b2: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
3b4: e8 0f add r30, r24
|
|
|
|
|
3b6: f1 1d adc r31, r1
|
|
|
|
|
3b8: 61 81 ldd r22, Z+1 ; 0x01
|
|
|
|
|
3ba: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
3bc: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
|
3be: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
3c0: 0e 94 97 08 call 0x112e ; 0x112e <__floatsisf>
|
|
|
|
|
3c4: 9b 01 movw r18, r22
|
|
|
|
|
3c6: ac 01 movw r20, r24
|
|
|
|
|
3c8: c3 01 movw r24, r6
|
|
|
|
|
3ca: b2 01 movw r22, r4
|
|
|
|
|
3cc: 0e 94 65 08 call 0x10ca ; 0x10ca <__cmpsf2>
|
|
|
|
|
3d0: 18 16 cp r1, r24
|
|
|
|
|
3d2: b4 f5 brge .+108 ; 0x440 <__vector_13+0x382>
|
|
|
|
|
3d4: 20 e0 ldi r18, 0x00 ; 0
|
|
|
|
|
3d6: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
3d8: a9 01 movw r20, r18
|
2015-02-10 12:05:04 +01:00
|
|
|
|
3da: c7 01 movw r24, r14
|
|
|
|
|
3dc: b6 01 movw r22, r12
|
2015-02-11 18:10:07 +01:00
|
|
|
|
3de: 0e 94 65 08 call 0x10ca ; 0x10ca <__cmpsf2>
|
|
|
|
|
3e2: 88 23 and r24, r24
|
|
|
|
|
3e4: 0c f0 brlt .+2 ; 0x3e8 <__vector_13+0x32a>
|
|
|
|
|
3e6: 59 c0 rjmp .+178 ; 0x49a <__vector_13+0x3dc>
|
|
|
|
|
3e8: fe 01 movw r30, r28
|
|
|
|
|
3ea: ee 0f add r30, r30
|
|
|
|
|
3ec: ff 1f adc r31, r31
|
|
|
|
|
3ee: ee 0f add r30, r30
|
|
|
|
|
3f0: ff 1f adc r31, r31
|
|
|
|
|
3f2: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
3f4: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
3f6: 25 a1 ldd r18, Z+37 ; 0x25
|
|
|
|
|
3f8: 36 a1 ldd r19, Z+38 ; 0x26
|
|
|
|
|
3fa: 47 a1 ldd r20, Z+39 ; 0x27
|
|
|
|
|
3fc: 50 a5 ldd r21, Z+40 ; 0x28
|
|
|
|
|
3fe: c7 01 movw r24, r14
|
|
|
|
|
400: b6 01 movw r22, r12
|
|
|
|
|
402: 0e 94 01 08 call 0x1002 ; 0x1002 <__addsf3>
|
|
|
|
|
406: 2b 01 movw r4, r22
|
|
|
|
|
408: 3c 01 movw r6, r24
|
|
|
|
|
40a: f8 01 movw r30, r16
|
|
|
|
|
40c: 80 81 ld r24, Z
|
|
|
|
|
40e: fe 01 movw r30, r28
|
|
|
|
|
410: ee 0f add r30, r30
|
|
|
|
|
412: ff 1f adc r31, r31
|
|
|
|
|
414: ec 0f add r30, r28
|
|
|
|
|
416: fd 1f adc r31, r29
|
|
|
|
|
418: ee 0f add r30, r30
|
|
|
|
|
41a: ff 1f adc r31, r31
|
|
|
|
|
41c: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
41e: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
420: e8 0f add r30, r24
|
|
|
|
|
422: f1 1d adc r31, r1
|
|
|
|
|
424: 61 81 ldd r22, Z+1 ; 0x01
|
|
|
|
|
426: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
428: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
|
42a: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
42c: 0e 94 97 08 call 0x112e ; 0x112e <__floatsisf>
|
|
|
|
|
430: 9b 01 movw r18, r22
|
|
|
|
|
432: ac 01 movw r20, r24
|
|
|
|
|
434: c3 01 movw r24, r6
|
|
|
|
|
436: b2 01 movw r22, r4
|
|
|
|
|
438: 0e 94 47 09 call 0x128e ; 0x128e <__gesf2>
|
|
|
|
|
43c: 88 23 and r24, r24
|
|
|
|
|
43e: 6c f1 brlt .+90 ; 0x49a <__vector_13+0x3dc>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->virtualcolor[i] = this->virtualcolor[i] + this->fadesteps[i];
|
2015-02-11 18:10:07 +01:00
|
|
|
|
440: cc 0f add r28, r28
|
|
|
|
|
442: dd 1f adc r29, r29
|
|
|
|
|
444: cc 0f add r28, r28
|
|
|
|
|
446: dd 1f adc r29, r29
|
|
|
|
|
448: c8 57 subi r28, 0x78 ; 120
|
|
|
|
|
44a: de 4f sbci r29, 0xFE ; 254
|
|
|
|
|
44c: 2d a1 ldd r18, Y+37 ; 0x25
|
|
|
|
|
44e: 3e a1 ldd r19, Y+38 ; 0x26
|
|
|
|
|
450: 4f a1 ldd r20, Y+39 ; 0x27
|
|
|
|
|
452: 58 a5 ldd r21, Y+40 ; 0x28
|
|
|
|
|
454: c7 01 movw r24, r14
|
|
|
|
|
456: b6 01 movw r22, r12
|
|
|
|
|
458: 0e 94 01 08 call 0x1002 ; 0x1002 <__addsf3>
|
|
|
|
|
45c: 26 2f mov r18, r22
|
|
|
|
|
45e: 37 2f mov r19, r23
|
|
|
|
|
460: 46 2f mov r20, r22
|
|
|
|
|
462: 57 2f mov r21, r23
|
|
|
|
|
464: 68 2f mov r22, r24
|
|
|
|
|
466: 79 2f mov r23, r25
|
|
|
|
|
468: 4d a3 std Y+37, r20 ; 0x25
|
|
|
|
|
46a: 5e a3 std Y+38, r21 ; 0x26
|
|
|
|
|
46c: 6f a3 std Y+39, r22 ; 0x27
|
|
|
|
|
46e: 78 a7 std Y+40, r23 ; 0x28
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->sp(i, this->virtualcolor[i]);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
470: 62 2f mov r22, r18
|
|
|
|
|
472: 73 2f mov r23, r19
|
|
|
|
|
474: 0e 94 69 08 call 0x10d2 ; 0x10d2 <__fixunssfsi>
|
|
|
|
|
this->_l = 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->initTimer();
|
|
|
|
|
this->color(0, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
void sp(uint8_t i, uint8_t c) {
|
|
|
|
|
switch(i) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
478: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
47a: 9f 16 cp r9, r31
|
|
|
|
|
47c: 41 f0 breq .+16 ; 0x48e <__vector_13+0x3d0>
|
|
|
|
|
47e: 9f 16 cp r9, r31
|
|
|
|
|
480: 20 f0 brcs .+8 ; 0x48a <__vector_13+0x3cc>
|
|
|
|
|
482: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
|
484: 98 12 cpse r9, r24
|
|
|
|
|
486: 31 c0 rjmp .+98 ; 0x4ea <__vector_13+0x42c>
|
|
|
|
|
488: 05 c0 rjmp .+10 ; 0x494 <__vector_13+0x3d6>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 0: OCR0B = c; break; //ROT
|
2015-02-11 18:10:07 +01:00
|
|
|
|
48a: 68 bd out 0x28, r22 ; 40
|
|
|
|
|
48c: 49 cf rjmp .-366 ; 0x320 <__vector_13+0x262>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 1: OCR2B = c; break; //GR<47>N
|
2015-02-11 18:10:07 +01:00
|
|
|
|
48e: f5 01 movw r30, r10
|
|
|
|
|
490: 60 83 st Z, r22
|
|
|
|
|
492: 46 cf rjmp .-372 ; 0x320 <__vector_13+0x262>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 2: OCR2A = c; break; //BLAU
|
2015-02-11 18:10:07 +01:00
|
|
|
|
494: 60 93 b3 00 sts 0x00B3, r22
|
|
|
|
|
498: 45 c0 rjmp .+138 ; 0x524 <__stack+0x25>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
if((this->fadesteps[i] > 0 && (this->virtualcolor[i] + this->fadesteps[i]) <= this->fademap[i][this->_l]) || (this->fadesteps[i] < 0 && (this->virtualcolor[i] + this->fadesteps[i]) >= this->fademap[i][this->_l])) {
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->virtualcolor[i] = this->virtualcolor[i] + this->fadesteps[i];
|
|
|
|
|
this->sp(i, this->virtualcolor[i]);
|
|
|
|
|
} else {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->sp(i, this->fademap[i][this->_l]);
|
|
|
|
|
49a: f8 01 movw r30, r16
|
|
|
|
|
49c: 80 81 ld r24, Z
|
|
|
|
|
49e: fe 01 movw r30, r28
|
|
|
|
|
4a0: ee 0f add r30, r30
|
|
|
|
|
4a2: ff 1f adc r31, r31
|
|
|
|
|
4a4: ec 0f add r30, r28
|
|
|
|
|
4a6: fd 1f adc r31, r29
|
|
|
|
|
4a8: ee 0f add r30, r30
|
|
|
|
|
4aa: ff 1f adc r31, r31
|
|
|
|
|
4ac: e8 57 subi r30, 0x78 ; 120
|
|
|
|
|
4ae: fe 4f sbci r31, 0xFE ; 254
|
|
|
|
|
4b0: e8 0f add r30, r24
|
|
|
|
|
4b2: f1 1d adc r31, r1
|
|
|
|
|
4b4: 81 81 ldd r24, Z+1 ; 0x01
|
|
|
|
|
this->_l = 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->initTimer();
|
|
|
|
|
this->color(0, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
void sp(uint8_t i, uint8_t c) {
|
|
|
|
|
switch(i) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4b6: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
4b8: 9f 16 cp r9, r31
|
|
|
|
|
4ba: 41 f0 breq .+16 ; 0x4cc <__vector_13+0x40e>
|
|
|
|
|
4bc: 9f 16 cp r9, r31
|
|
|
|
|
4be: 20 f0 brcs .+8 ; 0x4c8 <__vector_13+0x40a>
|
|
|
|
|
4c0: 92 e0 ldi r25, 0x02 ; 2
|
|
|
|
|
4c2: 99 12 cpse r9, r25
|
|
|
|
|
4c4: 08 c0 rjmp .+16 ; 0x4d6 <__vector_13+0x418>
|
|
|
|
|
4c6: 05 c0 rjmp .+10 ; 0x4d2 <__vector_13+0x414>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 0: OCR0B = c; break; //ROT
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4c8: 88 bd out 0x28, r24 ; 40
|
|
|
|
|
4ca: 05 c0 rjmp .+10 ; 0x4d6 <__vector_13+0x418>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 1: OCR2B = c; break; //GR<47>N
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4cc: f5 01 movw r30, r10
|
|
|
|
|
4ce: 80 83 st Z, r24
|
|
|
|
|
4d0: 02 c0 rjmp .+4 ; 0x4d6 <__vector_13+0x418>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 2: OCR2A = c; break; //BLAU
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4d2: f1 01 movw r30, r2
|
|
|
|
|
4d4: 80 83 st Z, r24
|
|
|
|
|
if((this->fadesteps[i] > 0 && (this->virtualcolor[i] + this->fadesteps[i]) <= this->fademap[i][this->_l]) || (this->fadesteps[i] < 0 && (this->virtualcolor[i] + this->fadesteps[i]) >= this->fademap[i][this->_l])) {
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->virtualcolor[i] = this->virtualcolor[i] + this->fadesteps[i];
|
|
|
|
|
this->sp(i, this->virtualcolor[i]);
|
|
|
|
|
} else {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->sp(i, this->fademap[i][this->_l]);
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->fadesteps[i] = 0;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4d6: cc 0f add r28, r28
|
|
|
|
|
4d8: dd 1f adc r29, r29
|
|
|
|
|
4da: cc 0f add r28, r28
|
|
|
|
|
4dc: dd 1f adc r29, r29
|
|
|
|
|
4de: c8 57 subi r28, 0x78 ; 120
|
|
|
|
|
4e0: de 4f sbci r29, 0xFE ; 254
|
|
|
|
|
4e2: 19 8e std Y+25, r1 ; 0x19
|
|
|
|
|
4e4: 1a 8e std Y+26, r1 ; 0x1a
|
|
|
|
|
4e6: 1b 8e std Y+27, r1 ; 0x1b
|
|
|
|
|
4e8: 1c 8e std Y+28, r1 ; 0x1c
|
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
|
|
|
|
this->virtualcolor[i] = this->gp(i);
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-10 12:05:04 +01:00
|
|
|
|
} else {
|
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4ea: f2 e0 ldi r31, 0x02 ; 2
|
|
|
|
|
4ec: f8 15 cp r31, r8
|
|
|
|
|
4ee: 08 f0 brcs .+2 ; 0x4f2 <__vector_13+0x434>
|
|
|
|
|
4f0: 17 cf rjmp .-466 ; 0x320 <__vector_13+0x262>
|
|
|
|
|
4f2: 18 c0 rjmp .+48 ; 0x524 <__stack+0x25>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
if(this->fade_zylk > 0) {
|
|
|
|
|
if(this->fadesteps[0] == 0 && this->fadesteps[1] == 0 && this->fadesteps[2] == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = (this->_l + 1 < this->fade_zylk) ? this->_l + 1 : 0;
|
2015-02-10 12:05:04 +01:00
|
|
|
|
for(uint8_t i = 0; i<3; i++) { //0=red,1=green,2=blue
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fadesteps[i] = (this->fademap[i][this->_l]-this->gp(i))/this->fademap[3][this->_l];
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->virtualcolor[i] = this->gp(i);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
4f4: c7 01 movw r24, r14
|
|
|
|
|
4f6: 88 0f add r24, r24
|
|
|
|
|
4f8: 99 1f adc r25, r25
|
|
|
|
|
4fa: 88 0f add r24, r24
|
|
|
|
|
4fc: 99 1f adc r25, r25
|
|
|
|
|
4fe: 0f 2e mov r0, r31
|
|
|
|
|
500: f8 e8 ldi r31, 0x88 ; 136
|
|
|
|
|
502: ef 2e mov r14, r31
|
|
|
|
|
504: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
506: ff 2e mov r15, r31
|
|
|
|
|
508: f0 2d mov r31, r0
|
|
|
|
|
50a: e8 0e add r14, r24
|
|
|
|
|
50c: f9 1e adc r15, r25
|
|
|
|
|
50e: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
510: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
|
512: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
514: 0e 94 95 08 call 0x112a ; 0x112a <__floatunsisf>
|
|
|
|
|
518: f7 01 movw r30, r14
|
|
|
|
|
51a: 65 a3 std Z+37, r22 ; 0x25
|
|
|
|
|
51c: 76 a3 std Z+38, r23 ; 0x26
|
|
|
|
|
51e: 87 a3 std Z+39, r24 ; 0x27
|
|
|
|
|
520: 90 a7 std Z+40, r25 ; 0x28
|
|
|
|
|
522: 43 ce rjmp .-890 ; 0x1aa <__vector_13+0xec>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
stripe.interrupt();
|
2015-02-11 18:10:07 +01:00
|
|
|
|
524: ff 91 pop r31
|
|
|
|
|
526: ef 91 pop r30
|
|
|
|
|
528: df 91 pop r29
|
|
|
|
|
52a: cf 91 pop r28
|
|
|
|
|
52c: bf 91 pop r27
|
|
|
|
|
52e: af 91 pop r26
|
|
|
|
|
530: 9f 91 pop r25
|
|
|
|
|
532: 8f 91 pop r24
|
|
|
|
|
534: 7f 91 pop r23
|
|
|
|
|
536: 6f 91 pop r22
|
|
|
|
|
538: 5f 91 pop r21
|
|
|
|
|
53a: 4f 91 pop r20
|
|
|
|
|
53c: 3f 91 pop r19
|
|
|
|
|
53e: 2f 91 pop r18
|
|
|
|
|
540: 1f 91 pop r17
|
|
|
|
|
542: 0f 91 pop r16
|
|
|
|
|
544: ff 90 pop r15
|
|
|
|
|
546: ef 90 pop r14
|
|
|
|
|
548: df 90 pop r13
|
|
|
|
|
54a: cf 90 pop r12
|
|
|
|
|
54c: bf 90 pop r11
|
|
|
|
|
54e: af 90 pop r10
|
|
|
|
|
550: 9f 90 pop r9
|
|
|
|
|
552: 8f 90 pop r8
|
|
|
|
|
554: 7f 90 pop r7
|
|
|
|
|
556: 6f 90 pop r6
|
|
|
|
|
558: 5f 90 pop r5
|
|
|
|
|
55a: 4f 90 pop r4
|
|
|
|
|
55c: 3f 90 pop r3
|
|
|
|
|
55e: 2f 90 pop r2
|
|
|
|
|
560: 0f 90 pop r0
|
|
|
|
|
562: 0f be out 0x3f, r0 ; 63
|
|
|
|
|
564: 0f 90 pop r0
|
|
|
|
|
566: 1f 90 pop r1
|
|
|
|
|
568: 18 95 reti
|
|
|
|
|
|
|
|
|
|
0000056a <_ZN4UartILm9600EEC1Ev>:
|
2015-02-08 00:22:32 +01:00
|
|
|
|
#include <avr/interrupt.h>
|
|
|
|
|
|
|
|
|
|
template <uint32_t baudrate>
|
|
|
|
|
class Uart {
|
|
|
|
|
public:
|
|
|
|
|
Uart() {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
56a: cf 93 push r28
|
|
|
|
|
56c: df 93 push r29
|
2015-02-08 00:22:32 +01:00
|
|
|
|
sei();
|
2015-02-11 18:10:07 +01:00
|
|
|
|
56e: 78 94 sei
|
2015-02-08 00:22:32 +01:00
|
|
|
|
void print(uint8_t wert) {
|
|
|
|
|
uart_putchar(wert);
|
2014-11-19 23:57:35 +01:00
|
|
|
|
}
|
2015-02-08 00:22:32 +01:00
|
|
|
|
private:
|
|
|
|
|
void init() {
|
|
|
|
|
UBRR0L = (F_CPU / (baudrate * 16L) - 1); //Teiler wird gesetzt
|
2015-02-11 18:10:07 +01:00
|
|
|
|
570: 81 e8 ldi r24, 0x81 ; 129
|
|
|
|
|
572: 80 93 c4 00 sts 0x00C4, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
576: 10 92 c0 00 sts 0x00C0, r1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
2015-02-11 18:10:07 +01:00
|
|
|
|
57a: 88 e0 ldi r24, 0x08 ; 8
|
|
|
|
|
57c: 80 93 c1 00 sts 0x00C1, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
2015-02-11 18:10:07 +01:00
|
|
|
|
580: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
|
582: 80 93 c2 00 sts 0x00C2, r24
|
|
|
|
|
586: a1 e0 ldi r26, 0x01 ; 1
|
|
|
|
|
588: b1 e0 ldi r27, 0x01 ; 1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
58a: 95 e5 ldi r25, 0x55 ; 85
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
58c: e0 ec ldi r30, 0xC0 ; 192
|
|
|
|
|
58e: f0 e0 ldi r31, 0x00 ; 0
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
590: c6 ec ldi r28, 0xC6 ; 198
|
|
|
|
|
592: d0 e0 ldi r29, 0x00 ; 0
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
2014-11-19 23:57:35 +01:00
|
|
|
|
}
|
2015-02-08 00:22:32 +01:00
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
594: 80 81 ld r24, Z
|
|
|
|
|
596: 85 ff sbrs r24, 5
|
|
|
|
|
598: fd cf rjmp .-6 ; 0x594 <_ZN4UartILm9600EEC1Ev+0x2a>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
59a: 98 83 st Y, r25
|
2015-02-08 00:22:32 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
59c: 9d 91 ld r25, X+
|
|
|
|
|
59e: 91 11 cpse r25, r1
|
|
|
|
|
5a0: f9 cf rjmp .-14 ; 0x594 <_ZN4UartILm9600EEC1Ev+0x2a>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5a2: e0 ec ldi r30, 0xC0 ; 192
|
|
|
|
|
5a4: f0 e0 ldi r31, 0x00 ; 0
|
|
|
|
|
5a6: 80 81 ld r24, Z
|
|
|
|
|
5a8: 85 ff sbrs r24, 5
|
|
|
|
|
5aa: fd cf rjmp .-6 ; 0x5a6 <_ZN4UartILm9600EEC1Ev+0x3c>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5ac: 8d e0 ldi r24, 0x0D ; 13
|
|
|
|
|
5ae: 80 93 c6 00 sts 0x00C6, r24
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5b2: e0 ec ldi r30, 0xC0 ; 192
|
|
|
|
|
5b4: f0 e0 ldi r31, 0x00 ; 0
|
|
|
|
|
5b6: 80 81 ld r24, Z
|
|
|
|
|
5b8: 85 ff sbrs r24, 5
|
|
|
|
|
5ba: fd cf rjmp .-6 ; 0x5b6 <_ZN4UartILm9600EEC1Ev+0x4c>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5bc: 8a e0 ldi r24, 0x0A ; 10
|
|
|
|
|
5be: 80 93 c6 00 sts 0x00C6, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
public:
|
|
|
|
|
Uart() {
|
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5c2: df 91 pop r29
|
|
|
|
|
5c4: cf 91 pop r28
|
|
|
|
|
5c6: 08 95 ret
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
2015-02-11 18:10:07 +01:00
|
|
|
|
000005c8 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh>:
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->sp(0, r); //ROT
|
|
|
|
|
this->sp(1, g); //GR<47>N
|
|
|
|
|
this->sp(2, b); //BLAU
|
|
|
|
|
}
|
|
|
|
|
void setcolor(uint8_t mask) {
|
|
|
|
|
(mask & (1<<0)) ? this->sp(2, 0xFF) : this->sp(2, 0x00); //Blau
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5c8: 60 ff sbrs r22, 0
|
|
|
|
|
5ca: 04 c0 rjmp .+8 ; 0x5d4 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh+0xc>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
}
|
|
|
|
|
void sp(uint8_t i, uint8_t c) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: OCR0B = c; break; //ROT
|
|
|
|
|
case 1: OCR2B = c; break; //GR<47>N
|
|
|
|
|
case 2: OCR2A = c; break; //BLAU
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5cc: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
5ce: 80 93 b3 00 sts 0x00B3, r24
|
|
|
|
|
5d2: 02 c0 rjmp .+4 ; 0x5d8 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh+0x10>
|
|
|
|
|
5d4: 10 92 b3 00 sts 0x00B3, r1
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->sp(1, g); //GR<47>N
|
|
|
|
|
this->sp(2, b); //BLAU
|
|
|
|
|
}
|
|
|
|
|
void setcolor(uint8_t mask) {
|
|
|
|
|
(mask & (1<<0)) ? this->sp(2, 0xFF) : this->sp(2, 0x00); //Blau
|
|
|
|
|
(mask & (1<<1)) ? this->sp(1, 0xFF) : this->sp(1, 0x00); //Gr<47>n
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5d8: 61 ff sbrs r22, 1
|
|
|
|
|
5da: 04 c0 rjmp .+8 ; 0x5e4 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh+0x1c>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->color(0, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
void sp(uint8_t i, uint8_t c) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: OCR0B = c; break; //ROT
|
|
|
|
|
case 1: OCR2B = c; break; //GR<47>N
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5dc: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
5de: 80 93 b4 00 sts 0x00B4, r24
|
|
|
|
|
5e2: 02 c0 rjmp .+4 ; 0x5e8 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh+0x20>
|
|
|
|
|
5e4: 10 92 b4 00 sts 0x00B4, r1
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->sp(2, b); //BLAU
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
void setcolor(uint8_t mask) {
|
2015-02-10 12:05:04 +01:00
|
|
|
|
(mask & (1<<0)) ? this->sp(2, 0xFF) : this->sp(2, 0x00); //Blau
|
|
|
|
|
(mask & (1<<1)) ? this->sp(1, 0xFF) : this->sp(1, 0x00); //Gr<47>n
|
|
|
|
|
(mask & (1<<2)) ? this->sp(0, 0xFF) : this->sp(0, 0x00); //Rot
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5e8: 62 ff sbrs r22, 2
|
|
|
|
|
5ea: 03 c0 rjmp .+6 ; 0x5f2 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh+0x2a>
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->initTimer();
|
|
|
|
|
this->color(0, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
void sp(uint8_t i, uint8_t c) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: OCR0B = c; break; //ROT
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5ec: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
5ee: 88 bd out 0x28, r24 ; 40
|
|
|
|
|
5f0: 08 95 ret
|
|
|
|
|
5f2: 18 bc out 0x28, r1 ; 40
|
|
|
|
|
5f4: 08 95 ret
|
2015-02-10 12:05:04 +01:00
|
|
|
|
|
2015-02-11 18:10:07 +01:00
|
|
|
|
000005f6 <_ZN4UartILm9600EE7printlnEPKc>:
|
2015-02-08 00:22:32 +01:00
|
|
|
|
} else {
|
|
|
|
|
print("0");
|
|
|
|
|
}
|
2014-11-19 23:57:35 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
2015-02-08 00:22:32 +01:00
|
|
|
|
void println(const char *text) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5f6: cf 93 push r28
|
|
|
|
|
5f8: df 93 push r29
|
2015-02-08 00:22:32 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
5fa: fb 01 movw r30, r22
|
|
|
|
|
5fc: 90 81 ld r25, Z
|
|
|
|
|
5fe: 99 23 and r25, r25
|
|
|
|
|
600: 69 f0 breq .+26 ; 0x61c <_ZN4UartILm9600EE7printlnEPKc+0x26>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
} else {
|
|
|
|
|
print("0");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void println(const char *text) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
602: db 01 movw r26, r22
|
|
|
|
|
604: 11 96 adiw r26, 0x01 ; 1
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
606: e0 ec ldi r30, 0xC0 ; 192
|
|
|
|
|
608: f0 e0 ldi r31, 0x00 ; 0
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
60a: c6 ec ldi r28, 0xC6 ; 198
|
|
|
|
|
60c: d0 e0 ldi r29, 0x00 ; 0
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
60e: 80 81 ld r24, Z
|
|
|
|
|
610: 85 ff sbrs r24, 5
|
|
|
|
|
612: fd cf rjmp .-6 ; 0x60e <_ZN4UartILm9600EE7printlnEPKc+0x18>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
614: 98 83 st Y, r25
|
2015-02-08 00:22:32 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
616: 9d 91 ld r25, X+
|
|
|
|
|
618: 91 11 cpse r25, r1
|
|
|
|
|
61a: f9 cf rjmp .-14 ; 0x60e <_ZN4UartILm9600EE7printlnEPKc+0x18>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
61c: e0 ec ldi r30, 0xC0 ; 192
|
|
|
|
|
61e: f0 e0 ldi r31, 0x00 ; 0
|
|
|
|
|
620: 80 81 ld r24, Z
|
|
|
|
|
622: 85 ff sbrs r24, 5
|
|
|
|
|
624: fd cf rjmp .-6 ; 0x620 <_ZN4UartILm9600EE7printlnEPKc+0x2a>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
626: 8d e0 ldi r24, 0x0D ; 13
|
|
|
|
|
628: 80 93 c6 00 sts 0x00C6, r24
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
62c: e0 ec ldi r30, 0xC0 ; 192
|
|
|
|
|
62e: f0 e0 ldi r31, 0x00 ; 0
|
|
|
|
|
630: 80 81 ld r24, Z
|
|
|
|
|
632: 85 ff sbrs r24, 5
|
|
|
|
|
634: fd cf rjmp .-6 ; 0x630 <_ZN4UartILm9600EE7printlnEPKc+0x3a>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
636: 8a e0 ldi r24, 0x0A ; 10
|
|
|
|
|
638: 80 93 c6 00 sts 0x00C6, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
void println(const char *text) {
|
|
|
|
|
print(text);
|
|
|
|
|
print("\r");
|
|
|
|
|
print("\n");
|
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
63c: df 91 pop r29
|
|
|
|
|
63e: cf 91 pop r28
|
|
|
|
|
640: 08 95 ret
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
2015-02-11 18:10:07 +01:00
|
|
|
|
00000642 <main>:
|
2015-02-08 00:22:32 +01:00
|
|
|
|
irclass ir;
|
|
|
|
|
|
2015-02-11 18:10:07 +01:00
|
|
|
|
const static uint8_t remotetimer = 10;
|
|
|
|
|
|
2015-02-08 00:22:32 +01:00
|
|
|
|
int main(void)
|
|
|
|
|
{
|
2015-02-11 18:10:07 +01:00
|
|
|
|
642: cf 93 push r28
|
|
|
|
|
644: df 93 push r29
|
|
|
|
|
646: 00 d0 rcall .+0 ; 0x648 <main+0x6>
|
|
|
|
|
648: 00 d0 rcall .+0 ; 0x64a <main+0x8>
|
|
|
|
|
64a: 1f 92 push r1
|
|
|
|
|
64c: cd b7 in r28, 0x3d ; 61
|
|
|
|
|
64e: de b7 in r29, 0x3e ; 62
|
2015-02-08 00:22:32 +01:00
|
|
|
|
sei();
|
2015-02-11 18:10:07 +01:00
|
|
|
|
650: 78 94 sei
|
2015-02-09 18:10:07 +01:00
|
|
|
|
uint8_t doorstatus = 0;
|
2015-02-08 00:22:32 +01:00
|
|
|
|
stripe.setcolor(stripe.RED);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
652: 64 e0 ldi r22, 0x04 ; 4
|
|
|
|
|
654: 88 e8 ldi r24, 0x88 ; 136
|
|
|
|
|
656: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
658: 0e 94 e4 02 call 0x5c8 ; 0x5c8 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
Serial.println("Rot!");
|
2015-02-11 18:10:07 +01:00
|
|
|
|
65c: 6b e0 ldi r22, 0x0B ; 11
|
|
|
|
|
65e: 71 e0 ldi r23, 0x01 ; 1
|
|
|
|
|
660: 8a eb ldi r24, 0xBA ; 186
|
|
|
|
|
662: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
664: 0e 94 fb 02 call 0x5f6 ; 0x5f6 <_ZN4UartILm9600EE7printlnEPKc>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
#else
|
|
|
|
|
//round up by default
|
|
|
|
|
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
668: 2f e7 ldi r18, 0x7F ; 127
|
|
|
|
|
66a: 3a e1 ldi r19, 0x1A ; 26
|
|
|
|
|
66c: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
|
66e: 21 50 subi r18, 0x01 ; 1
|
|
|
|
|
670: 30 40 sbci r19, 0x00 ; 0
|
|
|
|
|
672: 80 40 sbci r24, 0x00 ; 0
|
|
|
|
|
674: e1 f7 brne .-8 ; 0x66e <main+0x2c>
|
|
|
|
|
676: 00 c0 rjmp .+0 ; 0x678 <main+0x36>
|
|
|
|
|
678: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
_delay_ms(100);
|
|
|
|
|
stripe.setcolor(stripe.GREEN);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
67a: 62 e0 ldi r22, 0x02 ; 2
|
|
|
|
|
67c: 88 e8 ldi r24, 0x88 ; 136
|
|
|
|
|
67e: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
680: 0e 94 e4 02 call 0x5c8 ; 0x5c8 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
Serial.println("Gr<47>n!");
|
2015-02-11 18:10:07 +01:00
|
|
|
|
684: 60 e1 ldi r22, 0x10 ; 16
|
|
|
|
|
686: 71 e0 ldi r23, 0x01 ; 1
|
|
|
|
|
688: 8a eb ldi r24, 0xBA ; 186
|
|
|
|
|
68a: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
68c: 0e 94 fb 02 call 0x5f6 ; 0x5f6 <_ZN4UartILm9600EE7printlnEPKc>
|
|
|
|
|
690: 9f e7 ldi r25, 0x7F ; 127
|
|
|
|
|
692: aa e1 ldi r26, 0x1A ; 26
|
|
|
|
|
694: b6 e0 ldi r27, 0x06 ; 6
|
|
|
|
|
696: 91 50 subi r25, 0x01 ; 1
|
|
|
|
|
698: a0 40 sbci r26, 0x00 ; 0
|
|
|
|
|
69a: b0 40 sbci r27, 0x00 ; 0
|
|
|
|
|
69c: e1 f7 brne .-8 ; 0x696 <main+0x54>
|
|
|
|
|
69e: 00 c0 rjmp .+0 ; 0x6a0 <main+0x5e>
|
|
|
|
|
6a0: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
_delay_ms(100);
|
|
|
|
|
stripe.setcolor(stripe.BLUE);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
6a2: 61 e0 ldi r22, 0x01 ; 1
|
|
|
|
|
6a4: 88 e8 ldi r24, 0x88 ; 136
|
|
|
|
|
6a6: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
6a8: 0e 94 e4 02 call 0x5c8 ; 0x5c8 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
Serial.println("Blau!");
|
2015-02-11 18:10:07 +01:00
|
|
|
|
6ac: 66 e1 ldi r22, 0x16 ; 22
|
|
|
|
|
6ae: 71 e0 ldi r23, 0x01 ; 1
|
|
|
|
|
6b0: 8a eb ldi r24, 0xBA ; 186
|
|
|
|
|
6b2: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
6b4: 0e 94 fb 02 call 0x5f6 ; 0x5f6 <_ZN4UartILm9600EE7printlnEPKc>
|
|
|
|
|
6b8: 2f e7 ldi r18, 0x7F ; 127
|
|
|
|
|
6ba: 3a e1 ldi r19, 0x1A ; 26
|
|
|
|
|
6bc: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
|
6be: 21 50 subi r18, 0x01 ; 1
|
|
|
|
|
6c0: 30 40 sbci r19, 0x00 ; 0
|
|
|
|
|
6c2: 80 40 sbci r24, 0x00 ; 0
|
|
|
|
|
6c4: e1 f7 brne .-8 ; 0x6be <main+0x7c>
|
|
|
|
|
6c6: 00 c0 rjmp .+0 ; 0x6c8 <main+0x86>
|
|
|
|
|
6c8: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
_delay_ms(100);
|
|
|
|
|
stripe.setcolor(stripe.WHITE);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
6ca: 67 e0 ldi r22, 0x07 ; 7
|
|
|
|
|
6cc: 88 e8 ldi r24, 0x88 ; 136
|
|
|
|
|
6ce: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
6d0: 0e 94 e4 02 call 0x5c8 ; 0x5c8 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
Serial.println("Wei<65>, alles Initialisert! Habe Fertig und damit ab zum Normalbetrieb!");
|
2015-02-11 18:10:07 +01:00
|
|
|
|
6d4: 6c e1 ldi r22, 0x1C ; 28
|
|
|
|
|
6d6: 71 e0 ldi r23, 0x01 ; 1
|
|
|
|
|
6d8: 8a eb ldi r24, 0xBA ; 186
|
|
|
|
|
6da: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
6dc: 0e 94 fb 02 call 0x5f6 ; 0x5f6 <_ZN4UartILm9600EE7printlnEPKc>
|
|
|
|
|
6e0: 9f e7 ldi r25, 0x7F ; 127
|
|
|
|
|
6e2: aa e1 ldi r26, 0x1A ; 26
|
|
|
|
|
6e4: b6 e0 ldi r27, 0x06 ; 6
|
|
|
|
|
6e6: 91 50 subi r25, 0x01 ; 1
|
|
|
|
|
6e8: a0 40 sbci r26, 0x00 ; 0
|
|
|
|
|
6ea: b0 40 sbci r27, 0x00 ; 0
|
|
|
|
|
6ec: e1 f7 brne .-8 ; 0x6e6 <main+0xa4>
|
|
|
|
|
6ee: 00 c0 rjmp .+0 ; 0x6f0 <main+0xae>
|
|
|
|
|
6f0: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portb
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTB; }
|
|
|
|
|
static void port(uint8_t v) { PORTB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
6f2: 29 9a sbi 0x05, 1 ; 5
|
2015-02-08 00:22:32 +01:00
|
|
|
|
_delay_ms(100);
|
|
|
|
|
led.green(1);
|
|
|
|
|
stripe.setcolor(stripe.BLACK);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
6f4: 60 e0 ldi r22, 0x00 ; 0
|
|
|
|
|
6f6: 88 e8 ldi r24, 0x88 ; 136
|
|
|
|
|
6f8: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
6fa: 0e 94 e4 02 call 0x5c8 ; 0x5c8 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE8setcolorEh>
|
|
|
|
|
uint8_t annoing_speed = 0;
|
|
|
|
|
6fe: 31 2c mov r3, r1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
led.red(0);
|
|
|
|
|
EIFR |= (1<<INTF0);
|
|
|
|
|
}
|
|
|
|
|
uint8_t getCode() {
|
|
|
|
|
uint8_t ret = this->_code;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
700: 45 e8 ldi r20, 0x85 ; 133
|
|
|
|
|
702: 51 e0 ldi r21, 0x01 ; 1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
this->_code = 255;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
704: 1f ef ldi r17, 0xFF ; 255
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
706: 0f 2e mov r0, r31
|
|
|
|
|
708: f9 e8 ldi r31, 0x89 ; 137
|
|
|
|
|
70a: ef 2e mov r14, r31
|
|
|
|
|
70c: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
70e: ff 2e mov r15, r31
|
|
|
|
|
710: f0 2d mov r31, r0
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
712: 0f 2e mov r0, r31
|
|
|
|
|
714: f5 e9 ldi r31, 0x95 ; 149
|
|
|
|
|
716: 8f 2e mov r8, r31
|
|
|
|
|
718: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
71a: 9f 2e mov r9, r31
|
|
|
|
|
71c: f0 2d mov r31, r0
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
71e: 0f 2e mov r0, r31
|
|
|
|
|
720: fb e9 ldi r31, 0x9B ; 155
|
|
|
|
|
722: 6f 2e mov r6, r31
|
|
|
|
|
724: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
726: 7f 2e mov r7, r31
|
|
|
|
|
728: f0 2d mov r31, r0
|
|
|
|
|
72a: 0f 2e mov r0, r31
|
|
|
|
|
72c: fa e0 ldi r31, 0x0A ; 10
|
|
|
|
|
72e: 2f 2e mov r2, r31
|
|
|
|
|
730: f0 2d mov r31, r0
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
732: 0f 2e mov r0, r31
|
|
|
|
|
734: f8 e8 ldi r31, 0x88 ; 136
|
|
|
|
|
736: 4f 2e mov r4, r31
|
|
|
|
|
738: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
73a: 5f 2e mov r5, r31
|
|
|
|
|
73c: f0 2d mov r31, r0
|
|
|
|
|
73e: aa 24 eor r10, r10
|
|
|
|
|
740: a3 94 inc r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
742: 0f 2e mov r0, r31
|
|
|
|
|
744: f9 eb ldi r31, 0xB9 ; 185
|
|
|
|
|
746: cf 2e mov r12, r31
|
|
|
|
|
748: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
|
74a: df 2e mov r13, r31
|
|
|
|
|
74c: f0 2d mov r31, r0
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
74e: e0 ec ldi r30, 0xC0 ; 192
|
|
|
|
|
750: f0 e0 ldi r31, 0x00 ; 0
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
752: 0f 2e mov r0, r31
|
|
|
|
|
754: fd e0 ldi r31, 0x0D ; 13
|
|
|
|
|
756: bf 2e mov r11, r31
|
|
|
|
|
758: f0 2d mov r31, r0
|
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
75a: 39 82 std Y+1, r3 ; 0x01
|
|
|
|
|
75c: 01 2f mov r16, r17
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
led.red(0);
|
|
|
|
|
EIFR |= (1<<INTF0);
|
|
|
|
|
}
|
|
|
|
|
uint8_t getCode() {
|
|
|
|
|
uint8_t ret = this->_code;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
75e: da 01 movw r26, r20
|
|
|
|
|
760: 8c 91 ld r24, X
|
2015-02-08 00:22:32 +01:00
|
|
|
|
this->_code = 255;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
762: 0c 93 st X, r16
|
2015-02-08 00:22:32 +01:00
|
|
|
|
while(1)
|
|
|
|
|
{
|
|
|
|
|
uint8_t c = ir.getCode();
|
|
|
|
|
switch(c) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
764: 8c 30 cpi r24, 0x0C ; 12
|
|
|
|
|
766: 09 f4 brne .+2 ; 0x76a <main+0x128>
|
|
|
|
|
768: f9 c0 rjmp .+498 ; 0x95c <main+0x31a>
|
|
|
|
|
76a: 38 f5 brcc .+78 ; 0x7ba <main+0x178>
|
|
|
|
|
76c: 85 30 cpi r24, 0x05 ; 5
|
|
|
|
|
76e: 09 f4 brne .+2 ; 0x772 <main+0x130>
|
|
|
|
|
770: 82 c0 rjmp .+260 ; 0x876 <main+0x234>
|
|
|
|
|
772: 90 f4 brcc .+36 ; 0x798 <main+0x156>
|
|
|
|
|
774: 82 30 cpi r24, 0x02 ; 2
|
|
|
|
|
776: 09 f4 brne .+2 ; 0x77a <main+0x138>
|
|
|
|
|
778: 58 c0 rjmp .+176 ; 0x82a <main+0x1e8>
|
|
|
|
|
77a: 38 f4 brcc .+14 ; 0x78a <main+0x148>
|
|
|
|
|
77c: 88 23 and r24, r24
|
|
|
|
|
77e: 09 f4 brne .+2 ; 0x782 <main+0x140>
|
|
|
|
|
780: 46 c0 rjmp .+140 ; 0x80e <main+0x1cc>
|
|
|
|
|
782: 81 30 cpi r24, 0x01 ; 1
|
|
|
|
|
784: 09 f0 breq .+2 ; 0x788 <main+0x146>
|
|
|
|
|
786: ea c1 rjmp .+980 ; 0xb5c <main+0x51a>
|
|
|
|
|
788: 49 c0 rjmp .+146 ; 0x81c <main+0x1da>
|
|
|
|
|
78a: 83 30 cpi r24, 0x03 ; 3
|
|
|
|
|
78c: 09 f4 brne .+2 ; 0x790 <main+0x14e>
|
|
|
|
|
78e: 5c c0 rjmp .+184 ; 0x848 <main+0x206>
|
|
|
|
|
790: 84 30 cpi r24, 0x04 ; 4
|
|
|
|
|
792: 09 f0 breq .+2 ; 0x796 <main+0x154>
|
|
|
|
|
794: e3 c1 rjmp .+966 ; 0xb5c <main+0x51a>
|
|
|
|
|
796: 61 c0 rjmp .+194 ; 0x85a <main+0x218>
|
|
|
|
|
798: 88 30 cpi r24, 0x08 ; 8
|
|
|
|
|
79a: 09 f4 brne .+2 ; 0x79e <main+0x15c>
|
|
|
|
|
79c: 96 c0 rjmp .+300 ; 0x8ca <main+0x288>
|
|
|
|
|
79e: 38 f4 brcc .+14 ; 0x7ae <main+0x16c>
|
|
|
|
|
7a0: 86 30 cpi r24, 0x06 ; 6
|
|
|
|
|
7a2: 09 f4 brne .+2 ; 0x7a6 <main+0x164>
|
|
|
|
|
7a4: 76 c0 rjmp .+236 ; 0x892 <main+0x250>
|
|
|
|
|
7a6: 87 30 cpi r24, 0x07 ; 7
|
|
|
|
|
7a8: 09 f0 breq .+2 ; 0x7ac <main+0x16a>
|
|
|
|
|
7aa: d8 c1 rjmp .+944 ; 0xb5c <main+0x51a>
|
|
|
|
|
7ac: 80 c0 rjmp .+256 ; 0x8ae <main+0x26c>
|
|
|
|
|
7ae: 8a 30 cpi r24, 0x0A ; 10
|
|
|
|
|
7b0: 09 f4 brne .+2 ; 0x7b4 <main+0x172>
|
|
|
|
|
7b2: a9 c0 rjmp .+338 ; 0x906 <main+0x2c4>
|
|
|
|
|
7b4: 08 f0 brcs .+2 ; 0x7b8 <main+0x176>
|
|
|
|
|
7b6: b6 c0 rjmp .+364 ; 0x924 <main+0x2e2>
|
|
|
|
|
7b8: 97 c0 rjmp .+302 ; 0x8e8 <main+0x2a6>
|
|
|
|
|
7ba: 82 31 cpi r24, 0x12 ; 18
|
|
|
|
|
7bc: 09 f4 brne .+2 ; 0x7c0 <main+0x17e>
|
|
|
|
|
7be: 3a c1 rjmp .+628 ; 0xa34 <main+0x3f2>
|
|
|
|
|
7c0: 90 f4 brcc .+36 ; 0x7e6 <main+0x1a4>
|
|
|
|
|
7c2: 8f 30 cpi r24, 0x0F ; 15
|
|
|
|
|
7c4: 09 f4 brne .+2 ; 0x7c8 <main+0x186>
|
|
|
|
|
7c6: f7 c0 rjmp .+494 ; 0x9b6 <main+0x374>
|
|
|
|
|
7c8: 38 f4 brcc .+14 ; 0x7d8 <main+0x196>
|
|
|
|
|
7ca: 8d 30 cpi r24, 0x0D ; 13
|
|
|
|
|
7cc: 09 f4 brne .+2 ; 0x7d0 <main+0x18e>
|
|
|
|
|
7ce: d5 c0 rjmp .+426 ; 0x97a <main+0x338>
|
|
|
|
|
7d0: 8e 30 cpi r24, 0x0E ; 14
|
|
|
|
|
7d2: 09 f0 breq .+2 ; 0x7d6 <main+0x194>
|
|
|
|
|
7d4: c3 c1 rjmp .+902 ; 0xb5c <main+0x51a>
|
|
|
|
|
7d6: e0 c0 rjmp .+448 ; 0x998 <main+0x356>
|
|
|
|
|
7d8: 80 31 cpi r24, 0x10 ; 16
|
|
|
|
|
7da: 09 f4 brne .+2 ; 0x7de <main+0x19c>
|
|
|
|
|
7dc: 0d c1 rjmp .+538 ; 0x9f8 <main+0x3b6>
|
|
|
|
|
7de: 81 31 cpi r24, 0x11 ; 17
|
|
|
|
|
7e0: 09 f0 breq .+2 ; 0x7e4 <main+0x1a2>
|
|
|
|
|
7e2: bc c1 rjmp .+888 ; 0xb5c <main+0x51a>
|
|
|
|
|
7e4: 18 c1 rjmp .+560 ; 0xa16 <main+0x3d4>
|
|
|
|
|
7e6: 85 31 cpi r24, 0x15 ; 21
|
|
|
|
|
7e8: 09 f4 brne .+2 ; 0x7ec <main+0x1aa>
|
|
|
|
|
7ea: 7c c1 rjmp .+760 ; 0xae4 <main+0x4a2>
|
|
|
|
|
7ec: 38 f4 brcc .+14 ; 0x7fc <main+0x1ba>
|
|
|
|
|
7ee: 83 31 cpi r24, 0x13 ; 19
|
|
|
|
|
7f0: 09 f4 brne .+2 ; 0x7f4 <main+0x1b2>
|
|
|
|
|
7f2: 2f c1 rjmp .+606 ; 0xa52 <main+0x410>
|
|
|
|
|
7f4: 84 31 cpi r24, 0x14 ; 20
|
|
|
|
|
7f6: 09 f0 breq .+2 ; 0x7fa <main+0x1b8>
|
|
|
|
|
7f8: b1 c1 rjmp .+866 ; 0xb5c <main+0x51a>
|
|
|
|
|
7fa: 66 c1 rjmp .+716 ; 0xac8 <main+0x486>
|
|
|
|
|
7fc: 87 31 cpi r24, 0x17 ; 23
|
|
|
|
|
7fe: 09 f4 brne .+2 ; 0x802 <main+0x1c0>
|
|
|
|
|
800: 8d c1 rjmp .+794 ; 0xb1c <main+0x4da>
|
|
|
|
|
802: 08 f4 brcc .+2 ; 0x806 <main+0x1c4>
|
|
|
|
|
804: 7d c1 rjmp .+762 ; 0xb00 <main+0x4be>
|
|
|
|
|
806: 8f 3f cpi r24, 0xFF ; 255
|
|
|
|
|
808: 09 f0 breq .+2 ; 0x80c <main+0x1ca>
|
|
|
|
|
80a: a8 c1 rjmp .+848 ; 0xb5c <main+0x51a>
|
|
|
|
|
80c: 4e c2 rjmp .+1180 ; 0xcaa <main+0x668>
|
|
|
|
|
case 255: break; //Kein Code empfangen
|
|
|
|
|
case 0: if(annoing_speed<255) annoing_speed++; break; //Button High
|
|
|
|
|
80e: b9 81 ldd r27, Y+1 ; 0x01
|
|
|
|
|
810: bf 3f cpi r27, 0xFF ; 255
|
|
|
|
|
812: 09 f4 brne .+2 ; 0x816 <main+0x1d4>
|
|
|
|
|
814: 4a c2 rjmp .+1172 ; 0xcaa <main+0x668>
|
|
|
|
|
816: bf 5f subi r27, 0xFF ; 255
|
|
|
|
|
818: b9 83 std Y+1, r27 ; 0x01
|
|
|
|
|
81a: 47 c2 rjmp .+1166 ; 0xcaa <main+0x668>
|
|
|
|
|
case 1: if(annoing_speed>0) annoing_speed--; break; //Button Low
|
|
|
|
|
81c: 29 81 ldd r18, Y+1 ; 0x01
|
|
|
|
|
81e: 22 23 and r18, r18
|
|
|
|
|
820: 09 f4 brne .+2 ; 0x824 <main+0x1e2>
|
|
|
|
|
822: 43 c2 rjmp .+1158 ; 0xcaa <main+0x668>
|
|
|
|
|
824: 21 50 subi r18, 0x01 ; 1
|
|
|
|
|
826: 29 83 std Y+1, r18 ; 0x01
|
|
|
|
|
828: 40 c2 rjmp .+1152 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
void timerOff() {
|
|
|
|
|
// OC0B output: Disconnected
|
|
|
|
|
// OC2A output: Disconnected
|
|
|
|
|
// OC2B output: Disconnected
|
|
|
|
|
TCCR0A &= ~(1<<COM0B1);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
82a: 84 b5 in r24, 0x24 ; 36
|
|
|
|
|
82c: 8f 7d andi r24, 0xDF ; 223
|
|
|
|
|
82e: 84 bd out 0x24, r24 ; 36
|
2015-02-08 00:22:32 +01:00
|
|
|
|
TCCR2A &= ~((1<<COM2A1) | (1<<COM2B1));
|
2015-02-11 18:10:07 +01:00
|
|
|
|
830: a0 eb ldi r26, 0xB0 ; 176
|
|
|
|
|
832: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
834: 8c 91 ld r24, X
|
|
|
|
|
836: 8f 75 andi r24, 0x5F ; 95
|
|
|
|
|
838: 8c 93 st X, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portd
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTD; }
|
|
|
|
|
static void port(uint8_t v) { PORTD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
83a: 5d 98 cbi 0x0b, 5 ; 11
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
static uint8_t pin() { return PIND; }
|
|
|
|
|
static void pin(uint8_t v) { PIND = v; }
|
|
|
|
|
|
|
|
|
|
static uint8_t dir() { return DDRD; }
|
|
|
|
|
static void dir(uint8_t v) { DDRD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
83c: 55 9a sbi 0x0a, 5 ; 10
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portd
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTD; }
|
|
|
|
|
static void port(uint8_t v) { PORTD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
83e: 5b 98 cbi 0x0b, 3 ; 11
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
static uint8_t pin() { return PIND; }
|
|
|
|
|
static void pin(uint8_t v) { PIND = v; }
|
|
|
|
|
|
|
|
|
|
static uint8_t dir() { return DDRD; }
|
|
|
|
|
static void dir(uint8_t v) { DDRD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
840: 53 9a sbi 0x0a, 3 ; 10
|
|
|
|
|
842: 2b 98 cbi 0x05, 3 ; 5
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
static uint8_t pin() { return PINB; }
|
|
|
|
|
static void pin(uint8_t v) { PINB = v; }
|
|
|
|
|
|
|
|
|
|
static uint8_t dir() { return DDRB; }
|
|
|
|
|
static void dir(uint8_t v) { DDRB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
844: 23 9a sbi 0x04, 3 ; 4
|
|
|
|
|
846: 31 c2 rjmp .+1122 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
void timerOn() {
|
|
|
|
|
// OC0B output: Non-Inverted PWM
|
|
|
|
|
// OC2A output: Non-Inverted PWM
|
|
|
|
|
// OC2B output: Non-Inverted PWM
|
|
|
|
|
TCCR0A |= (1<<COM0B1);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
848: 84 b5 in r24, 0x24 ; 36
|
|
|
|
|
84a: 80 62 ori r24, 0x20 ; 32
|
|
|
|
|
84c: 84 bd out 0x24, r24 ; 36
|
2015-02-08 00:22:32 +01:00
|
|
|
|
TCCR2A |= (1<<COM2A1) | (1<<COM2B1);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
84e: a0 eb ldi r26, 0xB0 ; 176
|
|
|
|
|
850: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
852: 8c 91 ld r24, X
|
|
|
|
|
854: 80 6a ori r24, 0xA0 ; 160
|
|
|
|
|
856: 8c 93 st X, r24
|
|
|
|
|
858: 28 c2 rjmp .+1104 ; 0xcaa <main+0x668>
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
85a: d7 01 movw r26, r14
|
|
|
|
|
85c: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
85e: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
860: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
862: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
864: d4 01 movw r26, r8
|
|
|
|
|
866: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
868: d3 01 movw r26, r6
|
|
|
|
|
86a: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
86c: d2 01 movw r26, r4
|
|
|
|
|
86e: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
870: d6 01 movw r26, r12
|
|
|
|
|
872: 1c 92 st X, r1
|
|
|
|
|
874: 1a c2 rjmp .+1076 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
876: d7 01 movw r26, r14
|
|
|
|
|
878: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
87a: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
87c: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
87e: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
880: d4 01 movw r26, r8
|
|
|
|
|
882: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
884: d3 01 movw r26, r6
|
|
|
|
|
886: 2c 92 st X, r2
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
888: d2 01 movw r26, r4
|
|
|
|
|
88a: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
|
|
|
|
88c: d6 01 movw r26, r12
|
|
|
|
|
88e: 1c 92 st X, r1
|
|
|
|
|
890: 0c c2 rjmp .+1048 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
892: d7 01 movw r26, r14
|
|
|
|
|
894: 1c 92 st X, r1
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
896: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
898: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
89a: 1c 92 st X, r1
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
89c: d4 01 movw r26, r8
|
|
|
|
|
89e: 1c 93 st X, r17
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
8a0: d3 01 movw r26, r6
|
|
|
|
|
8a2: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
8a4: d2 01 movw r26, r4
|
|
|
|
|
8a6: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
8a8: d6 01 movw r26, r12
|
|
|
|
|
8aa: 1c 92 st X, r1
|
|
|
|
|
8ac: fe c1 rjmp .+1020 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8ae: d7 01 movw r26, r14
|
|
|
|
|
8b0: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8b2: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
8b4: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
8b6: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8b8: d4 01 movw r26, r8
|
|
|
|
|
8ba: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8bc: d3 01 movw r26, r6
|
|
|
|
|
8be: 2c 92 st X, r2
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
8c0: d2 01 movw r26, r4
|
|
|
|
|
8c2: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
|
|
|
|
8c4: d6 01 movw r26, r12
|
|
|
|
|
8c6: 1c 92 st X, r1
|
|
|
|
|
8c8: f0 c1 rjmp .+992 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
8ca: d7 01 movw r26, r14
|
|
|
|
|
8cc: 1c 93 st X, r17
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
8ce: 80 e4 ldi r24, 0x40 ; 64
|
|
|
|
|
8d0: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
8d2: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
8d4: 8c 93 st X, r24
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
8d6: d4 01 movw r26, r8
|
|
|
|
|
8d8: 1c 92 st X, r1
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
8da: d3 01 movw r26, r6
|
|
|
|
|
8dc: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
8de: d2 01 movw r26, r4
|
|
|
|
|
8e0: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
8e2: d6 01 movw r26, r12
|
|
|
|
|
8e4: 1c 92 st X, r1
|
|
|
|
|
8e6: e1 c1 rjmp .+962 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8e8: d7 01 movw r26, r14
|
|
|
|
|
8ea: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8ec: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
8ee: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
8f0: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8f2: 80 e4 ldi r24, 0x40 ; 64
|
|
|
|
|
8f4: d4 01 movw r26, r8
|
|
|
|
|
8f6: 8c 93 st X, r24
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
8f8: d3 01 movw r26, r6
|
|
|
|
|
8fa: 2c 92 st X, r2
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
8fc: d2 01 movw r26, r4
|
|
|
|
|
8fe: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
|
|
|
|
900: d6 01 movw r26, r12
|
|
|
|
|
902: 1c 92 st X, r1
|
|
|
|
|
904: d2 c1 rjmp .+932 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
906: 80 e4 ldi r24, 0x40 ; 64
|
|
|
|
|
908: d7 01 movw r26, r14
|
|
|
|
|
90a: 8c 93 st X, r24
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
90c: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
90e: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
910: 1c 92 st X, r1
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
912: d4 01 movw r26, r8
|
|
|
|
|
914: 1c 93 st X, r17
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
916: d3 01 movw r26, r6
|
|
|
|
|
918: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
91a: d2 01 movw r26, r4
|
|
|
|
|
91c: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
91e: d6 01 movw r26, r12
|
|
|
|
|
920: 1c 92 st X, r1
|
|
|
|
|
922: c3 c1 rjmp .+902 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
924: d7 01 movw r26, r14
|
|
|
|
|
926: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
928: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
92a: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
92c: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
92e: d4 01 movw r26, r8
|
|
|
|
|
930: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
932: 29 81 ldd r18, Y+1 ; 0x01
|
|
|
|
|
934: d3 01 movw r26, r6
|
|
|
|
|
936: 2c 93 st X, r18
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
938: aa e8 ldi r26, 0x8A ; 138
|
|
|
|
|
93a: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
93c: 1c 92 st X, r1
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
93e: a0 e9 ldi r26, 0x90 ; 144
|
|
|
|
|
940: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
942: 1c 92 st X, r1
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
944: a6 e9 ldi r26, 0x96 ; 150
|
|
|
|
|
946: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
948: 1c 92 st X, r1
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
94a: ac e9 ldi r26, 0x9C ; 156
|
|
|
|
|
94c: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
94e: 2c 93 st X, r18
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
950: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
|
952: d2 01 movw r26, r4
|
|
|
|
|
954: 8c 93 st X, r24
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
956: d6 01 movw r26, r12
|
|
|
|
|
958: 1c 92 st X, r1
|
|
|
|
|
95a: a7 c1 rjmp .+846 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
95c: d7 01 movw r26, r14
|
|
|
|
|
95e: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
960: 20 e8 ldi r18, 0x80 ; 128
|
|
|
|
|
962: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
964: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
966: 2c 93 st X, r18
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
968: d4 01 movw r26, r8
|
|
|
|
|
96a: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
96c: d3 01 movw r26, r6
|
|
|
|
|
96e: 2c 92 st X, r2
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
970: d2 01 movw r26, r4
|
|
|
|
|
972: ac 92 st X, r10
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
974: d6 01 movw r26, r12
|
|
|
|
|
976: 1c 92 st X, r1
|
|
|
|
|
978: 98 c1 rjmp .+816 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
97a: d7 01 movw r26, r14
|
|
|
|
|
97c: 1c 92 st X, r1
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
97e: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
980: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
982: 1c 93 st X, r17
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
984: 20 e8 ldi r18, 0x80 ; 128
|
|
|
|
|
986: d4 01 movw r26, r8
|
|
|
|
|
988: 2c 93 st X, r18
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
98a: d3 01 movw r26, r6
|
|
|
|
|
98c: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
98e: d2 01 movw r26, r4
|
|
|
|
|
990: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
992: d6 01 movw r26, r12
|
|
|
|
|
994: 1c 92 st X, r1
|
|
|
|
|
996: 89 c1 rjmp .+786 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
998: 20 e8 ldi r18, 0x80 ; 128
|
|
|
|
|
99a: d7 01 movw r26, r14
|
|
|
|
|
99c: 2c 93 st X, r18
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
99e: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
9a0: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
9a2: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9a4: d4 01 movw r26, r8
|
|
|
|
|
9a6: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9a8: d3 01 movw r26, r6
|
|
|
|
|
9aa: 2c 92 st X, r2
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
9ac: d2 01 movw r26, r4
|
|
|
|
|
9ae: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
|
|
|
|
9b0: d6 01 movw r26, r12
|
|
|
|
|
9b2: 1c 92 st X, r1
|
|
|
|
|
9b4: 7a c1 rjmp .+756 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
uint8_t gp(uint8_t i) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: return OCR0B; //ROT
|
|
|
|
|
case 1: return OCR2B; //GR<47>N
|
|
|
|
|
case 2: return OCR2A; //BLAU
|
|
|
|
|
9b6: 80 91 b3 00 lds r24, 0x00B3
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
}
|
|
|
|
|
uint8_t gp(uint8_t i) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: return OCR0B; //ROT
|
|
|
|
|
case 1: return OCR2B; //GR<47>N
|
|
|
|
|
9ba: 90 91 b4 00 lds r25, 0x00B4
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
}
|
|
|
|
|
uint8_t gp(uint8_t i) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: return OCR0B; //ROT
|
|
|
|
|
9be: 28 b5 in r18, 0x28 ; 40
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9c0: d7 01 movw r26, r14
|
|
|
|
|
9c2: 2c 93 st X, r18
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9c4: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
9c6: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
9c8: 9c 93 st X, r25
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9ca: d4 01 movw r26, r8
|
|
|
|
|
9cc: 8c 93 st X, r24
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9ce: 29 81 ldd r18, Y+1 ; 0x01
|
|
|
|
|
9d0: d3 01 movw r26, r6
|
|
|
|
|
9d2: 2c 93 st X, r18
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9d4: aa e8 ldi r26, 0x8A ; 138
|
|
|
|
|
9d6: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
9d8: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9da: a0 e9 ldi r26, 0x90 ; 144
|
|
|
|
|
9dc: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
9de: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9e0: a6 e9 ldi r26, 0x96 ; 150
|
|
|
|
|
9e2: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
9e4: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
9e6: ac e9 ldi r26, 0x9C ; 156
|
|
|
|
|
9e8: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
9ea: 2c 93 st X, r18
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
9ec: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
|
9ee: d2 01 movw r26, r4
|
|
|
|
|
9f0: 8c 93 st X, r24
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
9f2: d6 01 movw r26, r12
|
|
|
|
|
9f4: 1c 92 st X, r1
|
|
|
|
|
9f6: 59 c1 rjmp .+690 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
9f8: d7 01 movw r26, r14
|
|
|
|
|
9fa: 1c 93 st X, r17
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
9fc: 20 ec ldi r18, 0xC0 ; 192
|
|
|
|
|
9fe: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
a00: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
a02: 2c 93 st X, r18
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
a04: d4 01 movw r26, r8
|
|
|
|
|
a06: 1c 92 st X, r1
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
a08: d3 01 movw r26, r6
|
|
|
|
|
a0a: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
a0c: d2 01 movw r26, r4
|
|
|
|
|
a0e: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
a10: d6 01 movw r26, r12
|
|
|
|
|
a12: 1c 92 st X, r1
|
|
|
|
|
a14: 4a c1 rjmp .+660 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a16: d7 01 movw r26, r14
|
|
|
|
|
a18: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a1a: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
a1c: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
a1e: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a20: 20 ec ldi r18, 0xC0 ; 192
|
|
|
|
|
a22: d4 01 movw r26, r8
|
|
|
|
|
a24: 2c 93 st X, r18
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a26: d3 01 movw r26, r6
|
|
|
|
|
a28: 2c 92 st X, r2
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
a2a: d2 01 movw r26, r4
|
|
|
|
|
a2c: ac 92 st X, r10
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
a2e: d6 01 movw r26, r12
|
|
|
|
|
a30: 1c 92 st X, r1
|
|
|
|
|
a32: 3b c1 rjmp .+630 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
a34: 20 ec ldi r18, 0xC0 ; 192
|
|
|
|
|
a36: d7 01 movw r26, r14
|
|
|
|
|
a38: 2c 93 st X, r18
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
a3a: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
a3c: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
a3e: 1c 92 st X, r1
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
a40: d4 01 movw r26, r8
|
|
|
|
|
a42: 1c 93 st X, r17
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
a44: d3 01 movw r26, r6
|
|
|
|
|
a46: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
a48: d2 01 movw r26, r4
|
|
|
|
|
a4a: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
a4c: d6 01 movw r26, r12
|
|
|
|
|
a4e: 1c 92 st X, r1
|
|
|
|
|
a50: 2c c1 rjmp .+600 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a52: d7 01 movw r26, r14
|
|
|
|
|
a54: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a56: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
a58: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
a5a: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a5c: d4 01 movw r26, r8
|
|
|
|
|
a5e: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a60: d3 01 movw r26, r6
|
|
|
|
|
a62: 1c 93 st X, r17
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a64: aa e8 ldi r26, 0x8A ; 138
|
|
|
|
|
a66: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
a68: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a6a: a0 e9 ldi r26, 0x90 ; 144
|
|
|
|
|
a6c: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
a6e: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a70: a6 e9 ldi r26, 0x96 ; 150
|
|
|
|
|
a72: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
a74: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a76: ac e9 ldi r26, 0x9C ; 156
|
|
|
|
|
a78: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
a7a: 1c 93 st X, r17
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
a7c: 10 92 8b 01 sts 0x018B, r1
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
a80: 10 93 91 01 sts 0x0191, r17
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
a84: 10 92 97 01 sts 0x0197, r1
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
a88: 10 93 9d 01 sts 0x019D, r17
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a8c: 10 92 8c 01 sts 0x018C, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a90: 10 93 92 01 sts 0x0192, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a94: 10 93 98 01 sts 0x0198, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
a98: 10 93 9e 01 sts 0x019E, r17
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
a9c: 10 92 8d 01 sts 0x018D, r1
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
aa0: 10 92 93 01 sts 0x0193, r1
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
aa4: 10 93 99 01 sts 0x0199, r17
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
aa8: 10 93 9f 01 sts 0x019F, r17
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
aac: 10 93 8e 01 sts 0x018E, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ab0: 10 92 94 01 sts 0x0194, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ab4: 10 93 9a 01 sts 0x019A, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ab8: 10 93 a0 01 sts 0x01A0, r17
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
abc: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
|
abe: d2 01 movw r26, r4
|
|
|
|
|
ac0: 8c 93 st X, r24
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
|
|
|
|
ac2: d6 01 movw r26, r12
|
|
|
|
|
ac4: 1c 92 st X, r1
|
|
|
|
|
ac6: f1 c0 rjmp .+482 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
ac8: d7 01 movw r26, r14
|
|
|
|
|
aca: 1c 93 st X, r17
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
acc: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
ace: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
ad0: 1c 93 st X, r17
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
ad2: d4 01 movw r26, r8
|
|
|
|
|
ad4: 1c 92 st X, r1
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
ad6: d3 01 movw r26, r6
|
|
|
|
|
ad8: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
ada: d2 01 movw r26, r4
|
|
|
|
|
adc: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
ade: d6 01 movw r26, r12
|
|
|
|
|
ae0: 1c 92 st X, r1
|
|
|
|
|
ae2: e3 c0 rjmp .+454 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ae4: d7 01 movw r26, r14
|
|
|
|
|
ae6: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ae8: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
aea: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
aec: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
aee: d4 01 movw r26, r8
|
|
|
|
|
af0: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
af2: d3 01 movw r26, r6
|
|
|
|
|
af4: 2c 92 st X, r2
|
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
af6: d2 01 movw r26, r4
|
|
|
|
|
af8: ac 92 st X, r10
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
afa: d6 01 movw r26, r12
|
|
|
|
|
afc: 1c 92 st X, r1
|
|
|
|
|
afe: d5 c0 rjmp .+426 ; 0xcaa <main+0x668>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
b00: d7 01 movw r26, r14
|
|
|
|
|
b02: 1c 93 st X, r17
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
b04: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
b06: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
b08: 1c 92 st X, r1
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
b0a: d4 01 movw r26, r8
|
|
|
|
|
b0c: 1c 93 st X, r17
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
b0e: d3 01 movw r26, r6
|
|
|
|
|
b10: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
b12: d2 01 movw r26, r4
|
|
|
|
|
b14: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
b16: d6 01 movw r26, r12
|
|
|
|
|
b18: 1c 92 st X, r1
|
|
|
|
|
b1a: c7 c0 rjmp .+398 ; 0xcaa <main+0x668>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b1c: d7 01 movw r26, r14
|
|
|
|
|
b1e: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b20: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
b22: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
b24: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b26: 20 e1 ldi r18, 0x10 ; 16
|
|
|
|
|
b28: d4 01 movw r26, r8
|
|
|
|
|
b2a: 2c 93 st X, r18
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b2c: 29 e1 ldi r18, 0x19 ; 25
|
|
|
|
|
b2e: d3 01 movw r26, r6
|
|
|
|
|
b30: 2c 93 st X, r18
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->_l = 0;
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
|
|
|
|
b32: aa e8 ldi r26, 0x8A ; 138
|
|
|
|
|
b34: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
b36: 1c 92 st X, r1
|
|
|
|
|
this->fademap[1][index] = green;
|
|
|
|
|
b38: 2a ea ldi r18, 0xAA ; 170
|
|
|
|
|
b3a: a0 e9 ldi r26, 0x90 ; 144
|
|
|
|
|
b3c: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
b3e: 2c 93 st X, r18
|
|
|
|
|
this->fademap[2][index] = blue;
|
|
|
|
|
b40: 20 e1 ldi r18, 0x10 ; 16
|
|
|
|
|
b42: a6 e9 ldi r26, 0x96 ; 150
|
|
|
|
|
b44: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
b46: 2c 93 st X, r18
|
|
|
|
|
this->fademap[3][index] = time;
|
|
|
|
|
b48: 8f e0 ldi r24, 0x0F ; 15
|
|
|
|
|
b4a: ac e9 ldi r26, 0x9C ; 156
|
|
|
|
|
b4c: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
b4e: 8c 93 st X, r24
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
b50: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
|
b52: d2 01 movw r26, r4
|
|
|
|
|
b54: 8c 93 st X, r24
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
b56: d6 01 movw r26, r12
|
|
|
|
|
b58: 1c 92 st X, r1
|
|
|
|
|
b5a: a7 c0 rjmp .+334 ; 0xcaa <main+0x668>
|
|
|
|
|
case 23:
|
|
|
|
|
stripe.setfadecolor(0, 0x00, 0xFF, 0x10, 25);
|
|
|
|
|
stripe.setfadecolor(1, 0x00, 0xAA, 0x10, 15);
|
|
|
|
|
stripe.fade(2);
|
|
|
|
|
break; //Button SMOOTH
|
2015-02-08 00:22:32 +01:00
|
|
|
|
default: Serial.printDec(c); Serial.println(" Pressed!"); break; //Code den ich nicht kenne
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b5c: 28 2f mov r18, r24
|
|
|
|
|
b5e: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
b60: 3b 83 std Y+3, r19 ; 0x03
|
|
|
|
|
b62: 2a 83 std Y+2, r18 ; 0x02
|
2015-02-08 00:22:32 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
2015-02-07 18:10:00 +01:00
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b64: 80 81 ld r24, Z
|
|
|
|
|
b66: 85 ff sbrs r24, 5
|
|
|
|
|
b68: fd cf rjmp .-6 ; 0xb64 <main+0x522>
|
2015-02-07 18:10:00 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b6a: 80 e3 ldi r24, 0x30 ; 48
|
|
|
|
|
b6c: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
b6e: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
b70: 8c 93 st X, r24
|
2015-02-07 18:10:00 +01:00
|
|
|
|
text++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void printDec(uint16_t wert) {
|
|
|
|
|
print((wert/10000)+'0');
|
2014-11-19 23:57:35 +01:00
|
|
|
|
print(((wert/1000)%10)+'0');
|
2015-02-11 18:10:07 +01:00
|
|
|
|
b72: 60 e0 ldi r22, 0x00 ; 0
|
|
|
|
|
b74: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
b76: cb 01 movw r24, r22
|
|
|
|
|
b78: 96 95 lsr r25
|
|
|
|
|
b7a: 87 95 ror r24
|
|
|
|
|
b7c: 96 95 lsr r25
|
|
|
|
|
b7e: 87 95 ror r24
|
|
|
|
|
b80: 96 95 lsr r25
|
|
|
|
|
b82: 87 95 ror r24
|
|
|
|
|
b84: 9c 01 movw r18, r24
|
|
|
|
|
b86: 22 0f add r18, r18
|
|
|
|
|
b88: 33 1f adc r19, r19
|
|
|
|
|
b8a: 88 0f add r24, r24
|
|
|
|
|
b8c: 99 1f adc r25, r25
|
|
|
|
|
b8e: 88 0f add r24, r24
|
|
|
|
|
b90: 99 1f adc r25, r25
|
|
|
|
|
b92: 88 0f add r24, r24
|
|
|
|
|
b94: 99 1f adc r25, r25
|
|
|
|
|
b96: 82 0f add r24, r18
|
|
|
|
|
b98: 93 1f adc r25, r19
|
|
|
|
|
b9a: 68 1b sub r22, r24
|
|
|
|
|
b9c: 79 0b sbc r23, r25
|
|
|
|
|
b9e: 60 5d subi r22, 0xD0 ; 208
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ba0: 80 81 ld r24, Z
|
|
|
|
|
ba2: 85 ff sbrs r24, 5
|
|
|
|
|
ba4: fd cf rjmp .-6 ; 0xba0 <main+0x55e>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ba6: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
ba8: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
baa: 6c 93 st X, r22
|
2014-11-19 23:57:35 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void printDec(uint16_t wert) {
|
|
|
|
|
print((wert/10000)+'0');
|
|
|
|
|
print(((wert/1000)%10)+'0');
|
|
|
|
|
print(((wert/100)%10)+'0');
|
2015-02-11 18:10:07 +01:00
|
|
|
|
bac: 2a 81 ldd r18, Y+2 ; 0x02
|
|
|
|
|
bae: 3b 81 ldd r19, Y+3 ; 0x03
|
|
|
|
|
bb0: 36 95 lsr r19
|
|
|
|
|
bb2: 27 95 ror r18
|
|
|
|
|
bb4: 36 95 lsr r19
|
|
|
|
|
bb6: 27 95 ror r18
|
|
|
|
|
bb8: ab e7 ldi r26, 0x7B ; 123
|
|
|
|
|
bba: b4 e1 ldi r27, 0x14 ; 20
|
|
|
|
|
bbc: 0e 94 5f 09 call 0x12be ; 0x12be <__umulhisi3>
|
|
|
|
|
bc0: 96 95 lsr r25
|
|
|
|
|
bc2: 87 95 ror r24
|
|
|
|
|
bc4: 80 5d subi r24, 0xD0 ; 208
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
bc6: 90 81 ld r25, Z
|
|
|
|
|
bc8: 95 ff sbrs r25, 5
|
|
|
|
|
bca: fd cf rjmp .-6 ; 0xbc6 <main+0x584>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
bcc: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
bce: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
bd0: 8c 93 st X, r24
|
2014-11-19 23:57:35 +01:00
|
|
|
|
}
|
|
|
|
|
void printDec(uint16_t wert) {
|
|
|
|
|
print((wert/10000)+'0');
|
|
|
|
|
print(((wert/1000)%10)+'0');
|
|
|
|
|
print(((wert/100)%10)+'0');
|
|
|
|
|
print(((wert/10)%10)+'0');
|
2015-02-11 18:10:07 +01:00
|
|
|
|
bd2: 2a 81 ldd r18, Y+2 ; 0x02
|
|
|
|
|
bd4: 3b 81 ldd r19, Y+3 ; 0x03
|
|
|
|
|
bd6: ad ec ldi r26, 0xCD ; 205
|
|
|
|
|
bd8: bc ec ldi r27, 0xCC ; 204
|
|
|
|
|
bda: 0e 94 5f 09 call 0x12be ; 0x12be <__umulhisi3>
|
|
|
|
|
bde: 96 95 lsr r25
|
|
|
|
|
be0: 87 95 ror r24
|
|
|
|
|
be2: 96 95 lsr r25
|
|
|
|
|
be4: 87 95 ror r24
|
|
|
|
|
be6: 96 95 lsr r25
|
|
|
|
|
be8: 87 95 ror r24
|
|
|
|
|
bea: 9d 83 std Y+5, r25 ; 0x05
|
|
|
|
|
bec: 8c 83 std Y+4, r24 ; 0x04
|
|
|
|
|
bee: 9c 01 movw r18, r24
|
|
|
|
|
bf0: 0e 94 5f 09 call 0x12be ; 0x12be <__umulhisi3>
|
|
|
|
|
bf4: 96 95 lsr r25
|
|
|
|
|
bf6: 87 95 ror r24
|
|
|
|
|
bf8: 96 95 lsr r25
|
|
|
|
|
bfa: 87 95 ror r24
|
|
|
|
|
bfc: 96 95 lsr r25
|
|
|
|
|
bfe: 87 95 ror r24
|
|
|
|
|
c00: 9c 01 movw r18, r24
|
|
|
|
|
c02: 22 0f add r18, r18
|
|
|
|
|
c04: 33 1f adc r19, r19
|
|
|
|
|
c06: 88 0f add r24, r24
|
|
|
|
|
c08: 99 1f adc r25, r25
|
|
|
|
|
c0a: 88 0f add r24, r24
|
|
|
|
|
c0c: 99 1f adc r25, r25
|
|
|
|
|
c0e: 88 0f add r24, r24
|
|
|
|
|
c10: 99 1f adc r25, r25
|
|
|
|
|
c12: 82 0f add r24, r18
|
|
|
|
|
c14: 93 1f adc r25, r19
|
|
|
|
|
c16: 2c 81 ldd r18, Y+4 ; 0x04
|
|
|
|
|
c18: 3d 81 ldd r19, Y+5 ; 0x05
|
|
|
|
|
c1a: 28 1b sub r18, r24
|
|
|
|
|
c1c: 39 0b sbc r19, r25
|
|
|
|
|
c1e: c9 01 movw r24, r18
|
|
|
|
|
c20: 80 5d subi r24, 0xD0 ; 208
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c22: 90 81 ld r25, Z
|
|
|
|
|
c24: 95 ff sbrs r25, 5
|
|
|
|
|
c26: fd cf rjmp .-6 ; 0xc22 <main+0x5e0>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c28: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
c2a: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
c2c: 8c 93 st X, r24
|
2014-11-19 23:57:35 +01:00
|
|
|
|
void printDec(uint16_t wert) {
|
|
|
|
|
print((wert/10000)+'0');
|
|
|
|
|
print(((wert/1000)%10)+'0');
|
|
|
|
|
print(((wert/100)%10)+'0');
|
|
|
|
|
print(((wert/10)%10)+'0');
|
|
|
|
|
print((wert%10)+'0');
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c2e: 2a 81 ldd r18, Y+2 ; 0x02
|
|
|
|
|
c30: 3b 81 ldd r19, Y+3 ; 0x03
|
|
|
|
|
c32: ad ec ldi r26, 0xCD ; 205
|
|
|
|
|
c34: bc ec ldi r27, 0xCC ; 204
|
|
|
|
|
c36: 0e 94 5f 09 call 0x12be ; 0x12be <__umulhisi3>
|
|
|
|
|
c3a: 96 95 lsr r25
|
|
|
|
|
c3c: 87 95 ror r24
|
|
|
|
|
c3e: 96 95 lsr r25
|
|
|
|
|
c40: 87 95 ror r24
|
|
|
|
|
c42: 96 95 lsr r25
|
|
|
|
|
c44: 87 95 ror r24
|
|
|
|
|
c46: 9c 01 movw r18, r24
|
|
|
|
|
c48: 22 0f add r18, r18
|
|
|
|
|
c4a: 33 1f adc r19, r19
|
|
|
|
|
c4c: 88 0f add r24, r24
|
|
|
|
|
c4e: 99 1f adc r25, r25
|
|
|
|
|
c50: 88 0f add r24, r24
|
|
|
|
|
c52: 99 1f adc r25, r25
|
|
|
|
|
c54: 88 0f add r24, r24
|
|
|
|
|
c56: 99 1f adc r25, r25
|
|
|
|
|
c58: 82 0f add r24, r18
|
|
|
|
|
c5a: 93 1f adc r25, r19
|
|
|
|
|
c5c: 2a 81 ldd r18, Y+2 ; 0x02
|
|
|
|
|
c5e: 3b 81 ldd r19, Y+3 ; 0x03
|
|
|
|
|
c60: 28 1b sub r18, r24
|
|
|
|
|
c62: 39 0b sbc r19, r25
|
|
|
|
|
c64: c9 01 movw r24, r18
|
|
|
|
|
c66: 80 5d subi r24, 0xD0 ; 208
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c68: 90 81 ld r25, Z
|
|
|
|
|
c6a: 95 ff sbrs r25, 5
|
|
|
|
|
c6c: fd cf rjmp .-6 ; 0xc68 <main+0x626>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c6e: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
c70: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
c72: 8c 93 st X, r24
|
|
|
|
|
c74: a3 e6 ldi r26, 0x63 ; 99
|
|
|
|
|
c76: b1 e0 ldi r27, 0x01 ; 1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c78: 90 e2 ldi r25, 0x20 ; 32
|
|
|
|
|
c7a: 9d 01 movw r18, r26
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c7c: 80 81 ld r24, Z
|
|
|
|
|
c7e: 85 ff sbrs r24, 5
|
|
|
|
|
c80: fd cf rjmp .-6 ; 0xc7c <main+0x63a>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c82: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
c84: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
c86: 9c 93 st X, r25
|
2015-02-09 18:10:07 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c88: d9 01 movw r26, r18
|
|
|
|
|
c8a: 9d 91 ld r25, X+
|
|
|
|
|
c8c: 9d 01 movw r18, r26
|
|
|
|
|
c8e: 91 11 cpse r25, r1
|
|
|
|
|
c90: f5 cf rjmp .-22 ; 0xc7c <main+0x63a>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c92: 80 81 ld r24, Z
|
|
|
|
|
c94: 85 ff sbrs r24, 5
|
|
|
|
|
c96: fd cf rjmp .-6 ; 0xc92 <main+0x650>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c98: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
c9a: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
c9c: bc 92 st X, r11
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
c9e: 80 81 ld r24, Z
|
|
|
|
|
ca0: 85 ff sbrs r24, 5
|
|
|
|
|
ca2: fd cf rjmp .-6 ; 0xc9e <main+0x65c>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ca4: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
ca6: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
ca8: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
if(comp.is_active()) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
caa: 00 b6 in r0, 0x30 ; 48
|
|
|
|
|
cac: 05 fe sbrs r0, 5
|
|
|
|
|
cae: 2d c0 rjmp .+90 ; 0xd0a <main+0x6c8>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
if(doorstatus == 0) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cb0: 31 10 cpse r3, r1
|
|
|
|
|
cb2: 58 c0 rjmp .+176 ; 0xd64 <main+0x722>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cb4: d7 01 movw r26, r14
|
|
|
|
|
cb6: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cb8: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
cba: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
cbc: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cbe: d4 01 movw r26, r8
|
|
|
|
|
cc0: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cc2: 84 e6 ldi r24, 0x64 ; 100
|
|
|
|
|
cc4: d3 01 movw r26, r6
|
|
|
|
|
cc6: 8c 93 st X, r24
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
cc8: d2 01 movw r26, r4
|
|
|
|
|
cca: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
ccc: d6 01 movw r26, r12
|
|
|
|
|
cce: 1c 92 st X, r1
|
|
|
|
|
cd0: ad e6 ldi r26, 0x6D ; 109
|
|
|
|
|
cd2: b1 e0 ldi r27, 0x01 ; 1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cd4: 94 e5 ldi r25, 0x54 ; 84
|
|
|
|
|
cd6: 9d 01 movw r18, r26
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cd8: 80 81 ld r24, Z
|
|
|
|
|
cda: 85 ff sbrs r24, 5
|
|
|
|
|
cdc: fd cf rjmp .-6 ; 0xcd8 <main+0x696>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cde: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
ce0: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
ce2: 9c 93 st X, r25
|
2015-02-09 18:10:07 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ce4: d9 01 movw r26, r18
|
|
|
|
|
ce6: 9d 91 ld r25, X+
|
|
|
|
|
ce8: 9d 01 movw r18, r26
|
|
|
|
|
cea: 91 11 cpse r25, r1
|
|
|
|
|
cec: f5 cf rjmp .-22 ; 0xcd8 <main+0x696>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cee: 80 81 ld r24, Z
|
|
|
|
|
cf0: 85 ff sbrs r24, 5
|
|
|
|
|
cf2: fd cf rjmp .-6 ; 0xcee <main+0x6ac>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cf4: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
cf6: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
cf8: bc 92 st X, r11
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
cfa: 80 81 ld r24, Z
|
|
|
|
|
cfc: 85 ff sbrs r24, 5
|
|
|
|
|
cfe: fd cf rjmp .-6 ; 0xcfa <main+0x6b8>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d00: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
d02: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
d04: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
doorstatus = 1;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d06: 3a 2c mov r3, r10
|
|
|
|
|
d08: 2d c0 rjmp .+90 ; 0xd64 <main+0x722>
|
2015-02-09 18:10:07 +01:00
|
|
|
|
stripe.fadeto(0xFF,0x00,0x00,100);
|
|
|
|
|
Serial.println("T<>r Zu...");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if(doorstatus == 1) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d0a: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
d0c: 3b 12 cpse r3, r27
|
|
|
|
|
d0e: 2a c0 rjmp .+84 ; 0xd64 <main+0x722>
|
|
|
|
|
d10: a7 e7 ldi r26, 0x77 ; 119
|
|
|
|
|
d12: b1 e0 ldi r27, 0x01 ; 1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
2014-11-19 23:57:35 +01:00
|
|
|
|
}
|
2015-02-08 00:22:32 +01:00
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d14: 94 e5 ldi r25, 0x54 ; 84
|
|
|
|
|
d16: 9d 01 movw r18, r26
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d18: 80 81 ld r24, Z
|
|
|
|
|
d1a: 85 ff sbrs r24, 5
|
|
|
|
|
d1c: fd cf rjmp .-6 ; 0xd18 <main+0x6d6>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d1e: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
d20: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
d22: 9c 93 st X, r25
|
2015-02-08 00:22:32 +01:00
|
|
|
|
sei();
|
|
|
|
|
init();
|
|
|
|
|
println("Uart done!");
|
|
|
|
|
}
|
|
|
|
|
void print(const char *text) {
|
|
|
|
|
while (*text)
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d24: d9 01 movw r26, r18
|
|
|
|
|
d26: 9d 91 ld r25, X+
|
|
|
|
|
d28: 9d 01 movw r18, r26
|
|
|
|
|
d2a: 91 11 cpse r25, r1
|
|
|
|
|
d2c: f5 cf rjmp .-22 ; 0xd18 <main+0x6d6>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d2e: 80 81 ld r24, Z
|
|
|
|
|
d30: 85 ff sbrs r24, 5
|
|
|
|
|
d32: fd cf rjmp .-6 ; 0xd2e <main+0x6ec>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d34: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
d36: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
d38: bc 92 st X, r11
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UCSR0A= (0<<RXC0) | (0<<TXC0) | (0<<UDRE0) | (0<<FE0) | (0<<DOR0) | (0<<UPE0) | (0<<U2X0) | (0<<MPCM0);
|
|
|
|
|
UCSR0B= (0<<RXCIE0) | (0<<TXCIE0) | (0<<UDRIE0) | (0<<RXEN0) | (1<<TXEN0) | (0<<UCSZ02) | (0<<RXB80) | (0<<TXB80); //Enable TXEN im Register UCR TX-Data Enable
|
|
|
|
|
UCSR0C= (0<<UMSEL01) | (0<<UMSEL00) | (0<<UPM01) | (0<<UPM00) | (0<<USBS0) | (1<<UCSZ01) | (1<<UCSZ00) | (0<<UCPOL0); //8N1
|
|
|
|
|
}
|
|
|
|
|
uint8_t uart_putchar(uint8_t c) {
|
|
|
|
|
loop_until_bit_is_set(UCSR0A, UDRE0); //Ausgabe des Zeichens
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d3a: 80 81 ld r24, Z
|
|
|
|
|
d3c: 85 ff sbrs r24, 5
|
|
|
|
|
d3e: fd cf rjmp .-6 ; 0xd3a <main+0x6f8>
|
2014-11-19 23:57:35 +01:00
|
|
|
|
UDR0 = c;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d40: a6 ec ldi r26, 0xC6 ; 198
|
|
|
|
|
d42: b0 e0 ldi r27, 0x00 ; 0
|
|
|
|
|
d44: 2c 92 st X, r2
|
2015-02-09 18:10:07 +01:00
|
|
|
|
}
|
|
|
|
|
void setfadecolor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue, uint8_t time) {
|
|
|
|
|
this->fademap[0][index] = red;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d46: d7 01 movw r26, r14
|
|
|
|
|
d48: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[1][index] = green;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d4a: af e8 ldi r26, 0x8F ; 143
|
|
|
|
|
d4c: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
d4e: 1c 93 st X, r17
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[2][index] = blue;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d50: d4 01 movw r26, r8
|
|
|
|
|
d52: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->fademap[3][index] = time;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d54: 82 e3 ldi r24, 0x32 ; 50
|
|
|
|
|
d56: d3 01 movw r26, r6
|
|
|
|
|
d58: 8c 93 st X, r24
|
2015-02-09 18:10:07 +01:00
|
|
|
|
this->setfadecolor(0, red, green, blue, time);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
this->fade(1);
|
|
|
|
|
}
|
|
|
|
|
void fade(uint8_t num) {
|
|
|
|
|
if(num <= max_map_size && num >= 0) {
|
|
|
|
|
this->fade_zylk = num;
|
|
|
|
|
d5a: d2 01 movw r26, r4
|
|
|
|
|
d5c: ac 92 st X, r10
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this->fade_zylk = 0;
|
|
|
|
|
}
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
d5e: d6 01 movw r26, r12
|
|
|
|
|
d60: 1c 92 st X, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
doorstatus = 0;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d62: 31 2c mov r3, r1
|
|
|
|
|
d64: 87 e8 ldi r24, 0x87 ; 135
|
|
|
|
|
d66: 93 e1 ldi r25, 0x13 ; 19
|
|
|
|
|
d68: 01 97 sbiw r24, 0x01 ; 1
|
|
|
|
|
d6a: f1 f7 brne .-4 ; 0xd68 <main+0x726>
|
|
|
|
|
d6c: 00 c0 rjmp .+0 ; 0xd6e <main+0x72c>
|
|
|
|
|
d6e: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
2014-11-19 23:57:35 +01:00
|
|
|
|
|
2015-02-08 00:22:32 +01:00
|
|
|
|
struct portb
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTB; }
|
|
|
|
|
static void port(uint8_t v) { PORTB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d70: 29 98 cbi 0x05, 1 ; 5
|
|
|
|
|
d72: 9f ed ldi r25, 0xDF ; 223
|
|
|
|
|
d74: aa e0 ldi r26, 0x0A ; 10
|
|
|
|
|
d76: b6 e0 ldi r27, 0x06 ; 6
|
|
|
|
|
d78: 91 50 subi r25, 0x01 ; 1
|
|
|
|
|
d7a: a0 40 sbci r26, 0x00 ; 0
|
|
|
|
|
d7c: b0 40 sbci r27, 0x00 ; 0
|
|
|
|
|
d7e: e1 f7 brne .-8 ; 0xd78 <main+0x736>
|
|
|
|
|
d80: 00 c0 rjmp .+0 ; 0xd82 <main+0x740>
|
|
|
|
|
d82: 00 00 nop
|
|
|
|
|
d84: 29 9a sbi 0x05, 1 ; 5
|
|
|
|
|
d86: eb cc rjmp .-1578 ; 0x75e <main+0x11c>
|
|
|
|
|
|
|
|
|
|
00000d88 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE4initEv>:
|
|
|
|
|
d88: 55 9a sbi 0x0a, 5 ; 10
|
|
|
|
|
d8a: 53 9a sbi 0x0a, 3 ; 10
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
static uint8_t pin() { return PINB; }
|
|
|
|
|
static void pin(uint8_t v) { PINB = v; }
|
|
|
|
|
|
|
|
|
|
static uint8_t dir() { return DDRB; }
|
|
|
|
|
static void dir(uint8_t v) { DDRB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d8c: 23 9a sbi 0x04, 3 ; 4
|
|
|
|
|
uint8_t _l;
|
2015-02-09 18:10:07 +01:00
|
|
|
|
void init() {
|
|
|
|
|
stripered::make_output();
|
|
|
|
|
stripegreen::make_output();
|
|
|
|
|
stripeblue::make_output();
|
|
|
|
|
this->fade_zylk = 0;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d8e: fc 01 movw r30, r24
|
|
|
|
|
d90: 10 82 st Z, r1
|
|
|
|
|
this->_l = 0;
|
|
|
|
|
d92: 11 aa std Z+49, r1 ; 0x31
|
2015-02-08 00:22:32 +01:00
|
|
|
|
// Mode: Phase correct PWM top=0xFF
|
|
|
|
|
// OC0A output: Disconnected
|
|
|
|
|
// Timer Period: 0,06375 ms
|
|
|
|
|
// Output Pulse(s):
|
|
|
|
|
// OC0B Period: 0,06375 ms Width: 0 us
|
|
|
|
|
TCCR0A=(0<<COM0A1) | (0<<COM0A0) | (0<<COM0B0) | (0<<WGM01) | (1<<WGM00);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d94: 81 e0 ldi r24, 0x01 ; 1
|
|
|
|
|
d96: 84 bd out 0x24, r24 ; 36
|
2015-02-08 00:22:32 +01:00
|
|
|
|
TCCR0B=(0<<WGM02) | (1<<CS02) | (0<<CS01) | (0<<CS00);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d98: 94 e0 ldi r25, 0x04 ; 4
|
|
|
|
|
d9a: 95 bd out 0x25, r25 ; 37
|
2015-02-08 00:22:32 +01:00
|
|
|
|
TCNT0=0x00;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d9c: 16 bc out 0x26, r1 ; 38
|
2015-02-09 18:10:07 +01:00
|
|
|
|
// Timer Period: 3,2768 ms
|
|
|
|
|
// Timer1 Overflow Interrupt: On
|
|
|
|
|
// Input Capture Interrupt: Off
|
|
|
|
|
// Compare A Match Interrupt: Off
|
|
|
|
|
// Compare B Match Interrupt: Off
|
|
|
|
|
TCCR1A=(0<<COM1A1) | (0<<COM1A0) | (0<<COM1B1) | (0<<COM1B0) | (0<<WGM11) | (0<<WGM10);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
d9e: 10 92 80 00 sts 0x0080, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
TCCR1B=(0<<ICNC1) | (0<<ICES1) | (0<<WGM13) | (0<<WGM12) | (0<<CS12) | (1<<CS11) | (0<<CS10);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
da2: 92 e0 ldi r25, 0x02 ; 2
|
|
|
|
|
da4: 90 93 81 00 sts 0x0081, r25
|
2015-02-09 18:10:07 +01:00
|
|
|
|
TCNT1H=0x00;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
da8: 10 92 85 00 sts 0x0085, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
TCNT1L=0x00;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dac: 10 92 84 00 sts 0x0084, r1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
// Mode: Phase correct PWM top=0xFF
|
|
|
|
|
// Timer Period: 0,06375 ms
|
|
|
|
|
// Output Pulse(s):
|
|
|
|
|
// OC2A Period: 0,06375 ms Width: 0 us
|
|
|
|
|
// OC2B Period: 0,06375 ms Width: 0 us
|
|
|
|
|
ASSR=(0<<EXCLK) | (0<<AS2);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
db0: 10 92 b6 00 sts 0x00B6, r1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
TCCR2A=(0<<COM2A0) | (0<<COM2B0) | (0<<WGM21) | (1<<WGM20);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
db4: e0 eb ldi r30, 0xB0 ; 176
|
|
|
|
|
db6: f0 e0 ldi r31, 0x00 ; 0
|
|
|
|
|
db8: 80 83 st Z, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
TCCR2B=(0<<WGM22) | (1<<CS22) | (0<<CS21) | (1<<CS20);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dba: 95 e0 ldi r25, 0x05 ; 5
|
|
|
|
|
dbc: 90 93 b1 00 sts 0x00B1, r25
|
2015-02-08 00:22:32 +01:00
|
|
|
|
TCNT2=0x00;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dc0: 10 92 b2 00 sts 0x00B2, r1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
// Timer/Counter 0 Interrupt(s) initialization
|
|
|
|
|
TIMSK0=(0<<OCIE0B) | (0<<OCIE0A) | (0<<TOIE0);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dc4: 10 92 6e 00 sts 0x006E, r1
|
2015-02-09 18:10:07 +01:00
|
|
|
|
// Timer/Counter 1 Interrupt(s) initialization
|
|
|
|
|
TIMSK1=(0<<ICIE1) | (0<<OCIE1B) | (0<<OCIE1A) | (1<<TOIE1);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dc8: 80 93 6f 00 sts 0x006F, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
// Timer/Counter 2 Interrupt(s) initialization
|
|
|
|
|
TIMSK2=(0<<OCIE2B) | (0<<OCIE2A) | (0<<TOIE2);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dcc: 10 92 70 00 sts 0x0070, r1
|
2014-11-19 23:57:35 +01:00
|
|
|
|
}
|
2015-02-08 00:22:32 +01:00
|
|
|
|
void timerOn() {
|
|
|
|
|
// OC0B output: Non-Inverted PWM
|
|
|
|
|
// OC2A output: Non-Inverted PWM
|
|
|
|
|
// OC2B output: Non-Inverted PWM
|
|
|
|
|
TCCR0A |= (1<<COM0B1);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dd0: 84 b5 in r24, 0x24 ; 36
|
|
|
|
|
dd2: 80 62 ori r24, 0x20 ; 32
|
|
|
|
|
dd4: 84 bd out 0x24, r24 ; 36
|
2015-02-08 00:22:32 +01:00
|
|
|
|
TCCR2A |= (1<<COM2A1) | (1<<COM2B1);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dd6: 80 81 ld r24, Z
|
|
|
|
|
dd8: 80 6a ori r24, 0xA0 ; 160
|
|
|
|
|
dda: 80 83 st Z, r24
|
2015-02-10 12:05:04 +01:00
|
|
|
|
this->initTimer();
|
|
|
|
|
this->color(0, 0, 0);
|
|
|
|
|
}
|
|
|
|
|
void sp(uint8_t i, uint8_t c) {
|
|
|
|
|
switch(i) {
|
|
|
|
|
case 0: OCR0B = c; break; //ROT
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ddc: 18 bc out 0x28, r1 ; 40
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 1: OCR2B = c; break; //GR<47>N
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dde: 10 92 b4 00 sts 0x00B4, r1
|
2015-02-10 12:05:04 +01:00
|
|
|
|
case 2: OCR2A = c; break; //BLAU
|
2015-02-11 18:10:07 +01:00
|
|
|
|
de2: 10 92 b3 00 sts 0x00B3, r1
|
|
|
|
|
de6: 08 95 ret
|
2015-02-10 12:05:04 +01:00
|
|
|
|
|
2015-02-11 18:10:07 +01:00
|
|
|
|
00000de8 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv>:
|
2015-02-08 00:22:32 +01:00
|
|
|
|
// Interrupt on any change on pins PCINT16-23: Off
|
|
|
|
|
EICRA=(0<<ISC11) | (0<<ISC10) | (1<<ISC01) | (0<<ISC00);
|
|
|
|
|
EIMSK=(0<<INT1) | (1<<INT0);
|
|
|
|
|
EIFR=(0<<INTF1) | (0<<INTF0);
|
|
|
|
|
}
|
|
|
|
|
uint8_t read8bit() {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
de8: 20 e0 ldi r18, 0x00 ; 0
|
|
|
|
|
dea: 30 e0 ldi r19, 0x00 ; 0
|
2015-02-08 00:22:32 +01:00
|
|
|
|
uint8_t r = 0;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dec: 80 e0 ldi r24, 0x00 ; 0
|
2015-02-08 00:22:32 +01:00
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
|
|
|
|
r |= (1<<i);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
dee: 61 e0 ldi r22, 0x01 ; 1
|
|
|
|
|
df0: 70 e0 ldi r23, 0x00 ; 0
|
2015-02-08 00:22:32 +01:00
|
|
|
|
static void set_high() { set(true); }
|
|
|
|
|
static void set_low() { set(false); }
|
|
|
|
|
static bool read() { return value(); }
|
|
|
|
|
static void pullup() { set_high(); }
|
|
|
|
|
|
|
|
|
|
static void wait_is_set() { do { } while (!(Port::pin() & (1<<Pin))); }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
df2: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
df4: fe cf rjmp .-4 ; 0xdf2 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0xa>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
#else
|
|
|
|
|
//round up by default
|
|
|
|
|
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
df6: ef e9 ldi r30, 0x9F ; 159
|
|
|
|
|
df8: ff e0 ldi r31, 0x0F ; 15
|
|
|
|
|
dfa: 31 97 sbiw r30, 0x01 ; 1
|
|
|
|
|
dfc: f1 f7 brne .-4 ; 0xdfa <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x12>
|
|
|
|
|
dfe: 00 c0 rjmp .+0 ; 0xe00 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x18>
|
|
|
|
|
e00: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
uint8_t read8bit() {
|
|
|
|
|
uint8_t r = 0;
|
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e02: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
e04: 08 c0 rjmp .+16 ; 0xe16 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x2e>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
r |= (1<<i);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e06: ab 01 movw r20, r22
|
|
|
|
|
e08: 02 2e mov r0, r18
|
|
|
|
|
e0a: 02 c0 rjmp .+4 ; 0xe10 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x28>
|
|
|
|
|
e0c: 44 0f add r20, r20
|
|
|
|
|
e0e: 55 1f adc r21, r21
|
|
|
|
|
e10: 0a 94 dec r0
|
|
|
|
|
e12: e2 f7 brpl .-8 ; 0xe0c <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x24>
|
|
|
|
|
e14: 84 2b or r24, r20
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
for(uint8_t j=0;j<50;j++) {
|
|
|
|
|
if(!intpin::value()) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e16: 4a 99 sbic 0x09, 2 ; 9
|
|
|
|
|
e18: 0f c0 rjmp .+30 ; 0xe38 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x50>
|
|
|
|
|
e1a: 08 c0 rjmp .+16 ; 0xe2c <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x44>
|
|
|
|
|
e1c: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
e1e: 06 c0 rjmp .+12 ; 0xe2c <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x44>
|
|
|
|
|
e20: f5 e8 ldi r31, 0x85 ; 133
|
|
|
|
|
e22: fa 95 dec r31
|
|
|
|
|
e24: f1 f7 brne .-4 ; 0xe22 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x3a>
|
|
|
|
|
e26: 00 00 nop
|
|
|
|
|
e28: 91 50 subi r25, 0x01 ; 1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
|
|
|
|
r |= (1<<i);
|
|
|
|
|
}
|
|
|
|
|
for(uint8_t j=0;j<50;j++) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e2a: c1 f7 brne .-16 ; 0xe1c <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x34>
|
|
|
|
|
e2c: 2f 5f subi r18, 0xFF ; 255
|
|
|
|
|
e2e: 3f 4f sbci r19, 0xFF ; 255
|
2015-02-08 00:22:32 +01:00
|
|
|
|
EIMSK=(0<<INT1) | (1<<INT0);
|
|
|
|
|
EIFR=(0<<INTF1) | (0<<INTF0);
|
|
|
|
|
}
|
|
|
|
|
uint8_t read8bit() {
|
|
|
|
|
uint8_t r = 0;
|
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e30: 28 30 cpi r18, 0x08 ; 8
|
|
|
|
|
e32: 31 05 cpc r19, r1
|
|
|
|
|
e34: f1 f6 brne .-68 ; 0xdf2 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0xa>
|
|
|
|
|
e36: 08 95 ret
|
|
|
|
|
e38: 45 e8 ldi r20, 0x85 ; 133
|
|
|
|
|
e3a: 4a 95 dec r20
|
|
|
|
|
e3c: f1 f7 brne .-4 ; 0xe3a <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x52>
|
|
|
|
|
e3e: 00 00 nop
|
|
|
|
|
e40: 91 e3 ldi r25, 0x31 ; 49
|
|
|
|
|
e42: ec cf rjmp .-40 ; 0xe1c <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv+0x34>
|
|
|
|
|
|
|
|
|
|
00000e44 <__vector_1>:
|
2015-02-08 00:22:32 +01:00
|
|
|
|
_delay_ms(99);
|
|
|
|
|
led.green(1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ISR(INT0_vect) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e44: 1f 92 push r1
|
|
|
|
|
e46: 0f 92 push r0
|
|
|
|
|
e48: 0f b6 in r0, 0x3f ; 63
|
|
|
|
|
e4a: 0f 92 push r0
|
|
|
|
|
e4c: 11 24 eor r1, r1
|
|
|
|
|
e4e: 2f 93 push r18
|
|
|
|
|
e50: 3f 93 push r19
|
|
|
|
|
e52: 4f 93 push r20
|
|
|
|
|
e54: 5f 93 push r21
|
|
|
|
|
e56: 6f 93 push r22
|
|
|
|
|
e58: 7f 93 push r23
|
|
|
|
|
e5a: 8f 93 push r24
|
|
|
|
|
e5c: 9f 93 push r25
|
|
|
|
|
e5e: af 93 push r26
|
|
|
|
|
e60: bf 93 push r27
|
|
|
|
|
e62: cf 93 push r28
|
|
|
|
|
e64: ef 93 push r30
|
|
|
|
|
e66: ff 93 push r31
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portb
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTB; }
|
|
|
|
|
static void port(uint8_t v) { PORTB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e68: 28 9a sbi 0x05, 0 ; 5
|
2015-02-08 00:22:32 +01:00
|
|
|
|
public:
|
|
|
|
|
IR() {
|
|
|
|
|
this->init();
|
|
|
|
|
}
|
|
|
|
|
int read() {
|
|
|
|
|
if(intpin::value()) { //Is High, Abbort
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e6a: 4a 99 sbic 0x09, 2 ; 9
|
|
|
|
|
e6c: 79 c0 rjmp .+242 ; 0xf60 <__vector_1+0x11c>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
#else
|
|
|
|
|
//round up by default
|
|
|
|
|
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e6e: 8f e1 ldi r24, 0x1F ; 31
|
|
|
|
|
e70: 9e e4 ldi r25, 0x4E ; 78
|
|
|
|
|
e72: 01 97 sbiw r24, 0x01 ; 1
|
|
|
|
|
e74: f1 f7 brne .-4 ; 0xe72 <__vector_1+0x2e>
|
|
|
|
|
e76: 00 c0 rjmp .+0 ; 0xe78 <__vector_1+0x34>
|
|
|
|
|
e78: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
return 254;
|
2014-11-19 23:57:35 +01:00
|
|
|
|
}
|
2015-02-08 00:22:32 +01:00
|
|
|
|
_delay_ms(4); //Wait 4ms
|
|
|
|
|
if(intpin::value()) { //Is High, Abbort
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e7a: 4a 99 sbic 0x09, 2 ; 9
|
|
|
|
|
e7c: 71 c0 rjmp .+226 ; 0xf60 <__vector_1+0x11c>
|
|
|
|
|
e7e: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
e80: fe cf rjmp .-4 ; 0xe7e <__vector_1+0x3a>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
static void wait_is_clear() { do {} while ((Port::pin() & (1<<Pin))); }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e82: 4a 99 sbic 0x09, 2 ; 9
|
|
|
|
|
e84: fe cf rjmp .-4 ; 0xe82 <__vector_1+0x3e>
|
|
|
|
|
e86: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
|
e88: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
e8a: 60 e0 ldi r22, 0x00 ; 0
|
2015-02-08 00:22:32 +01:00
|
|
|
|
uint8_t r = 0;
|
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
|
|
|
|
r |= (1<<i);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e8c: 41 e0 ldi r20, 0x01 ; 1
|
|
|
|
|
e8e: 50 e0 ldi r21, 0x00 ; 0
|
2015-02-08 00:22:32 +01:00
|
|
|
|
static void set_high() { set(true); }
|
|
|
|
|
static void set_low() { set(false); }
|
|
|
|
|
static bool read() { return value(); }
|
|
|
|
|
static void pullup() { set_high(); }
|
|
|
|
|
|
|
|
|
|
static void wait_is_set() { do { } while (!(Port::pin() & (1<<Pin))); }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e90: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
e92: fe cf rjmp .-4 ; 0xe90 <__vector_1+0x4c>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
#else
|
|
|
|
|
//round up by default
|
|
|
|
|
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
e94: ef e9 ldi r30, 0x9F ; 159
|
|
|
|
|
e96: ff e0 ldi r31, 0x0F ; 15
|
|
|
|
|
e98: 31 97 sbiw r30, 0x01 ; 1
|
|
|
|
|
e9a: f1 f7 brne .-4 ; 0xe98 <__vector_1+0x54>
|
|
|
|
|
e9c: 00 c0 rjmp .+0 ; 0xe9e <__vector_1+0x5a>
|
|
|
|
|
e9e: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
uint8_t read8bit() {
|
|
|
|
|
uint8_t r = 0;
|
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ea0: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
ea2: 08 c0 rjmp .+16 ; 0xeb4 <__vector_1+0x70>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
r |= (1<<i);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ea4: 9a 01 movw r18, r20
|
|
|
|
|
ea6: 08 2e mov r0, r24
|
|
|
|
|
ea8: 02 c0 rjmp .+4 ; 0xeae <__vector_1+0x6a>
|
|
|
|
|
eaa: 22 0f add r18, r18
|
|
|
|
|
eac: 33 1f adc r19, r19
|
|
|
|
|
eae: 0a 94 dec r0
|
|
|
|
|
eb0: e2 f7 brpl .-8 ; 0xeaa <__vector_1+0x66>
|
|
|
|
|
eb2: 62 2b or r22, r18
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
for(uint8_t j=0;j<50;j++) {
|
|
|
|
|
if(!intpin::value()) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
eb4: 4a 99 sbic 0x09, 2 ; 9
|
|
|
|
|
eb6: 66 c0 rjmp .+204 ; 0xf84 <__vector_1+0x140>
|
|
|
|
|
eb8: 08 c0 rjmp .+16 ; 0xeca <__vector_1+0x86>
|
|
|
|
|
eba: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
ebc: 06 c0 rjmp .+12 ; 0xeca <__vector_1+0x86>
|
|
|
|
|
ebe: f5 e8 ldi r31, 0x85 ; 133
|
|
|
|
|
ec0: fa 95 dec r31
|
|
|
|
|
ec2: f1 f7 brne .-4 ; 0xec0 <__vector_1+0x7c>
|
|
|
|
|
ec4: 00 00 nop
|
|
|
|
|
ec6: 21 50 subi r18, 0x01 ; 1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
|
|
|
|
r |= (1<<i);
|
|
|
|
|
}
|
|
|
|
|
for(uint8_t j=0;j<50;j++) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ec8: c1 f7 brne .-16 ; 0xeba <__vector_1+0x76>
|
|
|
|
|
eca: 01 96 adiw r24, 0x01 ; 1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
EIMSK=(0<<INT1) | (1<<INT0);
|
|
|
|
|
EIFR=(0<<INTF1) | (0<<INTF0);
|
|
|
|
|
}
|
|
|
|
|
uint8_t read8bit() {
|
|
|
|
|
uint8_t r = 0;
|
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ecc: 88 30 cpi r24, 0x08 ; 8
|
|
|
|
|
ece: 91 05 cpc r25, r1
|
|
|
|
|
ed0: f9 f6 brne .-66 ; 0xe90 <__vector_1+0x4c>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
intpin::wait_is_set(); //Wait for the rest of the init.
|
|
|
|
|
intpin::wait_is_clear(); // Init Complete, wait for first Byte
|
|
|
|
|
|
|
|
|
|
//Read First Byte must be 0!
|
|
|
|
|
if(this->read8bit() != 0) { //Is first Byte not 0 Abbort;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ed2: 61 11 cpse r22, r1
|
|
|
|
|
ed4: 39 c0 rjmp .+114 ; 0xf48 <__vector_1+0x104>
|
|
|
|
|
ed6: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
|
ed8: 90 e0 ldi r25, 0x00 ; 0
|
2015-02-08 00:22:32 +01:00
|
|
|
|
uint8_t r = 0;
|
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
|
|
|
|
r |= (1<<i);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
eda: 41 e0 ldi r20, 0x01 ; 1
|
|
|
|
|
edc: 50 e0 ldi r21, 0x00 ; 0
|
|
|
|
|
ede: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
ee0: fe cf rjmp .-4 ; 0xede <__vector_1+0x9a>
|
|
|
|
|
ee2: ef e9 ldi r30, 0x9F ; 159
|
|
|
|
|
ee4: ff e0 ldi r31, 0x0F ; 15
|
|
|
|
|
ee6: 31 97 sbiw r30, 0x01 ; 1
|
|
|
|
|
ee8: f1 f7 brne .-4 ; 0xee6 <__vector_1+0xa2>
|
|
|
|
|
eea: 00 c0 rjmp .+0 ; 0xeec <__vector_1+0xa8>
|
|
|
|
|
eec: 00 00 nop
|
2015-02-08 00:22:32 +01:00
|
|
|
|
uint8_t read8bit() {
|
|
|
|
|
uint8_t r = 0;
|
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
eee: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
ef0: 08 c0 rjmp .+16 ; 0xf02 <__vector_1+0xbe>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
r |= (1<<i);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ef2: 9a 01 movw r18, r20
|
|
|
|
|
ef4: 08 2e mov r0, r24
|
|
|
|
|
ef6: 02 c0 rjmp .+4 ; 0xefc <__vector_1+0xb8>
|
|
|
|
|
ef8: 22 0f add r18, r18
|
|
|
|
|
efa: 33 1f adc r19, r19
|
|
|
|
|
efc: 0a 94 dec r0
|
|
|
|
|
efe: e2 f7 brpl .-8 ; 0xef8 <__vector_1+0xb4>
|
|
|
|
|
f00: 62 2b or r22, r18
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
for(uint8_t j=0;j<50;j++) {
|
|
|
|
|
if(!intpin::value()) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f02: 4a 99 sbic 0x09, 2 ; 9
|
|
|
|
|
f04: 39 c0 rjmp .+114 ; 0xf78 <__vector_1+0x134>
|
|
|
|
|
f06: 08 c0 rjmp .+16 ; 0xf18 <__vector_1+0xd4>
|
|
|
|
|
f08: 4a 9b sbis 0x09, 2 ; 9
|
|
|
|
|
f0a: 06 c0 rjmp .+12 ; 0xf18 <__vector_1+0xd4>
|
|
|
|
|
f0c: f5 e8 ldi r31, 0x85 ; 133
|
|
|
|
|
f0e: fa 95 dec r31
|
|
|
|
|
f10: f1 f7 brne .-4 ; 0xf0e <__vector_1+0xca>
|
|
|
|
|
f12: 00 00 nop
|
|
|
|
|
f14: 21 50 subi r18, 0x01 ; 1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
intpin::wait_is_set();
|
|
|
|
|
_delay_us(800);
|
|
|
|
|
if(intpin::read()) {
|
|
|
|
|
r |= (1<<i);
|
|
|
|
|
}
|
|
|
|
|
for(uint8_t j=0;j<50;j++) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f16: c1 f7 brne .-16 ; 0xf08 <__vector_1+0xc4>
|
|
|
|
|
f18: 01 96 adiw r24, 0x01 ; 1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
EIMSK=(0<<INT1) | (1<<INT0);
|
|
|
|
|
EIFR=(0<<INTF1) | (0<<INTF0);
|
|
|
|
|
}
|
|
|
|
|
uint8_t read8bit() {
|
|
|
|
|
uint8_t r = 0;
|
|
|
|
|
for (uint8_t i=0;i<8;i++) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f1a: 88 30 cpi r24, 0x08 ; 8
|
|
|
|
|
f1c: 91 05 cpc r25, r1
|
|
|
|
|
f1e: f9 f6 brne .-66 ; 0xede <__vector_1+0x9a>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
//Read First Byte must be 0!
|
|
|
|
|
if(this->read8bit() != 0) { //Is first Byte not 0 Abbort;
|
|
|
|
|
return 255;
|
|
|
|
|
}
|
|
|
|
|
//Read Second Byte must be 239!
|
|
|
|
|
if(this->read8bit() != 239) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f20: 6f 3e cpi r22, 0xEF ; 239
|
|
|
|
|
f22: 91 f4 brne .+36 ; 0xf48 <__vector_1+0x104>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
return 255;
|
|
|
|
|
}
|
|
|
|
|
//Read Byte 3 and 4 (Data Byte and Checksum Byte!
|
|
|
|
|
uint8_t a = this->read8bit();
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f24: 84 e8 ldi r24, 0x84 ; 132
|
|
|
|
|
f26: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
f28: 0e 94 f4 06 call 0xde8 ; 0xde8 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv>
|
|
|
|
|
f2c: c8 2f mov r28, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
uint8_t b = this->read8bit();
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f2e: 84 e8 ldi r24, 0x84 ; 132
|
|
|
|
|
f30: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
f32: 0e 94 f4 06 call 0xde8 ; 0xde8 <_ZN2IRIN6avrlib5portdELi2E3LedINS0_5portbELi0ELi1EEE8read8bitEv>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
//Make Checksum Byte 3 + 4 must be 255!
|
|
|
|
|
if(a+b != 255) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f36: 28 2f mov r18, r24
|
|
|
|
|
f38: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
f3a: 2c 0f add r18, r28
|
|
|
|
|
f3c: 31 1d adc r19, r1
|
|
|
|
|
f3e: 2f 3f cpi r18, 0xFF ; 255
|
|
|
|
|
f40: 31 05 cpc r19, r1
|
|
|
|
|
f42: 11 f4 brne .+4 ; 0xf48 <__vector_1+0x104>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
//The Interrupt Function
|
|
|
|
|
void interrupt() {
|
|
|
|
|
led.red(1);
|
|
|
|
|
uint8_t code = this->read();
|
|
|
|
|
if(code == 255) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f44: cf 3f cpi r28, 0xFF ; 255
|
|
|
|
|
f46: 51 f4 brne .+20 ; 0xf5c <__vector_1+0x118>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
#else
|
|
|
|
|
//round up by default
|
|
|
|
|
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f48: 2f e7 ldi r18, 0x7F ; 127
|
|
|
|
|
f4a: 34 e8 ldi r19, 0x84 ; 132
|
|
|
|
|
f4c: 8e e1 ldi r24, 0x1E ; 30
|
|
|
|
|
f4e: 21 50 subi r18, 0x01 ; 1
|
|
|
|
|
f50: 30 40 sbci r19, 0x00 ; 0
|
|
|
|
|
f52: 80 40 sbci r24, 0x00 ; 0
|
|
|
|
|
f54: e1 f7 brne .-8 ; 0xf4e <__vector_1+0x10a>
|
|
|
|
|
f56: 00 c0 rjmp .+0 ; 0xf58 <__vector_1+0x114>
|
|
|
|
|
f58: 00 00 nop
|
|
|
|
|
f5a: 0b c0 rjmp .+22 ; 0xf72 <__vector_1+0x12e>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
_delay_ms(500);
|
|
|
|
|
} else if(code == 254) {
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f5c: ce 3f cpi r28, 0xFE ; 254
|
|
|
|
|
f5e: 39 f4 brne .+14 ; 0xf6e <__vector_1+0x12a>
|
|
|
|
|
f60: e7 e8 ldi r30, 0x87 ; 135
|
|
|
|
|
f62: f3 e1 ldi r31, 0x13 ; 19
|
|
|
|
|
f64: 31 97 sbiw r30, 0x01 ; 1
|
|
|
|
|
f66: f1 f7 brne .-4 ; 0xf64 <__vector_1+0x120>
|
|
|
|
|
f68: 00 c0 rjmp .+0 ; 0xf6a <__vector_1+0x126>
|
|
|
|
|
f6a: 00 00 nop
|
|
|
|
|
f6c: 02 c0 rjmp .+4 ; 0xf72 <__vector_1+0x12e>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
_delay_ms(1);
|
|
|
|
|
} else {
|
|
|
|
|
this->_code = code;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f6e: c0 93 85 01 sts 0x0185, r28
|
|
|
|
|
f72: 28 98 cbi 0x05, 0 ; 5
|
2015-02-08 00:22:32 +01:00
|
|
|
|
}
|
|
|
|
|
led.red(0);
|
|
|
|
|
EIFR |= (1<<INTF0);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f74: e0 9a sbi 0x1c, 0 ; 28
|
|
|
|
|
f76: 0c c0 rjmp .+24 ; 0xf90 <__vector_1+0x14c>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
#else
|
|
|
|
|
//round up by default
|
|
|
|
|
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f78: f5 e8 ldi r31, 0x85 ; 133
|
|
|
|
|
f7a: fa 95 dec r31
|
|
|
|
|
f7c: f1 f7 brne .-4 ; 0xf7a <__vector_1+0x136>
|
|
|
|
|
f7e: 00 00 nop
|
|
|
|
|
f80: 21 e3 ldi r18, 0x31 ; 49
|
|
|
|
|
f82: c2 cf rjmp .-124 ; 0xf08 <__vector_1+0xc4>
|
|
|
|
|
f84: 25 e8 ldi r18, 0x85 ; 133
|
|
|
|
|
f86: 2a 95 dec r18
|
|
|
|
|
f88: f1 f7 brne .-4 ; 0xf86 <__vector_1+0x142>
|
|
|
|
|
f8a: 00 00 nop
|
|
|
|
|
f8c: 21 e3 ldi r18, 0x31 ; 49
|
|
|
|
|
f8e: 95 cf rjmp .-214 ; 0xeba <__vector_1+0x76>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
ir.interrupt();
|
|
|
|
|
}
|
2015-02-11 18:10:07 +01:00
|
|
|
|
f90: ff 91 pop r31
|
|
|
|
|
f92: ef 91 pop r30
|
|
|
|
|
f94: cf 91 pop r28
|
|
|
|
|
f96: bf 91 pop r27
|
|
|
|
|
f98: af 91 pop r26
|
|
|
|
|
f9a: 9f 91 pop r25
|
|
|
|
|
f9c: 8f 91 pop r24
|
|
|
|
|
f9e: 7f 91 pop r23
|
|
|
|
|
fa0: 6f 91 pop r22
|
|
|
|
|
fa2: 5f 91 pop r21
|
|
|
|
|
fa4: 4f 91 pop r20
|
|
|
|
|
fa6: 3f 91 pop r19
|
|
|
|
|
fa8: 2f 91 pop r18
|
|
|
|
|
faa: 0f 90 pop r0
|
|
|
|
|
fac: 0f be out 0x3f, r0 ; 63
|
|
|
|
|
fae: 0f 90 pop r0
|
|
|
|
|
fb0: 1f 90 pop r1
|
|
|
|
|
fb2: 18 95 reti
|
|
|
|
|
|
|
|
|
|
00000fb4 <_GLOBAL__sub_I_Serial>:
|
2015-02-08 00:22:32 +01:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "peripheral.h"
|
|
|
|
|
#include <util/delay.h>
|
|
|
|
|
|
|
|
|
|
uartclass Serial;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fb4: 8a eb ldi r24, 0xBA ; 186
|
|
|
|
|
fb6: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
fb8: 0e 94 b5 02 call 0x56a ; 0x56a <_ZN4UartILm9600EEC1Ev>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
template <typename PortR, int pin_red, typename PortG, int pin_green, typename PortB, int pin_blue>
|
|
|
|
|
class Stripe {
|
|
|
|
|
public:
|
|
|
|
|
Stripe() {
|
|
|
|
|
this->init();
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fbc: 88 e8 ldi r24, 0x88 ; 136
|
|
|
|
|
fbe: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
fc0: 0e 94 c4 06 call 0xd88 ; 0xd88 <_ZN6StripeIN6avrlib5portdELi5ES1_Li3ENS0_5portbELi3EE4initEv>
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
static uint8_t pin() { return PINB; }
|
|
|
|
|
static void pin(uint8_t v) { PINB = v; }
|
|
|
|
|
|
|
|
|
|
static uint8_t dir() { return DDRB; }
|
|
|
|
|
static void dir(uint8_t v) { DDRB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fc4: 20 9a sbi 0x04, 0 ; 4
|
|
|
|
|
fc6: 21 9a sbi 0x04, 1 ; 4
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portb
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTB; }
|
|
|
|
|
static void port(uint8_t v) { PORTB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fc8: 28 98 cbi 0x05, 0 ; 5
|
|
|
|
|
fca: 29 98 cbi 0x05, 1 ; 5
|
|
|
|
|
fcc: 56 98 cbi 0x0a, 6 ; 10
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portd
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTD; }
|
|
|
|
|
static void port(uint8_t v) { PORTD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fce: 5e 98 cbi 0x0b, 6 ; 11
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
static uint8_t pin() { return PIND; }
|
|
|
|
|
static void pin(uint8_t v) { PIND = v; }
|
|
|
|
|
|
|
|
|
|
static uint8_t dir() { return DDRD; }
|
|
|
|
|
static void dir(uint8_t v) { DDRD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fd0: 57 98 cbi 0x0a, 7 ; 10
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portd
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTD; }
|
|
|
|
|
static void port(uint8_t v) { PORTD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fd2: 5f 98 cbi 0x0b, 7 ; 11
|
2015-02-08 00:22:32 +01:00
|
|
|
|
// The Analog Comparator's positive input is
|
|
|
|
|
// connected to the AIN0 pin
|
|
|
|
|
// The Analog Comparator's negative input is
|
|
|
|
|
// connected to the AIN1 pin
|
|
|
|
|
// Analog Comparator Input Capture by Timer/Counter 1: Off
|
|
|
|
|
ACSR=(0<<ACD) | (0<<ACBG) | (0<<ACO) | (0<<ACI) | (0<<ACIE) | (0<<ACIC) | (0<<ACIS1) | (0<<ACIS0);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fd4: 10 be out 0x30, r1 ; 48
|
2015-02-08 00:22:32 +01:00
|
|
|
|
ADCSRB=(0<<ACME);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fd6: 10 92 7b 00 sts 0x007B, r1
|
2015-02-08 00:22:32 +01:00
|
|
|
|
// Digital input buffer on AIN0: Off
|
|
|
|
|
// Digital input buffer on AIN1: Off
|
|
|
|
|
DIDR1=(1<<AIN0D) | (1<<AIN1D);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fda: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
|
fdc: 80 93 7f 00 sts 0x007F, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
static uint8_t pin() { return PINB; }
|
|
|
|
|
static void pin(uint8_t v) { PINB = v; }
|
|
|
|
|
|
|
|
|
|
static uint8_t dir() { return DDRB; }
|
|
|
|
|
static void dir(uint8_t v) { DDRB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fe0: 20 9a sbi 0x04, 0 ; 4
|
|
|
|
|
fe2: 21 9a sbi 0x04, 1 ; 4
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portb
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTB; }
|
|
|
|
|
static void port(uint8_t v) { PORTB = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fe4: 28 98 cbi 0x05, 0 ; 5
|
|
|
|
|
fe6: 29 98 cbi 0x05, 1 ; 5
|
2015-02-08 00:22:32 +01:00
|
|
|
|
|
|
|
|
|
static uint8_t pin() { return PIND; }
|
|
|
|
|
static void pin(uint8_t v) { PIND = v; }
|
|
|
|
|
|
|
|
|
|
static uint8_t dir() { return DDRD; }
|
|
|
|
|
static void dir(uint8_t v) { DDRD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fe8: 52 98 cbi 0x0a, 2 ; 10
|
2015-02-08 00:22:32 +01:00
|
|
|
|
namespace avrlib {
|
|
|
|
|
|
|
|
|
|
struct portd
|
|
|
|
|
{
|
|
|
|
|
static uint8_t port() { return PORTD; }
|
|
|
|
|
static void port(uint8_t v) { PORTD = v; }
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fea: 5a 98 cbi 0x0b, 2 ; 11
|
2015-02-08 00:22:32 +01:00
|
|
|
|
private:
|
|
|
|
|
Led led;
|
|
|
|
|
uint8_t _code;
|
|
|
|
|
void init() {
|
|
|
|
|
intpin::make_input();
|
|
|
|
|
this->_code = 255;
|
2015-02-11 18:10:07 +01:00
|
|
|
|
fec: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
fee: 80 93 85 01 sts 0x0185, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
// INT0 Mode: Falling Edge
|
|
|
|
|
// INT1: Off
|
|
|
|
|
// Interrupt on any change on pins PCINT0-7: Off
|
|
|
|
|
// Interrupt on any change on pins PCINT8-14: Off
|
|
|
|
|
// Interrupt on any change on pins PCINT16-23: Off
|
|
|
|
|
EICRA=(0<<ISC11) | (0<<ISC10) | (1<<ISC01) | (0<<ISC00);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ff2: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
|
ff4: 80 93 69 00 sts 0x0069, r24
|
2015-02-08 00:22:32 +01:00
|
|
|
|
EIMSK=(0<<INT1) | (1<<INT0);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ff8: 81 e0 ldi r24, 0x01 ; 1
|
|
|
|
|
ffa: 8d bb out 0x1d, r24 ; 29
|
2015-02-08 00:22:32 +01:00
|
|
|
|
EIFR=(0<<INTF1) | (0<<INTF0);
|
2015-02-11 18:10:07 +01:00
|
|
|
|
ffc: 1c ba out 0x1c, r1 ; 28
|
|
|
|
|
ffe: 08 95 ret
|
|
|
|
|
|
|
|
|
|
00001000 <__subsf3>:
|
|
|
|
|
1000: 50 58 subi r21, 0x80 ; 128
|
|
|
|
|
|
|
|
|
|
00001002 <__addsf3>:
|
|
|
|
|
1002: bb 27 eor r27, r27
|
|
|
|
|
1004: aa 27 eor r26, r26
|
|
|
|
|
1006: 0e d0 rcall .+28 ; 0x1024 <__addsf3x>
|
|
|
|
|
1008: 08 c1 rjmp .+528 ; 0x121a <__fp_round>
|
|
|
|
|
100a: f9 d0 rcall .+498 ; 0x11fe <__fp_pscA>
|
|
|
|
|
100c: 30 f0 brcs .+12 ; 0x101a <__addsf3+0x18>
|
|
|
|
|
100e: fe d0 rcall .+508 ; 0x120c <__fp_pscB>
|
|
|
|
|
1010: 20 f0 brcs .+8 ; 0x101a <__addsf3+0x18>
|
|
|
|
|
1012: 31 f4 brne .+12 ; 0x1020 <__addsf3+0x1e>
|
|
|
|
|
1014: 9f 3f cpi r25, 0xFF ; 255
|
|
|
|
|
1016: 11 f4 brne .+4 ; 0x101c <__addsf3+0x1a>
|
|
|
|
|
1018: 1e f4 brtc .+6 ; 0x1020 <__addsf3+0x1e>
|
|
|
|
|
101a: ee c0 rjmp .+476 ; 0x11f8 <__fp_nan>
|
|
|
|
|
101c: 0e f4 brtc .+2 ; 0x1020 <__addsf3+0x1e>
|
|
|
|
|
101e: e0 95 com r30
|
|
|
|
|
1020: e7 fb bst r30, 7
|
|
|
|
|
1022: e4 c0 rjmp .+456 ; 0x11ec <__fp_inf>
|
|
|
|
|
|
|
|
|
|
00001024 <__addsf3x>:
|
|
|
|
|
1024: e9 2f mov r30, r25
|
|
|
|
|
1026: 0a d1 rcall .+532 ; 0x123c <__fp_split3>
|
|
|
|
|
1028: 80 f3 brcs .-32 ; 0x100a <__addsf3+0x8>
|
|
|
|
|
102a: ba 17 cp r27, r26
|
|
|
|
|
102c: 62 07 cpc r22, r18
|
|
|
|
|
102e: 73 07 cpc r23, r19
|
|
|
|
|
1030: 84 07 cpc r24, r20
|
|
|
|
|
1032: 95 07 cpc r25, r21
|
|
|
|
|
1034: 18 f0 brcs .+6 ; 0x103c <__addsf3x+0x18>
|
|
|
|
|
1036: 71 f4 brne .+28 ; 0x1054 <__addsf3x+0x30>
|
|
|
|
|
1038: 9e f5 brtc .+102 ; 0x10a0 <__addsf3x+0x7c>
|
|
|
|
|
103a: 22 c1 rjmp .+580 ; 0x1280 <__fp_zero>
|
|
|
|
|
103c: 0e f4 brtc .+2 ; 0x1040 <__addsf3x+0x1c>
|
|
|
|
|
103e: e0 95 com r30
|
|
|
|
|
1040: 0b 2e mov r0, r27
|
|
|
|
|
1042: ba 2f mov r27, r26
|
|
|
|
|
1044: a0 2d mov r26, r0
|
|
|
|
|
1046: 0b 01 movw r0, r22
|
|
|
|
|
1048: b9 01 movw r22, r18
|
|
|
|
|
104a: 90 01 movw r18, r0
|
|
|
|
|
104c: 0c 01 movw r0, r24
|
|
|
|
|
104e: ca 01 movw r24, r20
|
|
|
|
|
1050: a0 01 movw r20, r0
|
|
|
|
|
1052: 11 24 eor r1, r1
|
|
|
|
|
1054: ff 27 eor r31, r31
|
|
|
|
|
1056: 59 1b sub r21, r25
|
|
|
|
|
1058: 99 f0 breq .+38 ; 0x1080 <__addsf3x+0x5c>
|
|
|
|
|
105a: 59 3f cpi r21, 0xF9 ; 249
|
|
|
|
|
105c: 50 f4 brcc .+20 ; 0x1072 <__addsf3x+0x4e>
|
|
|
|
|
105e: 50 3e cpi r21, 0xE0 ; 224
|
|
|
|
|
1060: 68 f1 brcs .+90 ; 0x10bc <__addsf3x+0x98>
|
|
|
|
|
1062: 1a 16 cp r1, r26
|
|
|
|
|
1064: f0 40 sbci r31, 0x00 ; 0
|
|
|
|
|
1066: a2 2f mov r26, r18
|
|
|
|
|
1068: 23 2f mov r18, r19
|
|
|
|
|
106a: 34 2f mov r19, r20
|
|
|
|
|
106c: 44 27 eor r20, r20
|
|
|
|
|
106e: 58 5f subi r21, 0xF8 ; 248
|
|
|
|
|
1070: f3 cf rjmp .-26 ; 0x1058 <__addsf3x+0x34>
|
|
|
|
|
1072: 46 95 lsr r20
|
|
|
|
|
1074: 37 95 ror r19
|
|
|
|
|
1076: 27 95 ror r18
|
|
|
|
|
1078: a7 95 ror r26
|
|
|
|
|
107a: f0 40 sbci r31, 0x00 ; 0
|
|
|
|
|
107c: 53 95 inc r21
|
|
|
|
|
107e: c9 f7 brne .-14 ; 0x1072 <__addsf3x+0x4e>
|
|
|
|
|
1080: 7e f4 brtc .+30 ; 0x10a0 <__addsf3x+0x7c>
|
|
|
|
|
1082: 1f 16 cp r1, r31
|
|
|
|
|
1084: ba 0b sbc r27, r26
|
|
|
|
|
1086: 62 0b sbc r22, r18
|
|
|
|
|
1088: 73 0b sbc r23, r19
|
|
|
|
|
108a: 84 0b sbc r24, r20
|
|
|
|
|
108c: ba f0 brmi .+46 ; 0x10bc <__addsf3x+0x98>
|
|
|
|
|
108e: 91 50 subi r25, 0x01 ; 1
|
|
|
|
|
1090: a1 f0 breq .+40 ; 0x10ba <__addsf3x+0x96>
|
|
|
|
|
1092: ff 0f add r31, r31
|
|
|
|
|
1094: bb 1f adc r27, r27
|
|
|
|
|
1096: 66 1f adc r22, r22
|
|
|
|
|
1098: 77 1f adc r23, r23
|
|
|
|
|
109a: 88 1f adc r24, r24
|
|
|
|
|
109c: c2 f7 brpl .-16 ; 0x108e <__addsf3x+0x6a>
|
|
|
|
|
109e: 0e c0 rjmp .+28 ; 0x10bc <__addsf3x+0x98>
|
|
|
|
|
10a0: ba 0f add r27, r26
|
|
|
|
|
10a2: 62 1f adc r22, r18
|
|
|
|
|
10a4: 73 1f adc r23, r19
|
|
|
|
|
10a6: 84 1f adc r24, r20
|
|
|
|
|
10a8: 48 f4 brcc .+18 ; 0x10bc <__addsf3x+0x98>
|
|
|
|
|
10aa: 87 95 ror r24
|
|
|
|
|
10ac: 77 95 ror r23
|
|
|
|
|
10ae: 67 95 ror r22
|
|
|
|
|
10b0: b7 95 ror r27
|
|
|
|
|
10b2: f7 95 ror r31
|
|
|
|
|
10b4: 9e 3f cpi r25, 0xFE ; 254
|
|
|
|
|
10b6: 08 f0 brcs .+2 ; 0x10ba <__addsf3x+0x96>
|
|
|
|
|
10b8: b3 cf rjmp .-154 ; 0x1020 <__addsf3+0x1e>
|
|
|
|
|
10ba: 93 95 inc r25
|
|
|
|
|
10bc: 88 0f add r24, r24
|
|
|
|
|
10be: 08 f0 brcs .+2 ; 0x10c2 <__addsf3x+0x9e>
|
|
|
|
|
10c0: 99 27 eor r25, r25
|
|
|
|
|
10c2: ee 0f add r30, r30
|
|
|
|
|
10c4: 97 95 ror r25
|
|
|
|
|
10c6: 87 95 ror r24
|
|
|
|
|
10c8: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000010ca <__cmpsf2>:
|
|
|
|
|
10ca: 6c d0 rcall .+216 ; 0x11a4 <__fp_cmp>
|
|
|
|
|
10cc: 08 f4 brcc .+2 ; 0x10d0 <__cmpsf2+0x6>
|
|
|
|
|
10ce: 81 e0 ldi r24, 0x01 ; 1
|
2015-02-10 12:05:04 +01:00
|
|
|
|
10d0: 08 95 ret
|
|
|
|
|
|
2015-02-11 18:10:07 +01:00
|
|
|
|
000010d2 <__fixunssfsi>:
|
|
|
|
|
10d2: bc d0 rcall .+376 ; 0x124c <__fp_splitA>
|
|
|
|
|
10d4: 88 f0 brcs .+34 ; 0x10f8 <__fixunssfsi+0x26>
|
|
|
|
|
10d6: 9f 57 subi r25, 0x7F ; 127
|
|
|
|
|
10d8: 90 f0 brcs .+36 ; 0x10fe <__fixunssfsi+0x2c>
|
|
|
|
|
10da: b9 2f mov r27, r25
|
|
|
|
|
10dc: 99 27 eor r25, r25
|
|
|
|
|
10de: b7 51 subi r27, 0x17 ; 23
|
|
|
|
|
10e0: a0 f0 brcs .+40 ; 0x110a <__fixunssfsi+0x38>
|
|
|
|
|
10e2: d1 f0 breq .+52 ; 0x1118 <__fixunssfsi+0x46>
|
|
|
|
|
10e4: 66 0f add r22, r22
|
|
|
|
|
10e6: 77 1f adc r23, r23
|
|
|
|
|
10e8: 88 1f adc r24, r24
|
|
|
|
|
10ea: 99 1f adc r25, r25
|
|
|
|
|
10ec: 1a f0 brmi .+6 ; 0x10f4 <__fixunssfsi+0x22>
|
|
|
|
|
10ee: ba 95 dec r27
|
|
|
|
|
10f0: c9 f7 brne .-14 ; 0x10e4 <__fixunssfsi+0x12>
|
|
|
|
|
10f2: 12 c0 rjmp .+36 ; 0x1118 <__fixunssfsi+0x46>
|
|
|
|
|
10f4: b1 30 cpi r27, 0x01 ; 1
|
|
|
|
|
10f6: 81 f0 breq .+32 ; 0x1118 <__fixunssfsi+0x46>
|
|
|
|
|
10f8: c3 d0 rcall .+390 ; 0x1280 <__fp_zero>
|
|
|
|
|
10fa: b1 e0 ldi r27, 0x01 ; 1
|
|
|
|
|
10fc: 08 95 ret
|
|
|
|
|
10fe: c0 c0 rjmp .+384 ; 0x1280 <__fp_zero>
|
|
|
|
|
1100: 67 2f mov r22, r23
|
|
|
|
|
1102: 78 2f mov r23, r24
|
|
|
|
|
1104: 88 27 eor r24, r24
|
|
|
|
|
1106: b8 5f subi r27, 0xF8 ; 248
|
|
|
|
|
1108: 39 f0 breq .+14 ; 0x1118 <__fixunssfsi+0x46>
|
|
|
|
|
110a: b9 3f cpi r27, 0xF9 ; 249
|
|
|
|
|
110c: cc f3 brlt .-14 ; 0x1100 <__fixunssfsi+0x2e>
|
|
|
|
|
110e: 86 95 lsr r24
|
|
|
|
|
1110: 77 95 ror r23
|
|
|
|
|
1112: 67 95 ror r22
|
|
|
|
|
1114: b3 95 inc r27
|
|
|
|
|
1116: d9 f7 brne .-10 ; 0x110e <__fixunssfsi+0x3c>
|
|
|
|
|
1118: 3e f4 brtc .+14 ; 0x1128 <__fixunssfsi+0x56>
|
|
|
|
|
111a: 90 95 com r25
|
|
|
|
|
111c: 80 95 com r24
|
|
|
|
|
111e: 70 95 com r23
|
|
|
|
|
1120: 61 95 neg r22
|
|
|
|
|
1122: 7f 4f sbci r23, 0xFF ; 255
|
|
|
|
|
1124: 8f 4f sbci r24, 0xFF ; 255
|
|
|
|
|
1126: 9f 4f sbci r25, 0xFF ; 255
|
|
|
|
|
1128: 08 95 ret
|
|
|
|
|
|
|
|
|
|
0000112a <__floatunsisf>:
|
|
|
|
|
112a: e8 94 clt
|
|
|
|
|
112c: 09 c0 rjmp .+18 ; 0x1140 <__floatsisf+0x12>
|
|
|
|
|
|
|
|
|
|
0000112e <__floatsisf>:
|
|
|
|
|
112e: 97 fb bst r25, 7
|
|
|
|
|
1130: 3e f4 brtc .+14 ; 0x1140 <__floatsisf+0x12>
|
|
|
|
|
1132: 90 95 com r25
|
|
|
|
|
1134: 80 95 com r24
|
|
|
|
|
1136: 70 95 com r23
|
|
|
|
|
1138: 61 95 neg r22
|
|
|
|
|
113a: 7f 4f sbci r23, 0xFF ; 255
|
|
|
|
|
113c: 8f 4f sbci r24, 0xFF ; 255
|
|
|
|
|
113e: 9f 4f sbci r25, 0xFF ; 255
|
|
|
|
|
1140: 99 23 and r25, r25
|
|
|
|
|
1142: a9 f0 breq .+42 ; 0x116e <__floatsisf+0x40>
|
|
|
|
|
1144: f9 2f mov r31, r25
|
|
|
|
|
1146: 96 e9 ldi r25, 0x96 ; 150
|
|
|
|
|
1148: bb 27 eor r27, r27
|
|
|
|
|
114a: 93 95 inc r25
|
|
|
|
|
114c: f6 95 lsr r31
|
|
|
|
|
114e: 87 95 ror r24
|
|
|
|
|
1150: 77 95 ror r23
|
|
|
|
|
1152: 67 95 ror r22
|
|
|
|
|
1154: b7 95 ror r27
|
|
|
|
|
1156: f1 11 cpse r31, r1
|
|
|
|
|
1158: f8 cf rjmp .-16 ; 0x114a <__floatsisf+0x1c>
|
|
|
|
|
115a: fa f4 brpl .+62 ; 0x119a <__floatsisf+0x6c>
|
|
|
|
|
115c: bb 0f add r27, r27
|
|
|
|
|
115e: 11 f4 brne .+4 ; 0x1164 <__floatsisf+0x36>
|
|
|
|
|
1160: 60 ff sbrs r22, 0
|
|
|
|
|
1162: 1b c0 rjmp .+54 ; 0x119a <__floatsisf+0x6c>
|
|
|
|
|
1164: 6f 5f subi r22, 0xFF ; 255
|
|
|
|
|
1166: 7f 4f sbci r23, 0xFF ; 255
|
|
|
|
|
1168: 8f 4f sbci r24, 0xFF ; 255
|
|
|
|
|
116a: 9f 4f sbci r25, 0xFF ; 255
|
|
|
|
|
116c: 16 c0 rjmp .+44 ; 0x119a <__floatsisf+0x6c>
|
|
|
|
|
116e: 88 23 and r24, r24
|
|
|
|
|
1170: 11 f0 breq .+4 ; 0x1176 <__floatsisf+0x48>
|
|
|
|
|
1172: 96 e9 ldi r25, 0x96 ; 150
|
|
|
|
|
1174: 11 c0 rjmp .+34 ; 0x1198 <__floatsisf+0x6a>
|
|
|
|
|
1176: 77 23 and r23, r23
|
|
|
|
|
1178: 21 f0 breq .+8 ; 0x1182 <__floatsisf+0x54>
|
|
|
|
|
117a: 9e e8 ldi r25, 0x8E ; 142
|
|
|
|
|
117c: 87 2f mov r24, r23
|
|
|
|
|
117e: 76 2f mov r23, r22
|
|
|
|
|
1180: 05 c0 rjmp .+10 ; 0x118c <__floatsisf+0x5e>
|
|
|
|
|
1182: 66 23 and r22, r22
|
|
|
|
|
1184: 71 f0 breq .+28 ; 0x11a2 <__floatsisf+0x74>
|
|
|
|
|
1186: 96 e8 ldi r25, 0x86 ; 134
|
|
|
|
|
1188: 86 2f mov r24, r22
|
|
|
|
|
118a: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
118c: 60 e0 ldi r22, 0x00 ; 0
|
|
|
|
|
118e: 2a f0 brmi .+10 ; 0x119a <__floatsisf+0x6c>
|
|
|
|
|
1190: 9a 95 dec r25
|
|
|
|
|
1192: 66 0f add r22, r22
|
|
|
|
|
1194: 77 1f adc r23, r23
|
|
|
|
|
1196: 88 1f adc r24, r24
|
|
|
|
|
1198: da f7 brpl .-10 ; 0x1190 <__floatsisf+0x62>
|
|
|
|
|
119a: 88 0f add r24, r24
|
|
|
|
|
119c: 96 95 lsr r25
|
|
|
|
|
119e: 87 95 ror r24
|
|
|
|
|
11a0: 97 f9 bld r25, 7
|
|
|
|
|
11a2: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000011a4 <__fp_cmp>:
|
|
|
|
|
11a4: 99 0f add r25, r25
|
|
|
|
|
11a6: 00 08 sbc r0, r0
|
|
|
|
|
11a8: 55 0f add r21, r21
|
|
|
|
|
11aa: aa 0b sbc r26, r26
|
|
|
|
|
11ac: e0 e8 ldi r30, 0x80 ; 128
|
|
|
|
|
11ae: fe ef ldi r31, 0xFE ; 254
|
|
|
|
|
11b0: 16 16 cp r1, r22
|
|
|
|
|
11b2: 17 06 cpc r1, r23
|
|
|
|
|
11b4: e8 07 cpc r30, r24
|
|
|
|
|
11b6: f9 07 cpc r31, r25
|
|
|
|
|
11b8: c0 f0 brcs .+48 ; 0x11ea <__fp_cmp+0x46>
|
|
|
|
|
11ba: 12 16 cp r1, r18
|
|
|
|
|
11bc: 13 06 cpc r1, r19
|
|
|
|
|
11be: e4 07 cpc r30, r20
|
|
|
|
|
11c0: f5 07 cpc r31, r21
|
|
|
|
|
11c2: 98 f0 brcs .+38 ; 0x11ea <__fp_cmp+0x46>
|
|
|
|
|
11c4: 62 1b sub r22, r18
|
|
|
|
|
11c6: 73 0b sbc r23, r19
|
|
|
|
|
11c8: 84 0b sbc r24, r20
|
|
|
|
|
11ca: 95 0b sbc r25, r21
|
|
|
|
|
11cc: 39 f4 brne .+14 ; 0x11dc <__fp_cmp+0x38>
|
|
|
|
|
11ce: 0a 26 eor r0, r26
|
|
|
|
|
11d0: 61 f0 breq .+24 ; 0x11ea <__fp_cmp+0x46>
|
|
|
|
|
11d2: 23 2b or r18, r19
|
|
|
|
|
11d4: 24 2b or r18, r20
|
|
|
|
|
11d6: 25 2b or r18, r21
|
|
|
|
|
11d8: 21 f4 brne .+8 ; 0x11e2 <__fp_cmp+0x3e>
|
|
|
|
|
11da: 08 95 ret
|
|
|
|
|
11dc: 0a 26 eor r0, r26
|
|
|
|
|
11de: 09 f4 brne .+2 ; 0x11e2 <__fp_cmp+0x3e>
|
|
|
|
|
11e0: a1 40 sbci r26, 0x01 ; 1
|
|
|
|
|
11e2: a6 95 lsr r26
|
|
|
|
|
11e4: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
11e6: 81 1d adc r24, r1
|
|
|
|
|
11e8: 81 1d adc r24, r1
|
|
|
|
|
11ea: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000011ec <__fp_inf>:
|
|
|
|
|
11ec: 97 f9 bld r25, 7
|
|
|
|
|
11ee: 9f 67 ori r25, 0x7F ; 127
|
|
|
|
|
11f0: 80 e8 ldi r24, 0x80 ; 128
|
|
|
|
|
11f2: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
11f4: 60 e0 ldi r22, 0x00 ; 0
|
|
|
|
|
11f6: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000011f8 <__fp_nan>:
|
|
|
|
|
11f8: 9f ef ldi r25, 0xFF ; 255
|
|
|
|
|
11fa: 80 ec ldi r24, 0xC0 ; 192
|
|
|
|
|
11fc: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000011fe <__fp_pscA>:
|
|
|
|
|
11fe: 00 24 eor r0, r0
|
|
|
|
|
1200: 0a 94 dec r0
|
|
|
|
|
1202: 16 16 cp r1, r22
|
|
|
|
|
1204: 17 06 cpc r1, r23
|
|
|
|
|
1206: 18 06 cpc r1, r24
|
|
|
|
|
1208: 09 06 cpc r0, r25
|
|
|
|
|
120a: 08 95 ret
|
|
|
|
|
|
|
|
|
|
0000120c <__fp_pscB>:
|
|
|
|
|
120c: 00 24 eor r0, r0
|
|
|
|
|
120e: 0a 94 dec r0
|
|
|
|
|
1210: 12 16 cp r1, r18
|
|
|
|
|
1212: 13 06 cpc r1, r19
|
|
|
|
|
1214: 14 06 cpc r1, r20
|
|
|
|
|
1216: 05 06 cpc r0, r21
|
|
|
|
|
1218: 08 95 ret
|
|
|
|
|
|
|
|
|
|
0000121a <__fp_round>:
|
|
|
|
|
121a: 09 2e mov r0, r25
|
|
|
|
|
121c: 03 94 inc r0
|
|
|
|
|
121e: 00 0c add r0, r0
|
|
|
|
|
1220: 11 f4 brne .+4 ; 0x1226 <__fp_round+0xc>
|
|
|
|
|
1222: 88 23 and r24, r24
|
|
|
|
|
1224: 52 f0 brmi .+20 ; 0x123a <__fp_round+0x20>
|
|
|
|
|
1226: bb 0f add r27, r27
|
|
|
|
|
1228: 40 f4 brcc .+16 ; 0x123a <__fp_round+0x20>
|
|
|
|
|
122a: bf 2b or r27, r31
|
|
|
|
|
122c: 11 f4 brne .+4 ; 0x1232 <__fp_round+0x18>
|
|
|
|
|
122e: 60 ff sbrs r22, 0
|
|
|
|
|
1230: 04 c0 rjmp .+8 ; 0x123a <__fp_round+0x20>
|
|
|
|
|
1232: 6f 5f subi r22, 0xFF ; 255
|
|
|
|
|
1234: 7f 4f sbci r23, 0xFF ; 255
|
|
|
|
|
1236: 8f 4f sbci r24, 0xFF ; 255
|
|
|
|
|
1238: 9f 4f sbci r25, 0xFF ; 255
|
|
|
|
|
123a: 08 95 ret
|
|
|
|
|
|
|
|
|
|
0000123c <__fp_split3>:
|
|
|
|
|
123c: 57 fd sbrc r21, 7
|
|
|
|
|
123e: 90 58 subi r25, 0x80 ; 128
|
|
|
|
|
1240: 44 0f add r20, r20
|
|
|
|
|
1242: 55 1f adc r21, r21
|
|
|
|
|
1244: 59 f0 breq .+22 ; 0x125c <__fp_splitA+0x10>
|
|
|
|
|
1246: 5f 3f cpi r21, 0xFF ; 255
|
|
|
|
|
1248: 71 f0 breq .+28 ; 0x1266 <__fp_splitA+0x1a>
|
|
|
|
|
124a: 47 95 ror r20
|
|
|
|
|
|
|
|
|
|
0000124c <__fp_splitA>:
|
|
|
|
|
124c: 88 0f add r24, r24
|
|
|
|
|
124e: 97 fb bst r25, 7
|
|
|
|
|
1250: 99 1f adc r25, r25
|
|
|
|
|
1252: 61 f0 breq .+24 ; 0x126c <__fp_splitA+0x20>
|
|
|
|
|
1254: 9f 3f cpi r25, 0xFF ; 255
|
|
|
|
|
1256: 79 f0 breq .+30 ; 0x1276 <__fp_splitA+0x2a>
|
|
|
|
|
1258: 87 95 ror r24
|
|
|
|
|
125a: 08 95 ret
|
|
|
|
|
125c: 12 16 cp r1, r18
|
|
|
|
|
125e: 13 06 cpc r1, r19
|
|
|
|
|
1260: 14 06 cpc r1, r20
|
|
|
|
|
1262: 55 1f adc r21, r21
|
|
|
|
|
1264: f2 cf rjmp .-28 ; 0x124a <__fp_split3+0xe>
|
|
|
|
|
1266: 46 95 lsr r20
|
|
|
|
|
1268: f1 df rcall .-30 ; 0x124c <__fp_splitA>
|
|
|
|
|
126a: 08 c0 rjmp .+16 ; 0x127c <__fp_splitA+0x30>
|
|
|
|
|
126c: 16 16 cp r1, r22
|
|
|
|
|
126e: 17 06 cpc r1, r23
|
|
|
|
|
1270: 18 06 cpc r1, r24
|
|
|
|
|
1272: 99 1f adc r25, r25
|
|
|
|
|
1274: f1 cf rjmp .-30 ; 0x1258 <__fp_splitA+0xc>
|
|
|
|
|
1276: 86 95 lsr r24
|
|
|
|
|
1278: 71 05 cpc r23, r1
|
|
|
|
|
127a: 61 05 cpc r22, r1
|
|
|
|
|
127c: 08 94 sec
|
|
|
|
|
127e: 08 95 ret
|
|
|
|
|
|
|
|
|
|
00001280 <__fp_zero>:
|
|
|
|
|
1280: e8 94 clt
|
|
|
|
|
|
|
|
|
|
00001282 <__fp_szero>:
|
|
|
|
|
1282: bb 27 eor r27, r27
|
|
|
|
|
1284: 66 27 eor r22, r22
|
|
|
|
|
1286: 77 27 eor r23, r23
|
|
|
|
|
1288: cb 01 movw r24, r22
|
|
|
|
|
128a: 97 f9 bld r25, 7
|
|
|
|
|
128c: 08 95 ret
|
|
|
|
|
|
|
|
|
|
0000128e <__gesf2>:
|
|
|
|
|
128e: 8a df rcall .-236 ; 0x11a4 <__fp_cmp>
|
|
|
|
|
1290: 08 f4 brcc .+2 ; 0x1294 <__gesf2+0x6>
|
|
|
|
|
1292: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
1294: 08 95 ret
|
|
|
|
|
|
|
|
|
|
00001296 <__divmodhi4>:
|
|
|
|
|
1296: 97 fb bst r25, 7
|
|
|
|
|
1298: 07 2e mov r0, r23
|
|
|
|
|
129a: 16 f4 brtc .+4 ; 0x12a0 <__divmodhi4+0xa>
|
|
|
|
|
129c: 00 94 com r0
|
|
|
|
|
129e: 07 d0 rcall .+14 ; 0x12ae <__divmodhi4_neg1>
|
|
|
|
|
12a0: 77 fd sbrc r23, 7
|
|
|
|
|
12a2: 09 d0 rcall .+18 ; 0x12b6 <__divmodhi4_neg2>
|
|
|
|
|
12a4: 0e 94 6b 09 call 0x12d6 ; 0x12d6 <__udivmodhi4>
|
|
|
|
|
12a8: 07 fc sbrc r0, 7
|
|
|
|
|
12aa: 05 d0 rcall .+10 ; 0x12b6 <__divmodhi4_neg2>
|
|
|
|
|
12ac: 3e f4 brtc .+14 ; 0x12bc <__divmodhi4_exit>
|
|
|
|
|
|
|
|
|
|
000012ae <__divmodhi4_neg1>:
|
|
|
|
|
12ae: 90 95 com r25
|
|
|
|
|
12b0: 81 95 neg r24
|
|
|
|
|
12b2: 9f 4f sbci r25, 0xFF ; 255
|
|
|
|
|
12b4: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000012b6 <__divmodhi4_neg2>:
|
|
|
|
|
12b6: 70 95 com r23
|
|
|
|
|
12b8: 61 95 neg r22
|
|
|
|
|
12ba: 7f 4f sbci r23, 0xFF ; 255
|
|
|
|
|
|
|
|
|
|
000012bc <__divmodhi4_exit>:
|
|
|
|
|
12bc: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000012be <__umulhisi3>:
|
|
|
|
|
12be: a2 9f mul r26, r18
|
|
|
|
|
12c0: b0 01 movw r22, r0
|
|
|
|
|
12c2: b3 9f mul r27, r19
|
|
|
|
|
12c4: c0 01 movw r24, r0
|
|
|
|
|
12c6: a3 9f mul r26, r19
|
|
|
|
|
12c8: 01 d0 rcall .+2 ; 0x12cc <__umulhisi3+0xe>
|
|
|
|
|
12ca: b2 9f mul r27, r18
|
|
|
|
|
12cc: 70 0d add r23, r0
|
|
|
|
|
12ce: 81 1d adc r24, r1
|
|
|
|
|
12d0: 11 24 eor r1, r1
|
|
|
|
|
12d2: 91 1d adc r25, r1
|
|
|
|
|
12d4: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000012d6 <__udivmodhi4>:
|
|
|
|
|
12d6: aa 1b sub r26, r26
|
|
|
|
|
12d8: bb 1b sub r27, r27
|
|
|
|
|
12da: 51 e1 ldi r21, 0x11 ; 17
|
|
|
|
|
12dc: 07 c0 rjmp .+14 ; 0x12ec <__udivmodhi4_ep>
|
|
|
|
|
|
|
|
|
|
000012de <__udivmodhi4_loop>:
|
|
|
|
|
12de: aa 1f adc r26, r26
|
|
|
|
|
12e0: bb 1f adc r27, r27
|
|
|
|
|
12e2: a6 17 cp r26, r22
|
|
|
|
|
12e4: b7 07 cpc r27, r23
|
|
|
|
|
12e6: 10 f0 brcs .+4 ; 0x12ec <__udivmodhi4_ep>
|
|
|
|
|
12e8: a6 1b sub r26, r22
|
|
|
|
|
12ea: b7 0b sbc r27, r23
|
|
|
|
|
|
|
|
|
|
000012ec <__udivmodhi4_ep>:
|
|
|
|
|
12ec: 88 1f adc r24, r24
|
|
|
|
|
12ee: 99 1f adc r25, r25
|
|
|
|
|
12f0: 5a 95 dec r21
|
|
|
|
|
12f2: a9 f7 brne .-22 ; 0x12de <__udivmodhi4_loop>
|
|
|
|
|
12f4: 80 95 com r24
|
|
|
|
|
12f6: 90 95 com r25
|
|
|
|
|
12f8: bc 01 movw r22, r24
|
|
|
|
|
12fa: cd 01 movw r24, r26
|
|
|
|
|
12fc: 08 95 ret
|
|
|
|
|
|
|
|
|
|
000012fe <__tablejump2__>:
|
|
|
|
|
12fe: ee 0f add r30, r30
|
|
|
|
|
1300: ff 1f adc r31, r31
|
|
|
|
|
|
|
|
|
|
00001302 <__tablejump__>:
|
|
|
|
|
1302: 05 90 lpm r0, Z+
|
|
|
|
|
1304: f4 91 lpm r31, Z
|
|
|
|
|
1306: e0 2d mov r30, r0
|
|
|
|
|
1308: 09 94 ijmp
|
|
|
|
|
|
|
|
|
|
0000130a <_exit>:
|
|
|
|
|
130a: f8 94 cli
|
|
|
|
|
|
|
|
|
|
0000130c <__stop_program>:
|
|
|
|
|
130c: ff cf rjmp .-2 ; 0x130c <__stop_program>
|