1644 lines
74 KiB
Text
1644 lines
74 KiB
Text
|
|
C:\Users\flux\AppData\Local\Temp\arduino_build_587547/pocketpsithemius.ino.elf: file format elf32-avr
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
00000000 <__vectors>:
|
|
__vectors():
|
|
0: 33 c0 rjmp .+102 ; 0x68 <__ctors_end>
|
|
2: 4b c0 rjmp .+150 ; 0x9a <__bad_interrupt>
|
|
4: 4a c0 rjmp .+148 ; 0x9a <__bad_interrupt>
|
|
6: 49 c0 rjmp .+146 ; 0x9a <__bad_interrupt>
|
|
8: 48 c0 rjmp .+144 ; 0x9a <__bad_interrupt>
|
|
a: 47 c0 rjmp .+142 ; 0x9a <__bad_interrupt>
|
|
c: 3f c2 rjmp .+1150 ; 0x48c <__vector_6>
|
|
e: 45 c0 rjmp .+138 ; 0x9a <__bad_interrupt>
|
|
10: 44 c0 rjmp .+136 ; 0x9a <__bad_interrupt>
|
|
12: 43 c0 rjmp .+134 ; 0x9a <__bad_interrupt>
|
|
14: 42 c0 rjmp .+132 ; 0x9a <__bad_interrupt>
|
|
16: 41 c0 rjmp .+130 ; 0x9a <__bad_interrupt>
|
|
18: 40 c0 rjmp .+128 ; 0x9a <__bad_interrupt>
|
|
1a: 3f c0 rjmp .+126 ; 0x9a <__bad_interrupt>
|
|
1c: 3e c0 rjmp .+124 ; 0x9a <__bad_interrupt>
|
|
1e: 3d c0 rjmp .+122 ; 0x9a <__bad_interrupt>
|
|
20: 3c c0 rjmp .+120 ; 0x9a <__bad_interrupt>
|
|
22: 3b c0 rjmp .+118 ; 0x9a <__bad_interrupt>
|
|
24: 3a c0 rjmp .+116 ; 0x9a <__bad_interrupt>
|
|
|
|
00000026 <__trampolines_end>:
|
|
__trampolines_start():
|
|
26: 00 00 nop
|
|
28: 00 00 nop
|
|
2a: 05 00 .word 0x0005 ; ????
|
|
2c: 04 00 .word 0x0004 ; ????
|
|
2e: 03 00 .word 0x0003 ; ????
|
|
30: 00 00 nop
|
|
32: 00 00 nop
|
|
...
|
|
|
|
00000036 <digital_pin_to_bit_mask_PGM>:
|
|
36: 01 02 04 40 20 10 08 04 02 01 10 20 40 80 08 80 ...@ ...... @...
|
|
|
|
00000046 <digital_pin_to_port_PGM>:
|
|
46: 01 01 01 02 02 02 02 02 02 02 01 01 01 01 01 02 ................
|
|
|
|
00000056 <port_to_input_PGM>:
|
|
56: 00 00 39 00 36 00 ..9.6.
|
|
|
|
0000005c <port_to_output_PGM>:
|
|
5c: 00 00 3b 00 38 00 ..;.8.
|
|
|
|
00000062 <port_to_mode_PGM>:
|
|
62: 00 00 3a 00 37 00 ..:.7.
|
|
|
|
00000068 <__ctors_end>:
|
|
__dtors_end():
|
|
68: 11 24 eor r1, r1
|
|
6a: 1f be out 0x3f, r1 ; 63
|
|
6c: cf ed ldi r28, 0xDF ; 223
|
|
6e: cd bf out 0x3d, r28 ; 61
|
|
|
|
00000070 <__do_copy_data>:
|
|
__do_copy_data():
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2409
|
|
70: 10 e0 ldi r17, 0x00 ; 0
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2410
|
|
72: a0 e6 ldi r26, 0x60 ; 96
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2411
|
|
74: b0 e0 ldi r27, 0x00 ; 0
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2412
|
|
76: ee ed ldi r30, 0xDE ; 222
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2413
|
|
78: f7 e0 ldi r31, 0x07 ; 7
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2414
|
|
7a: 02 c0 rjmp .+4 ; 0x80 <__do_copy_data+0x10>
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2417
|
|
7c: 05 90 lpm r0, Z+
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2422
|
|
7e: 0d 92 st X+, r0
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2424
|
|
80: a2 38 cpi r26, 0x82 ; 130
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2425
|
|
82: b1 07 cpc r27, r17
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2426
|
|
84: d9 f7 brne .-10 ; 0x7c <__do_copy_data+0xc>
|
|
|
|
00000086 <__do_clear_bss>:
|
|
__do_clear_bss():
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2441
|
|
86: 20 e0 ldi r18, 0x00 ; 0
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2442
|
|
88: a2 e8 ldi r26, 0x82 ; 130
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2443
|
|
8a: b0 e0 ldi r27, 0x00 ; 0
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2444
|
|
8c: 01 c0 rjmp .+2 ; 0x90 <.do_clear_bss_start>
|
|
|
|
0000008e <.do_clear_bss_loop>:
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2446
|
|
8e: 1d 92 st X+, r1
|
|
|
|
00000090 <.do_clear_bss_start>:
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2448
|
|
90: a0 3a cpi r26, 0xA0 ; 160
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2449
|
|
92: b2 07 cpc r27, r18
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2450
|
|
94: e1 f7 brne .-8 ; 0x8e <.do_clear_bss_loop>
|
|
.do_clear_bss_start():
|
|
96: 9b d3 rcall .+1846 ; 0x7ce <main>
|
|
98: a0 c3 rjmp .+1856 ; 0x7da <_exit>
|
|
|
|
0000009a <__bad_interrupt>:
|
|
__vector_1():
|
|
9a: b2 cf rjmp .-156 ; 0x0 <__vectors>
|
|
|
|
0000009c <offLeds()>:
|
|
_Z7offLedsv():
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:80
|
|
selectedColor = paint;
|
|
selectedColor.r = paint.r;
|
|
selectedColor.b = paint.b;
|
|
selectedColor.g = paint.g;
|
|
//paint contains r g b value for pwm on pins
|
|
showColor();
|
|
9c: 6f ef ldi r22, 0xFF ; 255
|
|
9e: 70 e0 ldi r23, 0x00 ; 0
|
|
a0: 8c e0 ldi r24, 0x0C ; 12
|
|
a2: 64 d2 rcall .+1224 ; 0x56c <analogWrite>
|
|
a4: 6f ef ldi r22, 0xFF ; 255
|
|
a6: 70 e0 ldi r23, 0x00 ; 0
|
|
a8: 81 e0 ldi r24, 0x01 ; 1
|
|
aa: 60 d2 rcall .+1216 ; 0x56c <analogWrite>
|
|
ac: 6f ef ldi r22, 0xFF ; 255
|
|
ae: 70 e0 ldi r23, 0x00 ; 0
|
|
b0: 8e e0 ldi r24, 0x0E ; 14
|
|
b2: 5c c2 rjmp .+1208 ; 0x56c <analogWrite>
|
|
|
|
000000b4 <setup>:
|
|
setup():
|
|
b4: 60 e0 ldi r22, 0x00 ; 0
|
|
b6: 89 e0 ldi r24, 0x09 ; 9
|
|
b8: af d2 rcall .+1374 ; 0x618 <pinMode>
|
|
ba: 60 e0 ldi r22, 0x00 ; 0
|
|
bc: 88 e0 ldi r24, 0x08 ; 8
|
|
be: ac d2 rcall .+1368 ; 0x618 <pinMode>
|
|
c0: 60 e0 ldi r22, 0x00 ; 0
|
|
c2: 8d e0 ldi r24, 0x0D ; 13
|
|
c4: a9 d2 rcall .+1362 ; 0x618 <pinMode>
|
|
c6: 61 e0 ldi r22, 0x01 ; 1
|
|
c8: 81 e0 ldi r24, 0x01 ; 1
|
|
ca: a6 d2 rcall .+1356 ; 0x618 <pinMode>
|
|
cc: 61 e0 ldi r22, 0x01 ; 1
|
|
ce: 8e e0 ldi r24, 0x0E ; 14
|
|
d0: a3 d2 rcall .+1350 ; 0x618 <pinMode>
|
|
d2: 61 e0 ldi r22, 0x01 ; 1
|
|
d4: 8c e0 ldi r24, 0x0C ; 12
|
|
d6: a0 d2 rcall .+1344 ; 0x618 <pinMode>
|
|
d8: e1 df rcall .-62 ; 0x9c <offLeds()>
|
|
da: 61 e0 ldi r22, 0x01 ; 1
|
|
dc: 86 e0 ldi r24, 0x06 ; 6
|
|
de: 9c d2 rcall .+1336 ; 0x618 <pinMode>
|
|
e0: 60 e0 ldi r22, 0x00 ; 0
|
|
e2: 86 e0 ldi r24, 0x06 ; 6
|
|
e4: ed d2 rcall .+1498 ; 0x6c0 <digitalWrite>
|
|
e6: 61 e0 ldi r22, 0x01 ; 1
|
|
e8: 83 e0 ldi r24, 0x03 ; 3
|
|
ea: 96 d2 rcall .+1324 ; 0x618 <pinMode>
|
|
ec: 60 e0 ldi r22, 0x00 ; 0
|
|
ee: 83 e0 ldi r24, 0x03 ; 3
|
|
f0: e7 c2 rjmp .+1486 ; 0x6c0 <digitalWrite>
|
|
|
|
000000f2 <pressButton_B()>:
|
|
_Z13pressButton_Bv():
|
|
f2: cf 93 push r28
|
|
f4: 80 91 7f 00 lds r24, 0x007F ; 0x80007f <enabled_btnB>
|
|
f8: 81 11 cpse r24, r1
|
|
fa: 04 c0 rjmp .+8 ; 0x104 <pressButton_B()+0x12>
|
|
fc: 10 92 95 00 sts 0x0095, r1 ; 0x800095 <counterB>
|
|
100: cf 91 pop r28
|
|
102: 08 95 ret
|
|
104: c0 91 95 00 lds r28, 0x0095 ; 0x800095 <counterB>
|
|
108: c1 30 cpi r28, 0x01 ; 1
|
|
10a: a1 f4 brne .+40 ; 0x134 <pressButton_B()+0x42>
|
|
10c: 80 91 90 00 lds r24, 0x0090 ; 0x800090 <enabled_LED>
|
|
110: 80 93 8f 00 sts 0x008F, r24 ; 0x80008f <was_on_LED>
|
|
114: 10 92 90 00 sts 0x0090, r1 ; 0x800090 <enabled_LED>
|
|
118: 10 92 96 00 sts 0x0096, r1 ; 0x800096 <counterA>
|
|
11c: 10 92 94 00 sts 0x0094, r1 ; 0x800094 <counterC>
|
|
120: 10 92 80 00 sts 0x0080, r1 ; 0x800080 <enabled_btnAC>
|
|
124: 60 e0 ldi r22, 0x00 ; 0
|
|
126: 83 e0 ldi r24, 0x03 ; 3
|
|
128: cb d2 rcall .+1430 ; 0x6c0 <digitalWrite>
|
|
12a: 61 e0 ldi r22, 0x01 ; 1
|
|
12c: 86 e0 ldi r24, 0x06 ; 6
|
|
12e: c8 d2 rcall .+1424 ; 0x6c0 <digitalWrite>
|
|
130: c0 93 8d 00 sts 0x008D, r28 ; 0x80008d <countDelay>
|
|
134: 80 91 95 00 lds r24, 0x0095 ; 0x800095 <counterB>
|
|
138: 82 30 cpi r24, 0x02 ; 2
|
|
13a: 11 f7 brne .-60 ; 0x100 <pressButton_B()+0xe>
|
|
13c: 86 e0 ldi r24, 0x06 ; 6
|
|
13e: 07 d3 rcall .+1550 ; 0x74e <digitalRead>
|
|
140: 01 97 sbiw r24, 0x01 ; 1
|
|
142: 19 f4 brne .+6 ; 0x14a <pressButton_B()+0x58>
|
|
144: 60 e0 ldi r22, 0x00 ; 0
|
|
146: 86 e0 ldi r24, 0x06 ; 6
|
|
148: bb d2 rcall .+1398 ; 0x6c0 <digitalWrite>
|
|
14a: 81 e0 ldi r24, 0x01 ; 1
|
|
14c: 80 93 80 00 sts 0x0080, r24 ; 0x800080 <enabled_btnAC>
|
|
150: 80 93 7f 00 sts 0x007F, r24 ; 0x80007f <enabled_btnB>
|
|
154: 80 91 8f 00 lds r24, 0x008F ; 0x80008f <was_on_LED>
|
|
158: 80 93 90 00 sts 0x0090, r24 ; 0x800090 <enabled_LED>
|
|
15c: 10 92 8d 00 sts 0x008D, r1 ; 0x80008d <countDelay>
|
|
160: cf cf rjmp .-98 ; 0x100 <pressButton_B()+0xe>
|
|
|
|
00000162 <pressButton_C()>:
|
|
_Z13pressButton_Cv():
|
|
162: 80 91 80 00 lds r24, 0x0080 ; 0x800080 <enabled_btnAC>
|
|
166: 81 11 cpse r24, r1
|
|
168: 03 c0 rjmp .+6 ; 0x170 <pressButton_C()+0xe>
|
|
16a: 10 92 94 00 sts 0x0094, r1 ; 0x800094 <counterC>
|
|
16e: 08 95 ret
|
|
170: 80 91 94 00 lds r24, 0x0094 ; 0x800094 <counterC>
|
|
174: 81 30 cpi r24, 0x01 ; 1
|
|
176: 19 f4 brne .+6 ; 0x17e <pressButton_C()+0x1c>
|
|
178: 61 e0 ldi r22, 0x01 ; 1
|
|
17a: 83 e0 ldi r24, 0x03 ; 3
|
|
17c: a1 d2 rcall .+1346 ; 0x6c0 <digitalWrite>
|
|
17e: 80 91 94 00 lds r24, 0x0094 ; 0x800094 <counterC>
|
|
182: 82 30 cpi r24, 0x02 ; 2
|
|
184: 19 f4 brne .+6 ; 0x18c <pressButton_C()+0x2a>
|
|
186: 60 e0 ldi r22, 0x00 ; 0
|
|
188: 83 e0 ldi r24, 0x03 ; 3
|
|
18a: 9a c2 rjmp .+1332 ; 0x6c0 <digitalWrite>
|
|
18c: 08 95 ret
|
|
|
|
0000018e <softPWM(unsigned char, unsigned char, unsigned char)>:
|
|
_Z7softPWMhhh():
|
|
18e: ef 92 push r14
|
|
190: ff 92 push r15
|
|
192: 0f 93 push r16
|
|
194: 1f 93 push r17
|
|
196: cf 93 push r28
|
|
198: df 93 push r29
|
|
19a: 18 2f mov r17, r24
|
|
19c: 04 2f mov r16, r20
|
|
19e: 80 91 8e 00 lds r24, 0x008E ; 0x80008e <usePWM>
|
|
1a2: 88 23 and r24, r24
|
|
1a4: 99 f0 breq .+38 ; 0x1cc <softPWM(unsigned char, unsigned char, unsigned char)+0x3e>
|
|
1a6: e6 2e mov r14, r22
|
|
1a8: f1 2c mov r15, r1
|
|
1aa: 60 95 com r22
|
|
1ac: c6 2f mov r28, r22
|
|
1ae: d0 e0 ldi r29, 0x00 ; 0
|
|
1b0: 00 23 and r16, r16
|
|
1b2: d1 f0 breq .+52 ; 0x1e8 <softPWM(unsigned char, unsigned char, unsigned char)+0x5a>
|
|
1b4: 60 e0 ldi r22, 0x00 ; 0
|
|
1b6: 81 2f mov r24, r17
|
|
1b8: 83 d2 rcall .+1286 ; 0x6c0 <digitalWrite>
|
|
1ba: c7 01 movw r24, r14
|
|
1bc: bd d1 rcall .+890 ; 0x538 <delayMicroseconds>
|
|
1be: 61 e0 ldi r22, 0x01 ; 1
|
|
1c0: 81 2f mov r24, r17
|
|
1c2: 7e d2 rcall .+1276 ; 0x6c0 <digitalWrite>
|
|
1c4: ce 01 movw r24, r28
|
|
1c6: b8 d1 rcall .+880 ; 0x538 <delayMicroseconds>
|
|
1c8: 01 50 subi r16, 0x01 ; 1
|
|
1ca: f2 cf rjmp .-28 ; 0x1b0 <softPWM(unsigned char, unsigned char, unsigned char)+0x22>
|
|
1cc: 8f ef ldi r24, 0xFF ; 255
|
|
1ce: 90 e0 ldi r25, 0x00 ; 0
|
|
1d0: 9c 01 movw r18, r24
|
|
1d2: 26 1b sub r18, r22
|
|
1d4: 31 09 sbc r19, r1
|
|
1d6: b9 01 movw r22, r18
|
|
1d8: 81 2f mov r24, r17
|
|
1da: df 91 pop r29
|
|
1dc: cf 91 pop r28
|
|
1de: 1f 91 pop r17
|
|
1e0: 0f 91 pop r16
|
|
1e2: ff 90 pop r15
|
|
1e4: ef 90 pop r14
|
|
1e6: c2 c1 rjmp .+900 ; 0x56c <analogWrite>
|
|
1e8: df 91 pop r29
|
|
1ea: cf 91 pop r28
|
|
1ec: 1f 91 pop r17
|
|
1ee: 0f 91 pop r16
|
|
1f0: ff 90 pop r15
|
|
1f2: ef 90 pop r14
|
|
1f4: 08 95 ret
|
|
|
|
000001f6 <showColor()>:
|
|
_Z9showColorv():
|
|
1f6: 80 91 90 00 lds r24, 0x0090 ; 0x800090 <enabled_LED>
|
|
1fa: 88 23 and r24, r24
|
|
1fc: 79 f0 breq .+30 ; 0x21c <showColor()+0x26>
|
|
1fe: 41 e0 ldi r20, 0x01 ; 1
|
|
200: 60 91 82 00 lds r22, 0x0082 ; 0x800082 <__data_end>
|
|
204: 8c e0 ldi r24, 0x0C ; 12
|
|
206: c3 df rcall .-122 ; 0x18e <softPWM(unsigned char, unsigned char, unsigned char)>
|
|
208: 41 e0 ldi r20, 0x01 ; 1
|
|
20a: 60 91 84 00 lds r22, 0x0084 ; 0x800084 <__data_end+0x2>
|
|
20e: 81 e0 ldi r24, 0x01 ; 1
|
|
210: be df rcall .-132 ; 0x18e <softPWM(unsigned char, unsigned char, unsigned char)>
|
|
212: 41 e0 ldi r20, 0x01 ; 1
|
|
214: 60 91 83 00 lds r22, 0x0083 ; 0x800083 <__data_end+0x1>
|
|
218: 8e e0 ldi r24, 0x0E ; 14
|
|
21a: b9 cf rjmp .-142 ; 0x18e <softPWM(unsigned char, unsigned char, unsigned char)>
|
|
21c: 3f cf rjmp .-386 ; 0x9c <offLeds()>
|
|
|
|
0000021e <setColor(COLOR, bool) [clone .constprop.4]>:
|
|
_Z8setColor5COLORb():
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:75
|
|
};
|
|
COLOR selectedColor = { 0 , 0 , 0 };
|
|
|
|
void setColor(COLOR paint, bool full = true) {
|
|
//tricolor LED color
|
|
selectedColor = paint;
|
|
21e: 60 93 82 00 sts 0x0082, r22 ; 0x800082 <__data_end>
|
|
222: 70 93 83 00 sts 0x0083, r23 ; 0x800083 <__data_end+0x1>
|
|
226: 80 93 84 00 sts 0x0084, r24 ; 0x800084 <__data_end+0x2>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:80
|
|
selectedColor.r = paint.r;
|
|
selectedColor.b = paint.b;
|
|
selectedColor.g = paint.g;
|
|
//paint contains r g b value for pwm on pins
|
|
showColor();
|
|
22a: e5 cf rjmp .-54 ; 0x1f6 <showColor()>
|
|
|
|
0000022c <pressButton_A()>:
|
|
_Z13pressButton_Av():
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:190
|
|
}
|
|
|
|
//---- BUTTON STATE MACHINE FUNCTIONS
|
|
//Button A:
|
|
void pressButton_A() {
|
|
if (enabled_btnAC == false) {
|
|
22c: 80 91 80 00 lds r24, 0x0080 ; 0x800080 <enabled_btnAC>
|
|
230: 81 11 cpse r24, r1
|
|
232: 03 c0 rjmp .+6 ; 0x23a <pressButton_A()+0xe>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:228
|
|
case 9:
|
|
setColor(grey, true);
|
|
break;
|
|
case 10:
|
|
enabled_LED = false;
|
|
counterA = 0;//TURN OFF
|
|
234: 10 92 96 00 sts 0x0096, r1 ; 0x800096 <counterA>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:231
|
|
break;
|
|
}
|
|
}
|
|
238: 08 95 ret
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:194
|
|
void pressButton_A() {
|
|
if (enabled_btnAC == false) {
|
|
counterA = 0;
|
|
return;//Chek if button is disabled
|
|
}
|
|
switch (counterA) {
|
|
23a: e0 91 96 00 lds r30, 0x0096 ; 0x800096 <counterA>
|
|
23e: e1 50 subi r30, 0x01 ; 1
|
|
240: ea 30 cpi r30, 0x0A ; 10
|
|
242: d0 f7 brcc .-12 ; 0x238 <pressButton_A()+0xc>
|
|
244: f0 e0 ldi r31, 0x00 ; 0
|
|
246: ea 5d subi r30, 0xDA ; 218
|
|
248: fe 4f sbci r31, 0xFE ; 254
|
|
24a: 09 94 ijmp
|
|
24c: 09 c0 rjmp .+18 ; 0x260 <pressButton_A()+0x34>
|
|
24e: 12 c0 rjmp .+36 ; 0x274 <pressButton_A()+0x48>
|
|
250: 1b c0 rjmp .+54 ; 0x288 <pressButton_A()+0x5c>
|
|
252: 23 c0 rjmp .+70 ; 0x29a <pressButton_A()+0x6e>
|
|
254: 29 c0 rjmp .+82 ; 0x2a8 <pressButton_A()+0x7c>
|
|
256: 2f c0 rjmp .+94 ; 0x2b6 <pressButton_A()+0x8a>
|
|
258: 35 c0 rjmp .+106 ; 0x2c4 <pressButton_A()+0x98>
|
|
25a: 3e c0 rjmp .+124 ; 0x2d8 <pressButton_A()+0xac>
|
|
25c: 44 c0 rjmp .+136 ; 0x2e6 <pressButton_A()+0xba>
|
|
25e: 4a c0 rjmp .+148 ; 0x2f4 <pressButton_A()+0xc8>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:196
|
|
case 1:
|
|
enabled_LED = true;
|
|
260: 81 e0 ldi r24, 0x01 ; 1
|
|
262: 80 93 90 00 sts 0x0090, r24 ; 0x800090 <enabled_LED>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:197
|
|
setColor(white, true);
|
|
266: 60 91 78 00 lds r22, 0x0078 ; 0x800078 <white>
|
|
26a: 70 91 79 00 lds r23, 0x0079 ; 0x800079 <white+0x1>
|
|
26e: 80 91 7a 00 lds r24, 0x007A ; 0x80007a <white+0x2>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:224
|
|
break;
|
|
case 8:
|
|
setColor(indigo, true);
|
|
break;
|
|
case 9:
|
|
setColor(grey, true);
|
|
272: d5 cf rjmp .-86 ; 0x21e <setColor(COLOR, bool) [clone .constprop.4]>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:200
|
|
case 1:
|
|
enabled_LED = true;
|
|
setColor(white, true);
|
|
break;
|
|
case 2:
|
|
usePWM = true;
|
|
274: 81 e0 ldi r24, 0x01 ; 1
|
|
276: 80 93 8e 00 sts 0x008E, r24 ; 0x80008e <usePWM>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:201
|
|
setColor(orange, true);
|
|
27a: 60 91 75 00 lds r22, 0x0075 ; 0x800075 <orange>
|
|
27e: 70 91 76 00 lds r23, 0x0076 ; 0x800076 <orange+0x1>
|
|
282: 80 91 77 00 lds r24, 0x0077 ; 0x800077 <orange+0x2>
|
|
286: f5 cf rjmp .-22 ; 0x272 <pressButton_A()+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:204
|
|
break;
|
|
case 3:
|
|
usePWM = false;
|
|
288: 10 92 8e 00 sts 0x008E, r1 ; 0x80008e <usePWM>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:205
|
|
setColor(green, true);
|
|
28c: 60 91 72 00 lds r22, 0x0072 ; 0x800072 <green>
|
|
290: 70 91 73 00 lds r23, 0x0073 ; 0x800073 <green+0x1>
|
|
294: 80 91 74 00 lds r24, 0x0074 ; 0x800074 <green+0x2>
|
|
298: ec cf rjmp .-40 ; 0x272 <pressButton_A()+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:208
|
|
break;
|
|
case 4:
|
|
setColor(yellow, true);
|
|
29a: 60 91 6f 00 lds r22, 0x006F ; 0x80006f <yellow>
|
|
29e: 70 91 70 00 lds r23, 0x0070 ; 0x800070 <yellow+0x1>
|
|
2a2: 80 91 71 00 lds r24, 0x0071 ; 0x800071 <yellow+0x2>
|
|
2a6: e5 cf rjmp .-54 ; 0x272 <pressButton_A()+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:211
|
|
break;
|
|
case 5:
|
|
setColor(red, true);
|
|
2a8: 60 91 6c 00 lds r22, 0x006C ; 0x80006c <red>
|
|
2ac: 70 91 6d 00 lds r23, 0x006D ; 0x80006d <red+0x1>
|
|
2b0: 80 91 6e 00 lds r24, 0x006E ; 0x80006e <red+0x2>
|
|
2b4: de cf rjmp .-68 ; 0x272 <pressButton_A()+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:214
|
|
break;
|
|
case 6:
|
|
setColor(blue, true);
|
|
2b6: 60 91 69 00 lds r22, 0x0069 ; 0x800069 <blue>
|
|
2ba: 70 91 6a 00 lds r23, 0x006A ; 0x80006a <blue+0x1>
|
|
2be: 80 91 6b 00 lds r24, 0x006B ; 0x80006b <blue+0x2>
|
|
2c2: d7 cf rjmp .-82 ; 0x272 <pressButton_A()+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:217
|
|
break;
|
|
case 7:
|
|
usePWM = true;
|
|
2c4: 81 e0 ldi r24, 0x01 ; 1
|
|
2c6: 80 93 8e 00 sts 0x008E, r24 ; 0x80008e <usePWM>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:218
|
|
setColor(purple, true);
|
|
2ca: 60 91 66 00 lds r22, 0x0066 ; 0x800066 <purple>
|
|
2ce: 70 91 67 00 lds r23, 0x0067 ; 0x800067 <purple+0x1>
|
|
2d2: 80 91 68 00 lds r24, 0x0068 ; 0x800068 <purple+0x2>
|
|
2d6: cd cf rjmp .-102 ; 0x272 <pressButton_A()+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:221
|
|
break;
|
|
case 8:
|
|
setColor(indigo, true);
|
|
2d8: 60 91 63 00 lds r22, 0x0063 ; 0x800063 <indigo>
|
|
2dc: 70 91 64 00 lds r23, 0x0064 ; 0x800064 <indigo+0x1>
|
|
2e0: 80 91 65 00 lds r24, 0x0065 ; 0x800065 <indigo+0x2>
|
|
2e4: c6 cf rjmp .-116 ; 0x272 <pressButton_A()+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:224
|
|
break;
|
|
case 9:
|
|
setColor(grey, true);
|
|
2e6: 60 91 60 00 lds r22, 0x0060 ; 0x800060 <__data_start>
|
|
2ea: 70 91 61 00 lds r23, 0x0061 ; 0x800061 <__data_start+0x1>
|
|
2ee: 80 91 62 00 lds r24, 0x0062 ; 0x800062 <__data_start+0x2>
|
|
2f2: bf cf rjmp .-130 ; 0x272 <pressButton_A()+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:227
|
|
break;
|
|
case 10:
|
|
enabled_LED = false;
|
|
2f4: 10 92 90 00 sts 0x0090, r1 ; 0x800090 <enabled_LED>
|
|
2f8: 9d cf rjmp .-198 ; 0x234 <pressButton_A()+0x8>
|
|
|
|
000002fa <loop>:
|
|
loop():
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:128
|
|
pinMode(OPAMP, OUTPUT);
|
|
digitalWrite(OPAMP, OFF);
|
|
}
|
|
|
|
//---- DEVICE LOOP ----
|
|
void loop() {
|
|
2fa: 0f 93 push r16
|
|
2fc: 1f 93 push r17
|
|
2fe: cf 93 push r28
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:131
|
|
|
|
// Detect and debounce button presses
|
|
if ( (millis() - lastDebounceTime) > debounceDelay) {
|
|
300: 0f d1 rcall .+542 ; 0x520 <millis>
|
|
302: 00 91 85 00 lds r16, 0x0085 ; 0x800085 <lastDebounceTime>
|
|
306: 10 91 86 00 lds r17, 0x0086 ; 0x800086 <lastDebounceTime+0x1>
|
|
30a: 20 91 87 00 lds r18, 0x0087 ; 0x800087 <lastDebounceTime+0x2>
|
|
30e: 30 91 88 00 lds r19, 0x0088 ; 0x800088 <lastDebounceTime+0x3>
|
|
312: 60 1b sub r22, r16
|
|
314: 71 0b sbc r23, r17
|
|
316: 82 0b sbc r24, r18
|
|
318: 93 0b sbc r25, r19
|
|
31a: 00 91 7b 00 lds r16, 0x007B ; 0x80007b <debounceDelay>
|
|
31e: 10 91 7c 00 lds r17, 0x007C ; 0x80007c <debounceDelay+0x1>
|
|
322: 20 91 7d 00 lds r18, 0x007D ; 0x80007d <debounceDelay+0x2>
|
|
326: 30 91 7e 00 lds r19, 0x007E ; 0x80007e <debounceDelay+0x3>
|
|
32a: 06 17 cp r16, r22
|
|
32c: 17 07 cpc r17, r23
|
|
32e: 28 07 cpc r18, r24
|
|
330: 39 07 cpc r19, r25
|
|
332: 08 f0 brcs .+2 ; 0x336 <loop+0x3c>
|
|
334: 4e c0 rjmp .+156 ; 0x3d2 <loop+0xd8>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:134
|
|
|
|
//Button A:
|
|
bool pressed_btnA = !digitalRead(btnA);
|
|
336: 89 e0 ldi r24, 0x09 ; 9
|
|
338: 0a d2 rcall .+1044 ; 0x74e <digitalRead>
|
|
33a: c1 e0 ldi r28, 0x01 ; 1
|
|
33c: 00 97 sbiw r24, 0x00 ; 0
|
|
33e: 09 f0 breq .+2 ; 0x342 <loop+0x48>
|
|
340: c0 e0 ldi r28, 0x00 ; 0
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:135
|
|
if (pressed_btnA != last_btnA ) {
|
|
342: 20 91 93 00 lds r18, 0x0093 ; 0x800093 <last_btnA>
|
|
346: 2c 17 cp r18, r28
|
|
348: 69 f0 breq .+26 ; 0x364 <loop+0x6a>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:136
|
|
if (pressed_btnA == true) {
|
|
34a: 89 2b or r24, r25
|
|
34c: 49 f4 brne .+18 ; 0x360 <loop+0x66>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:137
|
|
counterA++;
|
|
34e: 80 91 96 00 lds r24, 0x0096 ; 0x800096 <counterA>
|
|
352: 8f 5f subi r24, 0xFF ; 255
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:138
|
|
if (counterA > 10)counterA = 1;
|
|
354: 8b 30 cpi r24, 0x0B ; 11
|
|
356: 08 f0 brcs .+2 ; 0x35a <loop+0x60>
|
|
358: 74 c0 rjmp .+232 ; 0x442 <__LOCK_REGION_LENGTH__+0x42>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:138 (discriminator 1)
|
|
35a: 80 93 96 00 sts 0x0096, r24 ; 0x800096 <counterA>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:139 (discriminator 1)
|
|
pressButton_A();
|
|
35e: 66 df rcall .-308 ; 0x22c <pressButton_A()>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:141
|
|
}
|
|
last_btnA = pressed_btnA;
|
|
360: c0 93 93 00 sts 0x0093, r28 ; 0x800093 <last_btnA>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:145
|
|
}
|
|
|
|
//Button B:
|
|
bool pressed_btnB = !digitalRead(btnB);
|
|
364: 88 e0 ldi r24, 0x08 ; 8
|
|
366: f3 d1 rcall .+998 ; 0x74e <digitalRead>
|
|
368: c1 e0 ldi r28, 0x01 ; 1
|
|
36a: 00 97 sbiw r24, 0x00 ; 0
|
|
36c: 09 f0 breq .+2 ; 0x370 <loop+0x76>
|
|
36e: c0 e0 ldi r28, 0x00 ; 0
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:146
|
|
if (pressed_btnB != last_btnB ) {
|
|
370: 20 91 92 00 lds r18, 0x0092 ; 0x800092 <last_btnB>
|
|
374: 2c 17 cp r18, r28
|
|
376: 69 f0 breq .+26 ; 0x392 <loop+0x98>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:147
|
|
if (pressed_btnB == true) {
|
|
378: 89 2b or r24, r25
|
|
37a: 49 f4 brne .+18 ; 0x38e <loop+0x94>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:148
|
|
counterB++;
|
|
37c: 80 91 95 00 lds r24, 0x0095 ; 0x800095 <counterB>
|
|
380: 8f 5f subi r24, 0xFF ; 255
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:149
|
|
if (counterB > 2)counterB = 1;
|
|
382: 83 30 cpi r24, 0x03 ; 3
|
|
384: 08 f0 brcs .+2 ; 0x388 <loop+0x8e>
|
|
386: 5f c0 rjmp .+190 ; 0x446 <__LOCK_REGION_LENGTH__+0x46>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:149 (discriminator 1)
|
|
388: 80 93 95 00 sts 0x0095, r24 ; 0x800095 <counterB>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:150 (discriminator 1)
|
|
pressButton_B();
|
|
38c: b2 de rcall .-668 ; 0xf2 <pressButton_B()>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:152
|
|
}
|
|
last_btnB = pressed_btnB;
|
|
38e: c0 93 92 00 sts 0x0092, r28 ; 0x800092 <last_btnB>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:156
|
|
}
|
|
|
|
//Button C:
|
|
bool pressed_btnC = !digitalRead(btnC);
|
|
392: 8d e0 ldi r24, 0x0D ; 13
|
|
394: dc d1 rcall .+952 ; 0x74e <digitalRead>
|
|
396: c1 e0 ldi r28, 0x01 ; 1
|
|
398: 00 97 sbiw r24, 0x00 ; 0
|
|
39a: 09 f0 breq .+2 ; 0x39e <loop+0xa4>
|
|
39c: c0 e0 ldi r28, 0x00 ; 0
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:157
|
|
if (pressed_btnC != last_btnC ) {
|
|
39e: 20 91 91 00 lds r18, 0x0091 ; 0x800091 <last_btnC>
|
|
3a2: 2c 17 cp r18, r28
|
|
3a4: 69 f0 breq .+26 ; 0x3c0 <loop+0xc6>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:158
|
|
if (pressed_btnC == true) {
|
|
3a6: 89 2b or r24, r25
|
|
3a8: 49 f4 brne .+18 ; 0x3bc <loop+0xc2>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:159
|
|
counterC++;
|
|
3aa: 80 91 94 00 lds r24, 0x0094 ; 0x800094 <counterC>
|
|
3ae: 8f 5f subi r24, 0xFF ; 255
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:160
|
|
if (counterC > 2)counterC = 1;
|
|
3b0: 83 30 cpi r24, 0x03 ; 3
|
|
3b2: 08 f0 brcs .+2 ; 0x3b6 <loop+0xbc>
|
|
3b4: 4a c0 rjmp .+148 ; 0x44a <__LOCK_REGION_LENGTH__+0x4a>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:160 (discriminator 1)
|
|
3b6: 80 93 94 00 sts 0x0094, r24 ; 0x800094 <counterC>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:161 (discriminator 1)
|
|
pressButton_C();
|
|
3ba: d3 de rcall .-602 ; 0x162 <pressButton_C()>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:163
|
|
}
|
|
last_btnC = pressed_btnC;
|
|
3bc: c0 93 91 00 sts 0x0091, r28 ; 0x800091 <last_btnC>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:165
|
|
}
|
|
lastDebounceTime = millis(); //set the current time
|
|
3c0: af d0 rcall .+350 ; 0x520 <millis>
|
|
3c2: 60 93 85 00 sts 0x0085, r22 ; 0x800085 <lastDebounceTime>
|
|
3c6: 70 93 86 00 sts 0x0086, r23 ; 0x800086 <lastDebounceTime+0x1>
|
|
3ca: 80 93 87 00 sts 0x0087, r24 ; 0x800087 <lastDebounceTime+0x2>
|
|
3ce: 90 93 88 00 sts 0x0088, r25 ; 0x800088 <lastDebounceTime+0x3>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:168
|
|
}
|
|
|
|
showColor();
|
|
3d2: 11 df rcall .-478 ; 0x1f6 <showColor()>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:171
|
|
|
|
//Counts up and turns UV LED off after 1min
|
|
if (countDelay == true) {
|
|
3d4: 80 91 8d 00 lds r24, 0x008D ; 0x80008d <countDelay>
|
|
3d8: 88 23 and r24, r24
|
|
3da: c9 f1 breq .+114 ; 0x44e <__LOCK_REGION_LENGTH__+0x4e>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:172
|
|
delayCount++;
|
|
3dc: 80 91 89 00 lds r24, 0x0089 ; 0x800089 <delayCount>
|
|
3e0: 90 91 8a 00 lds r25, 0x008A ; 0x80008a <delayCount+0x1>
|
|
3e4: a0 91 8b 00 lds r26, 0x008B ; 0x80008b <delayCount+0x2>
|
|
3e8: b0 91 8c 00 lds r27, 0x008C ; 0x80008c <delayCount+0x3>
|
|
3ec: 01 96 adiw r24, 0x01 ; 1
|
|
3ee: a1 1d adc r26, r1
|
|
3f0: b1 1d adc r27, r1
|
|
3f2: 80 93 89 00 sts 0x0089, r24 ; 0x800089 <delayCount>
|
|
3f6: 90 93 8a 00 sts 0x008A, r25 ; 0x80008a <delayCount+0x1>
|
|
3fa: a0 93 8b 00 sts 0x008B, r26 ; 0x80008b <delayCount+0x2>
|
|
3fe: b0 93 8c 00 sts 0x008C, r27 ; 0x80008c <delayCount+0x3>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:173
|
|
counterB = 1;
|
|
402: 81 e0 ldi r24, 0x01 ; 1
|
|
404: 80 93 95 00 sts 0x0095, r24 ; 0x800095 <counterB>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:176
|
|
}
|
|
else delayCount = 0;
|
|
if (delayCount > 1200000) {
|
|
408: 80 91 89 00 lds r24, 0x0089 ; 0x800089 <delayCount>
|
|
40c: 90 91 8a 00 lds r25, 0x008A ; 0x80008a <delayCount+0x1>
|
|
410: a0 91 8b 00 lds r26, 0x008B ; 0x80008b <delayCount+0x2>
|
|
414: b0 91 8c 00 lds r27, 0x008C ; 0x80008c <delayCount+0x3>
|
|
418: 81 38 cpi r24, 0x81 ; 129
|
|
41a: 9f 44 sbci r25, 0x4F ; 79
|
|
41c: a2 41 sbci r26, 0x12 ; 18
|
|
41e: b1 05 cpc r27, r1
|
|
420: 60 f0 brcs .+24 ; 0x43a <__LOCK_REGION_LENGTH__+0x3a>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:178
|
|
//Turn the UV LED off
|
|
digitalWrite(uv_LED, LOW);
|
|
422: 60 e0 ldi r22, 0x00 ; 0
|
|
424: 86 e0 ldi r24, 0x06 ; 6
|
|
426: 4c d1 rcall .+664 ; 0x6c0 <digitalWrite>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:179
|
|
countDelay = false;
|
|
428: 10 92 8d 00 sts 0x008D, r1 ; 0x80008d <countDelay>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:181
|
|
//Reenable all buttons
|
|
enabled_btnAC = true;
|
|
42c: 81 e0 ldi r24, 0x01 ; 1
|
|
42e: 80 93 80 00 sts 0x0080, r24 ; 0x800080 <enabled_btnAC>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:183
|
|
//LED Status back to before Button B was pushed
|
|
enabled_LED = was_on_LED;
|
|
432: 80 91 8f 00 lds r24, 0x008F ; 0x80008f <was_on_LED>
|
|
436: 80 93 90 00 sts 0x0090, r24 ; 0x800090 <enabled_LED>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:185
|
|
}
|
|
}
|
|
43a: cf 91 pop r28
|
|
43c: 1f 91 pop r17
|
|
43e: 0f 91 pop r16
|
|
440: 08 95 ret
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:138 (discriminator 1)
|
|
//Button A:
|
|
bool pressed_btnA = !digitalRead(btnA);
|
|
if (pressed_btnA != last_btnA ) {
|
|
if (pressed_btnA == true) {
|
|
counterA++;
|
|
if (counterA > 10)counterA = 1;
|
|
442: 81 e0 ldi r24, 0x01 ; 1
|
|
444: 8a cf rjmp .-236 ; 0x35a <loop+0x60>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:149 (discriminator 1)
|
|
//Button B:
|
|
bool pressed_btnB = !digitalRead(btnB);
|
|
if (pressed_btnB != last_btnB ) {
|
|
if (pressed_btnB == true) {
|
|
counterB++;
|
|
if (counterB > 2)counterB = 1;
|
|
446: 81 e0 ldi r24, 0x01 ; 1
|
|
448: 9f cf rjmp .-194 ; 0x388 <loop+0x8e>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:160 (discriminator 1)
|
|
//Button C:
|
|
bool pressed_btnC = !digitalRead(btnC);
|
|
if (pressed_btnC != last_btnC ) {
|
|
if (pressed_btnC == true) {
|
|
counterC++;
|
|
if (counterC > 2)counterC = 1;
|
|
44a: 81 e0 ldi r24, 0x01 ; 1
|
|
44c: b4 cf rjmp .-152 ; 0x3b6 <loop+0xbc>
|
|
F:\Projects\research\trithemius\rev8\firmware\SECUND MILESTONE - CODE(finished tested video)\pocketpsithemius/pocketpsithemius.ino:175
|
|
//Counts up and turns UV LED off after 1min
|
|
if (countDelay == true) {
|
|
delayCount++;
|
|
counterB = 1;
|
|
}
|
|
else delayCount = 0;
|
|
44e: 10 92 89 00 sts 0x0089, r1 ; 0x800089 <delayCount>
|
|
452: 10 92 8a 00 sts 0x008A, r1 ; 0x80008a <delayCount+0x1>
|
|
456: 10 92 8b 00 sts 0x008B, r1 ; 0x80008b <delayCount+0x2>
|
|
45a: 10 92 8c 00 sts 0x008C, r1 ; 0x80008c <delayCount+0x3>
|
|
45e: d4 cf rjmp .-88 ; 0x408 <__LOCK_REGION_LENGTH__+0x8>
|
|
|
|
00000460 <initToneTimerInternal>:
|
|
initToneTimerInternal():
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:642
|
|
PLLCSR |= PCKE;
|
|
}
|
|
#endif
|
|
#if INITIALIZE_SECONDARY_TIMERS
|
|
// Prepare the timer for PWM
|
|
initToneTimerInternal();
|
|
460: 8f b5 in r24, 0x2f ; 47
|
|
462: 80 7f andi r24, 0xF0 ; 240
|
|
464: 8f bd out 0x2f, r24 ; 47
|
|
466: 80 b7 in r24, 0x30 ; 48
|
|
468: 82 60 ori r24, 0x02 ; 2
|
|
46a: 80 bf out 0x30, r24 ; 48
|
|
46c: 80 b7 in r24, 0x30 ; 48
|
|
46e: 81 60 ori r24, 0x01 ; 1
|
|
470: 80 bf out 0x30, r24 ; 48
|
|
472: 87 b5 in r24, 0x27 ; 39
|
|
474: 81 60 ori r24, 0x01 ; 1
|
|
476: 87 bd out 0x27, r24 ; 39
|
|
478: 86 b5 in r24, 0x26 ; 38
|
|
47a: 8d 7f andi r24, 0xFD ; 253
|
|
47c: 86 bd out 0x26, r24 ; 38
|
|
47e: 86 b5 in r24, 0x26 ; 38
|
|
480: 81 60 ori r24, 0x01 ; 1
|
|
482: 86 bd out 0x26, r24 ; 38
|
|
484: 8f b5 in r24, 0x2f ; 47
|
|
486: 87 60 ori r24, 0x07 ; 7
|
|
488: 8f bd out 0x2f, r24 ; 47
|
|
48a: 08 95 ret
|
|
|
|
0000048c <__vector_6>:
|
|
__vector_6():
|
|
48c: 1f 92 push r1
|
|
48e: 0f 92 push r0
|
|
490: 0f b6 in r0, 0x3f ; 63
|
|
492: 0f 92 push r0
|
|
494: 11 24 eor r1, r1
|
|
496: 2f 93 push r18
|
|
498: 3f 93 push r19
|
|
49a: 8f 93 push r24
|
|
49c: 9f 93 push r25
|
|
49e: af 93 push r26
|
|
4a0: bf 93 push r27
|
|
4a2: 80 91 98 00 lds r24, 0x0098 ; 0x800098 <millis_timer_millis>
|
|
4a6: 90 91 99 00 lds r25, 0x0099 ; 0x800099 <millis_timer_millis+0x1>
|
|
4aa: a0 91 9a 00 lds r26, 0x009A ; 0x80009a <millis_timer_millis+0x2>
|
|
4ae: b0 91 9b 00 lds r27, 0x009B ; 0x80009b <millis_timer_millis+0x3>
|
|
4b2: 30 91 97 00 lds r19, 0x0097 ; 0x800097 <millis_timer_fract>
|
|
4b6: 23 e0 ldi r18, 0x03 ; 3
|
|
4b8: 23 0f add r18, r19
|
|
4ba: 2d 37 cpi r18, 0x7D ; 125
|
|
4bc: 68 f1 brcs .+90 ; 0x518 <__vector_6+0x8c>
|
|
4be: 26 e8 ldi r18, 0x86 ; 134
|
|
4c0: 23 0f add r18, r19
|
|
4c2: 02 96 adiw r24, 0x02 ; 2
|
|
4c4: a1 1d adc r26, r1
|
|
4c6: b1 1d adc r27, r1
|
|
4c8: 20 93 97 00 sts 0x0097, r18 ; 0x800097 <millis_timer_fract>
|
|
4cc: 80 93 98 00 sts 0x0098, r24 ; 0x800098 <millis_timer_millis>
|
|
4d0: 90 93 99 00 sts 0x0099, r25 ; 0x800099 <millis_timer_millis+0x1>
|
|
4d4: a0 93 9a 00 sts 0x009A, r26 ; 0x80009a <millis_timer_millis+0x2>
|
|
4d8: b0 93 9b 00 sts 0x009B, r27 ; 0x80009b <millis_timer_millis+0x3>
|
|
4dc: 80 91 9c 00 lds r24, 0x009C ; 0x80009c <millis_timer_overflow_count>
|
|
4e0: 90 91 9d 00 lds r25, 0x009D ; 0x80009d <millis_timer_overflow_count+0x1>
|
|
4e4: a0 91 9e 00 lds r26, 0x009E ; 0x80009e <millis_timer_overflow_count+0x2>
|
|
4e8: b0 91 9f 00 lds r27, 0x009F ; 0x80009f <millis_timer_overflow_count+0x3>
|
|
4ec: 01 96 adiw r24, 0x01 ; 1
|
|
4ee: a1 1d adc r26, r1
|
|
4f0: b1 1d adc r27, r1
|
|
4f2: 80 93 9c 00 sts 0x009C, r24 ; 0x80009c <millis_timer_overflow_count>
|
|
4f6: 90 93 9d 00 sts 0x009D, r25 ; 0x80009d <millis_timer_overflow_count+0x1>
|
|
4fa: a0 93 9e 00 sts 0x009E, r26 ; 0x80009e <millis_timer_overflow_count+0x2>
|
|
4fe: b0 93 9f 00 sts 0x009F, r27 ; 0x80009f <millis_timer_overflow_count+0x3>
|
|
502: bf 91 pop r27
|
|
504: af 91 pop r26
|
|
506: 9f 91 pop r25
|
|
508: 8f 91 pop r24
|
|
50a: 3f 91 pop r19
|
|
50c: 2f 91 pop r18
|
|
50e: 0f 90 pop r0
|
|
510: 0f be out 0x3f, r0 ; 63
|
|
512: 0f 90 pop r0
|
|
514: 1f 90 pop r1
|
|
516: 18 95 reti
|
|
518: 01 96 adiw r24, 0x01 ; 1
|
|
51a: a1 1d adc r26, r1
|
|
51c: b1 1d adc r27, r1
|
|
51e: d4 cf rjmp .-88 ; 0x4c8 <__vector_6+0x3c>
|
|
|
|
00000520 <millis>:
|
|
millis():
|
|
520: 2f b7 in r18, 0x3f ; 63
|
|
522: f8 94 cli
|
|
524: 60 91 98 00 lds r22, 0x0098 ; 0x800098 <millis_timer_millis>
|
|
528: 70 91 99 00 lds r23, 0x0099 ; 0x800099 <millis_timer_millis+0x1>
|
|
52c: 80 91 9a 00 lds r24, 0x009A ; 0x80009a <millis_timer_millis+0x2>
|
|
530: 90 91 9b 00 lds r25, 0x009B ; 0x80009b <millis_timer_millis+0x3>
|
|
534: 2f bf out 0x3f, r18 ; 63
|
|
536: 08 95 ret
|
|
|
|
00000538 <delayMicroseconds>:
|
|
delayMicroseconds():
|
|
538: 82 30 cpi r24, 0x02 ; 2
|
|
53a: 91 05 cpc r25, r1
|
|
53c: 38 f0 brcs .+14 ; 0x54c <delayMicroseconds+0x14>
|
|
53e: 88 0f add r24, r24
|
|
540: 99 1f adc r25, r25
|
|
542: 88 0f add r24, r24
|
|
544: 99 1f adc r25, r25
|
|
546: 05 97 sbiw r24, 0x05 ; 5
|
|
548: 01 97 sbiw r24, 0x01 ; 1
|
|
54a: f1 f7 brne .-4 ; 0x548 <delayMicroseconds+0x10>
|
|
54c: 08 95 ret
|
|
|
|
0000054e <init>:
|
|
init():
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:699
|
|
} else {
|
|
OSCCAL += 5;
|
|
}
|
|
}
|
|
#endif
|
|
sei();
|
|
54e: 78 94 sei
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:855
|
|
#endif
|
|
|
|
// Millis timer is always processor clock divided by MillisTimer_Prescale_Value (64)
|
|
#if (TIMER_TO_USE_FOR_MILLIS == 0)
|
|
#ifdef TCCR0B
|
|
TCCR0B = (TCCR0B & ~((1<<CS02)|(1<<CS01)|(1<<CS00))) | (MillisTimer_Prescale_Index << CS00);
|
|
550: 83 b7 in r24, 0x33 ; 51
|
|
552: 88 7f andi r24, 0xF8 ; 248
|
|
554: 83 60 ori r24, 0x03 ; 3
|
|
556: 83 bf out 0x33, r24 ; 51
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:867
|
|
TCCR1B = (TCCR1B & ~((1<<CS13)|(1<<CS12)|(1<<CS11)|(1<<CS10))) | (MillisTimer_Prescale_Index << CS10);
|
|
#elif (TIMER_TO_USE_FOR_MILLIS == 1)
|
|
TCCR1B = (TCCR1B & ~((1<<CS12)|(1<<CS11)|(1<<CS10))) | (MillisTimer_Prescale_Index << CS10);
|
|
#endif
|
|
// this needs to be called before setup() or some functions won't work there
|
|
sei();
|
|
558: 78 94 sei
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:872
|
|
|
|
#ifndef DISABLEMILLIS
|
|
// Enable the overlow interrupt (this is the basic system tic-toc for millis)
|
|
#if defined(TIMSK) && defined(TOIE0) && (TIMER_TO_USE_FOR_MILLIS == 0)
|
|
sbi(TIMSK, TOIE0);
|
|
55a: 89 b7 in r24, 0x39 ; 57
|
|
55c: 82 60 ori r24, 0x02 ; 2
|
|
55e: 89 bf out 0x39, r24 ; 57
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:886
|
|
#endif
|
|
#endif
|
|
|
|
// Initialize the timer used for Tone
|
|
#if INITIALIZE_SECONDARY_TIMERS
|
|
initToneTimerInternal();
|
|
560: 7f df rcall .-258 ; 0x460 <initToneTimerInternal>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:893
|
|
|
|
// Initialize the ADC
|
|
#if defined( INITIALIZE_ANALOG_TO_DIGITAL_CONVERTER ) && INITIALIZE_ANALOG_TO_DIGITAL_CONVERTER
|
|
#if defined(ADCSRA)
|
|
// set a2d prescale factor
|
|
ADCSRA = (ADCSRA & ~((1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0))) | (ADC_ARDUINO_PRESCALER << ADPS0) | (1<<ADEN);
|
|
562: 86 b1 in r24, 0x06 ; 6
|
|
564: 87 68 ori r24, 0x87 ; 135
|
|
566: 86 b9 out 0x06, r24 ; 6
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:895
|
|
// enable a2d conversions
|
|
sbi(ADCSRA, ADEN);
|
|
568: 37 9a sbi 0x06, 7 ; 6
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring.c:898
|
|
#endif
|
|
#endif
|
|
}
|
|
56a: 08 95 ret
|
|
|
|
0000056c <analogWrite>:
|
|
analogWrite():
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:95
|
|
// Right now, PWM output only works on the pins with
|
|
// hardware support. These are defined in the appropriate
|
|
// pins_*.c file. For the rest of the pins, we default
|
|
// to digital output.
|
|
void analogWrite(uint8_t pin, int val)
|
|
{
|
|
56c: 1f 93 push r17
|
|
56e: cf 93 push r28
|
|
570: df 93 push r29
|
|
572: 18 2f mov r17, r24
|
|
574: eb 01 movw r28, r22
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:101
|
|
// We need to make sure the PWM output is enabled for those pins
|
|
// that support it, as we turn it off when digitally reading or
|
|
// writing with them. Also, make sure the pin is in output mode
|
|
// for consistenty with Wiring, which doesn't require a pinMode
|
|
// call for the analog output pins.
|
|
pinMode(pin, OUTPUT);
|
|
576: 61 e0 ldi r22, 0x01 ; 1
|
|
578: 4f d0 rcall .+158 ; 0x618 <pinMode>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:103
|
|
|
|
if (val <= 0)
|
|
57a: 1c 16 cp r1, r28
|
|
57c: 1d 06 cpc r1, r29
|
|
57e: 34 f0 brlt .+12 ; 0x58c <analogWrite+0x20>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:105
|
|
{
|
|
digitalWrite(pin, LOW);
|
|
580: 60 e0 ldi r22, 0x00 ; 0
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:109
|
|
}
|
|
else if (val >= 255)
|
|
{
|
|
digitalWrite(pin, HIGH);
|
|
582: 81 2f mov r24, r17
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:216
|
|
digitalWrite(pin, HIGH);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
584: df 91 pop r29
|
|
586: cf 91 pop r28
|
|
588: 1f 91 pop r17
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:109
|
|
{
|
|
digitalWrite(pin, LOW);
|
|
}
|
|
else if (val >= 255)
|
|
{
|
|
digitalWrite(pin, HIGH);
|
|
58a: 9a c0 rjmp .+308 ; 0x6c0 <digitalWrite>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:107
|
|
|
|
if (val <= 0)
|
|
{
|
|
digitalWrite(pin, LOW);
|
|
}
|
|
else if (val >= 255)
|
|
58c: cf 3f cpi r28, 0xFF ; 255
|
|
58e: d1 05 cpc r29, r1
|
|
590: 14 f0 brlt .+4 ; 0x596 <analogWrite+0x2a>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:109
|
|
{
|
|
digitalWrite(pin, HIGH);
|
|
592: 61 e0 ldi r22, 0x01 ; 1
|
|
594: f6 cf rjmp .-20 ; 0x582 <analogWrite+0x16>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:113
|
|
}
|
|
else
|
|
{
|
|
uint8_t timer = digitalPinToTimer(pin);
|
|
596: e1 2f mov r30, r17
|
|
598: f0 e0 ldi r31, 0x00 ; 0
|
|
59a: ea 5d subi r30, 0xDA ; 218
|
|
59c: ff 4f sbci r31, 0xFF ; 255
|
|
59e: e4 91 lpm r30, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:150
|
|
OCR1A = val; // set pwm duty
|
|
} else
|
|
#endif
|
|
|
|
#if defined(TCCR1E) //Tiny861
|
|
if( timer == TIMER1A){
|
|
5a0: e3 30 cpi r30, 0x03 ; 3
|
|
5a2: 59 f4 brne .+22 ; 0x5ba <analogWrite+0x4e>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:152
|
|
// connect pwm to pin on timer 1, channel A
|
|
cbi(TCCR1C,COM1A1S);
|
|
5a4: 87 b5 in r24, 0x27 ; 39
|
|
5a6: 8f 77 andi r24, 0x7F ; 127
|
|
5a8: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:153
|
|
sbi(TCCR1C,COM1A0S);
|
|
5aa: 87 b5 in r24, 0x27 ; 39
|
|
5ac: 80 64 ori r24, 0x40 ; 64
|
|
5ae: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:155
|
|
//sbi(TCCR1A,PWM1A);
|
|
OCR1A = val; // set pwm duty
|
|
5b0: cd bd out 0x2d, r28 ; 45
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:216
|
|
digitalWrite(pin, HIGH);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
5b2: df 91 pop r29
|
|
5b4: cf 91 pop r28
|
|
5b6: 1f 91 pop r17
|
|
5b8: 08 95 ret
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:156
|
|
// connect pwm to pin on timer 1, channel A
|
|
cbi(TCCR1C,COM1A1S);
|
|
sbi(TCCR1C,COM1A0S);
|
|
//sbi(TCCR1A,PWM1A);
|
|
OCR1A = val; // set pwm duty
|
|
} else if (timer == TIMER1B){
|
|
5ba: e4 30 cpi r30, 0x04 ; 4
|
|
5bc: 41 f4 brne .+16 ; 0x5ce <analogWrite+0x62>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:158
|
|
// connect pwm to pin on timer 1, channel A
|
|
cbi(TCCR1C,COM1B1S);
|
|
5be: 87 b5 in r24, 0x27 ; 39
|
|
5c0: 8f 7d andi r24, 0xDF ; 223
|
|
5c2: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:159
|
|
sbi(TCCR1C,COM1B0S);
|
|
5c4: 87 b5 in r24, 0x27 ; 39
|
|
5c6: 80 61 ori r24, 0x10 ; 16
|
|
5c8: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:161
|
|
//sbi(TCCR1A,PWM1B);
|
|
OCR1B = val; // set pwm duty
|
|
5ca: cc bd out 0x2c, r28 ; 44
|
|
5cc: f2 cf rjmp .-28 ; 0x5b2 <analogWrite+0x46>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:162
|
|
} else if (timer == TIMER1D){
|
|
5ce: e5 30 cpi r30, 0x05 ; 5
|
|
5d0: 41 f4 brne .+16 ; 0x5e2 <analogWrite+0x76>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:164
|
|
// connect pwm to pin on timer 1, channel A
|
|
cbi(TCCR1C,COM1D1);
|
|
5d2: 87 b5 in r24, 0x27 ; 39
|
|
5d4: 87 7f andi r24, 0xF7 ; 247
|
|
5d6: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:165
|
|
sbi(TCCR1C,COM1D0);
|
|
5d8: 87 b5 in r24, 0x27 ; 39
|
|
5da: 84 60 ori r24, 0x04 ; 4
|
|
5dc: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:167
|
|
//sbi(TCCR1A,PWM1D);
|
|
OCR1D = val; // set pwm duty
|
|
5de: ca bd out 0x2a, r28 ; 42
|
|
5e0: e8 cf rjmp .-48 ; 0x5b2 <analogWrite+0x46>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_analog.c:205
|
|
OCR1B = val; // set pwm duty
|
|
} else
|
|
#endif
|
|
|
|
{
|
|
if (val < 128)
|
|
5e2: c0 38 cpi r28, 0x80 ; 128
|
|
5e4: d1 05 cpc r29, r1
|
|
5e6: ac f6 brge .-86 ; 0x592 <analogWrite+0x26>
|
|
5e8: cb cf rjmp .-106 ; 0x580 <analogWrite+0x14>
|
|
|
|
000005ea <turnOffPWM>:
|
|
turnOffPWM():
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:81
|
|
//cbi(TCCR0A, COM0B0);
|
|
} else
|
|
#endif
|
|
|
|
#if defined(TCCR1A) && defined(COM1A1)
|
|
if( timer == TIMER1A){
|
|
5ea: 83 30 cpi r24, 0x03 ; 3
|
|
5ec: 21 f4 brne .+8 ; 0x5f6 <turnOffPWM+0xc>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:82
|
|
cbi(TCCR1A, COM1A1);
|
|
5ee: 80 b7 in r24, 0x30 ; 48
|
|
5f0: 8f 77 andi r24, 0x7F ; 127
|
|
5f2: 80 bf out 0x30, r24 ; 48
|
|
5f4: 08 95 ret
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:92
|
|
if( timer == TIMER1A){
|
|
// disconnect pwm to pin on timer 1, channel A
|
|
cbi(TCCR1C,COM1A1S);
|
|
cbi(TCCR1C,COM1A0S);
|
|
//cbi(TCCR1A,PWM1A);
|
|
} else if (timer == TIMER1B){
|
|
5f6: 84 30 cpi r24, 0x04 ; 4
|
|
5f8: 39 f4 brne .+14 ; 0x608 <turnOffPWM+0x1e>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:94
|
|
// disconnect pwm to pin on timer 1, channel B
|
|
cbi(TCCR1C,COM1B1S);
|
|
5fa: 87 b5 in r24, 0x27 ; 39
|
|
5fc: 8f 7d andi r24, 0xDF ; 223
|
|
5fe: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:95
|
|
cbi(TCCR1C,COM1B0S);
|
|
600: 87 b5 in r24, 0x27 ; 39
|
|
602: 8f 7e andi r24, 0xEF ; 239
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:100
|
|
//cbi(TCCR1A,PWM1B);
|
|
} else if (timer == TIMER1D){
|
|
// disconnect pwm to pin on timer 1, channel D
|
|
cbi(TCCR1C,COM1D1);
|
|
cbi(TCCR1C,COM1D0);
|
|
604: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:134
|
|
#endif
|
|
|
|
{
|
|
}
|
|
|
|
}
|
|
606: 08 95 ret
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:97
|
|
} else if (timer == TIMER1B){
|
|
// disconnect pwm to pin on timer 1, channel B
|
|
cbi(TCCR1C,COM1B1S);
|
|
cbi(TCCR1C,COM1B0S);
|
|
//cbi(TCCR1A,PWM1B);
|
|
} else if (timer == TIMER1D){
|
|
608: 85 30 cpi r24, 0x05 ; 5
|
|
60a: e9 f7 brne .-6 ; 0x606 <turnOffPWM+0x1c>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:99
|
|
// disconnect pwm to pin on timer 1, channel D
|
|
cbi(TCCR1C,COM1D1);
|
|
60c: 87 b5 in r24, 0x27 ; 39
|
|
60e: 87 7f andi r24, 0xF7 ; 247
|
|
610: 87 bd out 0x27, r24 ; 39
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:100
|
|
cbi(TCCR1C,COM1D0);
|
|
612: 87 b5 in r24, 0x27 ; 39
|
|
614: 8b 7f andi r24, 0xFB ; 251
|
|
616: f6 cf rjmp .-20 ; 0x604 <turnOffPWM+0x1a>
|
|
|
|
00000618 <pinMode>:
|
|
pinMode():
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:33
|
|
#define ARDUINO_MAIN
|
|
#include "wiring_private.h"
|
|
#include "pins_arduino.h"
|
|
|
|
void pinMode(uint8_t pin, uint8_t mode)
|
|
{
|
|
618: cf 93 push r28
|
|
61a: df 93 push r29
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:34
|
|
if (pin&128) {pin=analogInputToDigitalPin((pin&127));}
|
|
61c: 87 ff sbrs r24, 7
|
|
61e: 0c c0 rjmp .+24 ; 0x638 <pinMode+0x20>
|
|
620: 8f 77 andi r24, 0x7F ; 127
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:34 (discriminator 1)
|
|
622: 83 30 cpi r24, 0x03 ; 3
|
|
624: 48 f0 brcs .+18 ; 0x638 <pinMode+0x20>
|
|
626: 28 2f mov r18, r24
|
|
628: 30 e0 ldi r19, 0x00 ; 0
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:34 (discriminator 3)
|
|
62a: a9 01 movw r20, r18
|
|
62c: 43 50 subi r20, 0x03 ; 3
|
|
62e: 51 09 sbc r21, r1
|
|
630: 44 30 cpi r20, 0x04 ; 4
|
|
632: 51 05 cpc r21, r1
|
|
634: 40 f5 brcc .+80 ; 0x686 <pinMode+0x6e>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:34 (discriminator 5)
|
|
636: 89 5f subi r24, 0xF9 ; 249
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:35
|
|
uint8_t bit = digitalPinToBitMask(pin);
|
|
638: 90 e0 ldi r25, 0x00 ; 0
|
|
63a: fc 01 movw r30, r24
|
|
63c: ea 5c subi r30, 0xCA ; 202
|
|
63e: ff 4f sbci r31, 0xFF ; 255
|
|
640: 24 91 lpm r18, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:36
|
|
uint8_t port = digitalPinToPort(pin);
|
|
642: 8a 5b subi r24, 0xBA ; 186
|
|
644: 9f 4f sbci r25, 0xFF ; 255
|
|
646: fc 01 movw r30, r24
|
|
648: 84 91 lpm r24, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:39
|
|
volatile uint8_t *reg, *out;
|
|
|
|
if (port == NOT_A_PIN) return;
|
|
64a: 88 23 and r24, r24
|
|
64c: c9 f0 breq .+50 ; 0x680 <pinMode+0x68>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:41
|
|
|
|
reg = portModeRegister(port);
|
|
64e: 90 e0 ldi r25, 0x00 ; 0
|
|
650: 88 0f add r24, r24
|
|
652: 99 1f adc r25, r25
|
|
654: fc 01 movw r30, r24
|
|
656: ee 59 subi r30, 0x9E ; 158
|
|
658: ff 4f sbci r31, 0xFF ; 255
|
|
65a: a5 91 lpm r26, Z+
|
|
65c: b4 91 lpm r27, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:42
|
|
out = portOutputRegister(port);
|
|
65e: fc 01 movw r30, r24
|
|
660: e4 5a subi r30, 0xA4 ; 164
|
|
662: ff 4f sbci r31, 0xFF ; 255
|
|
664: c5 91 lpm r28, Z+
|
|
666: d4 91 lpm r29, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:44
|
|
|
|
if (mode == INPUT) {
|
|
668: 61 11 cpse r22, r1
|
|
66a: 17 c0 rjmp .+46 ; 0x69a <pinMode+0x82>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:45
|
|
uint8_t oldSREG = SREG;
|
|
66c: 9f b7 in r25, 0x3f ; 63
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:46
|
|
cli();
|
|
66e: f8 94 cli
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:47
|
|
*reg &= ~bit;
|
|
670: 8c 91 ld r24, X
|
|
672: 20 95 com r18
|
|
674: 82 23 and r24, r18
|
|
676: 8c 93 st X, r24
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:48
|
|
*out &= ~bit;
|
|
678: 88 81 ld r24, Y
|
|
67a: 28 23 and r18, r24
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:54
|
|
SREG = oldSREG;
|
|
} else if (mode == INPUT_PULLUP) {
|
|
uint8_t oldSREG = SREG;
|
|
cli();
|
|
*reg &= ~bit;
|
|
*out |= bit;
|
|
67c: 28 83 st Y, r18
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:55
|
|
SREG = oldSREG;
|
|
67e: 9f bf out 0x3f, r25 ; 63
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:62
|
|
uint8_t oldSREG = SREG;
|
|
cli();
|
|
*reg |= bit;
|
|
SREG = oldSREG;
|
|
}
|
|
}
|
|
680: df 91 pop r29
|
|
682: cf 91 pop r28
|
|
684: 08 95 ret
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:34 (discriminator 6)
|
|
#include "wiring_private.h"
|
|
#include "pins_arduino.h"
|
|
|
|
void pinMode(uint8_t pin, uint8_t mode)
|
|
{
|
|
if (pin&128) {pin=analogInputToDigitalPin((pin&127));}
|
|
686: 27 50 subi r18, 0x07 ; 7
|
|
688: 31 09 sbc r19, r1
|
|
68a: 9c e0 ldi r25, 0x0C ; 12
|
|
68c: 98 1b sub r25, r24
|
|
68e: 89 2f mov r24, r25
|
|
690: 23 30 cpi r18, 0x03 ; 3
|
|
692: 31 05 cpc r19, r1
|
|
694: 88 f2 brcs .-94 ; 0x638 <pinMode+0x20>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:34
|
|
696: 8f ef ldi r24, 0xFF ; 255
|
|
698: cf cf rjmp .-98 ; 0x638 <pinMode+0x20>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:50
|
|
uint8_t oldSREG = SREG;
|
|
cli();
|
|
*reg &= ~bit;
|
|
*out &= ~bit;
|
|
SREG = oldSREG;
|
|
} else if (mode == INPUT_PULLUP) {
|
|
69a: 62 30 cpi r22, 0x02 ; 2
|
|
69c: 51 f4 brne .+20 ; 0x6b2 <pinMode+0x9a>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:51
|
|
uint8_t oldSREG = SREG;
|
|
69e: 9f b7 in r25, 0x3f ; 63
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:52
|
|
cli();
|
|
6a0: f8 94 cli
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:53
|
|
*reg &= ~bit;
|
|
6a2: 3c 91 ld r19, X
|
|
6a4: 82 2f mov r24, r18
|
|
6a6: 80 95 com r24
|
|
6a8: 83 23 and r24, r19
|
|
6aa: 8c 93 st X, r24
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:54
|
|
*out |= bit;
|
|
6ac: e8 81 ld r30, Y
|
|
6ae: 2e 2b or r18, r30
|
|
6b0: e5 cf rjmp .-54 ; 0x67c <pinMode+0x64>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:57
|
|
SREG = oldSREG;
|
|
} else {
|
|
uint8_t oldSREG = SREG;
|
|
6b2: 8f b7 in r24, 0x3f ; 63
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:58
|
|
cli();
|
|
6b4: f8 94 cli
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:59
|
|
*reg |= bit;
|
|
6b6: ec 91 ld r30, X
|
|
6b8: 2e 2b or r18, r30
|
|
6ba: 2c 93 st X, r18
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:60
|
|
SREG = oldSREG;
|
|
6bc: 8f bf out 0x3f, r24 ; 63
|
|
6be: e0 cf rjmp .-64 ; 0x680 <pinMode+0x68>
|
|
|
|
000006c0 <digitalWrite>:
|
|
digitalWrite():
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:137
|
|
}
|
|
|
|
}
|
|
|
|
void digitalWrite(uint8_t pin, uint8_t val)
|
|
{
|
|
6c0: 1f 93 push r17
|
|
6c2: cf 93 push r28
|
|
6c4: df 93 push r29
|
|
6c6: 16 2f mov r17, r22
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:138
|
|
if (pin&128) {pin=analogInputToDigitalPin((pin&127));}
|
|
6c8: 87 ff sbrs r24, 7
|
|
6ca: 0c c0 rjmp .+24 ; 0x6e4 <digitalWrite+0x24>
|
|
6cc: 8f 77 andi r24, 0x7F ; 127
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:138 (discriminator 1)
|
|
6ce: 83 30 cpi r24, 0x03 ; 3
|
|
6d0: 48 f0 brcs .+18 ; 0x6e4 <digitalWrite+0x24>
|
|
6d2: 28 2f mov r18, r24
|
|
6d4: 30 e0 ldi r19, 0x00 ; 0
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:138 (discriminator 3)
|
|
6d6: a9 01 movw r20, r18
|
|
6d8: 43 50 subi r20, 0x03 ; 3
|
|
6da: 51 09 sbc r21, r1
|
|
6dc: 44 30 cpi r20, 0x04 ; 4
|
|
6de: 51 05 cpc r21, r1
|
|
6e0: 40 f5 brcc .+80 ; 0x732 <digitalWrite+0x72>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:138 (discriminator 5)
|
|
6e2: 89 5f subi r24, 0xF9 ; 249
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:139
|
|
uint8_t timer = digitalPinToTimer(pin);
|
|
6e4: 28 2f mov r18, r24
|
|
6e6: 30 e0 ldi r19, 0x00 ; 0
|
|
6e8: f9 01 movw r30, r18
|
|
6ea: ea 5d subi r30, 0xDA ; 218
|
|
6ec: ff 4f sbci r31, 0xFF ; 255
|
|
6ee: 84 91 lpm r24, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:140
|
|
uint8_t bit = digitalPinToBitMask(pin);
|
|
6f0: f9 01 movw r30, r18
|
|
6f2: ea 5c subi r30, 0xCA ; 202
|
|
6f4: ff 4f sbci r31, 0xFF ; 255
|
|
6f6: d4 91 lpm r29, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:141
|
|
uint8_t port = digitalPinToPort(pin);
|
|
6f8: f9 01 movw r30, r18
|
|
6fa: ea 5b subi r30, 0xBA ; 186
|
|
6fc: ff 4f sbci r31, 0xFF ; 255
|
|
6fe: c4 91 lpm r28, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:144
|
|
volatile uint8_t *out;
|
|
|
|
if (port == NOT_A_PIN) return;
|
|
700: cc 23 and r28, r28
|
|
702: 99 f0 breq .+38 ; 0x72a <digitalWrite+0x6a>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:148
|
|
|
|
// If the pin that support PWM output, we need to turn it off
|
|
// before doing a digital write.
|
|
if (timer != NOT_ON_TIMER) turnOffPWM(timer);
|
|
704: 81 11 cpse r24, r1
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:148 (discriminator 1)
|
|
706: 71 df rcall .-286 ; 0x5ea <turnOffPWM>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:150
|
|
|
|
out = portOutputRegister(port);
|
|
708: ec 2f mov r30, r28
|
|
70a: f0 e0 ldi r31, 0x00 ; 0
|
|
70c: ee 0f add r30, r30
|
|
70e: ff 1f adc r31, r31
|
|
710: e4 5a subi r30, 0xA4 ; 164
|
|
712: ff 4f sbci r31, 0xFF ; 255
|
|
714: a5 91 lpm r26, Z+
|
|
716: b4 91 lpm r27, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:153
|
|
|
|
if (val == LOW) {
|
|
uint8_t oldSREG = SREG;
|
|
718: 8f b7 in r24, 0x3f ; 63
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:152
|
|
// before doing a digital write.
|
|
if (timer != NOT_ON_TIMER) turnOffPWM(timer);
|
|
|
|
out = portOutputRegister(port);
|
|
|
|
if (val == LOW) {
|
|
71a: 11 11 cpse r17, r1
|
|
71c: 14 c0 rjmp .+40 ; 0x746 <digitalWrite+0x86>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:154
|
|
uint8_t oldSREG = SREG;
|
|
cli();
|
|
71e: f8 94 cli
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:155
|
|
*out &= ~bit;
|
|
720: ec 91 ld r30, X
|
|
722: d0 95 com r29
|
|
724: de 23 and r29, r30
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:160
|
|
SREG = oldSREG;
|
|
} else {
|
|
uint8_t oldSREG = SREG;
|
|
cli();
|
|
*out |= bit;
|
|
726: dc 93 st X, r29
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:161
|
|
SREG = oldSREG;
|
|
728: 8f bf out 0x3f, r24 ; 63
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:163
|
|
}
|
|
}
|
|
72a: df 91 pop r29
|
|
72c: cf 91 pop r28
|
|
72e: 1f 91 pop r17
|
|
730: 08 95 ret
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:138 (discriminator 6)
|
|
|
|
}
|
|
|
|
void digitalWrite(uint8_t pin, uint8_t val)
|
|
{
|
|
if (pin&128) {pin=analogInputToDigitalPin((pin&127));}
|
|
732: 27 50 subi r18, 0x07 ; 7
|
|
734: 31 09 sbc r19, r1
|
|
736: 9c e0 ldi r25, 0x0C ; 12
|
|
738: 98 1b sub r25, r24
|
|
73a: 89 2f mov r24, r25
|
|
73c: 23 30 cpi r18, 0x03 ; 3
|
|
73e: 31 05 cpc r19, r1
|
|
740: 88 f2 brcs .-94 ; 0x6e4 <digitalWrite+0x24>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:138
|
|
742: 8f ef ldi r24, 0xFF ; 255
|
|
744: cf cf rjmp .-98 ; 0x6e4 <digitalWrite+0x24>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:159
|
|
cli();
|
|
*out &= ~bit;
|
|
SREG = oldSREG;
|
|
} else {
|
|
uint8_t oldSREG = SREG;
|
|
cli();
|
|
746: f8 94 cli
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:160
|
|
*out |= bit;
|
|
748: ec 91 ld r30, X
|
|
74a: de 2b or r29, r30
|
|
74c: ec cf rjmp .-40 ; 0x726 <digitalWrite+0x66>
|
|
|
|
0000074e <digitalRead>:
|
|
digitalRead():
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:166
|
|
SREG = oldSREG;
|
|
}
|
|
}
|
|
|
|
int digitalRead(uint8_t pin)
|
|
{
|
|
74e: cf 93 push r28
|
|
750: df 93 push r29
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:167
|
|
if (pin&128) {pin=analogInputToDigitalPin((pin&127));}
|
|
752: 87 ff sbrs r24, 7
|
|
754: 0c c0 rjmp .+24 ; 0x76e <digitalRead+0x20>
|
|
756: 8f 77 andi r24, 0x7F ; 127
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:167 (discriminator 1)
|
|
758: 83 30 cpi r24, 0x03 ; 3
|
|
75a: 48 f0 brcs .+18 ; 0x76e <digitalRead+0x20>
|
|
75c: 28 2f mov r18, r24
|
|
75e: 30 e0 ldi r19, 0x00 ; 0
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:167 (discriminator 3)
|
|
760: a9 01 movw r20, r18
|
|
762: 43 50 subi r20, 0x03 ; 3
|
|
764: 51 09 sbc r21, r1
|
|
766: 44 30 cpi r20, 0x04 ; 4
|
|
768: 51 05 cpc r21, r1
|
|
76a: 20 f5 brcc .+72 ; 0x7b4 <digitalRead+0x66>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:167 (discriminator 5)
|
|
76c: 89 5f subi r24, 0xF9 ; 249
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:168
|
|
uint8_t timer = digitalPinToTimer(pin);
|
|
76e: 28 2f mov r18, r24
|
|
770: 30 e0 ldi r19, 0x00 ; 0
|
|
772: f9 01 movw r30, r18
|
|
774: ea 5d subi r30, 0xDA ; 218
|
|
776: ff 4f sbci r31, 0xFF ; 255
|
|
778: 84 91 lpm r24, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:169
|
|
uint8_t bit = digitalPinToBitMask(pin);
|
|
77a: f9 01 movw r30, r18
|
|
77c: ea 5c subi r30, 0xCA ; 202
|
|
77e: ff 4f sbci r31, 0xFF ; 255
|
|
780: d4 91 lpm r29, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:170
|
|
uint8_t port = digitalPinToPort(pin);
|
|
782: f9 01 movw r30, r18
|
|
784: ea 5b subi r30, 0xBA ; 186
|
|
786: ff 4f sbci r31, 0xFF ; 255
|
|
788: c4 91 lpm r28, Z
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:172
|
|
|
|
if (port == NOT_A_PIN) return LOW;
|
|
78a: cc 23 and r28, r28
|
|
78c: e9 f0 breq .+58 ; 0x7c8 <digitalRead+0x7a>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:176
|
|
|
|
// If the pin that support PWM output, we need to turn it off
|
|
// before getting a digital reading.
|
|
if (timer != NOT_ON_TIMER) turnOffPWM(timer);
|
|
78e: 81 11 cpse r24, r1
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:176 (discriminator 1)
|
|
790: 2c df rcall .-424 ; 0x5ea <turnOffPWM>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:178
|
|
|
|
if (*portInputRegister(port) & bit) return HIGH;
|
|
792: ec 2f mov r30, r28
|
|
794: f0 e0 ldi r31, 0x00 ; 0
|
|
796: ee 0f add r30, r30
|
|
798: ff 1f adc r31, r31
|
|
79a: ea 5a subi r30, 0xAA ; 170
|
|
79c: ff 4f sbci r31, 0xFF ; 255
|
|
79e: a5 91 lpm r26, Z+
|
|
7a0: b4 91 lpm r27, Z
|
|
7a2: ec 91 ld r30, X
|
|
7a4: ed 23 and r30, r29
|
|
7a6: 81 e0 ldi r24, 0x01 ; 1
|
|
7a8: 90 e0 ldi r25, 0x00 ; 0
|
|
7aa: 09 f4 brne .+2 ; 0x7ae <digitalRead+0x60>
|
|
7ac: 80 e0 ldi r24, 0x00 ; 0
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:180
|
|
return LOW;
|
|
}
|
|
7ae: df 91 pop r29
|
|
7b0: cf 91 pop r28
|
|
7b2: 08 95 ret
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:167 (discriminator 6)
|
|
}
|
|
}
|
|
|
|
int digitalRead(uint8_t pin)
|
|
{
|
|
if (pin&128) {pin=analogInputToDigitalPin((pin&127));}
|
|
7b4: 27 50 subi r18, 0x07 ; 7
|
|
7b6: 31 09 sbc r19, r1
|
|
7b8: 9c e0 ldi r25, 0x0C ; 12
|
|
7ba: 98 1b sub r25, r24
|
|
7bc: 89 2f mov r24, r25
|
|
7be: 23 30 cpi r18, 0x03 ; 3
|
|
7c0: 31 05 cpc r19, r1
|
|
7c2: a8 f2 brcs .-86 ; 0x76e <digitalRead+0x20>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:167
|
|
7c4: 8f ef ldi r24, 0xFF ; 255
|
|
7c6: d3 cf rjmp .-90 ; 0x76e <digitalRead+0x20>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/wiring_digital.c:172
|
|
uint8_t timer = digitalPinToTimer(pin);
|
|
uint8_t bit = digitalPinToBitMask(pin);
|
|
uint8_t port = digitalPinToPort(pin);
|
|
|
|
if (port == NOT_A_PIN) return LOW;
|
|
7c8: 80 e0 ldi r24, 0x00 ; 0
|
|
7ca: 90 e0 ldi r25, 0x00 ; 0
|
|
7cc: f0 cf rjmp .-32 ; 0x7ae <digitalRead+0x60>
|
|
|
|
000007ce <main>:
|
|
main():
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/main.cpp:6
|
|
#include <Arduino.h>
|
|
|
|
int main(void)
|
|
{
|
|
#ifdef TUNED_OSCCAL_VALUE
|
|
OSCCAL = TUNED_OSCCAL_VALUE; //set the oscillator calibration value based on the pins_arduino.h file. If this is not set, it will be optimised away
|
|
7ce: 81 b7 in r24, 0x31 ; 49
|
|
7d0: 81 bf out 0x31, r24 ; 49
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/main.cpp:8
|
|
#endif
|
|
init();
|
|
7d2: bd de rcall .-646 ; 0x54e <init>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/main.cpp:10
|
|
|
|
setup();
|
|
7d4: 6f dc rcall .-1826 ; 0xb4 <setup>
|
|
C:\Users\flux\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.3.3\cores\tiny/main.cpp:13 (discriminator 1)
|
|
|
|
for (;;)
|
|
loop();
|
|
7d6: 91 dd rcall .-1246 ; 0x2fa <loop>
|
|
7d8: fe cf rjmp .-4 ; 0x7d6 <main+0x8>
|
|
|
|
000007da <_exit>:
|
|
exit():
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2278
|
|
7da: f8 94 cli
|
|
|
|
000007dc <__stop_program>:
|
|
__stop_program():
|
|
/home/jenkins-mingw32/workspace/avr-gcc-staging/label/Ubuntu14.04x64-mingw32/gcc-build/avr/avr25/tiny-stack/libgcc/../../../../../gcc/libgcc/config/avr/lib1funcs.S:2280
|
|
7dc: ff cf rjmp .-2 ; 0x7dc <__stop_program>
|