|
Dump for version d020013b18aedae08e7d2b3c1cd7dac5bc331bf3 of motor-driver |
|
https://github.com/kylemcdonald/Highsight/commit/d020013b18aedae08e7d2b3c1cd7dac5bc331bf3 |
|
|
|
created with |
|
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-objdump -d -S -j .text /var/folders/2b/bhcmg0h95z71bn0lyxzs0f3m0000gn/T/build3273403602098544096.tmp/motor_driver.cpp.elf > /tmp/motor_driver.cpp.asm |
|
|
|
|
|
/var/folders/2b/bhcmg0h95z71bn0lyxzs0f3m0000gn/T/build3273403602098544096.tmp/motor_driver.cpp.elf: file format elf32-avr |
|
|
|
|
|
Disassembly of section .text: |
|
|
|
00000000 <__vectors>: |
|
} |
|
|
|
|
|
|
|
// Non-blocking version |
|
void OscSerial::listen() { |
|
0: 0c 94 8b 00 jmp 0x116 ; 0x116 <__dtors_end> |
|
4: 0c 94 95 29 jmp 0x532a ; 0x532a <__vector_1> |
|
8: 0c 94 c2 29 jmp 0x5384 ; 0x5384 <__vector_2> |
|
int size; |
|
if( (size = slip->available()) > 0) { |
|
c: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
10: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
14: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
18: 0c 94 be 01 jmp 0x37c ; 0x37c <__vector_6> |
|
1c: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
20: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
while(size--) msgIN.fill(slip->read()); |
|
} |
|
if (!slip->endofPacket()) return; |
|
24: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
28: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
2c: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
30: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
|
|
// Non-blocking version |
|
void OscSerial::listen() { |
|
int size; |
|
if( (size = slip->available()) > 0) { |
|
while(size--) msgIN.fill(slip->read()); |
|
34: 0c 94 a6 0d jmp 0x1b4c ; 0x1b4c <__vector_13> |
|
38: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
3c: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
40: 0c 94 ef 29 jmp 0x53de ; 0x53de <__vector_16> |
|
44: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
48: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
4c: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
50: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
} |
|
if (!slip->endofPacket()) return; |
|
|
|
if (!msgIN.hasError()) { |
|
54: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
58: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
5c: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
oscEvent(msgIN); |
|
60: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
} |
|
|
|
msgIN.reset(); |
|
64: 0c 94 b3 00 jmp 0x166 ; 0x166 <__bad_interrupt> |
|
} |
|
68: 9b 09 sbc r25, r11 |
|
6a: 9e 09 sbc r25, r14 |
|
6c: a1 09 sbc r26, r1 |
|
|
|
if (!msgIN.hasError()) { |
|
oscEvent(msgIN); |
|
} |
|
|
|
msgIN.reset(); |
|
6e: ba 09 sbc r27, r10 |
|
70: a7 09 sbc r26, r7 |
|
} |
|
72: aa 09 sbc r26, r10 |
|
74: a4 09 sbc r26, r4 |
|
76: b7 09 sbc r27, r7 |
|
78: ad 09 sbc r26, r13 |
|
7a: 0a 1c adc r0, r10 |
|
} |
|
return 1; // we may have more but this is the only sure bet |
|
} |
|
else if(rstate==SLIPESC) |
|
return 1; |
|
else if(rstate==FIRSTEOT) |
|
7c: 10 1c adc r1, r0 |
|
7e: 18 1c adc r1, r8 |
|
80: 26 1c adc r2, r6 |
|
{ |
|
if(serial->peek()==eot) |
|
82: 31 1c adc r3, r1 |
|
84: 43 1c adc r4, r3 |
|
86: 4b 1c adc r4, r11 |
|
88: 05 a8 ldd r0, Z+53 ; 0x35 |
|
8a: 4c cd rjmp .-1384 ; 0xfffffb24 <__eeprom_end+0xff7efb24> |
|
8c: b2 d4 rcall .+2404 ; 0x9f2 <_Z6oscGo2R10OscMessage+0x3c> |
|
8e: 4e b9 out 0x0e, r20 ; 14 |
|
90: 38 36 cpi r19, 0x68 ; 104 |
|
92: a9 02 muls r26, r25 |
|
94: 0c 50 subi r16, 0x0C ; 12 |
|
96: b9 91 ld r27, Y+ |
|
98: 86 88 ldd r8, Z+22 ; 0x16 |
|
{ |
|
rstate = SECONDEOT; |
|
9a: 08 3c cpi r16, 0xC8 ; 200 |
|
9c: a6 aa std Z+54, r10 ; 0x36 |
|
9e: aa 2a or r10, r26 |
|
a0: be 00 .word 0x00be ; ???? |
|
serial->read(); // throw it on the floor |
|
a2: 00 00 nop |
|
a4: 80 3f cpi r24, 0xF0 ; 240 |
|
|
|
000000a6 <__trampolines_end>: |
|
a6: 00 00 nop |
|
a8: 00 08 sbc r0, r0 |
|
aa: 00 02 muls r16, r16 |
|
ac: 01 00 .word 0x0001 ; ???? |
|
ae: 00 03 mulsu r16, r16 |
|
b0: 04 07 cpc r16, r20 |
|
... |
|
|
|
000000ba <digital_pin_to_bit_mask_PGM>: |
|
return 0; |
|
} |
|
rstate = CHAR; |
|
}else if (rstate==SECONDEOT) { |
|
rstate = CHAR; |
|
ba: 01 02 04 08 10 20 40 80 01 02 04 08 10 20 01 02 ..... @...... .. |
|
} |
|
|
|
return 0; |
|
} |
|
ca: 04 08 10 20 ... |
|
|
|
000000ce <digital_pin_to_port_PGM>: |
|
ce: 04 04 04 04 04 04 04 04 02 02 02 02 02 02 03 03 ................ |
|
de: 03 03 03 03 .... |
|
|
|
000000e2 <port_to_input_PGM>: |
|
e2: 00 00 00 00 23 00 26 00 29 00 ....#.&.). |
|
|
|
000000ec <port_to_output_PGM>: |
|
ec: 00 00 00 00 25 00 28 00 2b 00 ....%.(.+. |
|
|
|
000000f6 <port_to_mode_PGM>: |
|
f6: 00 00 00 00 24 00 27 00 2a 00 ....$.'.*. |
|
|
|
00000100 <__ctors_start>: |
|
100: 58 02 muls r21, r24 |
|
102: af 0c add r10, r15 |
|
104: 4d 1d adc r20, r13 |
|
106: 7d 1d adc r23, r13 |
|
108: d6 1d adc r29, r6 |
|
10a: 25 22 and r2, r21 |
|
10c: 33 22 and r3, r19 |
|
10e: 3e 22 and r3, r30 |
|
110: 14 24 eor r1, r4 |
|
112: f5 2b or r31, r21 |
|
|
|
00000114 <__ctors_end>: |
|
114: 38 0d add r19, r8 |
|
|
|
00000116 <__dtors_end>: |
|
116: 11 24 eor r1, r1 |
|
118: 1f be out 0x3f, r1 ; 63 |
|
11a: cf ef ldi r28, 0xFF ; 255 |
|
11c: d8 e0 ldi r29, 0x08 ; 8 |
|
11e: de bf out 0x3e, r29 ; 62 |
|
120: cd bf out 0x3d, r28 ; 61 |
|
|
|
00000122 <__do_copy_data>: |
|
122: 12 e0 ldi r17, 0x02 ; 2 |
|
124: a0 e0 ldi r26, 0x00 ; 0 |
|
126: b1 e0 ldi r27, 0x01 ; 1 |
|
128: e8 ee ldi r30, 0xE8 ; 232 |
|
12a: f3 e6 ldi r31, 0x63 ; 99 |
|
12c: 02 c0 rjmp .+4 ; 0x132 <__do_copy_data+0x10> |
|
12e: 05 90 lpm r0, Z+ |
|
130: 0d 92 st X+, r0 |
|
132: ae 33 cpi r26, 0x3E ; 62 |
|
134: b1 07 cpc r27, r17 |
|
136: d9 f7 brne .-10 ; 0x12e <__do_copy_data+0xc> |
|
|
|
00000138 <__do_clear_bss>: |
|
138: 23 e0 ldi r18, 0x03 ; 3 |
|
13a: ae e3 ldi r26, 0x3E ; 62 |
|
13c: b2 e0 ldi r27, 0x02 ; 2 |
|
13e: 01 c0 rjmp .+2 ; 0x142 <.do_clear_bss_start> |
|
|
|
00000140 <.do_clear_bss_loop>: |
|
140: 1d 92 st X+, r1 |
|
|
|
00000142 <.do_clear_bss_start>: |
|
142: a2 38 cpi r26, 0x82 ; 130 |
|
144: b2 07 cpc r27, r18 |
|
146: e1 f7 brne .-8 ; 0x140 <.do_clear_bss_loop> |
|
|
|
00000148 <__do_global_ctors>: |
|
148: 11 e0 ldi r17, 0x01 ; 1 |
|
14a: c4 e1 ldi r28, 0x14 ; 20 |
|
14c: d1 e0 ldi r29, 0x01 ; 1 |
|
14e: 04 c0 rjmp .+8 ; 0x158 <__do_global_ctors+0x10> |
|
150: 22 97 sbiw r28, 0x02 ; 2 |
|
152: fe 01 movw r30, r28 |
|
154: 0e 94 64 2f call 0x5ec8 ; 0x5ec8 <__tablejump__> |
|
158: c0 30 cpi r28, 0x00 ; 0 |
|
15a: d1 07 cpc r29, r17 |
|
15c: c9 f7 brne .-14 ; 0x150 <__do_global_ctors+0x8> |
|
15e: 0e 94 05 2c call 0x580a ; 0x580a <main> |
|
162: 0c 94 e7 31 jmp 0x63ce ; 0x63ce <__do_global_dtors> |
|
|
|
00000166 <__bad_interrupt>: |
|
166: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> |
|
|
|
0000016a <_ZN8Watchdog19CApplicationMonitorC1Eii>: |
|
nBaseAddress: The address in the eeprom where crash data should be stored. |
|
nMaxEntries: The maximum number of crash entries that should be stored in the |
|
eeprom. Storage of eeprom data will take up sizeof(CApplicationMonitorHeader) + |
|
nMaxEntries * sizeof(CCrashReport) bytes in the eeprom. |
|
*/ |
|
CApplicationMonitor::CApplicationMonitor(int nBaseAddress, int nMaxEntries) |
|
16a: fc 01 movw r30, r24 |
|
: c_nBaseAddress(nBaseAddress), c_nMaxEntries(nMaxEntries) |
|
16c: 71 83 std Z+1, r23 ; 0x01 |
|
16e: 60 83 st Z, r22 |
|
170: 53 83 std Z+3, r21 ; 0x03 |
|
172: 42 83 std Z+2, r20 ; 0x02 |
|
{ |
|
m_CrashReport.m_uData = 0; |
|
174: 16 82 std Z+6, r1 ; 0x06 |
|
176: 17 82 std Z+7, r1 ; 0x07 |
|
178: 10 86 std Z+8, r1 ; 0x08 |
|
17a: 11 86 std Z+9, r1 ; 0x09 |
|
17c: 08 95 ret |
|
|
|
0000017e <_ZN8Watchdog19CApplicationMonitor14EnableWatchdogENS0_8ETimeoutE>: |
|
resetting the micro. When the interrupt fires, we save the program counter |
|
to the eeprom. |
|
*/ |
|
void CApplicationMonitor::EnableWatchdog(CApplicationMonitor::ETimeout Timeout) |
|
{ |
|
wdt_enable(Timeout); |
|
17e: 63 ff sbrs r22, 3 |
|
180: 02 c0 rjmp .+4 ; 0x186 <_ZN8Watchdog19CApplicationMonitor14EnableWatchdogENS0_8ETimeoutE+0x8> |
|
182: 88 e2 ldi r24, 0x28 ; 40 |
|
184: 01 c0 rjmp .+2 ; 0x188 <_ZN8Watchdog19CApplicationMonitor14EnableWatchdogENS0_8ETimeoutE+0xa> |
|
186: 88 e0 ldi r24, 0x08 ; 8 |
|
188: 67 70 andi r22, 0x07 ; 7 |
|
18a: 68 2b or r22, r24 |
|
18c: 88 e1 ldi r24, 0x18 ; 24 |
|
18e: 90 e0 ldi r25, 0x00 ; 0 |
|
190: 0f b6 in r0, 0x3f ; 63 |
|
192: f8 94 cli |
|
194: a8 95 wdr |
|
196: 80 93 60 00 sts 0x0060, r24 |
|
19a: 0f be out 0x3f, r0 ; 63 |
|
19c: 60 93 60 00 sts 0x0060, r22 |
|
WDTCSR |= _BV(WDIE); |
|
1a0: 80 91 60 00 lds r24, 0x0060 |
|
1a4: 80 64 ori r24, 0x40 ; 64 |
|
1a6: 80 93 60 00 sts 0x0060, r24 |
|
1aa: 08 95 ret |
|
|
|
000001ac <_ZNK8Watchdog19CApplicationMonitor8IAmAliveEv>: |
|
Lets the watchdog timer know the program is still alive. Call this before |
|
the watchdog timeout ellapses to prevent program being aborted. |
|
*/ |
|
void CApplicationMonitor::IAmAlive() const |
|
{ |
|
wdt_reset(); |
|
1ac: a8 95 wdr |
|
1ae: 08 95 ret |
|
|
|
000001b0 <_ZNK8Watchdog19CApplicationMonitor19GetAddressForReportEi>: |
|
|
|
int CApplicationMonitor::GetAddressForReport(int nReport) const |
|
{ |
|
int nAddress; |
|
|
|
nAddress = c_nBaseAddress + sizeof(CApplicationMonitorHeader); |
|
1b0: fc 01 movw r30, r24 |
|
1b2: 20 81 ld r18, Z |
|
1b4: 31 81 ldd r19, Z+1 ; 0x01 |
|
1b6: 2e 5f subi r18, 0xFE ; 254 |
|
1b8: 3f 4f sbci r19, 0xFF ; 255 |
|
if (nReport < c_nMaxEntries) |
|
1ba: 82 81 ldd r24, Z+2 ; 0x02 |
|
1bc: 93 81 ldd r25, Z+3 ; 0x03 |
|
1be: 68 17 cp r22, r24 |
|
1c0: 79 07 cpc r23, r25 |
|
1c2: 14 f0 brlt .+4 ; 0x1c8 <_ZNK8Watchdog19CApplicationMonitor19GetAddressForReportEi+0x18> |
|
|
|
int CApplicationMonitor::GetAddressForReport(int nReport) const |
|
{ |
|
int nAddress; |
|
|
|
nAddress = c_nBaseAddress + sizeof(CApplicationMonitorHeader); |
|
1c4: c9 01 movw r24, r18 |
|
1c6: 08 95 ret |
|
if (nReport < c_nMaxEntries) |
|
nAddress += nReport * sizeof(m_CrashReport); |
|
1c8: 46 e0 ldi r20, 0x06 ; 6 |
|
1ca: 46 9f mul r20, r22 |
|
1cc: c0 01 movw r24, r0 |
|
1ce: 47 9f mul r20, r23 |
|
1d0: 90 0d add r25, r0 |
|
1d2: 11 24 eor r1, r1 |
|
1d4: 82 0f add r24, r18 |
|
1d6: 93 1f adc r25, r19 |
|
return nAddress; |
|
} |
|
1d8: 08 95 ret |
|
|
|
000001da <_ZNK8Watchdog19CApplicationMonitor9ReadBlockEiPvh>: |
|
|
|
void CApplicationMonitor::ReadBlock(int nBaseAddress, void *pData, uint8_t uSize) const |
|
{ |
|
1da: ef 92 push r14 |
|
1dc: ff 92 push r15 |
|
1de: 0f 93 push r16 |
|
1e0: 1f 93 push r17 |
|
1e2: cf 93 push r28 |
|
1e4: df 93 push r29 |
|
1e6: 1f 92 push r1 |
|
1e8: cd b7 in r28, 0x3d ; 61 |
|
1ea: de b7 in r29, 0x3e ; 62 |
|
1ec: 8b 01 movw r16, r22 |
|
uint8_t *puData = (uint8_t *)pData; |
|
while (uSize --) |
|
1ee: 7a 01 movw r14, r20 |
|
1f0: 04 1b sub r16, r20 |
|
1f2: 15 0b sbc r17, r21 |
|
1f4: 21 50 subi r18, 0x01 ; 1 |
|
1f6: 58 f0 brcs .+22 ; 0x20e <_ZNK8Watchdog19CApplicationMonitor9ReadBlockEiPvh+0x34> |
|
*puData++ = eeprom_read_byte((const uint8_t *)nBaseAddress++); |
|
1f8: c8 01 movw r24, r16 |
|
1fa: 8e 0d add r24, r14 |
|
1fc: 9f 1d adc r25, r15 |
|
1fe: 29 83 std Y+1, r18 ; 0x01 |
|
200: 0e 94 9a 31 call 0x6334 ; 0x6334 <__eerd_byte_m328p> |
|
204: f7 01 movw r30, r14 |
|
206: 81 93 st Z+, r24 |
|
208: 7f 01 movw r14, r30 |
|
20a: 29 81 ldd r18, Y+1 ; 0x01 |
|
20c: f3 cf rjmp .-26 ; 0x1f4 <_ZNK8Watchdog19CApplicationMonitor9ReadBlockEiPvh+0x1a> |
|
} |
|
20e: 0f 90 pop r0 |
|
210: df 91 pop r29 |
|
212: cf 91 pop r28 |
|
214: 1f 91 pop r17 |
|
216: 0f 91 pop r16 |
|
218: ff 90 pop r15 |
|
21a: ef 90 pop r14 |
|
21c: 08 95 ret |
|
|
|
0000021e <_ZNK8Watchdog19CApplicationMonitor10LoadHeaderERNS_25CApplicationMonitorHeaderE>: |
|
while (true) |
|
; |
|
} |
|
|
|
void CApplicationMonitor::LoadHeader(CApplicationMonitorHeader &rReportHeader) const |
|
{ |
|
21e: 0f 93 push r16 |
|
220: 1f 93 push r17 |
|
222: cf 93 push r28 |
|
224: df 93 push r29 |
|
226: 8c 01 movw r16, r24 |
|
228: eb 01 movw r28, r22 |
|
ReadBlock(c_nBaseAddress, &rReportHeader, sizeof(rReportHeader)); |
|
22a: fc 01 movw r30, r24 |
|
22c: 60 81 ld r22, Z |
|
22e: 71 81 ldd r23, Z+1 ; 0x01 |
|
230: 22 e0 ldi r18, 0x02 ; 2 |
|
232: ae 01 movw r20, r28 |
|
234: 0e 94 ed 00 call 0x1da ; 0x1da <_ZNK8Watchdog19CApplicationMonitor9ReadBlockEiPvh> |
|
|
|
// Ensure the report structure is valid. |
|
if (rReportHeader.m_uSavedReports == 0xff) // eeprom is 0xff when uninitialized |
|
238: 28 81 ld r18, Y |
|
23a: 2f 3f cpi r18, 0xFF ; 255 |
|
23c: 11 f4 brne .+4 ; 0x242 <_ZNK8Watchdog19CApplicationMonitor10LoadHeaderERNS_25CApplicationMonitorHeaderE+0x24> |
|
rReportHeader.m_uSavedReports = 0; |
|
23e: 18 82 st Y, r1 |
|
240: 08 c0 rjmp .+16 ; 0x252 <_ZNK8Watchdog19CApplicationMonitor10LoadHeaderERNS_25CApplicationMonitorHeaderE+0x34> |
|
else if (rReportHeader.m_uSavedReports > c_nMaxEntries) |
|
242: f8 01 movw r30, r16 |
|
244: 82 81 ldd r24, Z+2 ; 0x02 |
|
246: 93 81 ldd r25, Z+3 ; 0x03 |
|
248: 30 e0 ldi r19, 0x00 ; 0 |
|
24a: 82 17 cp r24, r18 |
|
24c: 93 07 cpc r25, r19 |
|
24e: 0c f4 brge .+2 ; 0x252 <_ZNK8Watchdog19CApplicationMonitor10LoadHeaderERNS_25CApplicationMonitorHeaderE+0x34> |
|
rReportHeader.m_uSavedReports = c_nMaxEntries; |
|
250: 88 83 st Y, r24 |
|
|
|
if (rReportHeader.m_uNextReport >= c_nMaxEntries) |
|
252: 29 81 ldd r18, Y+1 ; 0x01 |
|
254: 30 e0 ldi r19, 0x00 ; 0 |
|
256: f8 01 movw r30, r16 |
|
258: 82 81 ldd r24, Z+2 ; 0x02 |
|
25a: 93 81 ldd r25, Z+3 ; 0x03 |
|
25c: 28 17 cp r18, r24 |
|
25e: 39 07 cpc r19, r25 |
|
260: 0c f0 brlt .+2 ; 0x264 <_ZNK8Watchdog19CApplicationMonitor10LoadHeaderERNS_25CApplicationMonitorHeaderE+0x46> |
|
rReportHeader.m_uNextReport = 0; |
|
262: 19 82 std Y+1, r1 ; 0x01 |
|
} |
|
264: df 91 pop r29 |
|
266: cf 91 pop r28 |
|
268: 1f 91 pop r17 |
|
26a: 0f 91 pop r16 |
|
26c: 08 95 ret |
|
|
|
0000026e <_ZNK8Watchdog19CApplicationMonitor10LoadReportEiRNS_12CCrashReportE>: |
|
{ |
|
WriteBlock(GetAddressForReport(nReportSlot), &m_CrashReport, sizeof(m_CrashReport)); |
|
} |
|
|
|
void CApplicationMonitor::LoadReport(int nReport, CCrashReport &rState) const |
|
{ |
|
26e: 0f 93 push r16 |
|
270: 1f 93 push r17 |
|
272: cf 93 push r28 |
|
274: df 93 push r29 |
|
276: 8c 01 movw r16, r24 |
|
278: ea 01 movw r28, r20 |
|
ReadBlock(GetAddressForReport(nReport), &rState, sizeof(rState)); |
|
27a: 0e 94 d8 00 call 0x1b0 ; 0x1b0 <_ZNK8Watchdog19CApplicationMonitor19GetAddressForReportEi> |
|
27e: 26 e0 ldi r18, 0x06 ; 6 |
|
280: ae 01 movw r20, r28 |
|
282: bc 01 movw r22, r24 |
|
284: c8 01 movw r24, r16 |
|
286: 0e 94 ed 00 call 0x1da ; 0x1da <_ZNK8Watchdog19CApplicationMonitor9ReadBlockEiPvh> |
|
|
|
// The return address is reversed when we read it off the stack. Correct that. |
|
// by reversing the byte order. Assuming PROGRAM_COUNTER_SIZE is 2 or 3. |
|
uint8_t uTemp; |
|
uTemp = rState.m_auAddress[0]; |
|
28a: 88 81 ld r24, Y |
|
rState.m_auAddress[0] = rState.m_auAddress[PROGRAM_COUNTER_SIZE - 1]; |
|
28c: 99 81 ldd r25, Y+1 ; 0x01 |
|
28e: 98 83 st Y, r25 |
|
rState.m_auAddress[PROGRAM_COUNTER_SIZE - 1] = uTemp; |
|
290: 89 83 std Y+1, r24 ; 0x01 |
|
} |
|
292: df 91 pop r29 |
|
294: cf 91 pop r28 |
|
296: 1f 91 pop r17 |
|
298: 0f 91 pop r16 |
|
29a: 08 95 ret |
|
|
|
0000029c <_ZNK8Watchdog19CApplicationMonitor10WriteBlockEiPKvh>: |
|
while (uSize --) |
|
*puData++ = eeprom_read_byte((const uint8_t *)nBaseAddress++); |
|
} |
|
|
|
void CApplicationMonitor::WriteBlock(int nBaseAddress, const void *pData, uint8_t uSize) const |
|
{ |
|
29c: ef 92 push r14 |
|
29e: ff 92 push r15 |
|
2a0: 0f 93 push r16 |
|
2a2: 1f 93 push r17 |
|
2a4: cf 93 push r28 |
|
2a6: df 93 push r29 |
|
2a8: 1f 92 push r1 |
|
2aa: cd b7 in r28, 0x3d ; 61 |
|
2ac: de b7 in r29, 0x3e ; 62 |
|
2ae: 7b 01 movw r14, r22 |
|
2b0: 8a 01 movw r16, r20 |
|
2b2: 26 0f add r18, r22 |
|
const uint8_t *puData = (const uint8_t *)pData; |
|
while (uSize --) |
|
2b4: 2e 15 cp r18, r14 |
|
2b6: 61 f0 breq .+24 ; 0x2d0 <_ZNK8Watchdog19CApplicationMonitor10WriteBlockEiPKvh+0x34> |
|
eeprom_write_byte((uint8_t *)nBaseAddress++, *puData++); |
|
2b8: f8 01 movw r30, r16 |
|
2ba: 61 91 ld r22, Z+ |
|
2bc: 8f 01 movw r16, r30 |
|
2be: c7 01 movw r24, r14 |
|
2c0: 29 83 std Y+1, r18 ; 0x01 |
|
2c2: 0e 94 a2 31 call 0x6344 ; 0x6344 <__eewr_byte_m328p> |
|
2c6: ff ef ldi r31, 0xFF ; 255 |
|
2c8: ef 1a sub r14, r31 |
|
2ca: ff 0a sbc r15, r31 |
|
2cc: 29 81 ldd r18, Y+1 ; 0x01 |
|
2ce: f2 cf rjmp .-28 ; 0x2b4 <_ZNK8Watchdog19CApplicationMonitor10WriteBlockEiPKvh+0x18> |
|
} |
|
2d0: 0f 90 pop r0 |
|
2d2: df 91 pop r29 |
|
2d4: cf 91 pop r28 |
|
2d6: 1f 91 pop r17 |
|
2d8: 0f 91 pop r16 |
|
2da: ff 90 pop r15 |
|
2dc: ef 90 pop r14 |
|
2de: 08 95 ret |
|
|
|
000002e0 <_ZNK8Watchdog19CApplicationMonitor10SaveHeaderERKNS_25CApplicationMonitorHeaderE>: |
|
if (rReportHeader.m_uNextReport >= c_nMaxEntries) |
|
rReportHeader.m_uNextReport = 0; |
|
} |
|
|
|
void CApplicationMonitor::SaveHeader(const CApplicationMonitorHeader &rReportHeader) const |
|
{ |
|
2e0: ab 01 movw r20, r22 |
|
WriteBlock(c_nBaseAddress, &rReportHeader, sizeof(rReportHeader)); |
|
2e2: fc 01 movw r30, r24 |
|
2e4: 60 81 ld r22, Z |
|
2e6: 71 81 ldd r23, Z+1 ; 0x01 |
|
2e8: 22 e0 ldi r18, 0x02 ; 2 |
|
2ea: 0c 94 4e 01 jmp 0x29c ; 0x29c <_ZNK8Watchdog19CApplicationMonitor10WriteBlockEiPKvh> |
|
|
|
000002ee <_ZNK8Watchdog19CApplicationMonitor17SaveCurrentReportEi>: |
|
} |
|
|
|
void CApplicationMonitor::SaveCurrentReport(int nReportSlot) const |
|
{ |
|
2ee: cf 93 push r28 |
|
2f0: df 93 push r29 |
|
2f2: ec 01 movw r28, r24 |
|
WriteBlock(GetAddressForReport(nReportSlot), &m_CrashReport, sizeof(m_CrashReport)); |
|
2f4: 0e 94 d8 00 call 0x1b0 ; 0x1b0 <_ZNK8Watchdog19CApplicationMonitor19GetAddressForReportEi> |
|
2f8: ae 01 movw r20, r28 |
|
2fa: 4c 5f subi r20, 0xFC ; 252 |
|
2fc: 5f 4f sbci r21, 0xFF ; 255 |
|
2fe: 26 e0 ldi r18, 0x06 ; 6 |
|
300: bc 01 movw r22, r24 |
|
302: ce 01 movw r24, r28 |
|
} |
|
304: df 91 pop r29 |
|
306: cf 91 pop r28 |
|
WriteBlock(c_nBaseAddress, &rReportHeader, sizeof(rReportHeader)); |
|
} |
|
|
|
void CApplicationMonitor::SaveCurrentReport(int nReportSlot) const |
|
{ |
|
WriteBlock(GetAddressForReport(nReportSlot), &m_CrashReport, sizeof(m_CrashReport)); |
|
308: 0c 94 4e 01 jmp 0x29c ; 0x29c <_ZNK8Watchdog19CApplicationMonitor10WriteBlockEiPKvh> |
|
|
|
0000030c <_ZN8Watchdog19CApplicationMonitor24WatchdogInterruptHandlerEPh>: |
|
if (bNewLine) |
|
rDestination.println(); |
|
} |
|
|
|
void CApplicationMonitor::WatchdogInterruptHandler(uint8_t *puProgramAddress) |
|
{ |
|
30c: cf 93 push r28 |
|
30e: df 93 push r29 |
|
310: 00 d0 rcall .+0 ; 0x312 <_ZN8Watchdog19CApplicationMonitor24WatchdogInterruptHandlerEPh+0x6> |
|
312: cd b7 in r28, 0x3d ; 61 |
|
314: de b7 in r29, 0x3e ; 62 |
|
316: 8c 01 movw r16, r24 |
|
318: 7b 01 movw r14, r22 |
|
CApplicationMonitorHeader Header; |
|
|
|
LoadHeader(Header); |
|
31a: be 01 movw r22, r28 |
|
31c: 6f 5f subi r22, 0xFF ; 255 |
|
31e: 7f 4f sbci r23, 0xFF ; 255 |
|
320: 0e 94 0f 01 call 0x21e ; 0x21e <_ZNK8Watchdog19CApplicationMonitor10LoadHeaderERNS_25CApplicationMonitorHeaderE> |
|
memcpy(m_CrashReport.m_auAddress, puProgramAddress, PROGRAM_COUNTER_SIZE); |
|
324: f7 01 movw r30, r14 |
|
326: 80 81 ld r24, Z |
|
328: 91 81 ldd r25, Z+1 ; 0x01 |
|
32a: f8 01 movw r30, r16 |
|
32c: 95 83 std Z+5, r25 ; 0x05 |
|
32e: 84 83 std Z+4, r24 ; 0x04 |
|
SaveCurrentReport(Header.m_uNextReport); |
|
330: 6a 81 ldd r22, Y+2 ; 0x02 |
|
332: 70 e0 ldi r23, 0x00 ; 0 |
|
334: c8 01 movw r24, r16 |
|
336: 0e 94 77 01 call 0x2ee ; 0x2ee <_ZNK8Watchdog19CApplicationMonitor17SaveCurrentReportEi> |
|
|
|
// Update header for next time. |
|
++Header.m_uNextReport; |
|
33a: 2a 81 ldd r18, Y+2 ; 0x02 |
|
33c: 2f 5f subi r18, 0xFF ; 255 |
|
33e: 2a 83 std Y+2, r18 ; 0x02 |
|
if (Header.m_uNextReport >= c_nMaxEntries) |
|
340: 30 e0 ldi r19, 0x00 ; 0 |
|
342: f8 01 movw r30, r16 |
|
344: 82 81 ldd r24, Z+2 ; 0x02 |
|
346: 93 81 ldd r25, Z+3 ; 0x03 |
|
348: 28 17 cp r18, r24 |
|
34a: 39 07 cpc r19, r25 |
|
34c: 14 f0 brlt .+4 ; 0x352 <_ZN8Watchdog19CApplicationMonitor24WatchdogInterruptHandlerEPh+0x46> |
|
Header.m_uNextReport = 0; |
|
34e: 1a 82 std Y+2, r1 ; 0x02 |
|
350: 03 c0 rjmp .+6 ; 0x358 <_ZN8Watchdog19CApplicationMonitor24WatchdogInterruptHandlerEPh+0x4c> |
|
else |
|
++Header.m_uSavedReports; |
|
352: 89 81 ldd r24, Y+1 ; 0x01 |
|
354: 8f 5f subi r24, 0xFF ; 255 |
|
356: 89 83 std Y+1, r24 ; 0x01 |
|
SaveHeader(Header); |
|
358: be 01 movw r22, r28 |
|
35a: 6f 5f subi r22, 0xFF ; 255 |
|
35c: 7f 4f sbci r23, 0xFF ; 255 |
|
35e: c8 01 movw r24, r16 |
|
360: 0e 94 70 01 call 0x2e0 ; 0x2e0 <_ZNK8Watchdog19CApplicationMonitor10SaveHeaderERKNS_25CApplicationMonitorHeaderE> |
|
|
|
// Wait for next watchdog time out to reset system. |
|
// If the watch dog timeout is too short, it doesn't |
|
// give the program much time to reset it before the |
|
// next timeout. So we can be a bit generous here. |
|
wdt_enable(WDTO_120MS); |
|
364: 2b e0 ldi r18, 0x0B ; 11 |
|
366: 88 e1 ldi r24, 0x18 ; 24 |
|
368: 90 e0 ldi r25, 0x00 ; 0 |
|
36a: 0f b6 in r0, 0x3f ; 63 |
|
36c: f8 94 cli |
|
36e: a8 95 wdr |
|
370: 80 93 60 00 sts 0x0060, r24 |
|
374: 0f be out 0x3f, r0 ; 63 |
|
376: 20 93 60 00 sts 0x0060, r18 |
|
37a: ff cf rjmp .-2 ; 0x37a <_ZN8Watchdog19CApplicationMonitor24WatchdogInterruptHandlerEPh+0x6e> |
|
|
|
0000037c <__vector_6>: |
|
{ |
|
// Setup a pointer to the program counter. It goes in a register so we |
|
// don't mess up the stack. |
|
register uint8_t *upStack; |
|
|
|
upStack = (uint8_t*)SP; |
|
37c: 6d b7 in r22, 0x3d ; 61 |
|
37e: 7e b7 in r23, 0x3e ; 62 |
|
|
|
// The stack pointer on the AVR micro points to the next available location |
|
// so we want to go back one location to get the first byte of the address |
|
// pushed onto the stack when the interrupt was triggered. There will be |
|
// PROGRAM_COUNTER_SIZE bytes there. |
|
++upStack; |
|
380: 6f 5f subi r22, 0xFF ; 255 |
|
382: 7f 4f sbci r23, 0xFF ; 255 |
|
ApplicationMonitor.WatchdogInterruptHandler(upStack); |
|
384: 80 e6 ldi r24, 0x60 ; 96 |
|
386: 92 e0 ldi r25, 0x02 ; 2 |
|
388: 0e 94 86 01 call 0x30c ; 0x30c <_ZN8Watchdog19CApplicationMonitor24WatchdogInterruptHandlerEPh> |
|
|
|
0000038c <_ZN10OscMessage3addIiEERS_T_>: |
|
SETTING DATA |
|
=============================================================================*/ |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
38c: ef 92 push r14 |
|
38e: ff 92 push r15 |
|
390: 0f 93 push r16 |
|
392: 1f 93 push r17 |
|
394: cf 93 push r28 |
|
396: df 93 push r29 |
|
398: 00 d0 rcall .+0 ; 0x39a <_ZN10OscMessage3addIiEERS_T_+0xe> |
|
39a: cd b7 in r28, 0x3d ; 61 |
|
39c: de b7 in r29, 0x3e ; 62 |
|
39e: 7c 01 movw r14, r24 |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
3a0: 8e e0 ldi r24, 0x0E ; 14 |
|
3a2: 90 e0 ldi r25, 0x00 ; 0 |
|
3a4: 69 83 std Y+1, r22 ; 0x01 |
|
3a6: 7a 83 std Y+2, r23 ; 0x02 |
|
3a8: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
3ac: 8c 01 movw r16, r24 |
|
3ae: 69 81 ldd r22, Y+1 ; 0x01 |
|
3b0: 7a 81 ldd r23, Y+2 ; 0x02 |
|
3b2: 0e 94 f9 13 call 0x27f2 ; 0x27f2 <_ZN7OSCDataC1Ei> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
3b6: f8 01 movw r30, r16 |
|
3b8: 80 81 ld r24, Z |
|
3ba: 91 81 ldd r25, Z+1 ; 0x01 |
|
error = ALLOCFAILED; |
|
3bc: f7 01 movw r30, r14 |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
3be: 83 30 cpi r24, 0x03 ; 3 |
|
3c0: 91 05 cpc r25, r1 |
|
3c2: 79 f0 breq .+30 ; 0x3e2 <_ZN10OscMessage3addIiEERS_T_+0x56> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
3c4: 64 81 ldd r22, Z+4 ; 0x04 |
|
3c6: 75 81 ldd r23, Z+5 ; 0x05 |
|
3c8: 6f 5f subi r22, 0xFF ; 255 |
|
3ca: 7f 4f sbci r23, 0xFF ; 255 |
|
3cc: 66 0f add r22, r22 |
|
3ce: 77 1f adc r23, r23 |
|
3d0: 82 81 ldd r24, Z+2 ; 0x02 |
|
3d2: 93 81 ldd r25, Z+3 ; 0x03 |
|
3d4: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
3d8: 00 97 sbiw r24, 0x00 ; 0 |
|
3da: 31 f4 brne .+12 ; 0x3e8 <_ZN10OscMessage3addIiEERS_T_+0x5c> |
|
error = ALLOCFAILED; |
|
3dc: 83 e0 ldi r24, 0x03 ; 3 |
|
3de: 90 e0 ldi r25, 0x00 ; 0 |
|
3e0: f7 01 movw r30, r14 |
|
3e2: 97 83 std Z+7, r25 ; 0x07 |
|
3e4: 86 83 std Z+6, r24 ; 0x06 |
|
3e6: 11 c0 rjmp .+34 ; 0x40a <_ZN10OscMessage3addIiEERS_T_+0x7e> |
|
} else { |
|
data = dataMem; |
|
3e8: f7 01 movw r30, r14 |
|
3ea: 93 83 std Z+3, r25 ; 0x03 |
|
3ec: 82 83 std Z+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
3ee: 24 81 ldd r18, Z+4 ; 0x04 |
|
3f0: 35 81 ldd r19, Z+5 ; 0x05 |
|
3f2: f9 01 movw r30, r18 |
|
3f4: ee 0f add r30, r30 |
|
3f6: ff 1f adc r31, r31 |
|
3f8: e8 0f add r30, r24 |
|
3fa: f9 1f adc r31, r25 |
|
3fc: 11 83 std Z+1, r17 ; 0x01 |
|
3fe: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
400: 2f 5f subi r18, 0xFF ; 255 |
|
402: 3f 4f sbci r19, 0xFF ; 255 |
|
404: f7 01 movw r30, r14 |
|
406: 35 83 std Z+5, r19 ; 0x05 |
|
408: 24 83 std Z+4, r18 ; 0x04 |
|
} |
|
} |
|
return *this; |
|
} |
|
40a: c7 01 movw r24, r14 |
|
40c: 0f 90 pop r0 |
|
40e: 0f 90 pop r0 |
|
410: df 91 pop r29 |
|
412: cf 91 pop r28 |
|
414: 1f 91 pop r17 |
|
416: 0f 91 pop r16 |
|
418: ff 90 pop r15 |
|
41a: ef 90 pop r14 |
|
41c: 08 95 ret |
|
|
|
0000041e <_ZNK8Watchdog19CApplicationMonitor4DumpER10OscMessageb>: |
|
} |
|
} |
|
} |
|
|
|
void CApplicationMonitor::Dump(OscMessage &msg, bool bOnlyIfPresent) const |
|
{ |
|
41e: df 92 push r13 |
|
420: ef 92 push r14 |
|
422: ff 92 push r15 |
|
424: 0f 93 push r16 |
|
426: 1f 93 push r17 |
|
428: cf 93 push r28 |
|
42a: df 93 push r29 |
|
42c: cd b7 in r28, 0x3d ; 61 |
|
42e: de b7 in r29, 0x3e ; 62 |
|
430: 2d 97 sbiw r28, 0x0d ; 13 |
|
432: 0f b6 in r0, 0x3f ; 63 |
|
434: f8 94 cli |
|
436: de bf out 0x3e, r29 ; 62 |
|
438: 0f be out 0x3f, r0 ; 63 |
|
43a: cd bf out 0x3d, r28 ; 61 |
|
43c: 8c 01 movw r16, r24 |
|
43e: 7b 01 movw r14, r22 |
|
CApplicationMonitorHeader Header; |
|
CCrashReport Report; |
|
uint8_t uReport; |
|
uint32_t uAddress; |
|
|
|
LoadHeader(Header); |
|
440: be 01 movw r22, r28 |
|
442: 65 5f subi r22, 0xF5 ; 245 |
|
444: 7f 4f sbci r23, 0xFF ; 255 |
|
446: 4d 87 std Y+13, r20 ; 0x0d |
|
448: 0e 94 0f 01 call 0x21e ; 0x21e <_ZNK8Watchdog19CApplicationMonitor10LoadHeaderERNS_25CApplicationMonitorHeaderE> |
|
if (!bOnlyIfPresent || Header.m_uSavedReports != 0) |
|
44c: 4d 85 ldd r20, Y+13 ; 0x0d |
|
44e: 44 23 and r20, r20 |
|
450: 19 f0 breq .+6 ; 0x458 <_ZNK8Watchdog19CApplicationMonitor4DumpER10OscMessageb+0x3a> |
|
452: 8b 85 ldd r24, Y+11 ; 0x0b |
|
454: 88 23 and r24, r24 |
|
456: f1 f0 breq .+60 ; 0x494 <_ZNK8Watchdog19CApplicationMonitor4DumpER10OscMessageb+0x76> |
|
} |
|
} |
|
} |
|
|
|
void CApplicationMonitor::Dump(OscMessage &msg, bool bOnlyIfPresent) const |
|
{ |
|
458: d1 2c mov r13, r1 |
|
uint32_t uAddress; |
|
|
|
LoadHeader(Header); |
|
if (!bOnlyIfPresent || Header.m_uSavedReports != 0) |
|
{ |
|
for (uReport = 0; uReport < Header.m_uSavedReports; ++uReport) |
|
45a: 8b 85 ldd r24, Y+11 ; 0x0b |
|
45c: d8 16 cp r13, r24 |
|
45e: d0 f4 brcc .+52 ; 0x494 <_ZNK8Watchdog19CApplicationMonitor4DumpER10OscMessageb+0x76> |
|
{ |
|
LoadReport(uReport, Report); |
|
460: 6d 2d mov r22, r13 |
|
462: 70 e0 ldi r23, 0x00 ; 0 |
|
464: ae 01 movw r20, r28 |
|
466: 4f 5f subi r20, 0xFF ; 255 |
|
468: 5f 4f sbci r21, 0xFF ; 255 |
|
46a: c8 01 movw r24, r16 |
|
46c: 0e 94 37 01 call 0x26e ; 0x26e <_ZNK8Watchdog19CApplicationMonitor10LoadReportEiRNS_12CCrashReportE> |
|
|
|
uAddress = 0; |
|
470: 1f 82 std Y+7, r1 ; 0x07 |
|
472: 18 86 std Y+8, r1 ; 0x08 |
|
474: 19 86 std Y+9, r1 ; 0x09 |
|
476: 1a 86 std Y+10, r1 ; 0x0a |
|
memcpy(&uAddress, Report.m_auAddress, PROGRAM_COUNTER_SIZE); |
|
478: 69 81 ldd r22, Y+1 ; 0x01 |
|
47a: 7a 81 ldd r23, Y+2 ; 0x02 |
|
47c: 78 87 std Y+8, r23 ; 0x08 |
|
47e: 6f 83 std Y+7, r22 ; 0x07 |
|
|
|
msg.add((int)uAddress); |
|
480: c7 01 movw r24, r14 |
|
482: 0e 94 c6 01 call 0x38c ; 0x38c <_ZN10OscMessage3addIiEERS_T_> |
|
msg.add((int)Report.m_uData); |
|
486: 6b 81 ldd r22, Y+3 ; 0x03 |
|
488: 7c 81 ldd r23, Y+4 ; 0x04 |
|
48a: c7 01 movw r24, r14 |
|
48c: 0e 94 c6 01 call 0x38c ; 0x38c <_ZN10OscMessage3addIiEERS_T_> |
|
uint32_t uAddress; |
|
|
|
LoadHeader(Header); |
|
if (!bOnlyIfPresent || Header.m_uSavedReports != 0) |
|
{ |
|
for (uReport = 0; uReport < Header.m_uSavedReports; ++uReport) |
|
490: d3 94 inc r13 |
|
492: e3 cf rjmp .-58 ; 0x45a <_ZNK8Watchdog19CApplicationMonitor4DumpER10OscMessageb+0x3c> |
|
|
|
msg.add((int)uAddress); |
|
msg.add((int)Report.m_uData); |
|
} |
|
} |
|
} |
|
494: 2d 96 adiw r28, 0x0d ; 13 |
|
496: 0f b6 in r0, 0x3f ; 63 |
|
498: f8 94 cli |
|
49a: de bf out 0x3e, r29 ; 62 |
|
49c: 0f be out 0x3f, r0 ; 63 |
|
49e: cd bf out 0x3d, r28 ; 61 |
|
4a0: df 91 pop r29 |
|
4a2: cf 91 pop r28 |
|
4a4: 1f 91 pop r17 |
|
4a6: 0f 91 pop r16 |
|
4a8: ff 90 pop r15 |
|
4aa: ef 90 pop r14 |
|
4ac: df 90 pop r13 |
|
4ae: 08 95 ret |
|
|
|
000004b0 <_GLOBAL__sub_I___vector_6>: |
|
void CApplicationMonitor::WriteBlock(int nBaseAddress, const void *pData, uint8_t uSize) const |
|
{ |
|
const uint8_t *puData = (const uint8_t *)pData; |
|
while (uSize --) |
|
eeprom_write_byte((uint8_t *)nBaseAddress++, *puData++); |
|
} |
|
4b0: 0f 93 push r16 |
|
friend class Server; |
|
friend class DhcpClass; |
|
friend class DNSClient; |
|
}; |
|
|
|
const IPAddress INADDR_NONE(0,0,0,0); |
|
4b2: 00 e0 ldi r16, 0x00 ; 0 |
|
4b4: 20 e0 ldi r18, 0x00 ; 0 |
|
4b6: 40 e0 ldi r20, 0x00 ; 0 |
|
4b8: 60 e0 ldi r22, 0x00 ; 0 |
|
4ba: 8e e3 ldi r24, 0x3E ; 62 |
|
4bc: 92 e0 ldi r25, 0x02 ; 2 |
|
4be: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
4c2: 0f 91 pop r16 |
|
4c4: 08 95 ret |
|
|
|
000004c6 <_Z10doEncoderAv>: |
|
4c6: 4b 9b sbis 0x09, 3 ; 9 |
|
4c8: 0c c0 rjmp .+24 ; 0x4e2 <_Z10doEncoderAv+0x1c> |
|
4ca: 80 91 86 03 lds r24, 0x0386 |
|
4ce: 90 91 87 03 lds r25, 0x0387 |
|
4d2: a0 91 88 03 lds r26, 0x0388 |
|
4d6: b0 91 89 03 lds r27, 0x0389 |
|
4da: 01 97 sbiw r24, 0x01 ; 1 |
|
4dc: a1 09 sbc r26, r1 |
|
4de: b1 09 sbc r27, r1 |
|
4e0: 0b c0 rjmp .+22 ; 0x4f8 <_Z10doEncoderAv+0x32> |
|
4e2: 80 91 86 03 lds r24, 0x0386 |
|
4e6: 90 91 87 03 lds r25, 0x0387 |
|
4ea: a0 91 88 03 lds r26, 0x0388 |
|
4ee: b0 91 89 03 lds r27, 0x0389 |
|
4f2: 01 96 adiw r24, 0x01 ; 1 |
|
4f4: a1 1d adc r26, r1 |
|
4f6: b1 1d adc r27, r1 |
|
4f8: 80 93 86 03 sts 0x0386, r24 |
|
4fc: 90 93 87 03 sts 0x0387, r25 |
|
500: a0 93 88 03 sts 0x0388, r26 |
|
504: b0 93 89 03 sts 0x0389, r27 |
|
508: 80 91 86 03 lds r24, 0x0386 |
|
50c: 90 91 87 03 lds r25, 0x0387 |
|
510: a0 91 88 03 lds r26, 0x0388 |
|
514: b0 91 89 03 lds r27, 0x0389 |
|
518: 21 ea ldi r18, 0xA1 ; 161 |
|
51a: 82 27 eor r24, r18 |
|
51c: 20 eb ldi r18, 0xB0 ; 176 |
|
51e: 92 27 eor r25, r18 |
|
520: 29 eb ldi r18, 0xB9 ; 185 |
|
522: a2 27 eor r26, r18 |
|
524: 22 e1 ldi r18, 0x12 ; 18 |
|
526: b2 27 eor r27, r18 |
|
528: 80 93 82 03 sts 0x0382, r24 |
|
52c: 90 93 83 03 sts 0x0383, r25 |
|
530: a0 93 84 03 sts 0x0384, r26 |
|
534: b0 93 85 03 sts 0x0385, r27 |
|
538: 08 95 ret |
|
|
|
0000053a <_Z7oscStopR10OscMessage>: |
|
53a: 0f 93 push r16 |
|
53c: 1f 93 push r17 |
|
53e: cf 93 push r28 |
|
540: df 93 push r29 |
|
542: ec 01 movw r28, r24 |
|
544: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
548: 89 2b or r24, r25 |
|
54a: c1 f0 breq .+48 ; 0x57c <_Z7oscStopR10OscMessage+0x42> |
|
54c: ce 01 movw r24, r28 |
|
54e: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
552: 01 97 sbiw r24, 0x01 ; 1 |
|
554: 19 f5 brne .+70 ; 0x59c <_Z7oscStopR10OscMessage+0x62> |
|
556: 60 e0 ldi r22, 0x00 ; 0 |
|
558: 70 e0 ldi r23, 0x00 ; 0 |
|
55a: ce 01 movw r24, r28 |
|
55c: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
560: 20 91 b3 02 lds r18, 0x02B3 |
|
564: 30 91 b4 02 lds r19, 0x02B4 |
|
568: 89 01 movw r16, r18 |
|
56a: 22 27 eor r18, r18 |
|
56c: 17 fd sbrc r17, 7 |
|
56e: 20 95 com r18 |
|
570: 32 2f mov r19, r18 |
|
572: 60 17 cp r22, r16 |
|
574: 71 07 cpc r23, r17 |
|
576: 82 07 cpc r24, r18 |
|
578: 93 07 cpc r25, r19 |
|
57a: 81 f4 brne .+32 ; 0x59c <_Z7oscStopR10OscMessage+0x62> |
|
57c: 80 91 0a 01 lds r24, 0x010A |
|
580: 90 91 0b 01 lds r25, 0x010B |
|
584: 84 30 cpi r24, 0x04 ; 4 |
|
586: 91 05 cpc r25, r1 |
|
588: 19 f0 breq .+6 ; 0x590 <_Z7oscStopR10OscMessage+0x56> |
|
58a: 87 30 cpi r24, 0x07 ; 7 |
|
58c: 91 05 cpc r25, r1 |
|
58e: 99 f4 brne .+38 ; 0x5b6 <_Z7oscStopR10OscMessage+0x7c> |
|
590: 85 e0 ldi r24, 0x05 ; 5 |
|
592: 90 e0 ldi r25, 0x00 ; 0 |
|
594: 90 93 0b 01 sts 0x010B, r25 |
|
598: 80 93 0a 01 sts 0x010A, r24 |
|
59c: 10 92 c6 02 sts 0x02C6, r1 |
|
5a0: 10 92 c7 02 sts 0x02C7, r1 |
|
5a4: 10 92 c8 02 sts 0x02C8, r1 |
|
5a8: 10 92 c9 02 sts 0x02C9, r1 |
|
5ac: df 91 pop r29 |
|
5ae: cf 91 pop r28 |
|
5b0: 1f 91 pop r17 |
|
5b2: 0f 91 pop r16 |
|
5b4: 08 95 ret |
|
5b6: 01 97 sbiw r24, 0x01 ; 1 |
|
5b8: 02 97 sbiw r24, 0x02 ; 2 |
|
5ba: 80 f7 brcc .-32 ; 0x59c <_Z7oscStopR10OscMessage+0x62> |
|
5bc: 10 92 0b 01 sts 0x010B, r1 |
|
5c0: 10 92 0a 01 sts 0x010A, r1 |
|
5c4: eb cf rjmp .-42 ; 0x59c <_Z7oscStopR10OscMessage+0x62> |
|
|
|
000005c6 <_Z8oscCrashR10OscMessage>: |
|
5c6: 68 e8 ldi r22, 0x88 ; 136 |
|
5c8: 73 e1 ldi r23, 0x13 ; 19 |
|
5ca: 80 e0 ldi r24, 0x00 ; 0 |
|
5cc: 90 e0 ldi r25, 0x00 ; 0 |
|
5ce: 0c 94 68 2a jmp 0x54d0 ; 0x54d0 <delay> |
|
|
|
000005d2 <_Z7oscHomeR10OscMessage>: |
|
5d2: cf 93 push r28 |
|
5d4: df 93 push r29 |
|
5d6: ec 01 movw r28, r24 |
|
5d8: 80 91 0a 01 lds r24, 0x010A |
|
5dc: 90 91 0b 01 lds r25, 0x010B |
|
5e0: 08 97 sbiw r24, 0x08 ; 8 |
|
5e2: 29 f1 breq .+74 ; 0x62e <_Z7oscHomeR10OscMessage+0x5c> |
|
5e4: 60 e0 ldi r22, 0x00 ; 0 |
|
5e6: 70 e0 ldi r23, 0x00 ; 0 |
|
5e8: ce 01 movw r24, r28 |
|
5ea: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
5ee: 20 91 b3 02 lds r18, 0x02B3 |
|
5f2: 30 91 b4 02 lds r19, 0x02B4 |
|
5f6: 26 17 cp r18, r22 |
|
5f8: 37 07 cpc r19, r23 |
|
5fa: c9 f4 brne .+50 ; 0x62e <_Z7oscHomeR10OscMessage+0x5c> |
|
5fc: 80 91 0a 01 lds r24, 0x010A |
|
600: 90 91 0b 01 lds r25, 0x010B |
|
604: 01 97 sbiw r24, 0x01 ; 1 |
|
606: 99 f0 breq .+38 ; 0x62e <_Z7oscHomeR10OscMessage+0x5c> |
|
608: 81 e0 ldi r24, 0x01 ; 1 |
|
60a: 90 e0 ldi r25, 0x00 ; 0 |
|
60c: 90 93 0b 01 sts 0x010B, r25 |
|
610: 80 93 0a 01 sts 0x010A, r24 |
|
614: 61 e0 ldi r22, 0x01 ; 1 |
|
616: 70 e0 ldi r23, 0x00 ; 0 |
|
618: ce 01 movw r24, r28 |
|
61a: 0e 94 a9 16 call 0x2d52 ; 0x2d52 <_ZN10OscMessage8getFloatEi> |
|
61e: 60 93 18 01 sts 0x0118, r22 |
|
622: 70 93 19 01 sts 0x0119, r23 |
|
626: 80 93 1a 01 sts 0x011A, r24 |
|
62a: 90 93 1b 01 sts 0x011B, r25 |
|
62e: df 91 pop r29 |
|
630: cf 91 pop r28 |
|
632: 08 95 ret |
|
|
|
00000634 <_Z14oscSetMaxAccelR10OscMessage>: |
|
634: 0f 93 push r16 |
|
636: 1f 93 push r17 |
|
638: cf 93 push r28 |
|
63a: df 93 push r29 |
|
63c: ec 01 movw r28, r24 |
|
63e: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
642: 01 97 sbiw r24, 0x01 ; 1 |
|
644: c1 f0 breq .+48 ; 0x676 <_Z14oscSetMaxAccelR10OscMessage+0x42> |
|
646: ce 01 movw r24, r28 |
|
648: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
64c: 02 97 sbiw r24, 0x02 ; 2 |
|
64e: 21 f5 brne .+72 ; 0x698 <_Z14oscSetMaxAccelR10OscMessage+0x64> |
|
650: 60 e0 ldi r22, 0x00 ; 0 |
|
652: 70 e0 ldi r23, 0x00 ; 0 |
|
654: ce 01 movw r24, r28 |
|
656: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
65a: 40 91 b3 02 lds r20, 0x02B3 |
|
65e: 50 91 b4 02 lds r21, 0x02B4 |
|
662: 8a 01 movw r16, r20 |
|
664: 22 27 eor r18, r18 |
|
666: 17 fd sbrc r17, 7 |
|
668: 20 95 com r18 |
|
66a: 32 2f mov r19, r18 |
|
66c: 60 17 cp r22, r16 |
|
66e: 71 07 cpc r23, r17 |
|
670: 82 07 cpc r24, r18 |
|
672: 93 07 cpc r25, r19 |
|
674: 89 f4 brne .+34 ; 0x698 <_Z14oscSetMaxAccelR10OscMessage+0x64> |
|
676: ce 01 movw r24, r28 |
|
678: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
67c: bc 01 movw r22, r24 |
|
67e: 61 50 subi r22, 0x01 ; 1 |
|
680: 71 09 sbc r23, r1 |
|
682: ce 01 movw r24, r28 |
|
684: 0e 94 a9 16 call 0x2d52 ; 0x2d52 <_ZN10OscMessage8getFloatEi> |
|
688: 60 93 20 01 sts 0x0120, r22 |
|
68c: 70 93 21 01 sts 0x0121, r23 |
|
690: 80 93 22 01 sts 0x0122, r24 |
|
694: 90 93 23 01 sts 0x0123, r25 |
|
698: df 91 pop r29 |
|
69a: cf 91 pop r28 |
|
69c: 1f 91 pop r17 |
|
69e: 0f 91 pop r16 |
|
6a0: 08 95 ret |
|
|
|
000006a2 <_Z14oscSetDeadZoneR10OscMessage>: |
|
6a2: 0f 93 push r16 |
|
6a4: 1f 93 push r17 |
|
6a6: cf 93 push r28 |
|
6a8: df 93 push r29 |
|
6aa: ec 01 movw r28, r24 |
|
6ac: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
6b0: 02 97 sbiw r24, 0x02 ; 2 |
|
6b2: c1 f0 breq .+48 ; 0x6e4 <_Z14oscSetDeadZoneR10OscMessage+0x42> |
|
6b4: ce 01 movw r24, r28 |
|
6b6: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
6ba: 03 97 sbiw r24, 0x03 ; 3 |
|
6bc: 69 f5 brne .+90 ; 0x718 <_Z14oscSetDeadZoneR10OscMessage+0x76> |
|
6be: 60 e0 ldi r22, 0x00 ; 0 |
|
6c0: 70 e0 ldi r23, 0x00 ; 0 |
|
6c2: ce 01 movw r24, r28 |
|
6c4: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
6c8: 20 91 b3 02 lds r18, 0x02B3 |
|
6cc: 30 91 b4 02 lds r19, 0x02B4 |
|
6d0: 89 01 movw r16, r18 |
|
6d2: 22 27 eor r18, r18 |
|
6d4: 17 fd sbrc r17, 7 |
|
6d6: 20 95 com r18 |
|
6d8: 32 2f mov r19, r18 |
|
6da: 60 17 cp r22, r16 |
|
6dc: 71 07 cpc r23, r17 |
|
6de: 82 07 cpc r24, r18 |
|
6e0: 93 07 cpc r25, r19 |
|
6e2: d1 f4 brne .+52 ; 0x718 <_Z14oscSetDeadZoneR10OscMessage+0x76> |
|
6e4: ce 01 movw r24, r28 |
|
6e6: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
6ea: bc 01 movw r22, r24 |
|
6ec: 62 50 subi r22, 0x02 ; 2 |
|
6ee: 71 09 sbc r23, r1 |
|
6f0: ce 01 movw r24, r28 |
|
6f2: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
6f6: 70 93 27 01 sts 0x0127, r23 |
|
6fa: 60 93 26 01 sts 0x0126, r22 |
|
6fe: ce 01 movw r24, r28 |
|
700: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
704: bc 01 movw r22, r24 |
|
706: 61 50 subi r22, 0x01 ; 1 |
|
708: 71 09 sbc r23, r1 |
|
70a: ce 01 movw r24, r28 |
|
70c: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
710: 70 93 25 01 sts 0x0125, r23 |
|
714: 60 93 24 01 sts 0x0124, r22 |
|
718: df 91 pop r29 |
|
71a: cf 91 pop r28 |
|
71c: 1f 91 pop r17 |
|
71e: 0f 91 pop r16 |
|
720: 08 95 ret |
|
|
|
00000722 <_Z20oscSetStatusIntervalR10OscMessage>: |
|
722: 0f 93 push r16 |
|
724: 1f 93 push r17 |
|
726: cf 93 push r28 |
|
728: df 93 push r29 |
|
72a: ec 01 movw r28, r24 |
|
72c: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
730: 01 97 sbiw r24, 0x01 ; 1 |
|
732: c1 f0 breq .+48 ; 0x764 <_Z20oscSetStatusIntervalR10OscMessage+0x42> |
|
734: ce 01 movw r24, r28 |
|
736: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
73a: 02 97 sbiw r24, 0x02 ; 2 |
|
73c: 31 f5 brne .+76 ; 0x78a <_Z20oscSetStatusIntervalR10OscMessage+0x68> |
|
73e: 60 e0 ldi r22, 0x00 ; 0 |
|
740: 70 e0 ldi r23, 0x00 ; 0 |
|
742: ce 01 movw r24, r28 |
|
744: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
748: 40 91 b3 02 lds r20, 0x02B3 |
|
74c: 50 91 b4 02 lds r21, 0x02B4 |
|
750: 8a 01 movw r16, r20 |
|
752: 22 27 eor r18, r18 |
|
754: 17 fd sbrc r17, 7 |
|
756: 20 95 com r18 |
|
758: 32 2f mov r19, r18 |
|
75a: 60 17 cp r22, r16 |
|
75c: 71 07 cpc r23, r17 |
|
75e: 82 07 cpc r24, r18 |
|
760: 93 07 cpc r25, r19 |
|
762: 99 f4 brne .+38 ; 0x78a <_Z20oscSetStatusIntervalR10OscMessage+0x68> |
|
764: ce 01 movw r24, r28 |
|
766: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
76a: bc 01 movw r22, r24 |
|
76c: 61 50 subi r22, 0x01 ; 1 |
|
76e: 71 09 sbc r23, r1 |
|
770: ce 01 movw r24, r28 |
|
772: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
776: 9b 01 movw r18, r22 |
|
778: 23 50 subi r18, 0x03 ; 3 |
|
77a: 31 09 sbc r19, r1 |
|
77c: 22 3f cpi r18, 0xF2 ; 242 |
|
77e: 31 40 sbci r19, 0x01 ; 1 |
|
780: 20 f4 brcc .+8 ; 0x78a <_Z20oscSetStatusIntervalR10OscMessage+0x68> |
|
782: 70 93 0d 01 sts 0x010D, r23 |
|
786: 60 93 0c 01 sts 0x010C, r22 |
|
78a: df 91 pop r29 |
|
78c: cf 91 pop r28 |
|
78e: 1f 91 pop r17 |
|
790: 0f 91 pop r16 |
|
792: 08 95 ret |
|
|
|
00000794 <_Z9oscResumeR10OscMessage>: |
|
794: 0f 93 push r16 |
|
796: 1f 93 push r17 |
|
798: cf 93 push r28 |
|
79a: df 93 push r29 |
|
79c: ec 01 movw r28, r24 |
|
79e: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
7a2: 89 2b or r24, r25 |
|
7a4: c1 f0 breq .+48 ; 0x7d6 <_Z9oscResumeR10OscMessage+0x42> |
|
7a6: ce 01 movw r24, r28 |
|
7a8: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
7ac: 01 97 sbiw r24, 0x01 ; 1 |
|
7ae: 01 f5 brne .+64 ; 0x7f0 <_Z9oscResumeR10OscMessage+0x5c> |
|
7b0: 60 e0 ldi r22, 0x00 ; 0 |
|
7b2: 70 e0 ldi r23, 0x00 ; 0 |
|
7b4: ce 01 movw r24, r28 |
|
7b6: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
7ba: 20 91 b3 02 lds r18, 0x02B3 |
|
7be: 30 91 b4 02 lds r19, 0x02B4 |
|
7c2: 89 01 movw r16, r18 |
|
7c4: 22 27 eor r18, r18 |
|
7c6: 17 fd sbrc r17, 7 |
|
7c8: 20 95 com r18 |
|
7ca: 32 2f mov r19, r18 |
|
7cc: 60 17 cp r22, r16 |
|
7ce: 71 07 cpc r23, r17 |
|
7d0: 82 07 cpc r24, r18 |
|
7d2: 93 07 cpc r25, r19 |
|
7d4: 69 f4 brne .+26 ; 0x7f0 <_Z9oscResumeR10OscMessage+0x5c> |
|
7d6: 80 91 0a 01 lds r24, 0x010A |
|
7da: 90 91 0b 01 lds r25, 0x010B |
|
7de: 8d 7f andi r24, 0xFD ; 253 |
|
7e0: 05 97 sbiw r24, 0x05 ; 5 |
|
7e2: 31 f4 brne .+12 ; 0x7f0 <_Z9oscResumeR10OscMessage+0x5c> |
|
7e4: 84 e0 ldi r24, 0x04 ; 4 |
|
7e6: 90 e0 ldi r25, 0x00 ; 0 |
|
7e8: 90 93 0b 01 sts 0x010B, r25 |
|
7ec: 80 93 0a 01 sts 0x010A, r24 |
|
7f0: df 91 pop r29 |
|
7f2: cf 91 pop r28 |
|
7f4: 1f 91 pop r17 |
|
7f6: 0f 91 pop r16 |
|
7f8: 08 95 ret |
|
|
|
000007fa <_Z14oscSetPositionR10OscMessage>: |
|
7fa: 0f 93 push r16 |
|
7fc: 1f 93 push r17 |
|
7fe: cf 93 push r28 |
|
800: df 93 push r29 |
|
802: ec 01 movw r28, r24 |
|
804: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
808: 02 97 sbiw r24, 0x02 ; 2 |
|
80a: 89 f5 brne .+98 ; 0x86e <_Z14oscSetPositionR10OscMessage+0x74> |
|
80c: 60 e0 ldi r22, 0x00 ; 0 |
|
80e: 70 e0 ldi r23, 0x00 ; 0 |
|
810: ce 01 movw r24, r28 |
|
812: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
816: 40 91 b3 02 lds r20, 0x02B3 |
|
81a: 50 91 b4 02 lds r21, 0x02B4 |
|
81e: 8a 01 movw r16, r20 |
|
820: 22 27 eor r18, r18 |
|
822: 17 fd sbrc r17, 7 |
|
824: 20 95 com r18 |
|
826: 32 2f mov r19, r18 |
|
828: 60 17 cp r22, r16 |
|
82a: 71 07 cpc r23, r17 |
|
82c: 82 07 cpc r24, r18 |
|
82e: 93 07 cpc r25, r19 |
|
830: f1 f4 brne .+60 ; 0x86e <_Z14oscSetPositionR10OscMessage+0x74> |
|
832: 61 e0 ldi r22, 0x01 ; 1 |
|
834: 70 e0 ldi r23, 0x00 ; 0 |
|
836: ce 01 movw r24, r28 |
|
838: 0e 94 a9 16 call 0x2d52 ; 0x2d52 <_ZN10OscMessage8getFloatEi> |
|
83c: 0e 94 73 2d call 0x5ae6 ; 0x5ae6 <__fixsfsi> |
|
840: 60 93 86 03 sts 0x0386, r22 |
|
844: 70 93 87 03 sts 0x0387, r23 |
|
848: 80 93 88 03 sts 0x0388, r24 |
|
84c: 90 93 89 03 sts 0x0389, r25 |
|
850: 81 e0 ldi r24, 0x01 ; 1 |
|
852: 80 93 c5 02 sts 0x02C5, r24 |
|
856: 80 91 0a 01 lds r24, 0x010A |
|
85a: 90 91 0b 01 lds r25, 0x010B |
|
85e: 89 2b or r24, r25 |
|
860: 31 f4 brne .+12 ; 0x86e <_Z14oscSetPositionR10OscMessage+0x74> |
|
862: 84 e0 ldi r24, 0x04 ; 4 |
|
864: 90 e0 ldi r25, 0x00 ; 0 |
|
866: 90 93 0b 01 sts 0x010B, r25 |
|
86a: 80 93 0a 01 sts 0x010A, r24 |
|
86e: df 91 pop r29 |
|
870: cf 91 pop r28 |
|
872: 1f 91 pop r17 |
|
874: 0f 91 pop r16 |
|
876: 08 95 ret |
|
|
|
00000878 <_Z19oscRememberPositionR10OscMessage>: |
|
878: 0f 93 push r16 |
|
87a: 1f 93 push r17 |
|
87c: cf 93 push r28 |
|
87e: df 93 push r29 |
|
880: ec 01 movw r28, r24 |
|
882: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
886: 01 97 sbiw r24, 0x01 ; 1 |
|
888: c1 f0 breq .+48 ; 0x8ba <_Z19oscRememberPositionR10OscMessage+0x42> |
|
88a: ce 01 movw r24, r28 |
|
88c: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
890: 02 97 sbiw r24, 0x02 ; 2 |
|
892: 59 f5 brne .+86 ; 0x8ea <_Z19oscRememberPositionR10OscMessage+0x72> |
|
894: 60 e0 ldi r22, 0x00 ; 0 |
|
896: 70 e0 ldi r23, 0x00 ; 0 |
|
898: ce 01 movw r24, r28 |
|
89a: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
89e: 40 91 b3 02 lds r20, 0x02B3 |
|
8a2: 50 91 b4 02 lds r21, 0x02B4 |
|
8a6: 8a 01 movw r16, r20 |
|
8a8: 22 27 eor r18, r18 |
|
8aa: 17 fd sbrc r17, 7 |
|
8ac: 20 95 com r18 |
|
8ae: 32 2f mov r19, r18 |
|
8b0: 60 17 cp r22, r16 |
|
8b2: 71 07 cpc r23, r17 |
|
8b4: 82 07 cpc r24, r18 |
|
8b6: 93 07 cpc r25, r19 |
|
8b8: c1 f4 brne .+48 ; 0x8ea <_Z19oscRememberPositionR10OscMessage+0x72> |
|
8ba: ce 01 movw r24, r28 |
|
8bc: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
8c0: bc 01 movw r22, r24 |
|
8c2: 61 50 subi r22, 0x01 ; 1 |
|
8c4: 71 09 sbc r23, r1 |
|
8c6: ce 01 movw r24, r28 |
|
8c8: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
8cc: 67 2b or r22, r23 |
|
8ce: 11 f0 breq .+4 ; 0x8d4 <_Z19oscRememberPositionR10OscMessage+0x5c> |
|
8d0: 41 e0 ldi r20, 0x01 ; 1 |
|
8d2: 01 c0 rjmp .+2 ; 0x8d6 <_Z19oscRememberPositionR10OscMessage+0x5e> |
|
8d4: 40 e0 ldi r20, 0x00 ; 0 |
|
8d6: 61 e0 ldi r22, 0x01 ; 1 |
|
8d8: 70 e0 ldi r23, 0x00 ; 0 |
|
8da: 8a e6 ldi r24, 0x6A ; 106 |
|
8dc: 93 e0 ldi r25, 0x03 ; 3 |
|
8de: df 91 pop r29 |
|
8e0: cf 91 pop r28 |
|
8e2: 1f 91 pop r17 |
|
8e4: 0f 91 pop r16 |
|
8e6: 0c 94 70 29 jmp 0x52e0 ; 0x52e0 <_ZN11EEPROMClass5writeEih> |
|
8ea: df 91 pop r29 |
|
8ec: cf 91 pop r28 |
|
8ee: 1f 91 pop r17 |
|
8f0: 0f 91 pop r16 |
|
8f2: 08 95 ret |
|
|
|
000008f4 <_Z8setupPIDv>: |
|
8f4: 0f 93 push r16 |
|
8f6: 1f 93 push r17 |
|
8f8: 10 92 0b 03 sts 0x030B, r1 |
|
8fc: 10 92 0c 03 sts 0x030C, r1 |
|
900: 10 92 0d 03 sts 0x030D, r1 |
|
904: 10 92 0e 03 sts 0x030E, r1 |
|
908: 00 91 1c 01 lds r16, 0x011C |
|
90c: 10 91 1d 01 lds r17, 0x011D |
|
910: 20 91 1e 01 lds r18, 0x011E |
|
914: 30 91 1f 01 lds r19, 0x011F |
|
918: b9 01 movw r22, r18 |
|
91a: a8 01 movw r20, r16 |
|
91c: 70 58 subi r23, 0x80 ; 128 |
|
91e: 8a ec ldi r24, 0xCA ; 202 |
|
920: 92 e0 ldi r25, 0x02 ; 2 |
|
922: 0e 94 ee 0f call 0x1fdc ; 0x1fdc <_ZN3PID15SetOutputLimitsEdd> |
|
926: 64 e1 ldi r22, 0x14 ; 20 |
|
928: 70 e0 ldi r23, 0x00 ; 0 |
|
92a: 8a ec ldi r24, 0xCA ; 202 |
|
92c: 92 e0 ldi r25, 0x02 ; 2 |
|
92e: 0e 94 a0 0f call 0x1f40 ; 0x1f40 <_ZN3PID13SetSampleTimeEi> |
|
932: 61 e0 ldi r22, 0x01 ; 1 |
|
934: 70 e0 ldi r23, 0x00 ; 0 |
|
936: 8a ec ldi r24, 0xCA ; 202 |
|
938: 92 e0 ldi r25, 0x02 ; 2 |
|
93a: 1f 91 pop r17 |
|
93c: 0f 91 pop r16 |
|
93e: 0c 94 b4 10 jmp 0x2168 ; 0x2168 <_ZN3PID7SetModeEi> |
|
|
|
00000942 <_Z14pidSetMaxSpeedf>: |
|
942: 0f 93 push r16 |
|
944: 1f 93 push r17 |
|
946: 8b 01 movw r16, r22 |
|
948: 9c 01 movw r18, r24 |
|
94a: ab 01 movw r20, r22 |
|
94c: bc 01 movw r22, r24 |
|
94e: 70 58 subi r23, 0x80 ; 128 |
|
950: 8a ec ldi r24, 0xCA ; 202 |
|
952: 92 e0 ldi r25, 0x02 ; 2 |
|
954: 0e 94 ee 0f call 0x1fdc ; 0x1fdc <_ZN3PID15SetOutputLimitsEdd> |
|
958: 1f 91 pop r17 |
|
95a: 0f 91 pop r16 |
|
95c: 08 95 ret |
|
|
|
0000095e <_Z5oscGoR10OscMessage>: |
|
95e: cf 93 push r28 |
|
960: df 93 push r29 |
|
962: ec 01 movw r28, r24 |
|
964: 80 91 0a 01 lds r24, 0x010A |
|
968: 90 91 0b 01 lds r25, 0x010B |
|
96c: 04 97 sbiw r24, 0x04 ; 4 |
|
96e: 01 f5 brne .+64 ; 0x9b0 <_Z5oscGoR10OscMessage+0x52> |
|
970: ce 01 movw r24, r28 |
|
972: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
976: 04 97 sbiw r24, 0x04 ; 4 |
|
978: dc f0 brlt .+54 ; 0x9b0 <_Z5oscGoR10OscMessage+0x52> |
|
97a: 60 91 b3 02 lds r22, 0x02B3 |
|
97e: 70 91 b4 02 lds r23, 0x02B4 |
|
982: ce 01 movw r24, r28 |
|
984: 0e 94 a9 16 call 0x2d52 ; 0x2d52 <_ZN10OscMessage8getFloatEi> |
|
988: 60 93 0b 03 sts 0x030B, r22 |
|
98c: 70 93 0c 03 sts 0x030C, r23 |
|
990: 80 93 0d 03 sts 0x030D, r24 |
|
994: 90 93 0e 03 sts 0x030E, r25 |
|
998: 60 91 1c 01 lds r22, 0x011C |
|
99c: 70 91 1d 01 lds r23, 0x011D |
|
9a0: 80 91 1e 01 lds r24, 0x011E |
|
9a4: 90 91 1f 01 lds r25, 0x011F |
|
9a8: df 91 pop r29 |
|
9aa: cf 91 pop r28 |
|
9ac: 0c 94 a1 04 jmp 0x942 ; 0x942 <_Z14pidSetMaxSpeedf> |
|
9b0: df 91 pop r29 |
|
9b2: cf 91 pop r28 |
|
9b4: 08 95 ret |
|
|
|
000009b6 <_Z6oscGo2R10OscMessage>: |
|
9b6: cf 92 push r12 |
|
9b8: df 92 push r13 |
|
9ba: ef 92 push r14 |
|
9bc: ff 92 push r15 |
|
9be: cf 93 push r28 |
|
9c0: df 93 push r29 |
|
9c2: ec 01 movw r28, r24 |
|
9c4: 80 91 0a 01 lds r24, 0x010A |
|
9c8: 90 91 0b 01 lds r25, 0x010B |
|
9cc: 04 97 sbiw r24, 0x04 ; 4 |
|
9ce: 59 f5 brne .+86 ; 0xa26 <_Z6oscGo2R10OscMessage+0x70> |
|
9d0: ce 01 movw r24, r28 |
|
9d2: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
9d6: 08 97 sbiw r24, 0x08 ; 8 |
|
9d8: 34 f1 brlt .+76 ; 0xa26 <_Z6oscGo2R10OscMessage+0x70> |
|
9da: 60 91 b3 02 lds r22, 0x02B3 |
|
9de: 70 91 b4 02 lds r23, 0x02B4 |
|
9e2: 66 0f add r22, r22 |
|
9e4: 77 1f adc r23, r23 |
|
9e6: ce 01 movw r24, r28 |
|
9e8: 0e 94 a9 16 call 0x2d52 ; 0x2d52 <_ZN10OscMessage8getFloatEi> |
|
9ec: 6b 01 movw r12, r22 |
|
9ee: 7c 01 movw r14, r24 |
|
9f0: 60 91 b3 02 lds r22, 0x02B3 |
|
9f4: 70 91 b4 02 lds r23, 0x02B4 |
|
9f8: 66 0f add r22, r22 |
|
9fa: 77 1f adc r23, r23 |
|
9fc: 6f 5f subi r22, 0xFF ; 255 |
|
9fe: 7f 4f sbci r23, 0xFF ; 255 |
|
a00: ce 01 movw r24, r28 |
|
a02: 0e 94 a9 16 call 0x2d52 ; 0x2d52 <_ZN10OscMessage8getFloatEi> |
|
a06: c0 92 0b 03 sts 0x030B, r12 |
|
a0a: d0 92 0c 03 sts 0x030C, r13 |
|
a0e: e0 92 0d 03 sts 0x030D, r14 |
|
a12: f0 92 0e 03 sts 0x030E, r15 |
|
a16: df 91 pop r29 |
|
a18: cf 91 pop r28 |
|
a1a: ff 90 pop r15 |
|
a1c: ef 90 pop r14 |
|
a1e: df 90 pop r13 |
|
a20: cf 90 pop r12 |
|
a22: 0c 94 a1 04 jmp 0x942 ; 0x942 <_Z14pidSetMaxSpeedf> |
|
a26: df 91 pop r29 |
|
a28: cf 91 pop r28 |
|
a2a: ff 90 pop r15 |
|
a2c: ef 90 pop r14 |
|
a2e: df 90 pop r13 |
|
a30: cf 90 pop r12 |
|
a32: 08 95 ret |
|
|
|
00000a34 <_Z14oscSetMaxSpeedR10OscMessage>: |
|
a34: 0f 93 push r16 |
|
a36: 1f 93 push r17 |
|
a38: cf 93 push r28 |
|
a3a: df 93 push r29 |
|
a3c: ec 01 movw r28, r24 |
|
a3e: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
a42: 01 97 sbiw r24, 0x01 ; 1 |
|
a44: c1 f0 breq .+48 ; 0xa76 <_Z14oscSetMaxSpeedR10OscMessage+0x42> |
|
a46: ce 01 movw r24, r28 |
|
a48: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
a4c: 02 97 sbiw r24, 0x02 ; 2 |
|
a4e: 51 f5 brne .+84 ; 0xaa4 <_Z14oscSetMaxSpeedR10OscMessage+0x70> |
|
a50: 60 e0 ldi r22, 0x00 ; 0 |
|
a52: 70 e0 ldi r23, 0x00 ; 0 |
|
a54: ce 01 movw r24, r28 |
|
a56: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
a5a: 40 91 b3 02 lds r20, 0x02B3 |
|
a5e: 50 91 b4 02 lds r21, 0x02B4 |
|
a62: 8a 01 movw r16, r20 |
|
a64: 22 27 eor r18, r18 |
|
a66: 17 fd sbrc r17, 7 |
|
a68: 20 95 com r18 |
|
a6a: 32 2f mov r19, r18 |
|
a6c: 60 17 cp r22, r16 |
|
a6e: 71 07 cpc r23, r17 |
|
a70: 82 07 cpc r24, r18 |
|
a72: 93 07 cpc r25, r19 |
|
a74: b9 f4 brne .+46 ; 0xaa4 <_Z14oscSetMaxSpeedR10OscMessage+0x70> |
|
a76: ce 01 movw r24, r28 |
|
a78: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
a7c: bc 01 movw r22, r24 |
|
a7e: 61 50 subi r22, 0x01 ; 1 |
|
a80: 71 09 sbc r23, r1 |
|
a82: ce 01 movw r24, r28 |
|
a84: 0e 94 a9 16 call 0x2d52 ; 0x2d52 <_ZN10OscMessage8getFloatEi> |
|
a88: 60 93 1c 01 sts 0x011C, r22 |
|
a8c: 70 93 1d 01 sts 0x011D, r23 |
|
a90: 80 93 1e 01 sts 0x011E, r24 |
|
a94: 90 93 1f 01 sts 0x011F, r25 |
|
a98: df 91 pop r29 |
|
a9a: cf 91 pop r28 |
|
a9c: 1f 91 pop r17 |
|
a9e: 0f 91 pop r16 |
|
aa0: 0c 94 a1 04 jmp 0x942 ; 0x942 <_Z14pidSetMaxSpeedf> |
|
aa4: df 91 pop r29 |
|
aa6: cf 91 pop r28 |
|
aa8: 1f 91 pop r17 |
|
aaa: 0f 91 pop r16 |
|
aac: 08 95 ret |
|
|
|
00000aae <_Z12setupEncoderv>: |
|
aae: 0f 93 push r16 |
|
ab0: 1f 93 push r17 |
|
ab2: 61 e0 ldi r22, 0x01 ; 1 |
|
ab4: 70 e0 ldi r23, 0x00 ; 0 |
|
ab6: 8a e6 ldi r24, 0x6A ; 106 |
|
ab8: 93 e0 ldi r25, 0x03 ; 3 |
|
aba: 0e 94 6d 29 call 0x52da ; 0x52da <_ZN11EEPROMClass4readEi> |
|
abe: 81 30 cpi r24, 0x01 ; 1 |
|
ac0: d1 f5 brne .+116 ; 0xb36 <_Z12setupEncoderv+0x88> |
|
ac2: 40 91 86 03 lds r20, 0x0386 |
|
ac6: 50 91 87 03 lds r21, 0x0387 |
|
aca: 60 91 88 03 lds r22, 0x0388 |
|
ace: 70 91 89 03 lds r23, 0x0389 |
|
ad2: 00 91 82 03 lds r16, 0x0382 |
|
ad6: 10 91 83 03 lds r17, 0x0383 |
|
ada: 20 91 84 03 lds r18, 0x0384 |
|
ade: 30 91 85 03 lds r19, 0x0385 |
|
ae2: 81 e0 ldi r24, 0x01 ; 1 |
|
ae4: 90 e0 ldi r25, 0x00 ; 0 |
|
ae6: a0 e0 ldi r26, 0x00 ; 0 |
|
ae8: b0 e0 ldi r27, 0x00 ; 0 |
|
aea: 01 3a cpi r16, 0xA1 ; 161 |
|
aec: 10 4b sbci r17, 0xB0 ; 176 |
|
aee: 29 4b sbci r18, 0xB9 ; 185 |
|
af0: 32 41 sbci r19, 0x12 ; 18 |
|
af2: 19 f0 breq .+6 ; 0xafa <_Z12setupEncoderv+0x4c> |
|
af4: 80 e0 ldi r24, 0x00 ; 0 |
|
af6: 90 e0 ldi r25, 0x00 ; 0 |
|
af8: dc 01 movw r26, r24 |
|
afa: 48 17 cp r20, r24 |
|
afc: 59 07 cpc r21, r25 |
|
afe: 6a 07 cpc r22, r26 |
|
b00: 7b 07 cpc r23, r27 |
|
b02: c9 f0 breq .+50 ; 0xb36 <_Z12setupEncoderv+0x88> |
|
b04: 80 91 86 03 lds r24, 0x0386 |
|
b08: 90 91 87 03 lds r25, 0x0387 |
|
b0c: a0 91 88 03 lds r26, 0x0388 |
|
b10: b0 91 89 03 lds r27, 0x0389 |
|
b14: 0b 97 sbiw r24, 0x0b ; 11 |
|
b16: a1 05 cpc r26, r1 |
|
b18: b1 05 cpc r27, r1 |
|
b1a: 6c f0 brlt .+26 ; 0xb36 <_Z12setupEncoderv+0x88> |
|
b1c: 80 91 86 03 lds r24, 0x0386 |
|
b20: 90 91 87 03 lds r25, 0x0387 |
|
b24: a0 91 88 03 lds r26, 0x0388 |
|
b28: b0 91 89 03 lds r27, 0x0389 |
|
b2c: 80 3a cpi r24, 0xA0 ; 160 |
|
b2e: 96 48 sbci r25, 0x86 ; 134 |
|
b30: a1 40 sbci r26, 0x01 ; 1 |
|
b32: b1 05 cpc r27, r1 |
|
b34: 04 f1 brlt .+64 ; 0xb76 <_Z12setupEncoderv+0xc8> |
|
b36: 8f ef ldi r24, 0xFF ; 255 |
|
b38: 9f ef ldi r25, 0xFF ; 255 |
|
b3a: dc 01 movw r26, r24 |
|
b3c: 80 93 86 03 sts 0x0386, r24 |
|
b40: 90 93 87 03 sts 0x0387, r25 |
|
b44: a0 93 88 03 sts 0x0388, r26 |
|
b48: b0 93 89 03 sts 0x0389, r27 |
|
b4c: 60 e0 ldi r22, 0x00 ; 0 |
|
b4e: 82 e0 ldi r24, 0x02 ; 2 |
|
b50: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
b54: 60 e0 ldi r22, 0x00 ; 0 |
|
b56: 83 e0 ldi r24, 0x03 ; 3 |
|
b58: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
b5c: 60 e0 ldi r22, 0x00 ; 0 |
|
b5e: 84 e0 ldi r24, 0x04 ; 4 |
|
b60: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
b64: 43 e0 ldi r20, 0x03 ; 3 |
|
b66: 50 e0 ldi r21, 0x00 ; 0 |
|
b68: 63 e6 ldi r22, 0x63 ; 99 |
|
b6a: 72 e0 ldi r23, 0x02 ; 2 |
|
b6c: 80 e0 ldi r24, 0x00 ; 0 |
|
b6e: 0e 94 75 29 call 0x52ea ; 0x52ea <attachInterrupt> |
|
b72: 80 e0 ldi r24, 0x00 ; 0 |
|
b74: 0a c0 rjmp .+20 ; 0xb8a <_Z12setupEncoderv+0xdc> |
|
b76: 80 91 c3 02 lds r24, 0x02C3 |
|
b7a: 90 91 c4 02 lds r25, 0x02C4 |
|
b7e: 01 96 adiw r24, 0x01 ; 1 |
|
b80: 90 93 c4 02 sts 0x02C4, r25 |
|
b84: 80 93 c3 02 sts 0x02C3, r24 |
|
b88: 81 e0 ldi r24, 0x01 ; 1 |
|
b8a: 1f 91 pop r17 |
|
b8c: 0f 91 pop r16 |
|
b8e: 08 95 ret |
|
|
|
00000b90 <_Z16setupMotorDriverb>: |
|
b90: 0f 93 push r16 |
|
b92: 1f 93 push r17 |
|
b94: cf 93 push r28 |
|
b96: df 93 push r29 |
|
b98: c8 2f mov r28, r24 |
|
b9a: 61 e0 ldi r22, 0x01 ; 1 |
|
b9c: 88 e0 ldi r24, 0x08 ; 8 |
|
b9e: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
ba2: 61 e0 ldi r22, 0x01 ; 1 |
|
ba4: 87 e0 ldi r24, 0x07 ; 7 |
|
ba6: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
baa: 6c 2f mov r22, r28 |
|
bac: 87 e0 ldi r24, 0x07 ; 7 |
|
bae: 0e 94 2d 2b call 0x565a ; 0x565a <digitalWrite> |
|
public: |
|
//**************************** |
|
// Configuration |
|
//**************************** |
|
void initialize(unsigned long microseconds=1000000) __attribute__((always_inline)) { |
|
TCCR1B = _BV(WGM13); // set mode as phase and frequency correct pwm, stop the timer |
|
bb2: c1 e8 ldi r28, 0x81 ; 129 |
|
bb4: d0 e0 ldi r29, 0x00 ; 0 |
|
bb6: 80 e1 ldi r24, 0x10 ; 16 |
|
bb8: 88 83 st Y, r24 |
|
TCCR1A = 0; // clear control register A |
|
bba: 00 e8 ldi r16, 0x80 ; 128 |
|
bbc: 10 e0 ldi r17, 0x00 ; 0 |
|
bbe: f8 01 movw r30, r16 |
|
bc0: 10 82 st Z, r1 |
|
setPeriod(microseconds); |
|
} |
|
void setPeriod(unsigned long microseconds) __attribute__((always_inline)) { |
|
const unsigned long cycles = (F_CPU / 2000000) * microseconds; |
|
if (cycles < TIMER1_RESOLUTION) { |
|
clockSelectBits = _BV(CS10); |
|
bc2: 81 e0 ldi r24, 0x01 ; 1 |
|
bc4: 80 93 17 03 sts 0x0317, r24 |
|
pwmPeriod = cycles; |
|
bc8: 80 e4 ldi r24, 0x40 ; 64 |
|
bca: 9f e1 ldi r25, 0x1F ; 31 |
|
bcc: 90 93 19 03 sts 0x0319, r25 |
|
bd0: 80 93 18 03 sts 0x0318, r24 |
|
pwmPeriod = cycles / 1024; |
|
} else { |
|
clockSelectBits = _BV(CS12) | _BV(CS10); |
|
pwmPeriod = TIMER1_RESOLUTION - 1; |
|
} |
|
ICR1 = pwmPeriod; |
|
bd4: 90 93 87 00 sts 0x0087, r25 |
|
bd8: 80 93 86 00 sts 0x0086, r24 |
|
TCCR1B = _BV(WGM13) | clockSelectBits; |
|
bdc: 81 e1 ldi r24, 0x11 ; 17 |
|
bde: 88 83 st Y, r24 |
|
#ifdef TIMER1_C_PIN |
|
else if (pin == TIMER1_C_PIN) OCR1C = dutyCycle; |
|
#endif |
|
} |
|
void pwm(char pin, unsigned int duty) __attribute__((always_inline)) { |
|
if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); } |
|
be0: 61 e0 ldi r22, 0x01 ; 1 |
|
be2: 89 e0 ldi r24, 0x09 ; 9 |
|
be4: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
be8: f8 01 movw r30, r16 |
|
bea: 80 81 ld r24, Z |
|
bec: 80 68 ori r24, 0x80 ; 128 |
|
bee: 80 83 st Z, r24 |
|
//**************************** |
|
void setPwmDuty(char pin, unsigned int duty) __attribute__((always_inline)) { |
|
unsigned long dutyCycle = pwmPeriod; |
|
dutyCycle *= duty; |
|
dutyCycle >>= 10; |
|
if (pin == TIMER1_A_PIN) OCR1A = dutyCycle; |
|
bf0: 10 92 89 00 sts 0x0089, r1 |
|
bf4: 10 92 88 00 sts 0x0088, r1 |
|
#endif |
|
#ifdef TIMER1_C_PIN |
|
else if (pin == TIMER1_C_PIN) { pinMode(TIMER1_C_PIN, OUTPUT); TCCR1A |= _BV(COM1C1); } |
|
#endif |
|
setPwmDuty(pin, duty); |
|
TCCR1B = _BV(WGM13) | clockSelectBits; |
|
bf8: 80 91 17 03 lds r24, 0x0317 |
|
bfc: 80 61 ori r24, 0x10 ; 16 |
|
bfe: 88 83 st Y, r24 |
|
|
|
//**************************** |
|
// Run Control |
|
//**************************** |
|
void start() __attribute__((always_inline)) { |
|
TCCR1B = 0; |
|
c00: 18 82 st Y, r1 |
|
TCNT1 = 0; // TODO: does this cause an undesired interrupt? |
|
c02: 10 92 85 00 sts 0x0085, r1 |
|
c06: 10 92 84 00 sts 0x0084, r1 |
|
} |
|
void restart() __attribute__((always_inline)) { |
|
start(); |
|
} |
|
void resume() __attribute__((always_inline)) { |
|
TCCR1B = _BV(WGM13) | clockSelectBits; |
|
c0a: 80 91 17 03 lds r24, 0x0317 |
|
c0e: 80 61 ori r24, 0x10 ; 16 |
|
c10: 88 83 st Y, r24 |
|
c12: df 91 pop r29 |
|
c14: cf 91 pop r28 |
|
c16: 1f 91 pop r17 |
|
c18: 0f 91 pop r16 |
|
c1a: 08 95 ret |
|
|
|
00000c1c <_Z13setupEndstopsv>: |
|
c1c: 62 e0 ldi r22, 0x02 ; 2 |
|
c1e: 86 e0 ldi r24, 0x06 ; 6 |
|
c20: 0c 94 f4 2a jmp 0x55e8 ; 0x55e8 <pinMode> |
|
|
|
00000c24 <_Z2gof>: |
|
c24: cf 92 push r12 |
|
c26: df 92 push r13 |
|
c28: ef 92 push r14 |
|
c2a: ff 92 push r15 |
|
c2c: cf 93 push r28 |
|
c2e: df 93 push r29 |
|
c30: 00 d0 rcall .+0 ; 0xc32 <_Z2gof+0xe> |
|
c32: 00 d0 rcall .+0 ; 0xc34 <_Z2gof+0x10> |
|
c34: cd b7 in r28, 0x3d ; 61 |
|
c36: de b7 in r29, 0x3e ; 62 |
|
c38: 6b 01 movw r12, r22 |
|
c3a: 7c 01 movw r14, r24 |
|
c3c: 60 93 b5 02 sts 0x02B5, r22 |
|
c40: 70 93 b6 02 sts 0x02B6, r23 |
|
c44: 80 93 b7 02 sts 0x02B7, r24 |
|
c48: 90 93 b8 02 sts 0x02B8, r25 |
|
c4c: 20 e0 ldi r18, 0x00 ; 0 |
|
c4e: 30 e0 ldi r19, 0x00 ; 0 |
|
c50: a9 01 movw r20, r18 |
|
c52: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
c56: 81 11 cpse r24, r1 |
|
c58: 1e c0 rjmp .+60 ; 0xc96 <_Z2gof+0x72> |
|
#ifdef TIMER1_C_PIN |
|
else if (pin == TIMER1_C_PIN) OCR1C = dutyCycle; |
|
#endif |
|
} |
|
void pwm(char pin, unsigned int duty) __attribute__((always_inline)) { |
|
if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); } |
|
c5a: 61 e0 ldi r22, 0x01 ; 1 |
|
c5c: 89 e0 ldi r24, 0x09 ; 9 |
|
c5e: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
c62: 80 91 80 00 lds r24, 0x0080 |
|
c66: 80 68 ori r24, 0x80 ; 128 |
|
c68: 80 93 80 00 sts 0x0080, r24 |
|
//**************************** |
|
void setPwmDuty(char pin, unsigned int duty) __attribute__((always_inline)) { |
|
unsigned long dutyCycle = pwmPeriod; |
|
dutyCycle *= duty; |
|
dutyCycle >>= 10; |
|
if (pin == TIMER1_A_PIN) OCR1A = dutyCycle; |
|
c6c: 10 92 89 00 sts 0x0089, r1 |
|
c70: 10 92 88 00 sts 0x0088, r1 |
|
#endif |
|
#ifdef TIMER1_C_PIN |
|
else if (pin == TIMER1_C_PIN) { pinMode(TIMER1_C_PIN, OUTPUT); TCCR1A |= _BV(COM1C1); } |
|
#endif |
|
setPwmDuty(pin, duty); |
|
TCCR1B = _BV(WGM13) | clockSelectBits; |
|
c74: 80 91 17 03 lds r24, 0x0317 |
|
c78: 80 61 ori r24, 0x10 ; 16 |
|
c7a: 80 93 81 00 sts 0x0081, r24 |
|
c7e: 10 92 b9 02 sts 0x02B9, r1 |
|
c82: 10 92 ba 02 sts 0x02BA, r1 |
|
c86: 10 92 bb 02 sts 0x02BB, r1 |
|
c8a: 10 92 bc 02 sts 0x02BC, r1 |
|
c8e: 60 e0 ldi r22, 0x00 ; 0 |
|
c90: 70 e0 ldi r23, 0x00 ; 0 |
|
c92: cb 01 movw r24, r22 |
|
c94: 00 c1 rjmp .+512 ; 0xe96 <_Z2gof+0x272> |
|
c96: 20 e0 ldi r18, 0x00 ; 0 |
|
c98: 30 e0 ldi r19, 0x00 ; 0 |
|
c9a: a9 01 movw r20, r18 |
|
c9c: c7 01 movw r24, r14 |
|
c9e: b6 01 movw r22, r12 |
|
ca0: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
ca4: 87 ff sbrs r24, 7 |
|
ca6: 09 c0 rjmp .+18 ; 0xcba <_Z2gof+0x96> |
|
ca8: f7 fa bst r15, 7 |
|
caa: f0 94 com r15 |
|
cac: f7 f8 bld r15, 7 |
|
cae: f0 94 com r15 |
|
cb0: 10 92 be 02 sts 0x02BE, r1 |
|
cb4: 10 92 bd 02 sts 0x02BD, r1 |
|
cb8: 06 c0 rjmp .+12 ; 0xcc6 <_Z2gof+0xa2> |
|
cba: 81 e0 ldi r24, 0x01 ; 1 |
|
cbc: 90 e0 ldi r25, 0x00 ; 0 |
|
cbe: 90 93 be 02 sts 0x02BE, r25 |
|
cc2: 80 93 bd 02 sts 0x02BD, r24 |
|
cc6: 60 91 bd 02 lds r22, 0x02BD |
|
cca: 70 91 be 02 lds r23, 0x02BE |
|
cce: 88 e0 ldi r24, 0x08 ; 8 |
|
cd0: 0e 94 2d 2b call 0x565a ; 0x565a <digitalWrite> |
|
cd4: a7 01 movw r20, r14 |
|
cd6: 96 01 movw r18, r12 |
|
cd8: 60 e0 ldi r22, 0x00 ; 0 |
|
cda: 74 e2 ldi r23, 0x24 ; 36 |
|
cdc: 84 e7 ldi r24, 0x74 ; 116 |
|
cde: 99 e4 ldi r25, 0x49 ; 73 |
|
ce0: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
ce4: 27 e2 ldi r18, 0x27 ; 39 |
|
ce6: 37 eb ldi r19, 0xB7 ; 183 |
|
ce8: 4c e3 ldi r20, 0x3C ; 60 |
|
cea: 52 e4 ldi r21, 0x42 ; 66 |
|
cec: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
cf0: 0e 94 78 2d call 0x5af0 ; 0x5af0 <__fixunssfsi> |
|
cf4: 60 93 b9 02 sts 0x02B9, r22 |
|
cf8: 70 93 ba 02 sts 0x02BA, r23 |
|
cfc: 80 93 bb 02 sts 0x02BB, r24 |
|
d00: 90 93 bc 02 sts 0x02BC, r25 |
|
d04: 60 91 b9 02 lds r22, 0x02B9 |
|
d08: 70 91 ba 02 lds r23, 0x02BA |
|
d0c: 80 91 bb 02 lds r24, 0x02BB |
|
d10: 90 91 bc 02 lds r25, 0x02BC |
|
d14: 0e 94 a4 2d call 0x5b48 ; 0x5b48 <__floatunsisf> |
|
d18: 9b 01 movw r18, r22 |
|
d1a: ac 01 movw r20, r24 |
|
d1c: 60 e0 ldi r22, 0x00 ; 0 |
|
d1e: 70 e0 ldi r23, 0x00 ; 0 |
|
d20: 88 e4 ldi r24, 0x48 ; 72 |
|
d22: 97 e4 ldi r25, 0x47 ; 71 |
|
d24: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
d28: 0e 94 78 2d call 0x5af0 ; 0x5af0 <__fixunssfsi> |
|
d2c: 61 15 cp r22, r1 |
|
d2e: 71 05 cpc r23, r1 |
|
d30: 81 05 cpc r24, r1 |
|
d32: 91 05 cpc r25, r1 |
|
d34: 69 f0 breq .+26 ; 0xd50 <_Z2gof+0x12c> |
|
d36: 9b 01 movw r18, r22 |
|
d38: ac 01 movw r20, r24 |
|
d3a: 21 15 cp r18, r1 |
|
d3c: 62 e0 ldi r22, 0x02 ; 2 |
|
d3e: 36 07 cpc r19, r22 |
|
d40: 41 05 cpc r20, r1 |
|
d42: 51 05 cpc r21, r1 |
|
d44: 48 f0 brcs .+18 ; 0xd58 <_Z2gof+0x134> |
|
d46: 2f ef ldi r18, 0xFF ; 255 |
|
d48: 31 e0 ldi r19, 0x01 ; 1 |
|
d4a: 40 e0 ldi r20, 0x00 ; 0 |
|
d4c: 50 e0 ldi r21, 0x00 ; 0 |
|
d4e: 04 c0 rjmp .+8 ; 0xd58 <_Z2gof+0x134> |
|
d50: 21 e0 ldi r18, 0x01 ; 1 |
|
d52: 30 e0 ldi r19, 0x00 ; 0 |
|
d54: 40 e0 ldi r20, 0x00 ; 0 |
|
d56: 50 e0 ldi r21, 0x00 ; 0 |
|
d58: 80 91 b9 02 lds r24, 0x02B9 |
|
d5c: 90 91 ba 02 lds r25, 0x02BA |
|
d60: a0 91 bb 02 lds r26, 0x02BB |
|
d64: b0 91 bc 02 lds r27, 0x02BC |
|
} |
|
void pwm(char pin, unsigned int duty, unsigned long microseconds) __attribute__((always_inline)) { |
|
if (microseconds > 0) setPeriod(microseconds); |
|
d68: 00 97 sbiw r24, 0x00 ; 0 |
|
d6a: a1 05 cpc r26, r1 |
|
d6c: b1 05 cpc r27, r1 |
|
d6e: 09 f4 brne .+2 ; 0xd72 <_Z2gof+0x14e> |
|
d70: 63 c0 rjmp .+198 ; 0xe38 <_Z2gof+0x214> |
|
TCCR1B = _BV(WGM13); // set mode as phase and frequency correct pwm, stop the timer |
|
TCCR1A = 0; // clear control register A |
|
setPeriod(microseconds); |
|
} |
|
void setPeriod(unsigned long microseconds) __attribute__((always_inline)) { |
|
const unsigned long cycles = (F_CPU / 2000000) * microseconds; |
|
d72: 63 e0 ldi r22, 0x03 ; 3 |
|
d74: 88 0f add r24, r24 |
|
d76: 99 1f adc r25, r25 |
|
d78: aa 1f adc r26, r26 |
|
d7a: bb 1f adc r27, r27 |
|
d7c: 6a 95 dec r22 |
|
d7e: d1 f7 brne .-12 ; 0xd74 <_Z2gof+0x150> |
|
if (cycles < TIMER1_RESOLUTION) { |
|
d80: 00 97 sbiw r24, 0x00 ; 0 |
|
d82: e1 e0 ldi r30, 0x01 ; 1 |
|
d84: ae 07 cpc r26, r30 |
|
d86: b1 05 cpc r27, r1 |
|
d88: 20 f4 brcc .+8 ; 0xd92 <_Z2gof+0x16e> |
|
clockSelectBits = _BV(CS10); |
|
d8a: e1 e0 ldi r30, 0x01 ; 1 |
|
d8c: e0 93 17 03 sts 0x0317, r30 |
|
d90: 42 c0 rjmp .+132 ; 0xe16 <_Z2gof+0x1f2> |
|
pwmPeriod = cycles; |
|
} else |
|
if (cycles < TIMER1_RESOLUTION * 8) { |
|
d92: 00 97 sbiw r24, 0x00 ; 0 |
|
d94: f8 e0 ldi r31, 0x08 ; 8 |
|
d96: af 07 cpc r26, r31 |
|
d98: b1 05 cpc r27, r1 |
|
d9a: 58 f4 brcc .+22 ; 0xdb2 <_Z2gof+0x18e> |
|
clockSelectBits = _BV(CS11); |
|
d9c: e2 e0 ldi r30, 0x02 ; 2 |
|
d9e: e0 93 17 03 sts 0x0317, r30 |
|
pwmPeriod = cycles / 8; |
|
da2: f3 e0 ldi r31, 0x03 ; 3 |
|
da4: b6 95 lsr r27 |
|
da6: a7 95 ror r26 |
|
da8: 97 95 ror r25 |
|
daa: 87 95 ror r24 |
|
dac: fa 95 dec r31 |
|
dae: d1 f7 brne .-12 ; 0xda4 <_Z2gof+0x180> |
|
db0: 32 c0 rjmp .+100 ; 0xe16 <_Z2gof+0x1f2> |
|
} else |
|
if (cycles < TIMER1_RESOLUTION * 64) { |
|
db2: 00 97 sbiw r24, 0x00 ; 0 |
|
db4: 60 e4 ldi r22, 0x40 ; 64 |
|
db6: a6 07 cpc r26, r22 |
|
db8: b1 05 cpc r27, r1 |
|
dba: 58 f4 brcc .+22 ; 0xdd2 <_Z2gof+0x1ae> |
|
clockSelectBits = _BV(CS11) | _BV(CS10); |
|
dbc: e3 e0 ldi r30, 0x03 ; 3 |
|
dbe: e0 93 17 03 sts 0x0317, r30 |
|
pwmPeriod = cycles / 64; |
|
dc2: e6 e0 ldi r30, 0x06 ; 6 |
|
dc4: b6 95 lsr r27 |
|
dc6: a7 95 ror r26 |
|
dc8: 97 95 ror r25 |
|
dca: 87 95 ror r24 |
|
dcc: ea 95 dec r30 |
|
dce: d1 f7 brne .-12 ; 0xdc4 <_Z2gof+0x1a0> |
|
dd0: 22 c0 rjmp .+68 ; 0xe16 <_Z2gof+0x1f2> |
|
} else |
|
if (cycles < TIMER1_RESOLUTION * 256) { |
|
dd2: 00 97 sbiw r24, 0x00 ; 0 |
|
dd4: a1 05 cpc r26, r1 |
|
dd6: e1 e0 ldi r30, 0x01 ; 1 |
|
dd8: be 07 cpc r27, r30 |
|
dda: 40 f4 brcc .+16 ; 0xdec <_Z2gof+0x1c8> |
|
clockSelectBits = _BV(CS12); |
|
ddc: e4 e0 ldi r30, 0x04 ; 4 |
|
dde: e0 93 17 03 sts 0x0317, r30 |
|
pwmPeriod = cycles / 256; |
|
de2: 89 2f mov r24, r25 |
|
de4: 9a 2f mov r25, r26 |
|
de6: ab 2f mov r26, r27 |
|
de8: bb 27 eor r27, r27 |
|
dea: 15 c0 rjmp .+42 ; 0xe16 <_Z2gof+0x1f2> |
|
} else |
|
if (cycles < TIMER1_RESOLUTION * 1024) { |
|
dec: 00 97 sbiw r24, 0x00 ; 0 |
|
dee: a1 05 cpc r26, r1 |
|
df0: f4 e0 ldi r31, 0x04 ; 4 |
|
df2: bf 07 cpc r27, r31 |
|
df4: 58 f4 brcc .+22 ; 0xe0c <_Z2gof+0x1e8> |
|
clockSelectBits = _BV(CS12) | _BV(CS10); |
|
df6: e5 e0 ldi r30, 0x05 ; 5 |
|
df8: e0 93 17 03 sts 0x0317, r30 |
|
pwmPeriod = cycles / 1024; |
|
dfc: 6a e0 ldi r22, 0x0A ; 10 |
|
dfe: b6 95 lsr r27 |
|
e00: a7 95 ror r26 |
|
e02: 97 95 ror r25 |
|
e04: 87 95 ror r24 |
|
e06: 6a 95 dec r22 |
|
e08: d1 f7 brne .-12 ; 0xdfe <_Z2gof+0x1da> |
|
e0a: 05 c0 rjmp .+10 ; 0xe16 <_Z2gof+0x1f2> |
|
} else { |
|
clockSelectBits = _BV(CS12) | _BV(CS10); |
|
e0c: 85 e0 ldi r24, 0x05 ; 5 |
|
e0e: 80 93 17 03 sts 0x0317, r24 |
|
pwmPeriod = TIMER1_RESOLUTION - 1; |
|
e12: 8f ef ldi r24, 0xFF ; 255 |
|
e14: 9f ef ldi r25, 0xFF ; 255 |
|
e16: 90 93 19 03 sts 0x0319, r25 |
|
e1a: 80 93 18 03 sts 0x0318, r24 |
|
} |
|
ICR1 = pwmPeriod; |
|
e1e: 80 91 18 03 lds r24, 0x0318 |
|
e22: 90 91 19 03 lds r25, 0x0319 |
|
e26: 90 93 87 00 sts 0x0087, r25 |
|
e2a: 80 93 86 00 sts 0x0086, r24 |
|
TCCR1B = _BV(WGM13) | clockSelectBits; |
|
e2e: 80 91 17 03 lds r24, 0x0317 |
|
e32: 80 61 ori r24, 0x10 ; 16 |
|
e34: 80 93 81 00 sts 0x0081, r24 |
|
#ifdef TIMER1_C_PIN |
|
else if (pin == TIMER1_C_PIN) OCR1C = dutyCycle; |
|
#endif |
|
} |
|
void pwm(char pin, unsigned int duty) __attribute__((always_inline)) { |
|
if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); } |
|
e38: 61 e0 ldi r22, 0x01 ; 1 |
|
e3a: 89 e0 ldi r24, 0x09 ; 9 |
|
e3c: 29 83 std Y+1, r18 ; 0x01 |
|
e3e: 3a 83 std Y+2, r19 ; 0x02 |
|
e40: 4b 83 std Y+3, r20 ; 0x03 |
|
e42: 5c 83 std Y+4, r21 ; 0x04 |
|
e44: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
e48: 80 91 80 00 lds r24, 0x0080 |
|
e4c: 80 68 ori r24, 0x80 ; 128 |
|
e4e: 80 93 80 00 sts 0x0080, r24 |
|
|
|
//**************************** |
|
// PWM outputs |
|
//**************************** |
|
void setPwmDuty(char pin, unsigned int duty) __attribute__((always_inline)) { |
|
unsigned long dutyCycle = pwmPeriod; |
|
e52: a0 91 18 03 lds r26, 0x0318 |
|
e56: b0 91 19 03 lds r27, 0x0319 |
|
dutyCycle *= duty; |
|
e5a: 29 81 ldd r18, Y+1 ; 0x01 |
|
e5c: 3a 81 ldd r19, Y+2 ; 0x02 |
|
e5e: 4b 81 ldd r20, Y+3 ; 0x03 |
|
e60: 5c 81 ldd r21, Y+4 ; 0x04 |
|
e62: 0e 94 68 2f call 0x5ed0 ; 0x5ed0 <__muluhisi3> |
|
dutyCycle >>= 10; |
|
e66: 2a e0 ldi r18, 0x0A ; 10 |
|
e68: 96 95 lsr r25 |
|
e6a: 87 95 ror r24 |
|
e6c: 77 95 ror r23 |
|
e6e: 67 95 ror r22 |
|
e70: 2a 95 dec r18 |
|
e72: d1 f7 brne .-12 ; 0xe68 <_Z2gof+0x244> |
|
if (pin == TIMER1_A_PIN) OCR1A = dutyCycle; |
|
e74: 70 93 89 00 sts 0x0089, r23 |
|
e78: 60 93 88 00 sts 0x0088, r22 |
|
#endif |
|
#ifdef TIMER1_C_PIN |
|
else if (pin == TIMER1_C_PIN) { pinMode(TIMER1_C_PIN, OUTPUT); TCCR1A |= _BV(COM1C1); } |
|
#endif |
|
setPwmDuty(pin, duty); |
|
TCCR1B = _BV(WGM13) | clockSelectBits; |
|
e7c: 80 91 17 03 lds r24, 0x0317 |
|
e80: 80 61 ori r24, 0x10 ; 16 |
|
e82: 80 93 81 00 sts 0x0081, r24 |
|
e86: 60 91 b9 02 lds r22, 0x02B9 |
|
e8a: 70 91 ba 02 lds r23, 0x02BA |
|
e8e: 80 91 bb 02 lds r24, 0x02BB |
|
e92: 90 91 bc 02 lds r25, 0x02BC |
|
e96: 0f 90 pop r0 |
|
e98: 0f 90 pop r0 |
|
e9a: 0f 90 pop r0 |
|
e9c: 0f 90 pop r0 |
|
e9e: df 91 pop r29 |
|
ea0: cf 91 pop r28 |
|
ea2: ff 90 pop r15 |
|
ea4: ef 90 pop r14 |
|
ea6: df 90 pop r13 |
|
ea8: cf 90 pop r12 |
|
eaa: 08 95 ret |
|
|
|
00000eac <_Z11updateSpeedm>: |
|
eac: 4f 92 push r4 |
|
eae: 5f 92 push r5 |
|
eb0: 6f 92 push r6 |
|
eb2: 7f 92 push r7 |
|
eb4: cf 92 push r12 |
|
eb6: df 92 push r13 |
|
eb8: ef 92 push r14 |
|
eba: ff 92 push r15 |
|
ebc: 0f 93 push r16 |
|
ebe: 1f 93 push r17 |
|
ec0: cf 93 push r28 |
|
ec2: df 93 push r29 |
|
ec4: 6b 01 movw r12, r22 |
|
ec6: 7c 01 movw r14, r24 |
|
ec8: 40 90 b5 02 lds r4, 0x02B5 |
|
ecc: 50 90 b6 02 lds r5, 0x02B6 |
|
ed0: 60 90 b7 02 lds r6, 0x02B7 |
|
ed4: 70 90 b8 02 lds r7, 0x02B8 |
|
ed8: a3 01 movw r20, r6 |
|
eda: 92 01 movw r18, r4 |
|
edc: 60 91 c6 02 lds r22, 0x02C6 |
|
ee0: 70 91 c7 02 lds r23, 0x02C7 |
|
ee4: 80 91 c8 02 lds r24, 0x02C8 |
|
ee8: 90 91 c9 02 lds r25, 0x02C9 |
|
eec: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
ef0: 8b 01 movw r16, r22 |
|
ef2: d8 2f mov r29, r24 |
|
ef4: c9 2f mov r28, r25 |
|
ef6: c7 01 movw r24, r14 |
|
ef8: b6 01 movw r22, r12 |
|
efa: 0e 94 a4 2d call 0x5b48 ; 0x5b48 <__floatunsisf> |
|
efe: 20 91 20 01 lds r18, 0x0120 |
|
f02: 30 91 21 01 lds r19, 0x0121 |
|
f06: 40 91 22 01 lds r20, 0x0122 |
|
f0a: 50 91 23 01 lds r21, 0x0123 |
|
f0e: 0e 94 5a 2e call 0x5cb4 ; 0x5cb4 <__mulsf3> |
|
f12: 20 e0 ldi r18, 0x00 ; 0 |
|
f14: 34 e2 ldi r19, 0x24 ; 36 |
|
f16: 44 e7 ldi r20, 0x74 ; 116 |
|
f18: 59 e4 ldi r21, 0x49 ; 73 |
|
f1a: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
f1e: 6b 01 movw r12, r22 |
|
f20: 7c 01 movw r14, r24 |
|
f22: 9b 01 movw r18, r22 |
|
f24: ac 01 movw r20, r24 |
|
f26: b8 01 movw r22, r16 |
|
f28: 8d 2f mov r24, r29 |
|
f2a: 9c 2f mov r25, r28 |
|
f2c: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
f30: 18 16 cp r1, r24 |
|
f32: 84 f0 brlt .+32 ; 0xf54 <_Z11updateSpeedm+0xa8> |
|
f34: f7 fa bst r15, 7 |
|
f36: f0 94 com r15 |
|
f38: f7 f8 bld r15, 7 |
|
f3a: f0 94 com r15 |
|
f3c: a7 01 movw r20, r14 |
|
f3e: 96 01 movw r18, r12 |
|
f40: b8 01 movw r22, r16 |
|
f42: 8d 2f mov r24, r29 |
|
f44: 9c 2f mov r25, r28 |
|
f46: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
f4a: 87 fd sbrc r24, 7 |
|
f4c: 03 c0 rjmp .+6 ; 0xf54 <_Z11updateSpeedm+0xa8> |
|
f4e: 68 01 movw r12, r16 |
|
f50: ed 2e mov r14, r29 |
|
f52: fc 2e mov r15, r28 |
|
f54: a7 01 movw r20, r14 |
|
f56: 96 01 movw r18, r12 |
|
f58: c3 01 movw r24, r6 |
|
f5a: b2 01 movw r22, r4 |
|
f5c: 0e 94 a3 2c call 0x5946 ; 0x5946 <__addsf3> |
|
f60: df 91 pop r29 |
|
f62: cf 91 pop r28 |
|
f64: 1f 91 pop r17 |
|
f66: 0f 91 pop r16 |
|
f68: ff 90 pop r15 |
|
f6a: ef 90 pop r14 |
|
f6c: df 90 pop r13 |
|
f6e: cf 90 pop r12 |
|
f70: 7f 90 pop r7 |
|
f72: 6f 90 pop r6 |
|
f74: 5f 90 pop r5 |
|
f76: 4f 90 pop r4 |
|
f78: 0c 94 12 06 jmp 0xc24 ; 0xc24 <_Z2gof> |
|
|
|
00000f7c <_Z11motorEnableb>: |
|
f7c: 68 2f mov r22, r24 |
|
f7e: 87 e0 ldi r24, 0x07 ; 7 |
|
f80: 0c 94 2d 2b jmp 0x565a ; 0x565a <digitalWrite> |
|
|
|
00000f84 <_Z16oscSetMotorPowerR10OscMessage>: |
|
f84: 0f 93 push r16 |
|
f86: 1f 93 push r17 |
|
f88: cf 93 push r28 |
|
f8a: df 93 push r29 |
|
f8c: ec 01 movw r28, r24 |
|
f8e: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
f92: 01 97 sbiw r24, 0x01 ; 1 |
|
f94: c9 f0 breq .+50 ; 0xfc8 <_Z16oscSetMotorPowerR10OscMessage+0x44> |
|
f96: ce 01 movw r24, r28 |
|
f98: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
f9c: 02 97 sbiw r24, 0x02 ; 2 |
|
f9e: 09 f0 breq .+2 ; 0xfa2 <_Z16oscSetMotorPowerR10OscMessage+0x1e> |
|
fa0: 42 c0 rjmp .+132 ; 0x1026 <_Z16oscSetMotorPowerR10OscMessage+0xa2> |
|
fa2: 60 e0 ldi r22, 0x00 ; 0 |
|
fa4: 70 e0 ldi r23, 0x00 ; 0 |
|
fa6: ce 01 movw r24, r28 |
|
fa8: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
fac: 40 91 b3 02 lds r20, 0x02B3 |
|
fb0: 50 91 b4 02 lds r21, 0x02B4 |
|
fb4: 8a 01 movw r16, r20 |
|
fb6: 22 27 eor r18, r18 |
|
fb8: 17 fd sbrc r17, 7 |
|
fba: 20 95 com r18 |
|
fbc: 32 2f mov r19, r18 |
|
fbe: 60 17 cp r22, r16 |
|
fc0: 71 07 cpc r23, r17 |
|
fc2: 82 07 cpc r24, r18 |
|
fc4: 93 07 cpc r25, r19 |
|
fc6: 79 f5 brne .+94 ; 0x1026 <_Z16oscSetMotorPowerR10OscMessage+0xa2> |
|
fc8: ce 01 movw r24, r28 |
|
fca: 0e 94 5e 16 call 0x2cbc ; 0x2cbc <_ZN10OscMessage4sizeEv> |
|
fce: bc 01 movw r22, r24 |
|
fd0: 61 50 subi r22, 0x01 ; 1 |
|
fd2: 71 09 sbc r23, r1 |
|
fd4: ce 01 movw r24, r28 |
|
fd6: 0e 94 8d 16 call 0x2d1a ; 0x2d1a <_ZN10OscMessage6getIntEi> |
|
fda: 67 2b or r22, r23 |
|
fdc: b9 f0 breq .+46 ; 0x100c <_Z16oscSetMotorPowerR10OscMessage+0x88> |
|
fde: 80 91 0a 01 lds r24, 0x010A |
|
fe2: 90 91 0b 01 lds r25, 0x010B |
|
fe6: 08 97 sbiw r24, 0x08 ; 8 |
|
fe8: 79 f4 brne .+30 ; 0x1008 <_Z16oscSetMotorPowerR10OscMessage+0x84> |
|
fea: 80 91 c5 02 lds r24, 0x02C5 |
|
fee: 88 23 and r24, r24 |
|
ff0: 39 f0 breq .+14 ; 0x1000 <_Z16oscSetMotorPowerR10OscMessage+0x7c> |
|
ff2: 84 e0 ldi r24, 0x04 ; 4 |
|
ff4: 90 e0 ldi r25, 0x00 ; 0 |
|
ff6: 90 93 0b 01 sts 0x010B, r25 |
|
ffa: 80 93 0a 01 sts 0x010A, r24 |
|
ffe: 04 c0 rjmp .+8 ; 0x1008 <_Z16oscSetMotorPowerR10OscMessage+0x84> |
|
1000: 10 92 0b 01 sts 0x010B, r1 |
|
1004: 10 92 0a 01 sts 0x010A, r1 |
|
1008: 81 e0 ldi r24, 0x01 ; 1 |
|
100a: 07 c0 rjmp .+14 ; 0x101a <_Z16oscSetMotorPowerR10OscMessage+0x96> |
|
100c: 88 e0 ldi r24, 0x08 ; 8 |
|
100e: 90 e0 ldi r25, 0x00 ; 0 |
|
1010: 90 93 0b 01 sts 0x010B, r25 |
|
1014: 80 93 0a 01 sts 0x010A, r24 |
|
1018: 80 e0 ldi r24, 0x00 ; 0 |
|
101a: df 91 pop r29 |
|
101c: cf 91 pop r28 |
|
101e: 1f 91 pop r17 |
|
1020: 0f 91 pop r16 |
|
1022: 0c 94 be 07 jmp 0xf7c ; 0xf7c <_Z11motorEnableb> |
|
1026: df 91 pop r29 |
|
1028: cf 91 pop r28 |
|
102a: 1f 91 pop r17 |
|
102c: 0f 91 pop r16 |
|
102e: 08 95 ret |
|
|
|
00001030 <_Z8oscEventR10OscMessage>: |
|
1030: cf 93 push r28 |
|
1032: df 93 push r29 |
|
1034: ec 01 movw r28, r24 |
|
1036: 20 e0 ldi r18, 0x00 ; 0 |
|
1038: 30 e0 ldi r19, 0x00 ; 0 |
|
103a: 4f ea ldi r20, 0xAF ; 175 |
|
103c: 54 e0 ldi r21, 0x04 ; 4 |
|
103e: 68 e2 ldi r22, 0x28 ; 40 |
|
1040: 71 e0 ldi r23, 0x01 ; 1 |
|
1042: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
1046: 20 e0 ldi r18, 0x00 ; 0 |
|
1048: 30 e0 ldi r19, 0x00 ; 0 |
|
104a: 4b ed ldi r20, 0xDB ; 219 |
|
104c: 54 e0 ldi r21, 0x04 ; 4 |
|
104e: 6c e2 ldi r22, 0x2C ; 44 |
|
1050: 71 e0 ldi r23, 0x01 ; 1 |
|
1052: ce 01 movw r24, r28 |
|
1054: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
1058: 20 e0 ldi r18, 0x00 ; 0 |
|
105a: 30 e0 ldi r19, 0x00 ; 0 |
|
105c: 49 ee ldi r20, 0xE9 ; 233 |
|
105e: 52 e0 ldi r21, 0x02 ; 2 |
|
1060: 61 e3 ldi r22, 0x31 ; 49 |
|
1062: 71 e0 ldi r23, 0x01 ; 1 |
|
1064: ce 01 movw r24, r28 |
|
1066: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
106a: 20 e0 ldi r18, 0x00 ; 0 |
|
106c: 30 e0 ldi r19, 0x00 ; 0 |
|
106e: 4a e1 ldi r20, 0x1A ; 26 |
|
1070: 55 e0 ldi r21, 0x05 ; 5 |
|
1072: 67 e3 ldi r22, 0x37 ; 55 |
|
1074: 71 e0 ldi r23, 0x01 ; 1 |
|
1076: ce 01 movw r24, r28 |
|
1078: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
107c: 20 e0 ldi r18, 0x00 ; 0 |
|
107e: 30 e0 ldi r19, 0x00 ; 0 |
|
1080: 4a e1 ldi r20, 0x1A ; 26 |
|
1082: 53 e0 ldi r21, 0x03 ; 3 |
|
1084: 61 e4 ldi r22, 0x41 ; 65 |
|
1086: 71 e0 ldi r23, 0x01 ; 1 |
|
1088: ce 01 movw r24, r28 |
|
108a: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
108e: 20 e0 ldi r18, 0x00 ; 0 |
|
1090: 30 e0 ldi r19, 0x00 ; 0 |
|
1092: 41 e5 ldi r20, 0x51 ; 81 |
|
1094: 53 e0 ldi r21, 0x03 ; 3 |
|
1096: 6b e4 ldi r22, 0x4B ; 75 |
|
1098: 71 e0 ldi r23, 0x01 ; 1 |
|
109a: ce 01 movw r24, r28 |
|
109c: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
10a0: 20 e0 ldi r18, 0x00 ; 0 |
|
10a2: 30 e0 ldi r19, 0x00 ; 0 |
|
10a4: 4d e9 ldi r20, 0x9D ; 157 |
|
10a6: 52 e0 ldi r21, 0x02 ; 2 |
|
10a8: 65 e5 ldi r22, 0x55 ; 85 |
|
10aa: 71 e0 ldi r23, 0x01 ; 1 |
|
10ac: ce 01 movw r24, r28 |
|
10ae: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
10b2: 20 e0 ldi r18, 0x00 ; 0 |
|
10b4: 30 e0 ldi r19, 0x00 ; 0 |
|
10b6: 4a ec ldi r20, 0xCA ; 202 |
|
10b8: 53 e0 ldi r21, 0x03 ; 3 |
|
10ba: 6b e5 ldi r22, 0x5B ; 91 |
|
10bc: 71 e0 ldi r23, 0x01 ; 1 |
|
10be: ce 01 movw r24, r28 |
|
10c0: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
10c4: 20 e0 ldi r18, 0x00 ; 0 |
|
10c6: 30 e0 ldi r19, 0x00 ; 0 |
|
10c8: 41 e9 ldi r20, 0x91 ; 145 |
|
10ca: 53 e0 ldi r21, 0x03 ; 3 |
|
10cc: 63 e6 ldi r22, 0x63 ; 99 |
|
10ce: 71 e0 ldi r23, 0x01 ; 1 |
|
10d0: ce 01 movw r24, r28 |
|
10d2: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
10d6: 20 e0 ldi r18, 0x00 ; 0 |
|
10d8: 30 e0 ldi r19, 0x00 ; 0 |
|
10da: 42 ec ldi r20, 0xC2 ; 194 |
|
10dc: 57 e0 ldi r21, 0x07 ; 7 |
|
10de: 63 e7 ldi r22, 0x73 ; 115 |
|
10e0: 71 e0 ldi r23, 0x01 ; 1 |
|
10e2: ce 01 movw r24, r28 |
|
10e4: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
10e8: 20 e0 ldi r18, 0x00 ; 0 |
|
10ea: 30 e0 ldi r19, 0x00 ; 0 |
|
10ec: 43 ee ldi r20, 0xE3 ; 227 |
|
10ee: 52 e0 ldi r21, 0x02 ; 2 |
|
10f0: 6a e7 ldi r22, 0x7A ; 122 |
|
10f2: 71 e0 ldi r23, 0x01 ; 1 |
|
10f4: ce 01 movw r24, r28 |
|
10f6: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
10fa: 20 e0 ldi r18, 0x00 ; 0 |
|
10fc: 30 e0 ldi r19, 0x00 ; 0 |
|
10fe: 4d ef ldi r20, 0xFD ; 253 |
|
1100: 53 e0 ldi r21, 0x03 ; 3 |
|
1102: 65 e8 ldi r22, 0x85 ; 133 |
|
1104: 71 e0 ldi r23, 0x01 ; 1 |
|
1106: ce 01 movw r24, r28 |
|
1108: 0e 94 06 16 call 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
110c: 20 e0 ldi r18, 0x00 ; 0 |
|
110e: 30 e0 ldi r19, 0x00 ; 0 |
|
1110: 4c e3 ldi r20, 0x3C ; 60 |
|
1112: 54 e0 ldi r21, 0x04 ; 4 |
|
1114: 62 e9 ldi r22, 0x92 ; 146 |
|
1116: 71 e0 ldi r23, 0x01 ; 1 |
|
1118: ce 01 movw r24, r28 |
|
111a: df 91 pop r29 |
|
111c: cf 91 pop r28 |
|
111e: 0c 94 06 16 jmp 0x2c0c ; 0x2c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei> |
|
|
|
00001122 <_Z13setupWatchdogv>: |
|
1122: cf 93 push r28 |
|
1124: df 93 push r29 |
|
1126: cd b7 in r28, 0x3d ; 61 |
|
1128: de b7 in r29, 0x3e ; 62 |
|
112a: 2e 97 sbiw r28, 0x0e ; 14 |
|
112c: 0f b6 in r0, 0x3f ; 63 |
|
112e: f8 94 cli |
|
1130: de bf out 0x3e, r29 ; 62 |
|
1132: 0f be out 0x3f, r0 ; 63 |
|
1134: cd bf out 0x3d, r28 ; 61 |
|
1136: 64 ea ldi r22, 0xA4 ; 164 |
|
1138: 71 e0 ldi r23, 0x01 ; 1 |
|
113a: ce 01 movw r24, r28 |
|
113c: 01 96 adiw r24, 0x01 ; 1 |
|
113e: 0e 94 47 16 call 0x2c8e ; 0x2c8e <_ZN10OscMessageC1EPKc> |
|
1142: 60 91 b3 02 lds r22, 0x02B3 |
|
1146: 70 91 b4 02 lds r23, 0x02B4 |
|
114a: ce 01 movw r24, r28 |
|
114c: 01 96 adiw r24, 0x01 ; 1 |
|
114e: 0e 94 c6 01 call 0x38c ; 0x38c <_ZN10OscMessage3addIiEERS_T_> |
|
1152: 41 e0 ldi r20, 0x01 ; 1 |
|
1154: be 01 movw r22, r28 |
|
1156: 6f 5f subi r22, 0xFF ; 255 |
|
1158: 7f 4f sbci r23, 0xFF ; 255 |
|
115a: 80 e6 ldi r24, 0x60 ; 96 |
|
115c: 92 e0 ldi r25, 0x02 ; 2 |
|
115e: 0e 94 0f 02 call 0x41e ; 0x41e <_ZNK8Watchdog19CApplicationMonitor4DumpER10OscMessageb> |
|
1162: 68 e0 ldi r22, 0x08 ; 8 |
|
1164: 70 e0 ldi r23, 0x00 ; 0 |
|
1166: 80 e6 ldi r24, 0x60 ; 96 |
|
1168: 92 e0 ldi r25, 0x02 ; 2 |
|
116a: 0e 94 bf 00 call 0x17e ; 0x17e <_ZN8Watchdog19CApplicationMonitor14EnableWatchdogENS0_8ETimeoutE> |
|
116e: 45 ea ldi r20, 0xA5 ; 165 |
|
1170: 52 e0 ldi r21, 0x02 ; 2 |
|
1172: be 01 movw r22, r28 |
|
1174: 6f 5f subi r22, 0xFF ; 255 |
|
1176: 7f 4f sbci r23, 0xFF ; 255 |
|
1178: 8a e6 ldi r24, 0x6A ; 106 |
|
117a: 92 e0 ldi r25, 0x02 ; 2 |
|
117c: 0e 94 da 1c call 0x39b4 ; 0x39b4 <_ZN6OscUDP4sendER10OscMessageR10NetAddress> |
|
1180: ce 01 movw r24, r28 |
|
1182: 01 96 adiw r24, 0x01 ; 1 |
|
1184: 0e 94 48 15 call 0x2a90 ; 0x2a90 <_ZN10OscMessageD1Ev> |
|
1188: 2e 96 adiw r28, 0x0e ; 14 |
|
118a: 0f b6 in r0, 0x3f ; 63 |
|
118c: f8 94 cli |
|
118e: de bf out 0x3e, r29 ; 62 |
|
1190: 0f be out 0x3f, r0 ; 63 |
|
1192: cd bf out 0x3d, r28 ; 61 |
|
1194: df 91 pop r29 |
|
1196: cf 91 pop r28 |
|
1198: 08 95 ret |
|
|
|
0000119a <_ZN10OscMessage3addIPKcEERS_T_>: |
|
SETTING DATA |
|
=============================================================================*/ |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
119a: ef 92 push r14 |
|
119c: ff 92 push r15 |
|
119e: 0f 93 push r16 |
|
11a0: 1f 93 push r17 |
|
11a2: cf 93 push r28 |
|
11a4: df 93 push r29 |
|
11a6: 00 d0 rcall .+0 ; 0x11a8 <_ZN10OscMessage3addIPKcEERS_T_+0xe> |
|
11a8: cd b7 in r28, 0x3d ; 61 |
|
11aa: de b7 in r29, 0x3e ; 62 |
|
11ac: 7c 01 movw r14, r24 |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
11ae: 8e e0 ldi r24, 0x0E ; 14 |
|
11b0: 90 e0 ldi r25, 0x00 ; 0 |
|
11b2: 69 83 std Y+1, r22 ; 0x01 |
|
11b4: 7a 83 std Y+2, r23 ; 0x02 |
|
11b6: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
11ba: 8c 01 movw r16, r24 |
|
11bc: 69 81 ldd r22, Y+1 ; 0x01 |
|
11be: 7a 81 ldd r23, Y+2 ; 0x02 |
|
11c0: 0e 94 c1 13 call 0x2782 ; 0x2782 <_ZN7OSCDataC1EPKc> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
11c4: f8 01 movw r30, r16 |
|
11c6: 80 81 ld r24, Z |
|
11c8: 91 81 ldd r25, Z+1 ; 0x01 |
|
error = ALLOCFAILED; |
|
11ca: f7 01 movw r30, r14 |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
11cc: 83 30 cpi r24, 0x03 ; 3 |
|
11ce: 91 05 cpc r25, r1 |
|
11d0: 79 f0 breq .+30 ; 0x11f0 <_ZN10OscMessage3addIPKcEERS_T_+0x56> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
11d2: 64 81 ldd r22, Z+4 ; 0x04 |
|
11d4: 75 81 ldd r23, Z+5 ; 0x05 |
|
11d6: 6f 5f subi r22, 0xFF ; 255 |
|
11d8: 7f 4f sbci r23, 0xFF ; 255 |
|
11da: 66 0f add r22, r22 |
|
11dc: 77 1f adc r23, r23 |
|
11de: 82 81 ldd r24, Z+2 ; 0x02 |
|
11e0: 93 81 ldd r25, Z+3 ; 0x03 |
|
11e2: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
11e6: 00 97 sbiw r24, 0x00 ; 0 |
|
11e8: 31 f4 brne .+12 ; 0x11f6 <_ZN10OscMessage3addIPKcEERS_T_+0x5c> |
|
error = ALLOCFAILED; |
|
11ea: 83 e0 ldi r24, 0x03 ; 3 |
|
11ec: 90 e0 ldi r25, 0x00 ; 0 |
|
11ee: f7 01 movw r30, r14 |
|
11f0: 97 83 std Z+7, r25 ; 0x07 |
|
11f2: 86 83 std Z+6, r24 ; 0x06 |
|
11f4: 11 c0 rjmp .+34 ; 0x1218 <_ZN10OscMessage3addIPKcEERS_T_+0x7e> |
|
} else { |
|
data = dataMem; |
|
11f6: f7 01 movw r30, r14 |
|
11f8: 93 83 std Z+3, r25 ; 0x03 |
|
11fa: 82 83 std Z+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
11fc: 24 81 ldd r18, Z+4 ; 0x04 |
|
11fe: 35 81 ldd r19, Z+5 ; 0x05 |
|
1200: f9 01 movw r30, r18 |
|
1202: ee 0f add r30, r30 |
|
1204: ff 1f adc r31, r31 |
|
1206: e8 0f add r30, r24 |
|
1208: f9 1f adc r31, r25 |
|
120a: 11 83 std Z+1, r17 ; 0x01 |
|
120c: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
120e: 2f 5f subi r18, 0xFF ; 255 |
|
1210: 3f 4f sbci r19, 0xFF ; 255 |
|
1212: f7 01 movw r30, r14 |
|
1214: 35 83 std Z+5, r19 ; 0x05 |
|
1216: 24 83 std Z+4, r18 ; 0x04 |
|
} |
|
} |
|
return *this; |
|
} |
|
1218: c7 01 movw r24, r14 |
|
121a: 0f 90 pop r0 |
|
121c: 0f 90 pop r0 |
|
121e: df 91 pop r29 |
|
1220: cf 91 pop r28 |
|
1222: 1f 91 pop r17 |
|
1224: 0f 91 pop r16 |
|
1226: ff 90 pop r15 |
|
1228: ef 90 pop r14 |
|
122a: 08 95 ret |
|
|
|
0000122c <_ZN10OscMessage3addIlEERS_T_>: |
|
SETTING DATA |
|
=============================================================================*/ |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
122c: ef 92 push r14 |
|
122e: ff 92 push r15 |
|
1230: 0f 93 push r16 |
|
1232: 1f 93 push r17 |
|
1234: cf 93 push r28 |
|
1236: df 93 push r29 |
|
1238: 00 d0 rcall .+0 ; 0x123a <_ZN10OscMessage3addIlEERS_T_+0xe> |
|
123a: 00 d0 rcall .+0 ; 0x123c <_ZN10OscMessage3addIlEERS_T_+0x10> |
|
123c: cd b7 in r28, 0x3d ; 61 |
|
123e: de b7 in r29, 0x3e ; 62 |
|
1240: 7c 01 movw r14, r24 |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
1242: 8e e0 ldi r24, 0x0E ; 14 |
|
1244: 90 e0 ldi r25, 0x00 ; 0 |
|
1246: 49 83 std Y+1, r20 ; 0x01 |
|
1248: 5a 83 std Y+2, r21 ; 0x02 |
|
124a: 6b 83 std Y+3, r22 ; 0x03 |
|
124c: 7c 83 std Y+4, r23 ; 0x04 |
|
124e: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
1252: 8c 01 movw r16, r24 |
|
1254: 49 81 ldd r20, Y+1 ; 0x01 |
|
1256: 5a 81 ldd r21, Y+2 ; 0x02 |
|
1258: 6b 81 ldd r22, Y+3 ; 0x03 |
|
125a: 7c 81 ldd r23, Y+4 ; 0x04 |
|
125c: 0e 94 0e 14 call 0x281c ; 0x281c <_ZN7OSCDataC1El> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
1260: f8 01 movw r30, r16 |
|
1262: 80 81 ld r24, Z |
|
1264: 91 81 ldd r25, Z+1 ; 0x01 |
|
error = ALLOCFAILED; |
|
1266: f7 01 movw r30, r14 |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
1268: 83 30 cpi r24, 0x03 ; 3 |
|
126a: 91 05 cpc r25, r1 |
|
126c: 79 f0 breq .+30 ; 0x128c <_ZN10OscMessage3addIlEERS_T_+0x60> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
126e: 64 81 ldd r22, Z+4 ; 0x04 |
|
1270: 75 81 ldd r23, Z+5 ; 0x05 |
|
1272: 6f 5f subi r22, 0xFF ; 255 |
|
1274: 7f 4f sbci r23, 0xFF ; 255 |
|
1276: 66 0f add r22, r22 |
|
1278: 77 1f adc r23, r23 |
|
127a: 82 81 ldd r24, Z+2 ; 0x02 |
|
127c: 93 81 ldd r25, Z+3 ; 0x03 |
|
127e: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
1282: 00 97 sbiw r24, 0x00 ; 0 |
|
1284: 31 f4 brne .+12 ; 0x1292 <_ZN10OscMessage3addIlEERS_T_+0x66> |
|
error = ALLOCFAILED; |
|
1286: 83 e0 ldi r24, 0x03 ; 3 |
|
1288: 90 e0 ldi r25, 0x00 ; 0 |
|
128a: f7 01 movw r30, r14 |
|
128c: 97 83 std Z+7, r25 ; 0x07 |
|
128e: 86 83 std Z+6, r24 ; 0x06 |
|
1290: 11 c0 rjmp .+34 ; 0x12b4 <_ZN10OscMessage3addIlEERS_T_+0x88> |
|
} else { |
|
data = dataMem; |
|
1292: f7 01 movw r30, r14 |
|
1294: 93 83 std Z+3, r25 ; 0x03 |
|
1296: 82 83 std Z+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
1298: 24 81 ldd r18, Z+4 ; 0x04 |
|
129a: 35 81 ldd r19, Z+5 ; 0x05 |
|
129c: f9 01 movw r30, r18 |
|
129e: ee 0f add r30, r30 |
|
12a0: ff 1f adc r31, r31 |
|
12a2: e8 0f add r30, r24 |
|
12a4: f9 1f adc r31, r25 |
|
12a6: 11 83 std Z+1, r17 ; 0x01 |
|
12a8: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
12aa: 2f 5f subi r18, 0xFF ; 255 |
|
12ac: 3f 4f sbci r19, 0xFF ; 255 |
|
12ae: f7 01 movw r30, r14 |
|
12b0: 35 83 std Z+5, r19 ; 0x05 |
|
12b2: 24 83 std Z+4, r18 ; 0x04 |
|
} |
|
} |
|
return *this; |
|
} |
|
12b4: c7 01 movw r24, r14 |
|
12b6: 0f 90 pop r0 |
|
12b8: 0f 90 pop r0 |
|
12ba: 0f 90 pop r0 |
|
12bc: 0f 90 pop r0 |
|
12be: df 91 pop r29 |
|
12c0: cf 91 pop r28 |
|
12c2: 1f 91 pop r17 |
|
12c4: 0f 91 pop r16 |
|
12c6: ff 90 pop r15 |
|
12c8: ef 90 pop r14 |
|
12ca: 08 95 ret |
|
|
|
000012cc <_Z13sendOscStatusll>: |
|
12cc: 4f 92 push r4 |
|
12ce: 5f 92 push r5 |
|
12d0: 6f 92 push r6 |
|
12d2: 7f 92 push r7 |
|
12d4: 8f 92 push r8 |
|
12d6: 9f 92 push r9 |
|
12d8: af 92 push r10 |
|
12da: bf 92 push r11 |
|
12dc: cf 92 push r12 |
|
12de: df 92 push r13 |
|
12e0: ef 92 push r14 |
|
12e2: ff 92 push r15 |
|
12e4: 0f 93 push r16 |
|
12e6: 1f 93 push r17 |
|
12e8: cf 93 push r28 |
|
12ea: df 93 push r29 |
|
12ec: cd b7 in r28, 0x3d ; 61 |
|
12ee: de b7 in r29, 0x3e ; 62 |
|
12f0: 62 97 sbiw r28, 0x12 ; 18 |
|
12f2: 0f b6 in r0, 0x3f ; 63 |
|
12f4: f8 94 cli |
|
12f6: de bf out 0x3e, r29 ; 62 |
|
12f8: 0f be out 0x3f, r0 ; 63 |
|
12fa: cd bf out 0x3d, r28 ; 61 |
|
12fc: 6b 01 movw r12, r22 |
|
12fe: 7c 01 movw r14, r24 |
|
1300: 49 01 movw r8, r18 |
|
1302: 5a 01 movw r10, r20 |
|
1304: 61 eb ldi r22, 0xB1 ; 177 |
|
1306: 71 e0 ldi r23, 0x01 ; 1 |
|
1308: ce 01 movw r24, r28 |
|
130a: 01 96 adiw r24, 0x01 ; 1 |
|
130c: 0e 94 47 16 call 0x2c8e ; 0x2c8e <_ZN10OscMessageC1EPKc> |
|
1310: 60 91 b3 02 lds r22, 0x02B3 |
|
1314: 70 91 b4 02 lds r23, 0x02B4 |
|
1318: ce 01 movw r24, r28 |
|
131a: 01 96 adiw r24, 0x01 ; 1 |
|
131c: 0e 94 c6 01 call 0x38c ; 0x38c <_ZN10OscMessage3addIiEERS_T_> |
|
1320: e0 91 0a 01 lds r30, 0x010A |
|
1324: f0 91 0b 01 lds r31, 0x010B |
|
1328: e9 30 cpi r30, 0x09 ; 9 |
|
132a: f1 05 cpc r31, r1 |
|
132c: 18 f5 brcc .+70 ; 0x1374 <_Z13sendOscStatusll+0xa8> |
|
132e: ec 5c subi r30, 0xCC ; 204 |
|
1330: ff 4f sbci r31, 0xFF ; 255 |
|
1332: 0c 94 62 2f jmp 0x5ec4 ; 0x5ec4 <__tablejump2__> |
|
1336: 69 eb ldi r22, 0xB9 ; 185 |
|
1338: 71 e0 ldi r23, 0x01 ; 1 |
|
133a: 1e c0 rjmp .+60 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
133c: 62 ec ldi r22, 0xC2 ; 194 |
|
133e: 71 e0 ldi r23, 0x01 ; 1 |
|
1340: 1b c0 rjmp .+54 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
1342: 69 ec ldi r22, 0xC9 ; 201 |
|
1344: 71 e0 ldi r23, 0x01 ; 1 |
|
1346: 18 c0 rjmp .+48 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
1348: 67 ed ldi r22, 0xD7 ; 215 |
|
134a: 71 e0 ldi r23, 0x01 ; 1 |
|
134c: 15 c0 rjmp .+42 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
134e: 6f ed ldi r22, 0xDF ; 223 |
|
1350: 71 e0 ldi r23, 0x01 ; 1 |
|
1352: 12 c0 rjmp .+36 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
1354: 62 ee ldi r22, 0xE2 ; 226 |
|
1356: 71 e0 ldi r23, 0x01 ; 1 |
|
1358: 0f c0 rjmp .+30 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
135a: 80 91 c5 02 lds r24, 0x02C5 |
|
135e: 88 23 and r24, r24 |
|
1360: 19 f0 breq .+6 ; 0x1368 <_Z13sendOscStatusll+0x9c> |
|
1362: 6a ee ldi r22, 0xEA ; 234 |
|
1364: 71 e0 ldi r23, 0x01 ; 1 |
|
1366: 08 c0 rjmp .+16 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
1368: 63 ef ldi r22, 0xF3 ; 243 |
|
136a: 71 e0 ldi r23, 0x01 ; 1 |
|
136c: 05 c0 rjmp .+10 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
136e: 60 e0 ldi r22, 0x00 ; 0 |
|
1370: 72 e0 ldi r23, 0x02 ; 2 |
|
1372: 02 c0 rjmp .+4 ; 0x1378 <_Z13sendOscStatusll+0xac> |
|
1374: 6c e0 ldi r22, 0x0C ; 12 |
|
1376: 72 e0 ldi r23, 0x02 ; 2 |
|
1378: ce 01 movw r24, r28 |
|
137a: 01 96 adiw r24, 0x01 ; 1 |
|
137c: 0e 94 cd 08 call 0x119a ; 0x119a <_ZN10OscMessage3addIPKcEERS_T_> |
|
1380: 40 90 86 03 lds r4, 0x0386 |
|
1384: 50 90 87 03 lds r5, 0x0387 |
|
1388: 60 90 88 03 lds r6, 0x0388 |
|
138c: 70 90 89 03 lds r7, 0x0389 |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
1390: 8e e0 ldi r24, 0x0E ; 14 |
|
1392: 90 e0 ldi r25, 0x00 ; 0 |
|
1394: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
1398: 8c 01 movw r16, r24 |
|
139a: c3 01 movw r24, r6 |
|
139c: b2 01 movw r22, r4 |
|
139e: 0e 94 a6 2d call 0x5b4c ; 0x5b4c <__floatsisf> |
|
13a2: ab 01 movw r20, r22 |
|
13a4: bc 01 movw r22, r24 |
|
13a6: c8 01 movw r24, r16 |
|
13a8: 0e 94 1e 14 call 0x283c ; 0x283c <_ZN7OSCDataC1Ef> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
13ac: f8 01 movw r30, r16 |
|
13ae: 80 81 ld r24, Z |
|
13b0: 91 81 ldd r25, Z+1 ; 0x01 |
|
13b2: 83 30 cpi r24, 0x03 ; 3 |
|
13b4: 91 05 cpc r25, r1 |
|
13b6: 71 f0 breq .+28 ; 0x13d4 <_Z13sendOscStatusll+0x108> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
13b8: 6d 81 ldd r22, Y+5 ; 0x05 |
|
13ba: 7e 81 ldd r23, Y+6 ; 0x06 |
|
13bc: 6f 5f subi r22, 0xFF ; 255 |
|
13be: 7f 4f sbci r23, 0xFF ; 255 |
|
13c0: 66 0f add r22, r22 |
|
13c2: 77 1f adc r23, r23 |
|
13c4: 8b 81 ldd r24, Y+3 ; 0x03 |
|
13c6: 9c 81 ldd r25, Y+4 ; 0x04 |
|
13c8: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
13cc: 00 97 sbiw r24, 0x00 ; 0 |
|
13ce: 29 f4 brne .+10 ; 0x13da <_Z13sendOscStatusll+0x10e> |
|
error = ALLOCFAILED; |
|
13d0: 83 e0 ldi r24, 0x03 ; 3 |
|
13d2: 90 e0 ldi r25, 0x00 ; 0 |
|
13d4: 98 87 std Y+8, r25 ; 0x08 |
|
13d6: 8f 83 std Y+7, r24 ; 0x07 |
|
13d8: 0f c0 rjmp .+30 ; 0x13f8 <_Z13sendOscStatusll+0x12c> |
|
} else { |
|
data = dataMem; |
|
13da: 9c 83 std Y+4, r25 ; 0x04 |
|
13dc: 8b 83 std Y+3, r24 ; 0x03 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
13de: 2d 81 ldd r18, Y+5 ; 0x05 |
|
13e0: 3e 81 ldd r19, Y+6 ; 0x06 |
|
13e2: f9 01 movw r30, r18 |
|
13e4: ee 0f add r30, r30 |
|
13e6: ff 1f adc r31, r31 |
|
13e8: e8 0f add r30, r24 |
|
13ea: f9 1f adc r31, r25 |
|
13ec: 11 83 std Z+1, r17 ; 0x01 |
|
13ee: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
13f0: 2f 5f subi r18, 0xFF ; 255 |
|
13f2: 3f 4f sbci r19, 0xFF ; 255 |
|
13f4: 3e 83 std Y+6, r19 ; 0x06 |
|
13f6: 2d 83 std Y+5, r18 ; 0x05 |
|
13f8: 40 91 b5 02 lds r20, 0x02B5 |
|
13fc: 50 91 b6 02 lds r21, 0x02B6 |
|
1400: 60 91 b7 02 lds r22, 0x02B7 |
|
1404: 70 91 b8 02 lds r23, 0x02B8 |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
1408: 8e e0 ldi r24, 0x0E ; 14 |
|
140a: 90 e0 ldi r25, 0x00 ; 0 |
|
140c: 4f 87 std Y+15, r20 ; 0x0f |
|
140e: 58 8b std Y+16, r21 ; 0x10 |
|
1410: 69 8b std Y+17, r22 ; 0x11 |
|
1412: 7a 8b std Y+18, r23 ; 0x12 |
|
1414: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
1418: 8c 01 movw r16, r24 |
|
141a: 4f 85 ldd r20, Y+15 ; 0x0f |
|
141c: 58 89 ldd r21, Y+16 ; 0x10 |
|
141e: 69 89 ldd r22, Y+17 ; 0x11 |
|
1420: 7a 89 ldd r23, Y+18 ; 0x12 |
|
1422: 0e 94 2e 14 call 0x285c ; 0x285c <_ZN7OSCDataC1Ed> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
1426: f8 01 movw r30, r16 |
|
1428: 80 81 ld r24, Z |
|
142a: 91 81 ldd r25, Z+1 ; 0x01 |
|
142c: 83 30 cpi r24, 0x03 ; 3 |
|
142e: 91 05 cpc r25, r1 |
|
1430: 71 f0 breq .+28 ; 0x144e <_Z13sendOscStatusll+0x182> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
1432: 6d 81 ldd r22, Y+5 ; 0x05 |
|
1434: 7e 81 ldd r23, Y+6 ; 0x06 |
|
1436: 6f 5f subi r22, 0xFF ; 255 |
|
1438: 7f 4f sbci r23, 0xFF ; 255 |
|
143a: 66 0f add r22, r22 |
|
143c: 77 1f adc r23, r23 |
|
143e: 8b 81 ldd r24, Y+3 ; 0x03 |
|
1440: 9c 81 ldd r25, Y+4 ; 0x04 |
|
1442: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
1446: 00 97 sbiw r24, 0x00 ; 0 |
|
1448: 29 f4 brne .+10 ; 0x1454 <_Z13sendOscStatusll+0x188> |
|
error = ALLOCFAILED; |
|
144a: 83 e0 ldi r24, 0x03 ; 3 |
|
144c: 90 e0 ldi r25, 0x00 ; 0 |
|
144e: 98 87 std Y+8, r25 ; 0x08 |
|
1450: 8f 83 std Y+7, r24 ; 0x07 |
|
1452: 0f c0 rjmp .+30 ; 0x1472 <_Z13sendOscStatusll+0x1a6> |
|
} else { |
|
data = dataMem; |
|
1454: 9c 83 std Y+4, r25 ; 0x04 |
|
1456: 8b 83 std Y+3, r24 ; 0x03 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
1458: 2d 81 ldd r18, Y+5 ; 0x05 |
|
145a: 3e 81 ldd r19, Y+6 ; 0x06 |
|
145c: f9 01 movw r30, r18 |
|
145e: ee 0f add r30, r30 |
|
1460: ff 1f adc r31, r31 |
|
1462: e8 0f add r30, r24 |
|
1464: f9 1f adc r31, r25 |
|
1466: 11 83 std Z+1, r17 ; 0x01 |
|
1468: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
146a: 2f 5f subi r18, 0xFF ; 255 |
|
146c: 3f 4f sbci r19, 0xFF ; 255 |
|
146e: 3e 83 std Y+6, r19 ; 0x06 |
|
1470: 2d 83 std Y+5, r18 ; 0x05 |
|
1472: b7 01 movw r22, r14 |
|
1474: a6 01 movw r20, r12 |
|
1476: ce 01 movw r24, r28 |
|
1478: 01 96 adiw r24, 0x01 ; 1 |
|
147a: 0e 94 16 09 call 0x122c ; 0x122c <_ZN10OscMessage3addIlEERS_T_> |
|
147e: b5 01 movw r22, r10 |
|
1480: a4 01 movw r20, r8 |
|
1482: ce 01 movw r24, r28 |
|
1484: 01 96 adiw r24, 0x01 ; 1 |
|
1486: 0e 94 16 09 call 0x122c ; 0x122c <_ZN10OscMessage3addIlEERS_T_> |
|
148a: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
148e: 20 91 c3 02 lds r18, 0x02C3 |
|
1492: 30 91 c4 02 lds r19, 0x02C4 |
|
1496: 23 2b or r18, r19 |
|
1498: 41 f0 breq .+16 ; 0x14aa <_Z13sendOscStatusll+0x1de> |
|
149a: 28 ee ldi r18, 0xE8 ; 232 |
|
149c: 33 e0 ldi r19, 0x03 ; 3 |
|
149e: 40 e0 ldi r20, 0x00 ; 0 |
|
14a0: 50 e0 ldi r21, 0x00 ; 0 |
|
14a2: 0e 94 40 2f call 0x5e80 ; 0x5e80 <__udivmodsi4> |
|
14a6: b9 01 movw r22, r18 |
|
14a8: 02 c0 rjmp .+4 ; 0x14ae <_Z13sendOscStatusll+0x1e2> |
|
14aa: 60 e0 ldi r22, 0x00 ; 0 |
|
14ac: 70 e0 ldi r23, 0x00 ; 0 |
|
14ae: ce 01 movw r24, r28 |
|
14b0: 01 96 adiw r24, 0x01 ; 1 |
|
14b2: 0e 94 c6 01 call 0x38c ; 0x38c <_ZN10OscMessage3addIiEERS_T_> |
|
14b6: 45 ea ldi r20, 0xA5 ; 165 |
|
14b8: 52 e0 ldi r21, 0x02 ; 2 |
|
14ba: be 01 movw r22, r28 |
|
14bc: 6f 5f subi r22, 0xFF ; 255 |
|
14be: 7f 4f sbci r23, 0xFF ; 255 |
|
14c0: 8a e6 ldi r24, 0x6A ; 106 |
|
14c2: 92 e0 ldi r25, 0x02 ; 2 |
|
14c4: 0e 94 da 1c call 0x39b4 ; 0x39b4 <_ZN6OscUDP4sendER10OscMessageR10NetAddress> |
|
14c8: ce 01 movw r24, r28 |
|
14ca: 01 96 adiw r24, 0x01 ; 1 |
|
14cc: 0e 94 48 15 call 0x2a90 ; 0x2a90 <_ZN10OscMessageD1Ev> |
|
14d0: 62 96 adiw r28, 0x12 ; 18 |
|
14d2: 0f b6 in r0, 0x3f ; 63 |
|
14d4: f8 94 cli |
|
14d6: de bf out 0x3e, r29 ; 62 |
|
14d8: 0f be out 0x3f, r0 ; 63 |
|
14da: cd bf out 0x3d, r28 ; 61 |
|
14dc: df 91 pop r29 |
|
14de: cf 91 pop r28 |
|
14e0: 1f 91 pop r17 |
|
14e2: 0f 91 pop r16 |
|
14e4: ff 90 pop r15 |
|
14e6: ef 90 pop r14 |
|
14e8: df 90 pop r13 |
|
14ea: cf 90 pop r12 |
|
14ec: bf 90 pop r11 |
|
14ee: af 90 pop r10 |
|
14f0: 9f 90 pop r9 |
|
14f2: 8f 90 pop r8 |
|
14f4: 7f 90 pop r7 |
|
14f6: 6f 90 pop r6 |
|
14f8: 5f 90 pop r5 |
|
14fa: 4f 90 pop r4 |
|
14fc: 08 95 ret |
|
|
|
000014fe <loop>: |
|
14fe: 8f 92 push r8 |
|
1500: 9f 92 push r9 |
|
1502: af 92 push r10 |
|
1504: bf 92 push r11 |
|
1506: cf 92 push r12 |
|
1508: df 92 push r13 |
|
150a: ef 92 push r14 |
|
150c: ff 92 push r15 |
|
150e: 80 e6 ldi r24, 0x60 ; 96 |
|
1510: 92 e0 ldi r25, 0x02 ; 2 |
|
1512: 0e 94 d6 00 call 0x1ac ; 0x1ac <_ZNK8Watchdog19CApplicationMonitor8IAmAliveEv> |
|
1516: 20 91 0a 01 lds r18, 0x010A |
|
151a: 30 91 0b 01 lds r19, 0x010B |
|
151e: c9 01 movw r24, r18 |
|
1520: a0 e0 ldi r26, 0x00 ; 0 |
|
1522: b0 e0 ldi r27, 0x00 ; 0 |
|
1524: 80 93 66 02 sts 0x0266, r24 |
|
1528: 90 93 67 02 sts 0x0267, r25 |
|
152c: a0 93 68 02 sts 0x0268, r26 |
|
1530: b0 93 69 02 sts 0x0269, r27 |
|
1534: 24 30 cpi r18, 0x04 ; 4 |
|
1536: 31 05 cpc r19, r1 |
|
1538: 09 f0 breq .+2 ; 0x153c <loop+0x3e> |
|
153a: 7a c0 rjmp .+244 ; 0x1630 <loop+0x132> |
|
153c: 60 91 86 03 lds r22, 0x0386 |
|
1540: 70 91 87 03 lds r23, 0x0387 |
|
1544: 80 91 88 03 lds r24, 0x0388 |
|
1548: 90 91 89 03 lds r25, 0x0389 |
|
154c: 0e 94 a6 2d call 0x5b4c ; 0x5b4c <__floatsisf> |
|
1550: 6b 01 movw r12, r22 |
|
1552: 7c 01 movw r14, r24 |
|
1554: 60 93 07 03 sts 0x0307, r22 |
|
1558: 70 93 08 03 sts 0x0308, r23 |
|
155c: 80 93 09 03 sts 0x0309, r24 |
|
1560: 90 93 0a 03 sts 0x030A, r25 |
|
1564: 80 90 0b 03 lds r8, 0x030B |
|
1568: 90 90 0c 03 lds r9, 0x030C |
|
156c: a0 90 0d 03 lds r10, 0x030D |
|
1570: b0 90 0e 03 lds r11, 0x030E |
|
1574: a5 01 movw r20, r10 |
|
1576: 94 01 movw r18, r8 |
|
1578: 60 91 44 02 lds r22, 0x0244 |
|
157c: 70 91 45 02 lds r23, 0x0245 |
|
1580: 80 91 46 02 lds r24, 0x0246 |
|
1584: 90 91 47 02 lds r25, 0x0247 |
|
1588: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
158c: a5 01 movw r20, r10 |
|
158e: 94 01 movw r18, r8 |
|
1590: 81 11 cpse r24, r1 |
|
1592: 16 c0 rjmp .+44 ; 0x15c0 <loop+0xc2> |
|
1594: c7 01 movw r24, r14 |
|
1596: b6 01 movw r22, r12 |
|
1598: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
159c: 6b 01 movw r12, r22 |
|
159e: 7c 01 movw r14, r24 |
|
15a0: 20 e0 ldi r18, 0x00 ; 0 |
|
15a2: 30 e0 ldi r19, 0x00 ; 0 |
|
15a4: a9 01 movw r20, r18 |
|
15a6: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
15aa: 18 16 cp r1, r24 |
|
15ac: 24 f0 brlt .+8 ; 0x15b6 <loop+0xb8> |
|
15ae: f7 fa bst r15, 7 |
|
15b0: f0 94 com r15 |
|
15b2: f7 f8 bld r15, 7 |
|
15b4: f0 94 com r15 |
|
15b6: 60 91 26 01 lds r22, 0x0126 |
|
15ba: 70 91 27 01 lds r23, 0x0127 |
|
15be: 15 c0 rjmp .+42 ; 0x15ea <loop+0xec> |
|
15c0: c7 01 movw r24, r14 |
|
15c2: b6 01 movw r22, r12 |
|
15c4: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
15c8: 6b 01 movw r12, r22 |
|
15ca: 7c 01 movw r14, r24 |
|
15cc: 20 e0 ldi r18, 0x00 ; 0 |
|
15ce: 30 e0 ldi r19, 0x00 ; 0 |
|
15d0: a9 01 movw r20, r18 |
|
15d2: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
15d6: 18 16 cp r1, r24 |
|
15d8: 24 f0 brlt .+8 ; 0x15e2 <loop+0xe4> |
|
15da: f7 fa bst r15, 7 |
|
15dc: f0 94 com r15 |
|
15de: f7 f8 bld r15, 7 |
|
15e0: f0 94 com r15 |
|
15e2: 60 91 24 01 lds r22, 0x0124 |
|
15e6: 70 91 25 01 lds r23, 0x0125 |
|
15ea: 88 27 eor r24, r24 |
|
15ec: 77 fd sbrc r23, 7 |
|
15ee: 80 95 com r24 |
|
15f0: 98 2f mov r25, r24 |
|
15f2: 0e 94 a6 2d call 0x5b4c ; 0x5b4c <__floatsisf> |
|
15f6: 9b 01 movw r18, r22 |
|
15f8: ac 01 movw r20, r24 |
|
15fa: c7 01 movw r24, r14 |
|
15fc: b6 01 movw r22, r12 |
|
15fe: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
1602: 87 fd sbrc r24, 7 |
|
1604: 17 c0 rjmp .+46 ; 0x1634 <loop+0x136> |
|
1606: 8a ec ldi r24, 0xCA ; 202 |
|
1608: 92 e0 ldi r25, 0x02 ; 2 |
|
160a: 0e 94 cd 0d call 0x1b9a ; 0x1b9a <_ZN3PID7ComputeEv> |
|
160e: 80 91 03 03 lds r24, 0x0303 |
|
1612: 90 91 04 03 lds r25, 0x0304 |
|
1616: a0 91 05 03 lds r26, 0x0305 |
|
161a: b0 91 06 03 lds r27, 0x0306 |
|
161e: 80 93 c6 02 sts 0x02C6, r24 |
|
1622: 90 93 c7 02 sts 0x02C7, r25 |
|
1626: a0 93 c8 02 sts 0x02C8, r26 |
|
162a: b0 93 c9 02 sts 0x02C9, r27 |
|
162e: 0a c0 rjmp .+20 ; 0x1644 <loop+0x146> |
|
1630: 23 2b or r18, r19 |
|
1632: 41 f4 brne .+16 ; 0x1644 <loop+0x146> |
|
1634: 10 92 c6 02 sts 0x02C6, r1 |
|
1638: 10 92 c7 02 sts 0x02C7, r1 |
|
163c: 10 92 c8 02 sts 0x02C8, r1 |
|
1640: 10 92 c9 02 sts 0x02C9, r1 |
|
1644: 80 91 0b 03 lds r24, 0x030B |
|
1648: 90 91 0c 03 lds r25, 0x030C |
|
164c: a0 91 0d 03 lds r26, 0x030D |
|
1650: b0 91 0e 03 lds r27, 0x030E |
|
1654: 80 93 44 02 sts 0x0244, r24 |
|
1658: 90 93 45 02 sts 0x0245, r25 |
|
165c: a0 93 46 02 sts 0x0246, r26 |
|
1660: b0 93 47 02 sts 0x0247, r27 |
|
1664: 80 91 0a 01 lds r24, 0x010A |
|
1668: 90 91 0b 01 lds r25, 0x010B |
|
166c: 81 30 cpi r24, 0x01 ; 1 |
|
166e: 91 05 cpc r25, r1 |
|
1670: 49 f4 brne .+18 ; 0x1684 <loop+0x186> |
|
1672: 80 91 18 01 lds r24, 0x0118 |
|
1676: 90 91 19 01 lds r25, 0x0119 |
|
167a: a0 91 1a 01 lds r26, 0x011A |
|
167e: b0 91 1b 01 lds r27, 0x011B |
|
1682: 8e c0 rjmp .+284 ; 0x17a0 <loop+0x2a2> |
|
1684: 82 30 cpi r24, 0x02 ; 2 |
|
1686: 91 05 cpc r25, r1 |
|
1688: 09 f0 breq .+2 ; 0x168c <loop+0x18e> |
|
168a: 4b c0 rjmp .+150 ; 0x1722 <loop+0x224> |
|
168c: 80 91 18 01 lds r24, 0x0118 |
|
1690: 90 91 19 01 lds r25, 0x0119 |
|
1694: a0 91 1a 01 lds r26, 0x011A |
|
1698: b0 91 1b 01 lds r27, 0x011B |
|
169c: bc 01 movw r22, r24 |
|
169e: cd 01 movw r24, r26 |
|
16a0: 90 58 subi r25, 0x80 ; 128 |
|
16a2: 60 93 c6 02 sts 0x02C6, r22 |
|
16a6: 70 93 c7 02 sts 0x02C7, r23 |
|
16aa: 80 93 c8 02 sts 0x02C8, r24 |
|
16ae: 90 93 c9 02 sts 0x02C9, r25 |
|
16b2: 0e 94 12 06 call 0xc24 ; 0xc24 <_Z2gof> |
|
16b6: 80 91 86 03 lds r24, 0x0386 |
|
16ba: 90 91 87 03 lds r25, 0x0387 |
|
16be: a0 91 88 03 lds r26, 0x0388 |
|
16c2: b0 91 89 03 lds r27, 0x0389 |
|
16c6: 18 16 cp r1, r24 |
|
16c8: 19 06 cpc r1, r25 |
|
16ca: 1a 06 cpc r1, r26 |
|
16cc: 1b 06 cpc r1, r27 |
|
16ce: 0c f0 brlt .+2 ; 0x16d2 <loop+0x1d4> |
|
16d0: 6f c0 rjmp .+222 ; 0x17b0 <loop+0x2b2> |
|
16d2: 10 92 c6 02 sts 0x02C6, r1 |
|
16d6: 10 92 c7 02 sts 0x02C7, r1 |
|
16da: 10 92 c8 02 sts 0x02C8, r1 |
|
16de: 10 92 c9 02 sts 0x02C9, r1 |
|
16e2: 60 91 86 03 lds r22, 0x0386 |
|
16e6: 70 91 87 03 lds r23, 0x0387 |
|
16ea: 80 91 88 03 lds r24, 0x0388 |
|
16ee: 90 91 89 03 lds r25, 0x0389 |
|
16f2: 0e 94 a6 2d call 0x5b4c ; 0x5b4c <__floatsisf> |
|
16f6: 60 93 0b 03 sts 0x030B, r22 |
|
16fa: 70 93 0c 03 sts 0x030C, r23 |
|
16fe: 80 93 0d 03 sts 0x030D, r24 |
|
1702: 90 93 0e 03 sts 0x030E, r25 |
|
1706: 84 e0 ldi r24, 0x04 ; 4 |
|
1708: 90 e0 ldi r25, 0x00 ; 0 |
|
170a: 90 93 0b 01 sts 0x010B, r25 |
|
170e: 80 93 0a 01 sts 0x010A, r24 |
|
1712: 81 e0 ldi r24, 0x01 ; 1 |
|
1714: 80 93 c5 02 sts 0x02C5, r24 |
|
1718: 10 92 c4 02 sts 0x02C4, r1 |
|
171c: 10 92 c3 02 sts 0x02C3, r1 |
|
1720: 47 c0 rjmp .+142 ; 0x17b0 <loop+0x2b2> |
|
1722: 07 97 sbiw r24, 0x07 ; 7 |
|
1724: 09 f0 breq .+2 ; 0x1728 <loop+0x22a> |
|
1726: 44 c0 rjmp .+136 ; 0x17b0 <loop+0x2b2> |
|
1728: c0 90 5c 02 lds r12, 0x025C |
|
172c: d0 90 5d 02 lds r13, 0x025D |
|
1730: e0 90 5e 02 lds r14, 0x025E |
|
1734: f0 90 5f 02 lds r15, 0x025F |
|
1738: 80 90 58 02 lds r8, 0x0258 |
|
173c: 90 90 59 02 lds r9, 0x0259 |
|
1740: a0 90 5a 02 lds r10, 0x025A |
|
1744: b0 90 5b 02 lds r11, 0x025B |
|
1748: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
174c: 0e 94 a4 2d call 0x5b48 ; 0x5b48 <__floatunsisf> |
|
1750: 20 e0 ldi r18, 0x00 ; 0 |
|
1752: 30 e8 ldi r19, 0x80 ; 128 |
|
1754: 4b eb ldi r20, 0xBB ; 187 |
|
1756: 55 e4 ldi r21, 0x45 ; 69 |
|
1758: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
175c: 0e 94 bd 2e call 0x5d7a ; 0x5d7a <sin> |
|
1760: 9b 01 movw r18, r22 |
|
1762: ac 01 movw r20, r24 |
|
1764: c5 01 movw r24, r10 |
|
1766: b4 01 movw r22, r8 |
|
1768: 0e 94 5a 2e call 0x5cb4 ; 0x5cb4 <__mulsf3> |
|
176c: 9b 01 movw r18, r22 |
|
176e: ac 01 movw r20, r24 |
|
1770: c7 01 movw r24, r14 |
|
1772: b6 01 movw r22, r12 |
|
1774: 0e 94 a3 2c call 0x5946 ; 0x5946 <__addsf3> |
|
1778: 60 93 0b 03 sts 0x030B, r22 |
|
177c: 70 93 0c 03 sts 0x030C, r23 |
|
1780: 80 93 0d 03 sts 0x030D, r24 |
|
1784: 90 93 0e 03 sts 0x030E, r25 |
|
1788: 8a ec ldi r24, 0xCA ; 202 |
|
178a: 92 e0 ldi r25, 0x02 ; 2 |
|
178c: 0e 94 cd 0d call 0x1b9a ; 0x1b9a <_ZN3PID7ComputeEv> |
|
1790: 80 91 03 03 lds r24, 0x0303 |
|
1794: 90 91 04 03 lds r25, 0x0304 |
|
1798: a0 91 05 03 lds r26, 0x0305 |
|
179c: b0 91 06 03 lds r27, 0x0306 |
|
17a0: 80 93 c6 02 sts 0x02C6, r24 |
|
17a4: 90 93 c7 02 sts 0x02C7, r25 |
|
17a8: a0 93 c8 02 sts 0x02C8, r26 |
|
17ac: b0 93 c9 02 sts 0x02C9, r27 |
|
17b0: 86 e0 ldi r24, 0x06 ; 6 |
|
17b2: 0e 94 63 2b call 0x56c6 ; 0x56c6 <digitalRead> |
|
17b6: 89 2b or r24, r25 |
|
17b8: 79 f1 breq .+94 ; 0x1818 <loop+0x31a> |
|
17ba: 80 91 0a 01 lds r24, 0x010A |
|
17be: 90 91 0b 01 lds r25, 0x010B |
|
17c2: 81 30 cpi r24, 0x01 ; 1 |
|
17c4: 91 05 cpc r25, r1 |
|
17c6: 99 f4 brne .+38 ; 0x17ee <loop+0x2f0> |
|
17c8: 82 e0 ldi r24, 0x02 ; 2 |
|
17ca: 90 e0 ldi r25, 0x00 ; 0 |
|
17cc: 90 93 0b 01 sts 0x010B, r25 |
|
17d0: 80 93 0a 01 sts 0x010A, r24 |
|
17d4: 88 e3 ldi r24, 0x38 ; 56 |
|
17d6: 9f ef ldi r25, 0xFF ; 255 |
|
17d8: af ef ldi r26, 0xFF ; 255 |
|
17da: bf ef ldi r27, 0xFF ; 255 |
|
17dc: 80 93 86 03 sts 0x0386, r24 |
|
17e0: 90 93 87 03 sts 0x0387, r25 |
|
17e4: a0 93 88 03 sts 0x0388, r26 |
|
17e8: b0 93 89 03 sts 0x0389, r27 |
|
17ec: 33 c0 rjmp .+102 ; 0x1854 <loop+0x356> |
|
17ee: 82 30 cpi r24, 0x02 ; 2 |
|
17f0: 91 05 cpc r25, r1 |
|
17f2: 81 f1 breq .+96 ; 0x1854 <loop+0x356> |
|
17f4: 08 97 sbiw r24, 0x08 ; 8 |
|
17f6: 71 f1 breq .+92 ; 0x1854 <loop+0x356> |
|
17f8: 86 e0 ldi r24, 0x06 ; 6 |
|
17fa: 90 e0 ldi r25, 0x00 ; 0 |
|
17fc: 90 93 0b 01 sts 0x010B, r25 |
|
1800: 80 93 0a 01 sts 0x010A, r24 |
|
1804: 10 92 c5 02 sts 0x02C5, r1 |
|
1808: 10 92 c6 02 sts 0x02C6, r1 |
|
180c: 10 92 c7 02 sts 0x02C7, r1 |
|
1810: 10 92 c8 02 sts 0x02C8, r1 |
|
1814: 10 92 c9 02 sts 0x02C9, r1 |
|
1818: 0e 94 45 2a call 0x548a ; 0x548a <micros> |
|
181c: 6b 01 movw r12, r22 |
|
181e: 7c 01 movw r14, r24 |
|
1820: 80 91 54 02 lds r24, 0x0254 |
|
1824: 90 91 55 02 lds r25, 0x0255 |
|
1828: a0 91 56 02 lds r26, 0x0256 |
|
182c: b0 91 57 02 lds r27, 0x0257 |
|
1830: c8 1a sub r12, r24 |
|
1832: d9 0a sbc r13, r25 |
|
1834: ea 0a sbc r14, r26 |
|
1836: fb 0a sbc r15, r27 |
|
1838: 0e 94 45 2a call 0x548a ; 0x548a <micros> |
|
183c: 60 93 54 02 sts 0x0254, r22 |
|
1840: 70 93 55 02 sts 0x0255, r23 |
|
1844: 80 93 56 02 sts 0x0256, r24 |
|
1848: 90 93 57 02 sts 0x0257, r25 |
|
184c: c7 01 movw r24, r14 |
|
184e: b6 01 movw r22, r12 |
|
1850: 0e 94 56 07 call 0xeac ; 0xeac <_Z11updateSpeedm> |
|
1854: 8a e6 ldi r24, 0x6A ; 106 |
|
1856: 92 e0 ldi r25, 0x02 ; 2 |
|
1858: 0e 94 04 1d call 0x3a08 ; 0x3a08 <_ZN6OscUDP6listenEv> |
|
185c: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
1860: c0 90 50 02 lds r12, 0x0250 |
|
1864: d0 90 51 02 lds r13, 0x0251 |
|
1868: e0 90 52 02 lds r14, 0x0252 |
|
186c: f0 90 53 02 lds r15, 0x0253 |
|
1870: 6c 19 sub r22, r12 |
|
1872: 7d 09 sbc r23, r13 |
|
1874: 8e 09 sbc r24, r14 |
|
1876: 9f 09 sbc r25, r15 |
|
1878: c0 90 0c 01 lds r12, 0x010C |
|
187c: d0 90 0d 01 lds r13, 0x010D |
|
1880: ee 24 eor r14, r14 |
|
1882: d7 fc sbrc r13, 7 |
|
1884: e0 94 com r14 |
|
1886: fe 2c mov r15, r14 |
|
1888: 6c 15 cp r22, r12 |
|
188a: 7d 05 cpc r23, r13 |
|
188c: 8e 05 cpc r24, r14 |
|
188e: 9f 05 cpc r25, r15 |
|
1890: 08 f4 brcc .+2 ; 0x1894 <loop+0x396> |
|
1892: 5c c0 rjmp .+184 ; 0x194c <loop+0x44e> |
|
1894: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
1898: 60 93 50 02 sts 0x0250, r22 |
|
189c: 70 93 51 02 sts 0x0251, r23 |
|
18a0: 80 93 52 02 sts 0x0252, r24 |
|
18a4: 90 93 53 02 sts 0x0253, r25 |
|
18a8: 60 91 bf 02 lds r22, 0x02BF |
|
18ac: 70 91 c0 02 lds r23, 0x02C0 |
|
18b0: 80 91 c1 02 lds r24, 0x02C1 |
|
18b4: 90 91 c2 02 lds r25, 0x02C2 |
|
18b8: c0 90 4c 02 lds r12, 0x024C |
|
18bc: d0 90 4d 02 lds r13, 0x024D |
|
18c0: e0 90 4e 02 lds r14, 0x024E |
|
18c4: f0 90 4f 02 lds r15, 0x024F |
|
18c8: 6c 19 sub r22, r12 |
|
18ca: 7d 09 sbc r23, r13 |
|
18cc: 8e 09 sbc r24, r14 |
|
18ce: 9f 09 sbc r25, r15 |
|
18d0: c0 90 bf 02 lds r12, 0x02BF |
|
18d4: d0 90 c0 02 lds r13, 0x02C0 |
|
18d8: e0 90 c1 02 lds r14, 0x02C1 |
|
18dc: f0 90 c2 02 lds r15, 0x02C2 |
|
18e0: c0 92 4c 02 sts 0x024C, r12 |
|
18e4: d0 92 4d 02 sts 0x024D, r13 |
|
18e8: e0 92 4e 02 sts 0x024E, r14 |
|
18ec: f0 92 4f 02 sts 0x024F, r15 |
|
18f0: 20 91 86 03 lds r18, 0x0386 |
|
18f4: 30 91 87 03 lds r19, 0x0387 |
|
18f8: 40 91 88 03 lds r20, 0x0388 |
|
18fc: 50 91 89 03 lds r21, 0x0389 |
|
1900: c0 90 48 02 lds r12, 0x0248 |
|
1904: d0 90 49 02 lds r13, 0x0249 |
|
1908: e0 90 4a 02 lds r14, 0x024A |
|
190c: f0 90 4b 02 lds r15, 0x024B |
|
1910: 2c 19 sub r18, r12 |
|
1912: 3d 09 sbc r19, r13 |
|
1914: 4e 09 sbc r20, r14 |
|
1916: 5f 09 sbc r21, r15 |
|
1918: c0 90 86 03 lds r12, 0x0386 |
|
191c: d0 90 87 03 lds r13, 0x0387 |
|
1920: e0 90 88 03 lds r14, 0x0388 |
|
1924: f0 90 89 03 lds r15, 0x0389 |
|
1928: c0 92 48 02 sts 0x0248, r12 |
|
192c: d0 92 49 02 sts 0x0249, r13 |
|
1930: e0 92 4a 02 sts 0x024A, r14 |
|
1934: f0 92 4b 02 sts 0x024B, r15 |
|
1938: ff 90 pop r15 |
|
193a: ef 90 pop r14 |
|
193c: df 90 pop r13 |
|
193e: cf 90 pop r12 |
|
1940: bf 90 pop r11 |
|
1942: af 90 pop r10 |
|
1944: 9f 90 pop r9 |
|
1946: 8f 90 pop r8 |
|
1948: 0c 94 66 09 jmp 0x12cc ; 0x12cc <_Z13sendOscStatusll> |
|
194c: ff 90 pop r15 |
|
194e: ef 90 pop r14 |
|
1950: df 90 pop r13 |
|
1952: cf 90 pop r12 |
|
1954: bf 90 pop r11 |
|
1956: af 90 pop r10 |
|
1958: 9f 90 pop r9 |
|
195a: 8f 90 pop r8 |
|
195c: 08 95 ret |
|
|
|
0000195e <_GLOBAL__sub_I_pidSetpoint>: |
|
195e: af 92 push r10 |
|
1960: bf 92 push r11 |
|
1962: cf 92 push r12 |
|
1964: df 92 push r13 |
|
1966: ef 92 push r14 |
|
1968: ff 92 push r15 |
|
196a: 0f 93 push r16 |
|
196c: 1f 93 push r17 |
|
196e: 00 e0 ldi r16, 0x00 ; 0 |
|
1970: 20 e0 ldi r18, 0x00 ; 0 |
|
1972: 40 e0 ldi r20, 0x00 ; 0 |
|
1974: 60 e0 ldi r22, 0x00 ; 0 |
|
1976: 8f e0 ldi r24, 0x0F ; 15 |
|
1978: 93 e0 ldi r25, 0x03 ; 3 |
|
197a: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
197e: 1f 92 push r1 |
|
1980: 81 e0 ldi r24, 0x01 ; 1 |
|
1982: 8f 93 push r24 |
|
1984: 87 e3 ldi r24, 0x37 ; 55 |
|
1986: 8f 93 push r24 |
|
1988: 87 e2 ldi r24, 0x27 ; 39 |
|
198a: 8f 93 push r24 |
|
198c: 85 ec ldi r24, 0xC5 ; 197 |
|
198e: 8f 93 push r24 |
|
1990: 8c ea ldi r24, 0xAC ; 172 |
|
1992: 8f 93 push r24 |
|
1994: 66 ea ldi r22, 0xA6 ; 166 |
|
1996: a6 2e mov r10, r22 |
|
1998: 6b e9 ldi r22, 0x9B ; 155 |
|
199a: b6 2e mov r11, r22 |
|
199c: 64 e4 ldi r22, 0x44 ; 68 |
|
199e: c6 2e mov r12, r22 |
|
19a0: 6c e3 ldi r22, 0x3C ; 60 |
|
19a2: d6 2e mov r13, r22 |
|
19a4: 1a e0 ldi r17, 0x0A ; 10 |
|
19a6: e1 2e mov r14, r17 |
|
19a8: 17 ed ldi r17, 0xD7 ; 215 |
|
19aa: f1 2e mov r15, r17 |
|
19ac: 03 ea ldi r16, 0xA3 ; 163 |
|
19ae: 1d e3 ldi r17, 0x3D ; 61 |
|
19b0: 2b e0 ldi r18, 0x0B ; 11 |
|
19b2: 33 e0 ldi r19, 0x03 ; 3 |
|
19b4: 43 e0 ldi r20, 0x03 ; 3 |
|
19b6: 53 e0 ldi r21, 0x03 ; 3 |
|
19b8: 67 e0 ldi r22, 0x07 ; 7 |
|
19ba: 73 e0 ldi r23, 0x03 ; 3 |
|
19bc: 8a ec ldi r24, 0xCA ; 202 |
|
19be: 92 e0 ldi r25, 0x02 ; 2 |
|
19c0: 0e 94 06 11 call 0x220c ; 0x220c <_ZN3PIDC1EPdS0_S0_dddi> |
|
19c4: 60 e0 ldi r22, 0x00 ; 0 |
|
19c6: 70 e0 ldi r23, 0x00 ; 0 |
|
19c8: 8a e6 ldi r24, 0x6A ; 106 |
|
19ca: 93 e0 ldi r25, 0x03 ; 3 |
|
19cc: 0e 94 6d 29 call 0x52da ; 0x52da <_ZN11EEPROMClass4readEi> |
|
19d0: 28 2f mov r18, r24 |
|
19d2: 30 e0 ldi r19, 0x00 ; 0 |
|
19d4: 30 93 b4 02 sts 0x02B4, r19 |
|
19d8: 20 93 b3 02 sts 0x02B3, r18 |
|
19dc: 80 93 17 01 sts 0x0117, r24 |
|
19e0: 0a e2 ldi r16, 0x2A ; 42 |
|
19e2: 08 0f add r16, r24 |
|
19e4: 22 e0 ldi r18, 0x02 ; 2 |
|
19e6: 48 ea ldi r20, 0xA8 ; 168 |
|
19e8: 60 ec ldi r22, 0xC0 ; 192 |
|
19ea: 8d ea ldi r24, 0xAD ; 173 |
|
19ec: 92 e0 ldi r25, 0x02 ; 2 |
|
19ee: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
19f2: 85 ea ldi r24, 0xA5 ; 165 |
|
19f4: 92 e0 ldi r25, 0x02 ; 2 |
|
19f6: 0e 94 3a 1d call 0x3a74 ; 0x3a74 <_ZN10NetAddressC1Ev> |
|
19fa: 0f ef ldi r16, 0xFF ; 255 |
|
19fc: 22 e0 ldi r18, 0x02 ; 2 |
|
19fe: 48 ea ldi r20, 0xA8 ; 168 |
|
1a00: 60 ec ldi r22, 0xC0 ; 192 |
|
1a02: 8f e9 ldi r24, 0x9F ; 159 |
|
1a04: 92 e0 ldi r25, 0x02 ; 2 |
|
1a06: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
1a0a: 84 e8 ldi r24, 0x84 ; 132 |
|
1a0c: 92 e0 ldi r25, 0x02 ; 2 |
|
1a0e: 0e 94 a1 23 call 0x4742 ; 0x4742 <_ZN11EthernetUDPC1Ev> |
|
1a12: 8a e6 ldi r24, 0x6A ; 106 |
|
1a14: 92 e0 ldi r25, 0x02 ; 2 |
|
1a16: 0e 94 76 1c call 0x38ec ; 0x38ec <_ZN6OscUDPC1Ev> |
|
1a1a: 4a e0 ldi r20, 0x0A ; 10 |
|
1a1c: 50 e0 ldi r21, 0x00 ; 0 |
|
1a1e: 64 ef ldi r22, 0xF4 ; 244 |
|
1a20: 71 e0 ldi r23, 0x01 ; 1 |
|
1a22: 80 e6 ldi r24, 0x60 ; 96 |
|
1a24: 92 e0 ldi r25, 0x02 ; 2 |
|
1a26: 0e 94 b5 00 call 0x16a ; 0x16a <_ZN8Watchdog19CApplicationMonitorC1Eii> |
|
1a2a: 0e 94 45 2a call 0x548a ; 0x548a <micros> |
|
1a2e: 60 93 54 02 sts 0x0254, r22 |
|
1a32: 70 93 55 02 sts 0x0255, r23 |
|
1a36: 80 93 56 02 sts 0x0256, r24 |
|
1a3a: 90 93 57 02 sts 0x0257, r25 |
|
1a3e: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
1a42: 60 93 50 02 sts 0x0250, r22 |
|
1a46: 70 93 51 02 sts 0x0251, r23 |
|
1a4a: 80 93 52 02 sts 0x0252, r24 |
|
1a4e: 90 93 53 02 sts 0x0253, r25 |
|
1a52: 0f 90 pop r0 |
|
1a54: 0f 90 pop r0 |
|
1a56: 0f 90 pop r0 |
|
1a58: 0f 90 pop r0 |
|
1a5a: 0f 90 pop r0 |
|
1a5c: 0f 90 pop r0 |
|
1a5e: 1f 91 pop r17 |
|
1a60: 0f 91 pop r16 |
|
1a62: ff 90 pop r15 |
|
1a64: ef 90 pop r14 |
|
1a66: df 90 pop r13 |
|
1a68: cf 90 pop r12 |
|
1a6a: bf 90 pop r11 |
|
1a6c: af 90 pop r10 |
|
1a6e: 08 95 ret |
|
|
|
00001a70 <_GLOBAL__sub_D_pidSetpoint>: |
|
}; |
|
|
|
|
|
|
|
//============================================================================= |
|
class OscUDP { |
|
1a70: 8a e6 ldi r24, 0x6A ; 106 |
|
1a72: 92 e0 ldi r25, 0x02 ; 2 |
|
1a74: 0c 94 48 15 jmp 0x2a90 ; 0x2a90 <_ZN10OscMessageD1Ev> |
|
|
|
00001a78 <_Z13setupEthernetv>: |
|
1a78: 0f 93 push r16 |
|
1a7a: 1f 93 push r17 |
|
1a7c: cf 93 push r28 |
|
1a7e: df 93 push r29 |
|
1a80: 00 d0 rcall .+0 ; 0x1a82 <_Z13setupEthernetv+0xa> |
|
1a82: 00 d0 rcall .+0 ; 0x1a84 <_Z13setupEthernetv+0xc> |
|
1a84: 00 d0 rcall .+0 ; 0x1a86 <_Z13setupEthernetv+0xe> |
|
1a86: cd b7 in r28, 0x3d ; 61 |
|
1a88: de b7 in r29, 0x3e ; 62 |
|
#include <stdint.h> |
|
#include <Printable.h> |
|
|
|
// A class to make it easier to handle and pass around IP addresses |
|
|
|
class IPAddress : public Printable { |
|
1a8a: 0c e3 ldi r16, 0x3C ; 60 |
|
1a8c: 12 e0 ldi r17, 0x02 ; 2 |
|
1a8e: 1a 83 std Y+2, r17 ; 0x02 |
|
1a90: 09 83 std Y+1, r16 ; 0x01 |
|
1a92: 80 91 af 02 lds r24, 0x02AF |
|
1a96: 90 91 b0 02 lds r25, 0x02B0 |
|
1a9a: a0 91 b1 02 lds r26, 0x02B1 |
|
1a9e: b0 91 b2 02 lds r27, 0x02B2 |
|
1aa2: 8b 83 std Y+3, r24 ; 0x03 |
|
1aa4: 9c 83 std Y+4, r25 ; 0x04 |
|
1aa6: ad 83 std Y+5, r26 ; 0x05 |
|
1aa8: be 83 std Y+6, r27 ; 0x06 |
|
1aaa: ae 01 movw r20, r28 |
|
1aac: 4f 5f subi r20, 0xFF ; 255 |
|
1aae: 5f 4f sbci r21, 0xFF ; 255 |
|
1ab0: 62 e1 ldi r22, 0x12 ; 18 |
|
1ab2: 71 e0 ldi r23, 0x01 ; 1 |
|
1ab4: 80 e3 ldi r24, 0x30 ; 48 |
|
1ab6: 93 e0 ldi r25, 0x03 ; 3 |
|
1ab8: 0e 94 d7 21 call 0x43ae ; 0x43ae <_ZN13EthernetClass5beginEPh9IPAddress> |
|
1abc: 60 91 10 01 lds r22, 0x0110 |
|
1ac0: 70 91 11 01 lds r23, 0x0111 |
|
1ac4: 84 e8 ldi r24, 0x84 ; 132 |
|
1ac6: 92 e0 ldi r25, 0x02 ; 2 |
|
1ac8: 0e 94 24 23 call 0x4648 ; 0x4648 <_ZN11EthernetUDP5beginEj> |
|
1acc: 64 e8 ldi r22, 0x84 ; 132 |
|
1ace: 72 e0 ldi r23, 0x02 ; 2 |
|
1ad0: 8a e6 ldi r24, 0x6A ; 106 |
|
1ad2: 92 e0 ldi r25, 0x02 ; 2 |
|
1ad4: 0e 94 81 1c call 0x3902 ; 0x3902 <_ZN6OscUDP5beginER11EthernetUDP> |
|
1ad8: 40 91 0e 01 lds r20, 0x010E |
|
1adc: 50 91 0f 01 lds r21, 0x010F |
|
1ae0: 1a 83 std Y+2, r17 ; 0x02 |
|
1ae2: 09 83 std Y+1, r16 ; 0x01 |
|
1ae4: 80 91 a1 02 lds r24, 0x02A1 |
|
1ae8: 90 91 a2 02 lds r25, 0x02A2 |
|
1aec: a0 91 a3 02 lds r26, 0x02A3 |
|
1af0: b0 91 a4 02 lds r27, 0x02A4 |
|
1af4: 8b 83 std Y+3, r24 ; 0x03 |
|
1af6: 9c 83 std Y+4, r25 ; 0x04 |
|
1af8: ad 83 std Y+5, r26 ; 0x05 |
|
1afa: be 83 std Y+6, r27 ; 0x06 |
|
1afc: be 01 movw r22, r28 |
|
1afe: 6f 5f subi r22, 0xFF ; 255 |
|
1b00: 7f 4f sbci r23, 0xFF ; 255 |
|
1b02: 85 ea ldi r24, 0xA5 ; 165 |
|
1b04: 92 e0 ldi r25, 0x02 ; 2 |
|
1b06: 0e 94 3c 1d call 0x3a78 ; 0x3a78 <_ZN10NetAddress3setE9IPAddressi> |
|
1b0a: 26 96 adiw r28, 0x06 ; 6 |
|
1b0c: 0f b6 in r0, 0x3f ; 63 |
|
1b0e: f8 94 cli |
|
1b10: de bf out 0x3e, r29 ; 62 |
|
1b12: 0f be out 0x3f, r0 ; 63 |
|
1b14: cd bf out 0x3d, r28 ; 61 |
|
1b16: df 91 pop r29 |
|
1b18: cf 91 pop r28 |
|
1b1a: 1f 91 pop r17 |
|
1b1c: 0f 91 pop r16 |
|
1b1e: 08 95 ret |
|
|
|
00001b20 <setup>: |
|
1b20: 0e 94 3c 0d call 0x1a78 ; 0x1a78 <_Z13setupEthernetv> |
|
1b24: 0e 94 57 05 call 0xaae ; 0xaae <_Z12setupEncoderv> |
|
1b28: 80 93 c5 02 sts 0x02C5, r24 |
|
1b2c: 88 23 and r24, r24 |
|
1b2e: 31 f0 breq .+12 ; 0x1b3c <setup+0x1c> |
|
1b30: 24 e0 ldi r18, 0x04 ; 4 |
|
1b32: 30 e0 ldi r19, 0x00 ; 0 |
|
1b34: 30 93 0b 01 sts 0x010B, r19 |
|
1b38: 20 93 0a 01 sts 0x010A, r18 |
|
1b3c: 0e 94 c8 05 call 0xb90 ; 0xb90 <_Z16setupMotorDriverb> |
|
1b40: 0e 94 0e 06 call 0xc1c ; 0xc1c <_Z13setupEndstopsv> |
|
1b44: 0e 94 7a 04 call 0x8f4 ; 0x8f4 <_Z8setupPIDv> |
|
1b48: 0c 94 91 08 jmp 0x1122 ; 0x1122 <_Z13setupWatchdogv> |
|
|
|
00001b4c <__vector_13>: |
|
void (*TimerOne::isrCallback)() = NULL; |
|
|
|
// interrupt service routine that wraps a user defined function supplied by attachInterrupt |
|
#if defined(__AVR__) |
|
ISR(TIMER1_OVF_vect) |
|
{ |
|
1b4c: 1f 92 push r1 |
|
1b4e: 0f 92 push r0 |
|
1b50: 0f b6 in r0, 0x3f ; 63 |
|
1b52: 0f 92 push r0 |
|
1b54: 11 24 eor r1, r1 |
|
1b56: 2f 93 push r18 |
|
1b58: 3f 93 push r19 |
|
1b5a: 4f 93 push r20 |
|
1b5c: 5f 93 push r21 |
|
1b5e: 6f 93 push r22 |
|
1b60: 7f 93 push r23 |
|
1b62: 8f 93 push r24 |
|
1b64: 9f 93 push r25 |
|
1b66: af 93 push r26 |
|
1b68: bf 93 push r27 |
|
1b6a: ef 93 push r30 |
|
1b6c: ff 93 push r31 |
|
Timer1.isrCallback(); |
|
1b6e: e0 91 15 03 lds r30, 0x0315 |
|
1b72: f0 91 16 03 lds r31, 0x0316 |
|
1b76: 09 95 icall |
|
} |
|
1b78: ff 91 pop r31 |
|
1b7a: ef 91 pop r30 |
|
1b7c: bf 91 pop r27 |
|
1b7e: af 91 pop r26 |
|
1b80: 9f 91 pop r25 |
|
1b82: 8f 91 pop r24 |
|
1b84: 7f 91 pop r23 |
|
1b86: 6f 91 pop r22 |
|
1b88: 5f 91 pop r21 |
|
1b8a: 4f 91 pop r20 |
|
1b8c: 3f 91 pop r19 |
|
1b8e: 2f 91 pop r18 |
|
1b90: 0f 90 pop r0 |
|
1b92: 0f be out 0x3f, r0 ; 63 |
|
1b94: 0f 90 pop r0 |
|
1b96: 1f 90 pop r1 |
|
1b98: 18 95 reti |
|
|
|
00001b9a <_ZN3PID7ComputeEv>: |
|
* every time "void loop()" executes. the function will decide for itself whether a new |
|
* pid Output needs to be computed. returns true when the output is computed, |
|
* false when nothing has been done. |
|
**********************************************************************************/ |
|
bool PID::Compute() |
|
{ |
|
1b9a: 2f 92 push r2 |
|
1b9c: 3f 92 push r3 |
|
1b9e: 4f 92 push r4 |
|
1ba0: 5f 92 push r5 |
|
1ba2: 6f 92 push r6 |
|
1ba4: 7f 92 push r7 |
|
1ba6: 8f 92 push r8 |
|
1ba8: 9f 92 push r9 |
|
1baa: af 92 push r10 |
|
1bac: bf 92 push r11 |
|
1bae: cf 92 push r12 |
|
1bb0: df 92 push r13 |
|
1bb2: ef 92 push r14 |
|
1bb4: ff 92 push r15 |
|
1bb6: 0f 93 push r16 |
|
1bb8: 1f 93 push r17 |
|
1bba: cf 93 push r28 |
|
1bbc: df 93 push r29 |
|
1bbe: cd b7 in r28, 0x3d ; 61 |
|
1bc0: de b7 in r29, 0x3e ; 62 |
|
1bc2: 2b 97 sbiw r28, 0x0b ; 11 |
|
1bc4: 0f b6 in r0, 0x3f ; 63 |
|
1bc6: f8 94 cli |
|
1bc8: de bf out 0x3e, r29 ; 62 |
|
1bca: 0f be out 0x3f, r0 ; 63 |
|
1bcc: cd bf out 0x3d, r28 ; 61 |
|
1bce: 9b 87 std Y+11, r25 ; 0x0b |
|
1bd0: 8a 87 std Y+10, r24 ; 0x0a |
|
if(!inAuto) return false; |
|
1bd2: dc 01 movw r26, r24 |
|
1bd4: d8 96 adiw r26, 0x38 ; 56 |
|
1bd6: bc 91 ld r27, X |
|
1bd8: b9 83 std Y+1, r27 ; 0x01 |
|
1bda: b1 11 cpse r27, r1 |
|
1bdc: 02 c0 rjmp .+4 ; 0x1be2 <_ZN3PID7ComputeEv+0x48> |
|
1bde: 19 82 std Y+1, r1 ; 0x01 |
|
1be0: e2 c0 rjmp .+452 ; 0x1da6 <_ZN3PID7ComputeEv+0x20c> |
|
unsigned long now = millis(); |
|
1be2: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
1be6: 6a 83 std Y+2, r22 ; 0x02 |
|
1be8: 7b 83 std Y+3, r23 ; 0x03 |
|
1bea: 8c 83 std Y+4, r24 ; 0x04 |
|
1bec: 9d 83 std Y+5, r25 ; 0x05 |
|
unsigned long timeChange = (now - lastTime); |
|
1bee: ea 85 ldd r30, Y+10 ; 0x0a |
|
1bf0: fb 85 ldd r31, Y+11 ; 0x0b |
|
1bf2: 80 a1 ldd r24, Z+32 ; 0x20 |
|
1bf4: 91 a1 ldd r25, Z+33 ; 0x21 |
|
1bf6: a2 a1 ldd r26, Z+34 ; 0x22 |
|
1bf8: b3 a1 ldd r27, Z+35 ; 0x23 |
|
1bfa: 4a 81 ldd r20, Y+2 ; 0x02 |
|
1bfc: 5b 81 ldd r21, Y+3 ; 0x03 |
|
1bfe: 6c 81 ldd r22, Y+4 ; 0x04 |
|
1c00: 7d 81 ldd r23, Y+5 ; 0x05 |
|
1c02: 48 1b sub r20, r24 |
|
1c04: 59 0b sbc r21, r25 |
|
1c06: 6a 0b sbc r22, r26 |
|
1c08: 7b 0b sbc r23, r27 |
|
if(timeChange>=SampleTime) |
|
1c0a: 84 a5 ldd r24, Z+44 ; 0x2c |
|
1c0c: 95 a5 ldd r25, Z+45 ; 0x2d |
|
1c0e: a6 a5 ldd r26, Z+46 ; 0x2e |
|
1c10: b7 a5 ldd r27, Z+47 ; 0x2f |
|
1c12: 48 17 cp r20, r24 |
|
1c14: 59 07 cpc r21, r25 |
|
1c16: 6a 07 cpc r22, r26 |
|
1c18: 7b 07 cpc r23, r27 |
|
1c1a: 08 f3 brcs .-62 ; 0x1bde <_ZN3PID7ComputeEv+0x44> |
|
{ |
|
/*Compute all the working error variables*/ |
|
double input = *myInput; |
|
1c1c: 02 8c ldd r0, Z+26 ; 0x1a |
|
1c1e: f3 8d ldd r31, Z+27 ; 0x1b |
|
1c20: e0 2d mov r30, r0 |
|
1c22: 80 80 ld r8, Z |
|
1c24: 91 80 ldd r9, Z+1 ; 0x01 |
|
1c26: a2 80 ldd r10, Z+2 ; 0x02 |
|
1c28: b3 80 ldd r11, Z+3 ; 0x03 |
|
double error = *mySetpoint - input; |
|
1c2a: aa 85 ldd r26, Y+10 ; 0x0a |
|
1c2c: bb 85 ldd r27, Y+11 ; 0x0b |
|
1c2e: 5e 96 adiw r26, 0x1e ; 30 |
|
1c30: ed 91 ld r30, X+ |
|
1c32: fc 91 ld r31, X |
|
1c34: 5f 97 sbiw r26, 0x1f ; 31 |
|
1c36: a5 01 movw r20, r10 |
|
1c38: 94 01 movw r18, r8 |
|
1c3a: 60 81 ld r22, Z |
|
1c3c: 71 81 ldd r23, Z+1 ; 0x01 |
|
1c3e: 82 81 ldd r24, Z+2 ; 0x02 |
|
1c40: 93 81 ldd r25, Z+3 ; 0x03 |
|
1c42: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
1c46: 2b 01 movw r4, r22 |
|
1c48: 3c 01 movw r6, r24 |
|
ITerm+= (ki * error); |
|
1c4a: ea 85 ldd r30, Y+10 ; 0x0a |
|
1c4c: fb 85 ldd r31, Y+11 ; 0x0b |
|
1c4e: 20 89 ldd r18, Z+16 ; 0x10 |
|
1c50: 31 89 ldd r19, Z+17 ; 0x11 |
|
1c52: 42 89 ldd r20, Z+18 ; 0x12 |
|
1c54: 53 89 ldd r21, Z+19 ; 0x13 |
|
1c56: 0e 94 5a 2e call 0x5cb4 ; 0x5cb4 <__mulsf3> |
|
1c5a: aa 85 ldd r26, Y+10 ; 0x0a |
|
1c5c: bb 85 ldd r27, Y+11 ; 0x0b |
|
1c5e: 94 96 adiw r26, 0x24 ; 36 |
|
1c60: 2d 91 ld r18, X+ |
|
1c62: 3d 91 ld r19, X+ |
|
1c64: 4d 91 ld r20, X+ |
|
1c66: 5c 91 ld r21, X |
|
1c68: 97 97 sbiw r26, 0x27 ; 39 |
|
1c6a: 0e 94 a3 2c call 0x5946 ; 0x5946 <__addsf3> |
|
1c6e: 6b 01 movw r12, r22 |
|
1c70: 7c 01 movw r14, r24 |
|
1c72: ea 85 ldd r30, Y+10 ; 0x0a |
|
1c74: fb 85 ldd r31, Y+11 ; 0x0b |
|
1c76: 64 a3 std Z+36, r22 ; 0x24 |
|
1c78: 75 a3 std Z+37, r23 ; 0x25 |
|
1c7a: 86 a3 std Z+38, r24 ; 0x26 |
|
1c7c: 97 a3 std Z+39, r25 ; 0x27 |
|
if(ITerm > outMax) ITerm= outMax; |
|
1c7e: 24 a8 ldd r2, Z+52 ; 0x34 |
|
1c80: 35 a8 ldd r3, Z+53 ; 0x35 |
|
1c82: 06 a9 ldd r16, Z+54 ; 0x36 |
|
1c84: 17 a9 ldd r17, Z+55 ; 0x37 |
|
1c86: 91 01 movw r18, r2 |
|
1c88: a8 01 movw r20, r16 |
|
1c8a: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
1c8e: 18 16 cp r1, r24 |
|
1c90: 1c f4 brge .+6 ; 0x1c98 <_ZN3PID7ComputeEv+0xfe> |
|
1c92: c1 01 movw r24, r2 |
|
1c94: d8 01 movw r26, r16 |
|
1c96: 18 c0 rjmp .+48 ; 0x1cc8 <_ZN3PID7ComputeEv+0x12e> |
|
else if(ITerm < outMin) ITerm= outMin; |
|
1c98: aa 85 ldd r26, Y+10 ; 0x0a |
|
1c9a: bb 85 ldd r27, Y+11 ; 0x0b |
|
1c9c: d0 96 adiw r26, 0x30 ; 48 |
|
1c9e: 8d 91 ld r24, X+ |
|
1ca0: 9d 91 ld r25, X+ |
|
1ca2: 0d 90 ld r0, X+ |
|
1ca4: bc 91 ld r27, X |
|
1ca6: a0 2d mov r26, r0 |
|
1ca8: 8e 83 std Y+6, r24 ; 0x06 |
|
1caa: 9f 83 std Y+7, r25 ; 0x07 |
|
1cac: a8 87 std Y+8, r26 ; 0x08 |
|
1cae: b9 87 std Y+9, r27 ; 0x09 |
|
1cb0: 9c 01 movw r18, r24 |
|
1cb2: ad 01 movw r20, r26 |
|
1cb4: c7 01 movw r24, r14 |
|
1cb6: b6 01 movw r22, r12 |
|
1cb8: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
1cbc: 87 ff sbrs r24, 7 |
|
1cbe: 0a c0 rjmp .+20 ; 0x1cd4 <_ZN3PID7ComputeEv+0x13a> |
|
1cc0: 8e 81 ldd r24, Y+6 ; 0x06 |
|
1cc2: 9f 81 ldd r25, Y+7 ; 0x07 |
|
1cc4: a8 85 ldd r26, Y+8 ; 0x08 |
|
1cc6: b9 85 ldd r27, Y+9 ; 0x09 |
|
1cc8: ea 85 ldd r30, Y+10 ; 0x0a |
|
1cca: fb 85 ldd r31, Y+11 ; 0x0b |
|
1ccc: 84 a3 std Z+36, r24 ; 0x24 |
|
1cce: 95 a3 std Z+37, r25 ; 0x25 |
|
1cd0: a6 a3 std Z+38, r26 ; 0x26 |
|
1cd2: b7 a3 std Z+39, r27 ; 0x27 |
|
double dInput = (input - lastInput); |
|
|
|
/*Compute PID Output*/ |
|
double output = kp * error + ITerm- kd * dInput; |
|
1cd4: aa 85 ldd r26, Y+10 ; 0x0a |
|
1cd6: bb 85 ldd r27, Y+11 ; 0x0b |
|
1cd8: 1c 96 adiw r26, 0x0c ; 12 |
|
1cda: 2d 91 ld r18, X+ |
|
1cdc: 3d 91 ld r19, X+ |
|
1cde: 4d 91 ld r20, X+ |
|
1ce0: 5c 91 ld r21, X |
|
1ce2: 1f 97 sbiw r26, 0x0f ; 15 |
|
1ce4: c3 01 movw r24, r6 |
|
1ce6: b2 01 movw r22, r4 |
|
1ce8: 0e 94 5a 2e call 0x5cb4 ; 0x5cb4 <__mulsf3> |
|
1cec: ea 85 ldd r30, Y+10 ; 0x0a |
|
1cee: fb 85 ldd r31, Y+11 ; 0x0b |
|
1cf0: 24 a1 ldd r18, Z+36 ; 0x24 |
|
1cf2: 35 a1 ldd r19, Z+37 ; 0x25 |
|
1cf4: 46 a1 ldd r20, Z+38 ; 0x26 |
|
1cf6: 57 a1 ldd r21, Z+39 ; 0x27 |
|
1cf8: 0e 94 a3 2c call 0x5946 ; 0x5946 <__addsf3> |
|
1cfc: 6b 01 movw r12, r22 |
|
1cfe: 7c 01 movw r14, r24 |
|
double input = *myInput; |
|
double error = *mySetpoint - input; |
|
ITerm+= (ki * error); |
|
if(ITerm > outMax) ITerm= outMax; |
|
else if(ITerm < outMin) ITerm= outMin; |
|
double dInput = (input - lastInput); |
|
1d00: aa 85 ldd r26, Y+10 ; 0x0a |
|
1d02: bb 85 ldd r27, Y+11 ; 0x0b |
|
1d04: 98 96 adiw r26, 0x28 ; 40 |
|
1d06: 2d 91 ld r18, X+ |
|
1d08: 3d 91 ld r19, X+ |
|
1d0a: 4d 91 ld r20, X+ |
|
1d0c: 5c 91 ld r21, X |
|
1d0e: 9b 97 sbiw r26, 0x2b ; 43 |
|
1d10: c5 01 movw r24, r10 |
|
1d12: b4 01 movw r22, r8 |
|
1d14: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
|
|
/*Compute PID Output*/ |
|
double output = kp * error + ITerm- kd * dInput; |
|
1d18: ea 85 ldd r30, Y+10 ; 0x0a |
|
1d1a: fb 85 ldd r31, Y+11 ; 0x0b |
|
1d1c: 24 89 ldd r18, Z+20 ; 0x14 |
|
1d1e: 35 89 ldd r19, Z+21 ; 0x15 |
|
1d20: 46 89 ldd r20, Z+22 ; 0x16 |
|
1d22: 57 89 ldd r21, Z+23 ; 0x17 |
|
1d24: 0e 94 5a 2e call 0x5cb4 ; 0x5cb4 <__mulsf3> |
|
1d28: 9b 01 movw r18, r22 |
|
1d2a: ac 01 movw r20, r24 |
|
1d2c: c7 01 movw r24, r14 |
|
1d2e: b6 01 movw r22, r12 |
|
1d30: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
1d34: 6b 01 movw r12, r22 |
|
1d36: 7c 01 movw r14, r24 |
|
|
|
if(output > outMax) output = outMax; |
|
1d38: 91 01 movw r18, r2 |
|
1d3a: a8 01 movw r20, r16 |
|
1d3c: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
1d40: 18 16 cp r1, r24 |
|
1d42: bc f0 brlt .+46 ; 0x1d72 <_ZN3PID7ComputeEv+0x1d8> |
|
else if(output < outMin) output = outMin; |
|
1d44: aa 85 ldd r26, Y+10 ; 0x0a |
|
1d46: bb 85 ldd r27, Y+11 ; 0x0b |
|
1d48: d0 96 adiw r26, 0x30 ; 48 |
|
1d4a: 2c 90 ld r2, X |
|
1d4c: d0 97 sbiw r26, 0x30 ; 48 |
|
1d4e: d1 96 adiw r26, 0x31 ; 49 |
|
1d50: 3c 90 ld r3, X |
|
1d52: d1 97 sbiw r26, 0x31 ; 49 |
|
1d54: d2 96 adiw r26, 0x32 ; 50 |
|
1d56: 0c 91 ld r16, X |
|
1d58: d2 97 sbiw r26, 0x32 ; 50 |
|
1d5a: d3 96 adiw r26, 0x33 ; 51 |
|
1d5c: 1c 91 ld r17, X |
|
1d5e: 91 01 movw r18, r2 |
|
1d60: a8 01 movw r20, r16 |
|
1d62: b6 01 movw r22, r12 |
|
1d64: c7 01 movw r24, r14 |
|
1d66: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
1d6a: 87 fd sbrc r24, 7 |
|
1d6c: 02 c0 rjmp .+4 ; 0x1d72 <_ZN3PID7ComputeEv+0x1d8> |
|
if(ITerm > outMax) ITerm= outMax; |
|
else if(ITerm < outMin) ITerm= outMin; |
|
double dInput = (input - lastInput); |
|
|
|
/*Compute PID Output*/ |
|
double output = kp * error + ITerm- kd * dInput; |
|
1d6e: 16 01 movw r2, r12 |
|
1d70: 87 01 movw r16, r14 |
|
|
|
if(output > outMax) output = outMax; |
|
else if(output < outMin) output = outMin; |
|
*myOutput = output; |
|
1d72: aa 85 ldd r26, Y+10 ; 0x0a |
|
1d74: bb 85 ldd r27, Y+11 ; 0x0b |
|
1d76: 5c 96 adiw r26, 0x1c ; 28 |
|
1d78: ed 91 ld r30, X+ |
|
1d7a: fc 91 ld r31, X |
|
1d7c: 5d 97 sbiw r26, 0x1d ; 29 |
|
1d7e: c1 01 movw r24, r2 |
|
1d80: d8 01 movw r26, r16 |
|
1d82: 80 83 st Z, r24 |
|
1d84: 91 83 std Z+1, r25 ; 0x01 |
|
1d86: a2 83 std Z+2, r26 ; 0x02 |
|
1d88: b3 83 std Z+3, r27 ; 0x03 |
|
|
|
/*Remember some variables for next time*/ |
|
lastInput = input; |
|
1d8a: ea 85 ldd r30, Y+10 ; 0x0a |
|
1d8c: fb 85 ldd r31, Y+11 ; 0x0b |
|
1d8e: 80 a6 std Z+40, r8 ; 0x28 |
|
1d90: 91 a6 std Z+41, r9 ; 0x29 |
|
1d92: a2 a6 std Z+42, r10 ; 0x2a |
|
1d94: b3 a6 std Z+43, r11 ; 0x2b |
|
lastTime = now; |
|
1d96: 8a 81 ldd r24, Y+2 ; 0x02 |
|
1d98: 9b 81 ldd r25, Y+3 ; 0x03 |
|
1d9a: ac 81 ldd r26, Y+4 ; 0x04 |
|
1d9c: bd 81 ldd r27, Y+5 ; 0x05 |
|
1d9e: 80 a3 std Z+32, r24 ; 0x20 |
|
1da0: 91 a3 std Z+33, r25 ; 0x21 |
|
1da2: a2 a3 std Z+34, r26 ; 0x22 |
|
1da4: b3 a3 std Z+35, r27 ; 0x23 |
|
return true; |
|
} |
|
else return false; |
|
} |
|
1da6: 89 81 ldd r24, Y+1 ; 0x01 |
|
1da8: 2b 96 adiw r28, 0x0b ; 11 |
|
1daa: 0f b6 in r0, 0x3f ; 63 |
|
1dac: f8 94 cli |
|
1dae: de bf out 0x3e, r29 ; 62 |
|
1db0: 0f be out 0x3f, r0 ; 63 |
|
1db2: cd bf out 0x3d, r28 ; 61 |
|
1db4: df 91 pop r29 |
|
1db6: cf 91 pop r28 |
|
1db8: 1f 91 pop r17 |
|
1dba: 0f 91 pop r16 |
|
1dbc: ff 90 pop r15 |
|
1dbe: ef 90 pop r14 |
|
1dc0: df 90 pop r13 |
|
1dc2: cf 90 pop r12 |
|
1dc4: bf 90 pop r11 |
|
1dc6: af 90 pop r10 |
|
1dc8: 9f 90 pop r9 |
|
1dca: 8f 90 pop r8 |
|
1dcc: 7f 90 pop r7 |
|
1dce: 6f 90 pop r6 |
|
1dd0: 5f 90 pop r5 |
|
1dd2: 4f 90 pop r4 |
|
1dd4: 3f 90 pop r3 |
|
1dd6: 2f 90 pop r2 |
|
1dd8: 08 95 ret |
|
|
|
00001dda <_ZN3PID10SetTuningsEddd>: |
|
* This function allows the controller's dynamic performance to be adjusted. |
|
* it's called automatically from the constructor, but tunings can also |
|
* be adjusted on the fly during normal operation |
|
******************************************************************************/ |
|
void PID::SetTunings(double Kp, double Ki, double Kd) |
|
{ |
|
1dda: 2f 92 push r2 |
|
1ddc: 3f 92 push r3 |
|
1dde: 4f 92 push r4 |
|
1de0: 5f 92 push r5 |
|
1de2: 6f 92 push r6 |
|
1de4: 7f 92 push r7 |
|
1de6: 8f 92 push r8 |
|
1de8: 9f 92 push r9 |
|
1dea: af 92 push r10 |
|
1dec: bf 92 push r11 |
|
1dee: cf 92 push r12 |
|
1df0: df 92 push r13 |
|
1df2: ef 92 push r14 |
|
1df4: ff 92 push r15 |
|
1df6: 0f 93 push r16 |
|
1df8: 1f 93 push r17 |
|
1dfa: cf 93 push r28 |
|
1dfc: df 93 push r29 |
|
1dfe: 00 d0 rcall .+0 ; 0x1e00 <_ZN3PID10SetTuningsEddd+0x26> |
|
1e00: 00 d0 rcall .+0 ; 0x1e02 <_ZN3PID10SetTuningsEddd+0x28> |
|
1e02: cd b7 in r28, 0x3d ; 61 |
|
1e04: de b7 in r29, 0x3e ; 62 |
|
1e06: 1c 01 movw r2, r24 |
|
1e08: 2a 01 movw r4, r20 |
|
1e0a: 3b 01 movw r6, r22 |
|
1e0c: 48 01 movw r8, r16 |
|
1e0e: 59 01 movw r10, r18 |
|
if (Kp<0 || Ki<0 || Kd<0) return; |
|
1e10: 20 e0 ldi r18, 0x00 ; 0 |
|
1e12: 30 e0 ldi r19, 0x00 ; 0 |
|
1e14: a9 01 movw r20, r18 |
|
1e16: c3 01 movw r24, r6 |
|
1e18: b2 01 movw r22, r4 |
|
1e1a: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
1e1e: 87 fd sbrc r24, 7 |
|
1e20: 78 c0 rjmp .+240 ; 0x1f12 <_ZN3PID10SetTuningsEddd+0x138> |
|
1e22: 20 e0 ldi r18, 0x00 ; 0 |
|
1e24: 30 e0 ldi r19, 0x00 ; 0 |
|
1e26: a9 01 movw r20, r18 |
|
1e28: c5 01 movw r24, r10 |
|
1e2a: b4 01 movw r22, r8 |
|
1e2c: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
1e30: 87 fd sbrc r24, 7 |
|
1e32: 6f c0 rjmp .+222 ; 0x1f12 <_ZN3PID10SetTuningsEddd+0x138> |
|
1e34: 20 e0 ldi r18, 0x00 ; 0 |
|
1e36: 30 e0 ldi r19, 0x00 ; 0 |
|
1e38: a9 01 movw r20, r18 |
|
1e3a: c7 01 movw r24, r14 |
|
1e3c: b6 01 movw r22, r12 |
|
1e3e: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
1e42: 87 fd sbrc r24, 7 |
|
1e44: 66 c0 rjmp .+204 ; 0x1f12 <_ZN3PID10SetTuningsEddd+0x138> |
|
|
|
dispKp = Kp; dispKi = Ki; dispKd = Kd; |
|
1e46: f1 01 movw r30, r2 |
|
1e48: 40 82 st Z, r4 |
|
1e4a: 51 82 std Z+1, r5 ; 0x01 |
|
1e4c: 62 82 std Z+2, r6 ; 0x02 |
|
1e4e: 73 82 std Z+3, r7 ; 0x03 |
|
1e50: 84 82 std Z+4, r8 ; 0x04 |
|
1e52: 95 82 std Z+5, r9 ; 0x05 |
|
1e54: a6 82 std Z+6, r10 ; 0x06 |
|
1e56: b7 82 std Z+7, r11 ; 0x07 |
|
1e58: c0 86 std Z+8, r12 ; 0x08 |
|
1e5a: d1 86 std Z+9, r13 ; 0x09 |
|
1e5c: e2 86 std Z+10, r14 ; 0x0a |
|
1e5e: f3 86 std Z+11, r15 ; 0x0b |
|
|
|
double SampleTimeInSec = ((double)SampleTime)/1000; |
|
1e60: 64 a5 ldd r22, Z+44 ; 0x2c |
|
1e62: 75 a5 ldd r23, Z+45 ; 0x2d |
|
1e64: 86 a5 ldd r24, Z+46 ; 0x2e |
|
1e66: 97 a5 ldd r25, Z+47 ; 0x2f |
|
1e68: 0e 94 a4 2d call 0x5b48 ; 0x5b48 <__floatunsisf> |
|
1e6c: 20 e0 ldi r18, 0x00 ; 0 |
|
1e6e: 30 e0 ldi r19, 0x00 ; 0 |
|
1e70: 4a e7 ldi r20, 0x7A ; 122 |
|
1e72: 54 e4 ldi r21, 0x44 ; 68 |
|
1e74: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
1e78: 69 83 std Y+1, r22 ; 0x01 |
|
1e7a: 7a 83 std Y+2, r23 ; 0x02 |
|
1e7c: 8b 83 std Y+3, r24 ; 0x03 |
|
1e7e: 9c 83 std Y+4, r25 ; 0x04 |
|
kp = Kp; |
|
1e80: f1 01 movw r30, r2 |
|
1e82: 44 86 std Z+12, r4 ; 0x0c |
|
1e84: 55 86 std Z+13, r5 ; 0x0d |
|
1e86: 66 86 std Z+14, r6 ; 0x0e |
|
1e88: 77 86 std Z+15, r7 ; 0x0f |
|
ki = Ki * SampleTimeInSec; |
|
1e8a: 9b 01 movw r18, r22 |
|
1e8c: ac 01 movw r20, r24 |
|
1e8e: c5 01 movw r24, r10 |
|
1e90: b4 01 movw r22, r8 |
|
1e92: 0e 94 5a 2e call 0x5cb4 ; 0x5cb4 <__mulsf3> |
|
1e96: 4b 01 movw r8, r22 |
|
1e98: 5c 01 movw r10, r24 |
|
1e9a: f1 01 movw r30, r2 |
|
1e9c: 60 8b std Z+16, r22 ; 0x10 |
|
1e9e: 71 8b std Z+17, r23 ; 0x11 |
|
1ea0: 82 8b std Z+18, r24 ; 0x12 |
|
1ea2: 93 8b std Z+19, r25 ; 0x13 |
|
kd = Kd / SampleTimeInSec; |
|
1ea4: 29 81 ldd r18, Y+1 ; 0x01 |
|
1ea6: 3a 81 ldd r19, Y+2 ; 0x02 |
|
1ea8: 4b 81 ldd r20, Y+3 ; 0x03 |
|
1eaa: 5c 81 ldd r21, Y+4 ; 0x04 |
|
1eac: c7 01 movw r24, r14 |
|
1eae: b6 01 movw r22, r12 |
|
1eb0: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
1eb4: 6b 01 movw r12, r22 |
|
1eb6: 7c 01 movw r14, r24 |
|
1eb8: f1 01 movw r30, r2 |
|
1eba: 64 8b std Z+20, r22 ; 0x14 |
|
1ebc: 75 8b std Z+21, r23 ; 0x15 |
|
1ebe: 86 8b std Z+22, r24 ; 0x16 |
|
1ec0: 97 8b std Z+23, r25 ; 0x17 |
|
|
|
if(controllerDirection ==REVERSE) |
|
1ec2: 80 8d ldd r24, Z+24 ; 0x18 |
|
1ec4: 91 8d ldd r25, Z+25 ; 0x19 |
|
1ec6: 01 97 sbiw r24, 0x01 ; 1 |
|
1ec8: 21 f5 brne .+72 ; 0x1f12 <_ZN3PID10SetTuningsEddd+0x138> |
|
{ |
|
kp = (0 - kp); |
|
1eca: a3 01 movw r20, r6 |
|
1ecc: 92 01 movw r18, r4 |
|
1ece: 60 e0 ldi r22, 0x00 ; 0 |
|
1ed0: 70 e0 ldi r23, 0x00 ; 0 |
|
1ed2: cb 01 movw r24, r22 |
|
1ed4: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
1ed8: f1 01 movw r30, r2 |
|
1eda: 64 87 std Z+12, r22 ; 0x0c |
|
1edc: 75 87 std Z+13, r23 ; 0x0d |
|
1ede: 86 87 std Z+14, r24 ; 0x0e |
|
1ee0: 97 87 std Z+15, r25 ; 0x0f |
|
ki = (0 - ki); |
|
1ee2: a5 01 movw r20, r10 |
|
1ee4: 94 01 movw r18, r8 |
|
1ee6: 60 e0 ldi r22, 0x00 ; 0 |
|
1ee8: 70 e0 ldi r23, 0x00 ; 0 |
|
1eea: cb 01 movw r24, r22 |
|
1eec: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
1ef0: f1 01 movw r30, r2 |
|
1ef2: 60 8b std Z+16, r22 ; 0x10 |
|
1ef4: 71 8b std Z+17, r23 ; 0x11 |
|
1ef6: 82 8b std Z+18, r24 ; 0x12 |
|
1ef8: 93 8b std Z+19, r25 ; 0x13 |
|
kd = (0 - kd); |
|
1efa: a7 01 movw r20, r14 |
|
1efc: 96 01 movw r18, r12 |
|
1efe: 60 e0 ldi r22, 0x00 ; 0 |
|
1f00: 70 e0 ldi r23, 0x00 ; 0 |
|
1f02: cb 01 movw r24, r22 |
|
1f04: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
1f08: f1 01 movw r30, r2 |
|
1f0a: 64 8b std Z+20, r22 ; 0x14 |
|
1f0c: 75 8b std Z+21, r23 ; 0x15 |
|
1f0e: 86 8b std Z+22, r24 ; 0x16 |
|
1f10: 97 8b std Z+23, r25 ; 0x17 |
|
} |
|
} |
|
1f12: 0f 90 pop r0 |
|
1f14: 0f 90 pop r0 |
|
1f16: 0f 90 pop r0 |
|
1f18: 0f 90 pop r0 |
|
1f1a: df 91 pop r29 |
|
1f1c: cf 91 pop r28 |
|
1f1e: 1f 91 pop r17 |
|
1f20: 0f 91 pop r16 |
|
1f22: ff 90 pop r15 |
|
1f24: ef 90 pop r14 |
|
1f26: df 90 pop r13 |
|
1f28: cf 90 pop r12 |
|
1f2a: bf 90 pop r11 |
|
1f2c: af 90 pop r10 |
|
1f2e: 9f 90 pop r9 |
|
1f30: 8f 90 pop r8 |
|
1f32: 7f 90 pop r7 |
|
1f34: 6f 90 pop r6 |
|
1f36: 5f 90 pop r5 |
|
1f38: 4f 90 pop r4 |
|
1f3a: 3f 90 pop r3 |
|
1f3c: 2f 90 pop r2 |
|
1f3e: 08 95 ret |
|
|
|
00001f40 <_ZN3PID13SetSampleTimeEi>: |
|
|
|
/* SetSampleTime(...) ********************************************************* |
|
* sets the period, in Milliseconds, at which the calculation is performed |
|
******************************************************************************/ |
|
void PID::SetSampleTime(int NewSampleTime) |
|
{ |
|
1f40: 8f 92 push r8 |
|
1f42: 9f 92 push r9 |
|
1f44: af 92 push r10 |
|
1f46: bf 92 push r11 |
|
1f48: cf 92 push r12 |
|
1f4a: df 92 push r13 |
|
1f4c: ef 92 push r14 |
|
1f4e: ff 92 push r15 |
|
1f50: cf 93 push r28 |
|
1f52: df 93 push r29 |
|
1f54: ec 01 movw r28, r24 |
|
if (NewSampleTime > 0) |
|
1f56: 16 16 cp r1, r22 |
|
1f58: 17 06 cpc r1, r23 |
|
1f5a: ac f5 brge .+106 ; 0x1fc6 <_ZN3PID13SetSampleTimeEi+0x86> |
|
{ |
|
double ratio = (double)NewSampleTime |
|
/ (double)SampleTime; |
|
1f5c: 6b 01 movw r12, r22 |
|
1f5e: ee 24 eor r14, r14 |
|
1f60: d7 fc sbrc r13, 7 |
|
1f62: e0 94 com r14 |
|
1f64: fe 2c mov r15, r14 |
|
1f66: c7 01 movw r24, r14 |
|
1f68: b6 01 movw r22, r12 |
|
1f6a: 0e 94 a6 2d call 0x5b4c ; 0x5b4c <__floatsisf> |
|
1f6e: 4b 01 movw r8, r22 |
|
1f70: 5c 01 movw r10, r24 |
|
1f72: 6c a5 ldd r22, Y+44 ; 0x2c |
|
1f74: 7d a5 ldd r23, Y+45 ; 0x2d |
|
1f76: 8e a5 ldd r24, Y+46 ; 0x2e |
|
1f78: 9f a5 ldd r25, Y+47 ; 0x2f |
|
1f7a: 0e 94 a4 2d call 0x5b48 ; 0x5b48 <__floatunsisf> |
|
1f7e: 9b 01 movw r18, r22 |
|
1f80: ac 01 movw r20, r24 |
|
1f82: c5 01 movw r24, r10 |
|
1f84: b4 01 movw r22, r8 |
|
1f86: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
1f8a: 4b 01 movw r8, r22 |
|
1f8c: 5c 01 movw r10, r24 |
|
ki *= ratio; |
|
1f8e: 9b 01 movw r18, r22 |
|
1f90: ac 01 movw r20, r24 |
|
1f92: 68 89 ldd r22, Y+16 ; 0x10 |
|
1f94: 79 89 ldd r23, Y+17 ; 0x11 |
|
1f96: 8a 89 ldd r24, Y+18 ; 0x12 |
|
1f98: 9b 89 ldd r25, Y+19 ; 0x13 |
|
1f9a: 0e 94 5a 2e call 0x5cb4 ; 0x5cb4 <__mulsf3> |
|
1f9e: 68 8b std Y+16, r22 ; 0x10 |
|
1fa0: 79 8b std Y+17, r23 ; 0x11 |
|
1fa2: 8a 8b std Y+18, r24 ; 0x12 |
|
1fa4: 9b 8b std Y+19, r25 ; 0x13 |
|
kd /= ratio; |
|
1fa6: a5 01 movw r20, r10 |
|
1fa8: 94 01 movw r18, r8 |
|
1faa: 6c 89 ldd r22, Y+20 ; 0x14 |
|
1fac: 7d 89 ldd r23, Y+21 ; 0x15 |
|
1fae: 8e 89 ldd r24, Y+22 ; 0x16 |
|
1fb0: 9f 89 ldd r25, Y+23 ; 0x17 |
|
1fb2: 0e 94 0b 2d call 0x5a16 ; 0x5a16 <__divsf3> |
|
1fb6: 6c 8b std Y+20, r22 ; 0x14 |
|
1fb8: 7d 8b std Y+21, r23 ; 0x15 |
|
1fba: 8e 8b std Y+22, r24 ; 0x16 |
|
1fbc: 9f 8b std Y+23, r25 ; 0x17 |
|
SampleTime = (unsigned long)NewSampleTime; |
|
1fbe: cc a6 std Y+44, r12 ; 0x2c |
|
1fc0: dd a6 std Y+45, r13 ; 0x2d |
|
1fc2: ee a6 std Y+46, r14 ; 0x2e |
|
1fc4: ff a6 std Y+47, r15 ; 0x2f |
|
} |
|
} |
|
1fc6: df 91 pop r29 |
|
1fc8: cf 91 pop r28 |
|
1fca: ff 90 pop r15 |
|
1fcc: ef 90 pop r14 |
|
1fce: df 90 pop r13 |
|
1fd0: cf 90 pop r12 |
|
1fd2: bf 90 pop r11 |
|
1fd4: af 90 pop r10 |
|
1fd6: 9f 90 pop r9 |
|
1fd8: 8f 90 pop r8 |
|
1fda: 08 95 ret |
|
|
|
00001fdc <_ZN3PID15SetOutputLimitsEdd>: |
|
* be doing a time window and will need 0-8000 or something. or maybe they'll |
|
* want to clamp it from 0-125. who knows. at any rate, that can all be done |
|
* here. |
|
**************************************************************************/ |
|
void PID::SetOutputLimits(double Min, double Max) |
|
{ |
|
1fdc: 2f 92 push r2 |
|
1fde: 3f 92 push r3 |
|
1fe0: 4f 92 push r4 |
|
1fe2: 5f 92 push r5 |
|
1fe4: 6f 92 push r6 |
|
1fe6: 7f 92 push r7 |
|
1fe8: 8f 92 push r8 |
|
1fea: 9f 92 push r9 |
|
1fec: af 92 push r10 |
|
1fee: bf 92 push r11 |
|
1ff0: cf 92 push r12 |
|
1ff2: df 92 push r13 |
|
1ff4: ef 92 push r14 |
|
1ff6: ff 92 push r15 |
|
1ff8: 0f 93 push r16 |
|
1ffa: 1f 93 push r17 |
|
1ffc: cf 93 push r28 |
|
1ffe: df 93 push r29 |
|
2000: ec 01 movw r28, r24 |
|
2002: 6a 01 movw r12, r20 |
|
2004: 7b 01 movw r14, r22 |
|
2006: 48 01 movw r8, r16 |
|
2008: 59 01 movw r10, r18 |
|
if(Min >= Max) return; |
|
200a: a9 01 movw r20, r18 |
|
200c: 98 01 movw r18, r16 |
|
200e: c7 01 movw r24, r14 |
|
2010: b6 01 movw r22, r12 |
|
2012: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
2016: 87 ff sbrs r24, 7 |
|
2018: 4e c0 rjmp .+156 ; 0x20b6 <_ZN3PID15SetOutputLimitsEdd+0xda> |
|
outMin = Min; |
|
201a: c8 aa std Y+48, r12 ; 0x30 |
|
201c: d9 aa std Y+49, r13 ; 0x31 |
|
201e: ea aa std Y+50, r14 ; 0x32 |
|
2020: fb aa std Y+51, r15 ; 0x33 |
|
outMax = Max; |
|
2022: 8c aa std Y+52, r8 ; 0x34 |
|
2024: 9d aa std Y+53, r9 ; 0x35 |
|
2026: ae aa std Y+54, r10 ; 0x36 |
|
2028: bf aa std Y+55, r11 ; 0x37 |
|
|
|
if(inAuto) |
|
202a: 88 ad ldd r24, Y+56 ; 0x38 |
|
202c: 88 23 and r24, r24 |
|
202e: 09 f4 brne .+2 ; 0x2032 <_ZN3PID15SetOutputLimitsEdd+0x56> |
|
2030: 42 c0 rjmp .+132 ; 0x20b6 <_ZN3PID15SetOutputLimitsEdd+0xda> |
|
{ |
|
if(*myOutput > outMax) *myOutput = outMax; |
|
2032: 2c 8c ldd r2, Y+28 ; 0x1c |
|
2034: 3d 8c ldd r3, Y+29 ; 0x1d |
|
2036: f1 01 movw r30, r2 |
|
2038: 40 80 ld r4, Z |
|
203a: 51 80 ldd r5, Z+1 ; 0x01 |
|
203c: 62 80 ldd r6, Z+2 ; 0x02 |
|
203e: 73 80 ldd r7, Z+3 ; 0x03 |
|
2040: a5 01 movw r20, r10 |
|
2042: 94 01 movw r18, r8 |
|
2044: c3 01 movw r24, r6 |
|
2046: b2 01 movw r22, r4 |
|
2048: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
204c: 18 16 cp r1, r24 |
|
204e: 34 f4 brge .+12 ; 0x205c <_ZN3PID15SetOutputLimitsEdd+0x80> |
|
2050: f1 01 movw r30, r2 |
|
2052: 80 82 st Z, r8 |
|
2054: 91 82 std Z+1, r9 ; 0x01 |
|
2056: a2 82 std Z+2, r10 ; 0x02 |
|
2058: b3 82 std Z+3, r11 ; 0x03 |
|
205a: 0d c0 rjmp .+26 ; 0x2076 <_ZN3PID15SetOutputLimitsEdd+0x9a> |
|
else if(*myOutput < outMin) *myOutput = outMin; |
|
205c: a7 01 movw r20, r14 |
|
205e: 96 01 movw r18, r12 |
|
2060: c3 01 movw r24, r6 |
|
2062: b2 01 movw r22, r4 |
|
2064: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
2068: 87 ff sbrs r24, 7 |
|
206a: 05 c0 rjmp .+10 ; 0x2076 <_ZN3PID15SetOutputLimitsEdd+0x9a> |
|
206c: f1 01 movw r30, r2 |
|
206e: c0 82 st Z, r12 |
|
2070: d1 82 std Z+1, r13 ; 0x01 |
|
2072: e2 82 std Z+2, r14 ; 0x02 |
|
2074: f3 82 std Z+3, r15 ; 0x03 |
|
|
|
if(ITerm > outMax) ITerm= outMax; |
|
2076: 8c a0 ldd r8, Y+36 ; 0x24 |
|
2078: 9d a0 ldd r9, Y+37 ; 0x25 |
|
207a: ae a0 ldd r10, Y+38 ; 0x26 |
|
207c: bf a0 ldd r11, Y+39 ; 0x27 |
|
207e: cc a8 ldd r12, Y+52 ; 0x34 |
|
2080: dd a8 ldd r13, Y+53 ; 0x35 |
|
2082: ee a8 ldd r14, Y+54 ; 0x36 |
|
2084: ff a8 ldd r15, Y+55 ; 0x37 |
|
2086: a7 01 movw r20, r14 |
|
2088: 96 01 movw r18, r12 |
|
208a: c5 01 movw r24, r10 |
|
208c: b4 01 movw r22, r8 |
|
208e: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
2092: 18 16 cp r1, r24 |
|
2094: 64 f0 brlt .+24 ; 0x20ae <_ZN3PID15SetOutputLimitsEdd+0xd2> |
|
else if(ITerm < outMin) ITerm= outMin; |
|
2096: c8 a8 ldd r12, Y+48 ; 0x30 |
|
2098: d9 a8 ldd r13, Y+49 ; 0x31 |
|
209a: ea a8 ldd r14, Y+50 ; 0x32 |
|
209c: fb a8 ldd r15, Y+51 ; 0x33 |
|
209e: a7 01 movw r20, r14 |
|
20a0: 96 01 movw r18, r12 |
|
20a2: c5 01 movw r24, r10 |
|
20a4: b4 01 movw r22, r8 |
|
20a6: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
20aa: 87 ff sbrs r24, 7 |
|
20ac: 04 c0 rjmp .+8 ; 0x20b6 <_ZN3PID15SetOutputLimitsEdd+0xda> |
|
20ae: cc a2 std Y+36, r12 ; 0x24 |
|
20b0: dd a2 std Y+37, r13 ; 0x25 |
|
20b2: ee a2 std Y+38, r14 ; 0x26 |
|
20b4: ff a2 std Y+39, r15 ; 0x27 |
|
} |
|
} |
|
20b6: df 91 pop r29 |
|
20b8: cf 91 pop r28 |
|
20ba: 1f 91 pop r17 |
|
20bc: 0f 91 pop r16 |
|
20be: ff 90 pop r15 |
|
20c0: ef 90 pop r14 |
|
20c2: df 90 pop r13 |
|
20c4: cf 90 pop r12 |
|
20c6: bf 90 pop r11 |
|
20c8: af 90 pop r10 |
|
20ca: 9f 90 pop r9 |
|
20cc: 8f 90 pop r8 |
|
20ce: 7f 90 pop r7 |
|
20d0: 6f 90 pop r6 |
|
20d2: 5f 90 pop r5 |
|
20d4: 4f 90 pop r4 |
|
20d6: 3f 90 pop r3 |
|
20d8: 2f 90 pop r2 |
|
20da: 08 95 ret |
|
|
|
000020dc <_ZN3PID10InitializeEv>: |
|
/* Initialize()**************************************************************** |
|
* does all the things that need to happen to ensure a bumpless transfer |
|
* from manual to automatic mode. |
|
******************************************************************************/ |
|
void PID::Initialize() |
|
{ |
|
20dc: 8f 92 push r8 |
|
20de: 9f 92 push r9 |
|
20e0: af 92 push r10 |
|
20e2: bf 92 push r11 |
|
20e4: cf 92 push r12 |
|
20e6: df 92 push r13 |
|
20e8: ef 92 push r14 |
|
20ea: ff 92 push r15 |
|
20ec: cf 93 push r28 |
|
20ee: df 93 push r29 |
|
20f0: ec 01 movw r28, r24 |
|
ITerm = *myOutput; |
|
20f2: ec 8d ldd r30, Y+28 ; 0x1c |
|
20f4: fd 8d ldd r31, Y+29 ; 0x1d |
|
20f6: c0 80 ld r12, Z |
|
20f8: d1 80 ldd r13, Z+1 ; 0x01 |
|
20fa: e2 80 ldd r14, Z+2 ; 0x02 |
|
20fc: f3 80 ldd r15, Z+3 ; 0x03 |
|
20fe: cc a2 std Y+36, r12 ; 0x24 |
|
2100: dd a2 std Y+37, r13 ; 0x25 |
|
2102: ee a2 std Y+38, r14 ; 0x26 |
|
2104: ff a2 std Y+39, r15 ; 0x27 |
|
lastInput = *myInput; |
|
2106: ea 8d ldd r30, Y+26 ; 0x1a |
|
2108: fb 8d ldd r31, Y+27 ; 0x1b |
|
210a: 80 81 ld r24, Z |
|
210c: 91 81 ldd r25, Z+1 ; 0x01 |
|
210e: a2 81 ldd r26, Z+2 ; 0x02 |
|
2110: b3 81 ldd r27, Z+3 ; 0x03 |
|
2112: 88 a7 std Y+40, r24 ; 0x28 |
|
2114: 99 a7 std Y+41, r25 ; 0x29 |
|
2116: aa a7 std Y+42, r26 ; 0x2a |
|
2118: bb a7 std Y+43, r27 ; 0x2b |
|
if(ITerm > outMax) ITerm = outMax; |
|
211a: 8c a8 ldd r8, Y+52 ; 0x34 |
|
211c: 9d a8 ldd r9, Y+53 ; 0x35 |
|
211e: ae a8 ldd r10, Y+54 ; 0x36 |
|
2120: bf a8 ldd r11, Y+55 ; 0x37 |
|
2122: a5 01 movw r20, r10 |
|
2124: 94 01 movw r18, r8 |
|
2126: c7 01 movw r24, r14 |
|
2128: b6 01 movw r22, r12 |
|
212a: 0e 94 56 2e call 0x5cac ; 0x5cac <__gesf2> |
|
212e: 18 16 cp r1, r24 |
|
2130: 64 f0 brlt .+24 ; 0x214a <_ZN3PID10InitializeEv+0x6e> |
|
else if(ITerm < outMin) ITerm = outMin; |
|
2132: 88 a8 ldd r8, Y+48 ; 0x30 |
|
2134: 99 a8 ldd r9, Y+49 ; 0x31 |
|
2136: aa a8 ldd r10, Y+50 ; 0x32 |
|
2138: bb a8 ldd r11, Y+51 ; 0x33 |
|
213a: a5 01 movw r20, r10 |
|
213c: 94 01 movw r18, r8 |
|
213e: c7 01 movw r24, r14 |
|
2140: b6 01 movw r22, r12 |
|
2142: 0e 94 07 2d call 0x5a0e ; 0x5a0e <__cmpsf2> |
|
2146: 87 ff sbrs r24, 7 |
|
2148: 04 c0 rjmp .+8 ; 0x2152 <_ZN3PID10InitializeEv+0x76> |
|
214a: 8c a2 std Y+36, r8 ; 0x24 |
|
214c: 9d a2 std Y+37, r9 ; 0x25 |
|
214e: ae a2 std Y+38, r10 ; 0x26 |
|
2150: bf a2 std Y+39, r11 ; 0x27 |
|
} |
|
2152: df 91 pop r29 |
|
2154: cf 91 pop r28 |
|
2156: ff 90 pop r15 |
|
2158: ef 90 pop r14 |
|
215a: df 90 pop r13 |
|
215c: cf 90 pop r12 |
|
215e: bf 90 pop r11 |
|
2160: af 90 pop r10 |
|
2162: 9f 90 pop r9 |
|
2164: 8f 90 pop r8 |
|
2166: 08 95 ret |
|
|
|
00002168 <_ZN3PID7SetModeEi>: |
|
* Allows the controller Mode to be set to manual (0) or Automatic (non-zero) |
|
* when the transition from manual to auto occurs, the controller is |
|
* automatically initialized |
|
******************************************************************************/ |
|
void PID::SetMode(int Mode) |
|
{ |
|
2168: 1f 93 push r17 |
|
216a: cf 93 push r28 |
|
216c: df 93 push r29 |
|
216e: ec 01 movw r28, r24 |
|
bool newAuto = (Mode == AUTOMATIC); |
|
2170: 11 e0 ldi r17, 0x01 ; 1 |
|
2172: 61 30 cpi r22, 0x01 ; 1 |
|
2174: 71 05 cpc r23, r1 |
|
2176: 09 f0 breq .+2 ; 0x217a <_ZN3PID7SetModeEi+0x12> |
|
2178: 10 e0 ldi r17, 0x00 ; 0 |
|
if(newAuto == !inAuto) |
|
217a: 88 ad ldd r24, Y+56 ; 0x38 |
|
217c: 91 e0 ldi r25, 0x01 ; 1 |
|
217e: 89 27 eor r24, r25 |
|
2180: 18 13 cpse r17, r24 |
|
2182: 03 c0 rjmp .+6 ; 0x218a <_ZN3PID7SetModeEi+0x22> |
|
{ /*we just went from manual to auto*/ |
|
PID::Initialize(); |
|
2184: ce 01 movw r24, r28 |
|
2186: 0e 94 6e 10 call 0x20dc ; 0x20dc <_ZN3PID10InitializeEv> |
|
} |
|
inAuto = newAuto; |
|
218a: 18 af std Y+56, r17 ; 0x38 |
|
} |
|
218c: df 91 pop r29 |
|
218e: cf 91 pop r28 |
|
2190: 1f 91 pop r17 |
|
2192: 08 95 ret |
|
|
|
00002194 <_ZN3PID22SetControllerDirectionEi>: |
|
* to +Input) or a REVERSE acting process(+Output leads to -Input.) we need to |
|
* know which one, because otherwise we may increase the output when we should |
|
* be decreasing. This is called from the constructor. |
|
******************************************************************************/ |
|
void PID::SetControllerDirection(int Direction) |
|
{ |
|
2194: 0f 93 push r16 |
|
2196: 1f 93 push r17 |
|
2198: cf 93 push r28 |
|
219a: df 93 push r29 |
|
219c: ec 01 movw r28, r24 |
|
219e: 8b 01 movw r16, r22 |
|
if(inAuto && Direction !=controllerDirection) |
|
21a0: 88 ad ldd r24, Y+56 ; 0x38 |
|
21a2: 88 23 and r24, r24 |
|
21a4: 61 f1 breq .+88 ; 0x21fe <_ZN3PID22SetControllerDirectionEi+0x6a> |
|
21a6: 88 8d ldd r24, Y+24 ; 0x18 |
|
21a8: 99 8d ldd r25, Y+25 ; 0x19 |
|
21aa: 68 17 cp r22, r24 |
|
21ac: 79 07 cpc r23, r25 |
|
21ae: 39 f1 breq .+78 ; 0x21fe <_ZN3PID22SetControllerDirectionEi+0x6a> |
|
{ |
|
kp = (0 - kp); |
|
21b0: 2c 85 ldd r18, Y+12 ; 0x0c |
|
21b2: 3d 85 ldd r19, Y+13 ; 0x0d |
|
21b4: 4e 85 ldd r20, Y+14 ; 0x0e |
|
21b6: 5f 85 ldd r21, Y+15 ; 0x0f |
|
21b8: 60 e0 ldi r22, 0x00 ; 0 |
|
21ba: 70 e0 ldi r23, 0x00 ; 0 |
|
21bc: cb 01 movw r24, r22 |
|
21be: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
21c2: 6c 87 std Y+12, r22 ; 0x0c |
|
21c4: 7d 87 std Y+13, r23 ; 0x0d |
|
21c6: 8e 87 std Y+14, r24 ; 0x0e |
|
21c8: 9f 87 std Y+15, r25 ; 0x0f |
|
ki = (0 - ki); |
|
21ca: 28 89 ldd r18, Y+16 ; 0x10 |
|
21cc: 39 89 ldd r19, Y+17 ; 0x11 |
|
21ce: 4a 89 ldd r20, Y+18 ; 0x12 |
|
21d0: 5b 89 ldd r21, Y+19 ; 0x13 |
|
21d2: 60 e0 ldi r22, 0x00 ; 0 |
|
21d4: 70 e0 ldi r23, 0x00 ; 0 |
|
21d6: cb 01 movw r24, r22 |
|
21d8: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
21dc: 68 8b std Y+16, r22 ; 0x10 |
|
21de: 79 8b std Y+17, r23 ; 0x11 |
|
21e0: 8a 8b std Y+18, r24 ; 0x12 |
|
21e2: 9b 8b std Y+19, r25 ; 0x13 |
|
kd = (0 - kd); |
|
21e4: 2c 89 ldd r18, Y+20 ; 0x14 |
|
21e6: 3d 89 ldd r19, Y+21 ; 0x15 |
|
21e8: 4e 89 ldd r20, Y+22 ; 0x16 |
|
21ea: 5f 89 ldd r21, Y+23 ; 0x17 |
|
21ec: 60 e0 ldi r22, 0x00 ; 0 |
|
21ee: 70 e0 ldi r23, 0x00 ; 0 |
|
21f0: cb 01 movw r24, r22 |
|
21f2: 0e 94 a2 2c call 0x5944 ; 0x5944 <__subsf3> |
|
21f6: 6c 8b std Y+20, r22 ; 0x14 |
|
21f8: 7d 8b std Y+21, r23 ; 0x15 |
|
21fa: 8e 8b std Y+22, r24 ; 0x16 |
|
21fc: 9f 8b std Y+23, r25 ; 0x17 |
|
} |
|
controllerDirection = Direction; |
|
21fe: 19 8f std Y+25, r17 ; 0x19 |
|
2200: 08 8f std Y+24, r16 ; 0x18 |
|
} |
|
2202: df 91 pop r29 |
|
2204: cf 91 pop r28 |
|
2206: 1f 91 pop r17 |
|
2208: 0f 91 pop r16 |
|
220a: 08 95 ret |
|
|
|
0000220c <_ZN3PIDC1EPdS0_S0_dddi>: |
|
|
|
/*Constructor (...)********************************************************* |
|
* The parameters specified here are those for for which we can't set up |
|
* reliable defaults, so we need to have the user set them. |
|
***************************************************************************/ |
|
PID::PID(double* Input, double* Output, double* Setpoint, |
|
220c: 4f 92 push r4 |
|
220e: 5f 92 push r5 |
|
2210: 6f 92 push r6 |
|
2212: 7f 92 push r7 |
|
2214: 8f 92 push r8 |
|
2216: 9f 92 push r9 |
|
2218: af 92 push r10 |
|
221a: bf 92 push r11 |
|
221c: cf 92 push r12 |
|
221e: df 92 push r13 |
|
2220: ef 92 push r14 |
|
2222: ff 92 push r15 |
|
2224: 0f 93 push r16 |
|
2226: 1f 93 push r17 |
|
2228: cf 93 push r28 |
|
222a: df 93 push r29 |
|
222c: 00 d0 rcall .+0 ; 0x222e <_ZN3PIDC1EPdS0_S0_dddi+0x22> |
|
222e: 00 d0 rcall .+0 ; 0x2230 <_ZN3PIDC1EPdS0_S0_dddi+0x24> |
|
2230: cd b7 in r28, 0x3d ; 61 |
|
2232: de b7 in r29, 0x3e ; 62 |
|
2234: 4c 01 movw r8, r24 |
|
2236: 27 01 movw r4, r14 |
|
2238: 38 01 movw r6, r16 |
|
223a: a9 82 std Y+1, r10 ; 0x01 |
|
223c: ba 82 std Y+2, r11 ; 0x02 |
|
223e: cb 82 std Y+3, r12 ; 0x03 |
|
2240: dc 82 std Y+4, r13 ; 0x04 |
|
double Kp, double Ki, double Kd, int ControllerDirection) |
|
{ |
|
|
|
myOutput = Output; |
|
2242: fc 01 movw r30, r24 |
|
2244: 55 8f std Z+29, r21 ; 0x1d |
|
2246: 44 8f std Z+28, r20 ; 0x1c |
|
myInput = Input; |
|
2248: 73 8f std Z+27, r23 ; 0x1b |
|
224a: 62 8f std Z+26, r22 ; 0x1a |
|
mySetpoint = Setpoint; |
|
224c: 37 8f std Z+31, r19 ; 0x1f |
|
224e: 26 8f std Z+30, r18 ; 0x1e |
|
inAuto = false; |
|
2250: 10 ae std Z+56, r1 ; 0x38 |
|
* here. |
|
**************************************************************************/ |
|
void PID::SetOutputLimits(double Min, double Max) |
|
{ |
|
if(Min >= Max) return; |
|
outMin = Min; |
|
2252: 10 aa std Z+48, r1 ; 0x30 |
|
2254: 11 aa std Z+49, r1 ; 0x31 |
|
2256: 12 aa std Z+50, r1 ; 0x32 |
|
2258: 13 aa std Z+51, r1 ; 0x33 |
|
outMax = Max; |
|
225a: 80 e0 ldi r24, 0x00 ; 0 |
|
225c: 90 e0 ldi r25, 0x00 ; 0 |
|
225e: af e7 ldi r26, 0x7F ; 127 |
|
2260: b3 e4 ldi r27, 0x43 ; 67 |
|
2262: 84 ab std Z+52, r24 ; 0x34 |
|
2264: 95 ab std Z+53, r25 ; 0x35 |
|
2266: a6 ab std Z+54, r26 ; 0x36 |
|
2268: b7 ab std Z+55, r27 ; 0x37 |
|
inAuto = false; |
|
|
|
PID::SetOutputLimits(0, 255); //default output limit corresponds to |
|
//the arduino pwm limits |
|
|
|
SampleTime = 100; //default Controller Sample Time is 0.1 seconds |
|
226a: 84 e6 ldi r24, 0x64 ; 100 |
|
226c: 90 e0 ldi r25, 0x00 ; 0 |
|
226e: a0 e0 ldi r26, 0x00 ; 0 |
|
2270: b0 e0 ldi r27, 0x00 ; 0 |
|
2272: 84 a7 std Z+44, r24 ; 0x2c |
|
2274: 95 a7 std Z+45, r25 ; 0x2d |
|
2276: a6 a7 std Z+46, r26 ; 0x2e |
|
2278: b7 a7 std Z+47, r27 ; 0x2f |
|
|
|
PID::SetControllerDirection(ControllerDirection); |
|
227a: 6b 8d ldd r22, Y+27 ; 0x1b |
|
227c: 7c 8d ldd r23, Y+28 ; 0x1c |
|
227e: c4 01 movw r24, r8 |
|
2280: 0e 94 ca 10 call 0x2194 ; 0x2194 <_ZN3PID22SetControllerDirectionEi> |
|
PID::SetTunings(Kp, Ki, Kd); |
|
2284: cf 88 ldd r12, Y+23 ; 0x17 |
|
2286: d8 8c ldd r13, Y+24 ; 0x18 |
|
2288: e9 8c ldd r14, Y+25 ; 0x19 |
|
228a: fa 8c ldd r15, Y+26 ; 0x1a |
|
228c: 09 81 ldd r16, Y+1 ; 0x01 |
|
228e: 1a 81 ldd r17, Y+2 ; 0x02 |
|
2290: 2b 81 ldd r18, Y+3 ; 0x03 |
|
2292: 3c 81 ldd r19, Y+4 ; 0x04 |
|
2294: b3 01 movw r22, r6 |
|
2296: a2 01 movw r20, r4 |
|
2298: c4 01 movw r24, r8 |
|
229a: 0e 94 ed 0e call 0x1dda ; 0x1dda <_ZN3PID10SetTuningsEddd> |
|
|
|
lastTime = millis()-SampleTime; |
|
229e: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
22a2: f4 01 movw r30, r8 |
|
22a4: 44 a4 ldd r4, Z+44 ; 0x2c |
|
22a6: 55 a4 ldd r5, Z+45 ; 0x2d |
|
22a8: 66 a4 ldd r6, Z+46 ; 0x2e |
|
22aa: 77 a4 ldd r7, Z+47 ; 0x2f |
|
22ac: 64 19 sub r22, r4 |
|
22ae: 75 09 sbc r23, r5 |
|
22b0: 86 09 sbc r24, r6 |
|
22b2: 97 09 sbc r25, r7 |
|
22b4: 60 a3 std Z+32, r22 ; 0x20 |
|
22b6: 71 a3 std Z+33, r23 ; 0x21 |
|
22b8: 82 a3 std Z+34, r24 ; 0x22 |
|
22ba: 93 a3 std Z+35, r25 ; 0x23 |
|
} |
|
22bc: 0f 90 pop r0 |
|
22be: 0f 90 pop r0 |
|
22c0: 0f 90 pop r0 |
|
22c2: 0f 90 pop r0 |
|
22c4: df 91 pop r29 |
|
22c6: cf 91 pop r28 |
|
22c8: 1f 91 pop r17 |
|
22ca: 0f 91 pop r16 |
|
22cc: ff 90 pop r15 |
|
22ce: ef 90 pop r14 |
|
22d0: df 90 pop r13 |
|
22d2: cf 90 pop r12 |
|
22d4: bf 90 pop r11 |
|
22d6: af 90 pop r10 |
|
22d8: 9f 90 pop r9 |
|
22da: 8f 90 pop r8 |
|
22dc: 7f 90 pop r7 |
|
22de: 6f 90 pop r6 |
|
22e0: 5f 90 pop r5 |
|
22e2: 4f 90 pop r4 |
|
22e4: 08 95 ret |
|
|
|
000022e6 <osc_match_bracket>: |
|
} |
|
return 0; |
|
} |
|
|
|
static int osc_match_bracket(const char *pattern, const char *address) |
|
{ |
|
22e6: cf 93 push r28 |
|
22e8: df 93 push r29 |
|
22ea: fc 01 movw r30, r24 |
|
pattern++; |
|
int val = 1; |
|
if(*pattern == '!'){ |
|
22ec: 81 81 ldd r24, Z+1 ; 0x01 |
|
22ee: 81 32 cpi r24, 0x21 ; 33 |
|
22f0: 21 f0 breq .+8 ; 0x22fa <osc_match_bracket+0x14> |
|
return 0; |
|
} |
|
|
|
static int osc_match_bracket(const char *pattern, const char *address) |
|
{ |
|
pattern++; |
|
22f2: 31 96 adiw r30, 0x01 ; 1 |
|
int val = 1; |
|
22f4: 21 e0 ldi r18, 0x01 ; 1 |
|
22f6: 30 e0 ldi r19, 0x00 ; 0 |
|
22f8: 03 c0 rjmp .+6 ; 0x2300 <osc_match_bracket+0x1a> |
|
if(*pattern == '!'){ |
|
pattern++; |
|
22fa: 32 96 adiw r30, 0x02 ; 2 |
|
val = 0; |
|
22fc: 20 e0 ldi r18, 0x00 ; 0 |
|
22fe: 30 e0 ldi r19, 0x00 ; 0 |
|
2300: c9 01 movw r24, r18 |
|
2302: 41 e0 ldi r20, 0x01 ; 1 |
|
2304: 84 27 eor r24, r20 |
|
} |
|
int matched = !val; |
|
while(*pattern != ']' && *pattern != '\0'){ |
|
2306: 40 81 ld r20, Z |
|
2308: 4d 35 cpi r20, 0x5D ; 93 |
|
230a: 99 f0 breq .+38 ; 0x2332 <osc_match_bracket+0x4c> |
|
230c: 44 23 and r20, r20 |
|
230e: 89 f0 breq .+34 ; 0x2332 <osc_match_bracket+0x4c> |
|
// the character we're on now is the beginning of a range |
|
if(*(pattern + 1) == '-'){ |
|
2310: a1 81 ldd r26, Z+1 ; 0x01 |
|
2312: eb 01 movw r28, r22 |
|
2314: 58 81 ld r21, Y |
|
2316: ad 32 cpi r26, 0x2D ; 45 |
|
2318: 39 f4 brne .+14 ; 0x2328 <osc_match_bracket+0x42> |
|
if(*address >= *pattern && *address <= *(pattern + 2)){ |
|
231a: 54 17 cp r21, r20 |
|
231c: 1c f0 brlt .+6 ; 0x2324 <osc_match_bracket+0x3e> |
|
231e: 42 81 ldd r20, Z+2 ; 0x02 |
|
2320: 45 17 cp r20, r21 |
|
2322: 34 f4 brge .+12 ; 0x2330 <osc_match_bracket+0x4a> |
|
matched = val; |
|
break; |
|
}else{ |
|
pattern += 3; |
|
2324: 33 96 adiw r30, 0x03 ; 3 |
|
2326: ef cf rjmp .-34 ; 0x2306 <osc_match_bracket+0x20> |
|
} |
|
}else{ |
|
// just test the character |
|
if(*pattern == *address){ |
|
2328: 45 17 cp r20, r21 |
|
232a: 11 f0 breq .+4 ; 0x2330 <osc_match_bracket+0x4a> |
|
matched = val; |
|
break; |
|
} |
|
pattern++; |
|
232c: 31 96 adiw r30, 0x01 ; 1 |
|
232e: eb cf rjmp .-42 ; 0x2306 <osc_match_bracket+0x20> |
|
pattern += 3; |
|
} |
|
}else{ |
|
// just test the character |
|
if(*pattern == *address){ |
|
matched = val; |
|
2330: c9 01 movw r24, r18 |
|
} |
|
pattern++; |
|
} |
|
} |
|
return matched; |
|
} |
|
2332: df 91 pop r29 |
|
2334: cf 91 pop r28 |
|
2336: 08 95 ret |
|
|
|
00002338 <osc_match_curly_brace>: |
|
|
|
static int osc_match_curly_brace(const char *pattern, const char *address) |
|
{ |
|
2338: ef 92 push r14 |
|
233a: ff 92 push r15 |
|
233c: 0f 93 push r16 |
|
233e: 1f 93 push r17 |
|
2340: cf 93 push r28 |
|
2342: df 93 push r29 |
|
2344: 7b 01 movw r14, r22 |
|
} |
|
int n = ptr - pattern; |
|
if(!strncmp(pattern, address, n)){ |
|
return n; |
|
}else{ |
|
ptr++; |
|
2346: 01 96 adiw r24, 0x01 ; 1 |
|
|
|
static int osc_match_curly_brace(const char *pattern, const char *address) |
|
{ |
|
pattern++; |
|
const char *ptr = pattern; |
|
while(*ptr != '}' && *ptr != '\0' && *ptr != '/'){ |
|
2348: fc 01 movw r30, r24 |
|
234a: 20 81 ld r18, Z |
|
234c: 2d 37 cpi r18, 0x7D ; 125 |
|
234e: e1 f0 breq .+56 ; 0x2388 <osc_match_curly_brace+0x50> |
|
2350: 22 23 and r18, r18 |
|
2352: d1 f0 breq .+52 ; 0x2388 <osc_match_curly_brace+0x50> |
|
2354: 2f 32 cpi r18, 0x2F ; 47 |
|
2356: c1 f0 breq .+48 ; 0x2388 <osc_match_curly_brace+0x50> |
|
2358: 8f 01 movw r16, r30 |
|
while(*ptr != '}' && *ptr != '\0' && *ptr != '/' && *ptr != ','){ |
|
235a: 21 91 ld r18, Z+ |
|
235c: 2d 37 cpi r18, 0x7D ; 125 |
|
235e: 59 f4 brne .+22 ; 0x2376 <osc_match_curly_brace+0x3e> |
|
ptr++; |
|
} |
|
int n = ptr - pattern; |
|
2360: e8 01 movw r28, r16 |
|
2362: c8 1b sub r28, r24 |
|
2364: d9 0b sbc r29, r25 |
|
if(!strncmp(pattern, address, n)){ |
|
2366: ae 01 movw r20, r28 |
|
2368: b7 01 movw r22, r14 |
|
236a: 0e 94 8c 31 call 0x6318 ; 0x6318 <strncmp> |
|
236e: 89 2b or r24, r25 |
|
2370: 49 f0 breq .+18 ; 0x2384 <osc_match_curly_brace+0x4c> |
|
return n; |
|
}else{ |
|
ptr++; |
|
2372: c8 01 movw r24, r16 |
|
2374: e8 cf rjmp .-48 ; 0x2346 <osc_match_curly_brace+0xe> |
|
static int osc_match_curly_brace(const char *pattern, const char *address) |
|
{ |
|
pattern++; |
|
const char *ptr = pattern; |
|
while(*ptr != '}' && *ptr != '\0' && *ptr != '/'){ |
|
while(*ptr != '}' && *ptr != '\0' && *ptr != '/' && *ptr != ','){ |
|
2376: 22 23 and r18, r18 |
|
2378: 99 f3 breq .-26 ; 0x2360 <osc_match_curly_brace+0x28> |
|
237a: 2f 32 cpi r18, 0x2F ; 47 |
|
237c: 89 f3 breq .-30 ; 0x2360 <osc_match_curly_brace+0x28> |
|
237e: 2c 32 cpi r18, 0x2C ; 44 |
|
2380: 59 f7 brne .-42 ; 0x2358 <osc_match_curly_brace+0x20> |
|
2382: ee cf rjmp .-36 ; 0x2360 <osc_match_curly_brace+0x28> |
|
ptr++; |
|
} |
|
int n = ptr - pattern; |
|
2384: ce 01 movw r24, r28 |
|
2386: 02 c0 rjmp .+4 ; 0x238c <osc_match_curly_brace+0x54> |
|
}else{ |
|
ptr++; |
|
pattern = ptr; |
|
} |
|
} |
|
return 0; |
|
2388: 80 e0 ldi r24, 0x00 ; 0 |
|
238a: 90 e0 ldi r25, 0x00 ; 0 |
|
238c: df 91 pop r29 |
|
238e: cf 91 pop r28 |
|
2390: 1f 91 pop r17 |
|
2392: 0f 91 pop r16 |
|
2394: ff 90 pop r15 |
|
2396: ef 90 pop r14 |
|
2398: 08 95 ret |
|
|
|
0000239a <osc_match_single_char>: |
|
} |
|
#endif |
|
|
|
static int osc_match_single_char(const char *pattern, const char *address) |
|
{ |
|
switch(*pattern){ |
|
239a: fc 01 movw r30, r24 |
|
239c: 20 81 ld r18, Z |
|
239e: 2d 35 cpi r18, 0x5D ; 93 |
|
23a0: 59 f0 breq .+22 ; 0x23b8 <osc_match_single_char+0x1e> |
|
23a2: 2c f4 brge .+10 ; 0x23ae <osc_match_single_char+0x14> |
|
23a4: 2f 33 cpi r18, 0x3F ; 63 |
|
23a6: 01 f1 breq .+64 ; 0x23e8 <osc_match_single_char+0x4e> |
|
23a8: 2b 35 cpi r18, 0x5B ; 91 |
|
23aa: 61 f0 breq .+24 ; 0x23c4 <osc_match_single_char+0x2a> |
|
23ac: 15 c0 rjmp .+42 ; 0x23d8 <osc_match_single_char+0x3e> |
|
23ae: 2b 37 cpi r18, 0x7B ; 123 |
|
23b0: 89 f0 breq .+34 ; 0x23d4 <osc_match_single_char+0x3a> |
|
23b2: 2d 37 cpi r18, 0x7D ; 125 |
|
23b4: 49 f0 breq .+18 ; 0x23c8 <osc_match_single_char+0x2e> |
|
23b6: 10 c0 rjmp .+32 ; 0x23d8 <osc_match_single_char+0x3e> |
|
case '[': |
|
return osc_match_bracket(pattern, address); |
|
case ']': |
|
while(*pattern != '['){ |
|
23b8: fc 01 movw r30, r24 |
|
23ba: 20 81 ld r18, Z |
|
23bc: 2b 35 cpi r18, 0x5B ; 91 |
|
23be: 11 f0 breq .+4 ; 0x23c4 <osc_match_single_char+0x2a> |
|
pattern--; |
|
23c0: 01 97 sbiw r24, 0x01 ; 1 |
|
23c2: fa cf rjmp .-12 ; 0x23b8 <osc_match_single_char+0x1e> |
|
|
|
static int osc_match_single_char(const char *pattern, const char *address) |
|
{ |
|
switch(*pattern){ |
|
case '[': |
|
return osc_match_bracket(pattern, address); |
|
23c4: 0c 94 73 11 jmp 0x22e6 ; 0x22e6 <osc_match_bracket> |
|
} |
|
return osc_match_bracket(pattern, address); |
|
case '{': |
|
return osc_match_curly_brace(pattern, address); |
|
case '}': |
|
while(*pattern != '{'){ |
|
23c8: fc 01 movw r30, r24 |
|
23ca: 20 81 ld r18, Z |
|
23cc: 2b 37 cpi r18, 0x7B ; 123 |
|
23ce: 11 f0 breq .+4 ; 0x23d4 <osc_match_single_char+0x3a> |
|
pattern--; |
|
23d0: 01 97 sbiw r24, 0x01 ; 1 |
|
23d2: fa cf rjmp .-12 ; 0x23c8 <osc_match_single_char+0x2e> |
|
} |
|
return osc_match_curly_brace(pattern, address); |
|
23d4: 0c 94 9c 11 jmp 0x2338 ; 0x2338 <osc_match_curly_brace> |
|
case '?': |
|
return 1; |
|
default: |
|
if(*pattern == *address){ |
|
23d8: 81 e0 ldi r24, 0x01 ; 1 |
|
23da: 90 e0 ldi r25, 0x00 ; 0 |
|
23dc: fb 01 movw r30, r22 |
|
23de: 30 81 ld r19, Z |
|
23e0: 23 17 cp r18, r19 |
|
23e2: 21 f0 breq .+8 ; 0x23ec <osc_match_single_char+0x52> |
|
23e4: 80 e0 ldi r24, 0x00 ; 0 |
|
23e6: 08 95 ret |
|
while(*pattern != '{'){ |
|
pattern--; |
|
} |
|
return osc_match_curly_brace(pattern, address); |
|
case '?': |
|
return 1; |
|
23e8: 81 e0 ldi r24, 0x01 ; 1 |
|
23ea: 90 e0 ldi r25, 0x00 ; 0 |
|
}else{ |
|
return 0; |
|
} |
|
} |
|
return 0; |
|
} |
|
23ec: 08 95 ret |
|
|
|
000023ee <osc_match_star_r>: |
|
return 1; |
|
} |
|
|
|
#if (OSC_MATCH_ENABLE_NSTARS == 1) |
|
static int osc_match_star_r(const char *pattern, const char *address) |
|
{ |
|
23ee: ef 92 push r14 |
|
23f0: ff 92 push r15 |
|
23f2: 0f 93 push r16 |
|
23f4: 1f 93 push r17 |
|
23f6: cf 93 push r28 |
|
23f8: df 93 push r29 |
|
23fa: 1f 92 push r1 |
|
23fc: cd b7 in r28, 0x3d ; 61 |
|
23fe: de b7 in r29, 0x3e ; 62 |
|
2400: 7c 01 movw r14, r24 |
|
2402: 8b 01 movw r16, r22 |
|
2404: b8 01 movw r22, r16 |
|
if(*address == '/' || *address == '\0'){ |
|
2406: f8 01 movw r30, r16 |
|
2408: 81 91 ld r24, Z+ |
|
240a: 8f 01 movw r16, r30 |
|
240c: 8f 32 cpi r24, 0x2F ; 47 |
|
240e: 29 f4 brne .+10 ; 0x241a <osc_match_star_r+0x2c> |
|
if(*pattern == '/' || *pattern == '\0' || (*pattern == '*' && ((*(pattern + 1) == '/') || *(pattern + 1) == '\0'))){ |
|
2410: f7 01 movw r30, r14 |
|
2412: 80 81 ld r24, Z |
|
2414: 8f 32 cpi r24, 0x2F ; 47 |
|
2416: 21 f4 brne .+8 ; 0x2420 <osc_match_star_r+0x32> |
|
2418: 31 c0 rjmp .+98 ; 0x247c <osc_match_star_r+0x8e> |
|
} |
|
|
|
#if (OSC_MATCH_ENABLE_NSTARS == 1) |
|
static int osc_match_star_r(const char *pattern, const char *address) |
|
{ |
|
if(*address == '/' || *address == '\0'){ |
|
241a: 81 11 cpse r24, r1 |
|
241c: 0f c0 rjmp .+30 ; 0x243c <osc_match_star_r+0x4e> |
|
241e: f8 cf rjmp .-16 ; 0x2410 <osc_match_star_r+0x22> |
|
if(*pattern == '/' || *pattern == '\0' || (*pattern == '*' && ((*(pattern + 1) == '/') || *(pattern + 1) == '\0'))){ |
|
2420: 88 23 and r24, r24 |
|
2422: 61 f1 breq .+88 ; 0x247c <osc_match_star_r+0x8e> |
|
2424: 8a 32 cpi r24, 0x2A ; 42 |
|
2426: 19 f0 breq .+6 ; 0x242e <osc_match_star_r+0x40> |
|
return 1; |
|
}else{ |
|
return 0; |
|
2428: 80 e0 ldi r24, 0x00 ; 0 |
|
242a: 90 e0 ldi r25, 0x00 ; 0 |
|
242c: 29 c0 rjmp .+82 ; 0x2480 <osc_match_star_r+0x92> |
|
|
|
#if (OSC_MATCH_ENABLE_NSTARS == 1) |
|
static int osc_match_star_r(const char *pattern, const char *address) |
|
{ |
|
if(*address == '/' || *address == '\0'){ |
|
if(*pattern == '/' || *pattern == '\0' || (*pattern == '*' && ((*(pattern + 1) == '/') || *(pattern + 1) == '\0'))){ |
|
242e: f7 01 movw r30, r14 |
|
2430: 81 81 ldd r24, Z+1 ; 0x01 |
|
2432: 8f 32 cpi r24, 0x2F ; 47 |
|
2434: 19 f1 breq .+70 ; 0x247c <osc_match_star_r+0x8e> |
|
2436: 88 23 and r24, r24 |
|
2438: 09 f1 breq .+66 ; 0x247c <osc_match_star_r+0x8e> |
|
243a: f6 cf rjmp .-20 ; 0x2428 <osc_match_star_r+0x3a> |
|
return 1; |
|
}else{ |
|
return 0; |
|
} |
|
} |
|
if(*pattern == '*'){ |
|
243c: f7 01 movw r30, r14 |
|
243e: 20 81 ld r18, Z |
|
if(osc_match_star_r(pattern + 1, address)){ |
|
2440: c7 01 movw r24, r14 |
|
return 1; |
|
}else{ |
|
return 0; |
|
} |
|
} |
|
if(*pattern == '*'){ |
|
2442: 2a 32 cpi r18, 0x2A ; 42 |
|
2444: 31 f4 brne .+12 ; 0x2452 <osc_match_star_r+0x64> |
|
if(osc_match_star_r(pattern + 1, address)){ |
|
2446: 01 96 adiw r24, 0x01 ; 1 |
|
2448: 0e 94 f7 11 call 0x23ee ; 0x23ee <osc_match_star_r> |
|
244c: 89 2b or r24, r25 |
|
244e: d1 f2 breq .-76 ; 0x2404 <osc_match_star_r+0x16> |
|
2450: 15 c0 rjmp .+42 ; 0x247c <osc_match_star_r+0x8e> |
|
return 1; |
|
}else{ |
|
return osc_match_star_r(pattern, address + 1); |
|
} |
|
}else{ |
|
if(!osc_match_single_char(pattern, address)){ |
|
2452: 29 83 std Y+1, r18 ; 0x01 |
|
2454: 0e 94 cd 11 call 0x239a ; 0x239a <osc_match_single_char> |
|
2458: 29 81 ldd r18, Y+1 ; 0x01 |
|
245a: 00 97 sbiw r24, 0x00 ; 0 |
|
245c: 89 f0 breq .+34 ; 0x2480 <osc_match_star_r+0x92> |
|
return 0; |
|
} |
|
if(*pattern == '[' || *pattern == '{'){ |
|
245e: 2f 7d andi r18, 0xDF ; 223 |
|
2460: 2b 35 cpi r18, 0x5B ; 91 |
|
2462: 41 f4 brne .+16 ; 0x2474 <osc_match_star_r+0x86> |
|
2464: c7 01 movw r24, r14 |
|
2466: 7c 01 movw r14, r24 |
|
2468: 01 96 adiw r24, 0x01 ; 1 |
|
while(*pattern != ']' && *pattern != '}'){ |
|
246a: f7 01 movw r30, r14 |
|
246c: 20 81 ld r18, Z |
|
246e: 2f 7d andi r18, 0xDF ; 223 |
|
2470: 2d 35 cpi r18, 0x5D ; 93 |
|
2472: c9 f7 brne .-14 ; 0x2466 <osc_match_star_r+0x78> |
|
pattern++; |
|
} |
|
} |
|
return osc_match_star_r(pattern + 1, address + 1); |
|
2474: ff ef ldi r31, 0xFF ; 255 |
|
2476: ef 1a sub r14, r31 |
|
2478: ff 0a sbc r15, r31 |
|
247a: c4 cf rjmp .-120 ; 0x2404 <osc_match_star_r+0x16> |
|
#if (OSC_MATCH_ENABLE_NSTARS == 1) |
|
static int osc_match_star_r(const char *pattern, const char *address) |
|
{ |
|
if(*address == '/' || *address == '\0'){ |
|
if(*pattern == '/' || *pattern == '\0' || (*pattern == '*' && ((*(pattern + 1) == '/') || *(pattern + 1) == '\0'))){ |
|
return 1; |
|
247c: 81 e0 ldi r24, 0x01 ; 1 |
|
247e: 90 e0 ldi r25, 0x00 ; 0 |
|
pattern++; |
|
} |
|
} |
|
return osc_match_star_r(pattern + 1, address + 1); |
|
} |
|
} |
|
2480: 0f 90 pop r0 |
|
2482: df 91 pop r29 |
|
2484: cf 91 pop r28 |
|
2486: 1f 91 pop r17 |
|
2488: 0f 91 pop r16 |
|
248a: ff 90 pop r15 |
|
248c: ef 90 pop r14 |
|
248e: 08 95 ret |
|
|
|
00002490 <osc_match>: |
|
static int osc_match_single_char(const char *pattern, const char *address); |
|
static int osc_match_bracket(const char *pattern, const char *address); |
|
static int osc_match_curly_brace(const char *pattern, const char *address); |
|
|
|
int osc_match(const char *pattern, const char *address, int *pattern_offset, int *address_offset) |
|
{ |
|
2490: 2f 92 push r2 |
|
2492: 3f 92 push r3 |
|
2494: 4f 92 push r4 |
|
2496: 5f 92 push r5 |
|
2498: 6f 92 push r6 |
|
249a: 7f 92 push r7 |
|
249c: 8f 92 push r8 |
|
249e: 9f 92 push r9 |
|
24a0: af 92 push r10 |
|
24a2: bf 92 push r11 |
|
24a4: cf 92 push r12 |
|
24a6: df 92 push r13 |
|
24a8: ef 92 push r14 |
|
24aa: ff 92 push r15 |
|
24ac: 0f 93 push r16 |
|
24ae: 1f 93 push r17 |
|
24b0: cf 93 push r28 |
|
24b2: df 93 push r29 |
|
24b4: 00 d0 rcall .+0 ; 0x24b6 <osc_match+0x26> |
|
24b6: 00 d0 rcall .+0 ; 0x24b8 <osc_match+0x28> |
|
24b8: 1f 92 push r1 |
|
24ba: cd b7 in r28, 0x3d ; 61 |
|
24bc: de b7 in r29, 0x3e ; 62 |
|
24be: 6c 01 movw r12, r24 |
|
24c0: 5b 01 movw r10, r22 |
|
24c2: 1a 01 movw r2, r20 |
|
24c4: 29 01 movw r4, r18 |
|
if(!strcmp(pattern, address)){ |
|
24c6: 0e 94 7c 31 call 0x62f8 ; 0x62f8 <strcmp> |
|
24ca: 89 2b or r24, r25 |
|
24cc: b9 f4 brne .+46 ; 0x24fc <osc_match+0x6c> |
|
*pattern_offset = strlen(pattern); |
|
24ce: f6 01 movw r30, r12 |
|
24d0: 01 90 ld r0, Z+ |
|
24d2: 00 20 and r0, r0 |
|
24d4: e9 f7 brne .-6 ; 0x24d0 <osc_match+0x40> |
|
24d6: 31 97 sbiw r30, 0x01 ; 1 |
|
24d8: ec 19 sub r30, r12 |
|
24da: fd 09 sbc r31, r13 |
|
24dc: d1 01 movw r26, r2 |
|
24de: ed 93 st X+, r30 |
|
24e0: fc 93 st X, r31 |
|
*address_offset = strlen(address); |
|
24e2: f5 01 movw r30, r10 |
|
24e4: 01 90 ld r0, Z+ |
|
24e6: 00 20 and r0, r0 |
|
24e8: e9 f7 brne .-6 ; 0x24e4 <osc_match+0x54> |
|
24ea: 31 97 sbiw r30, 0x01 ; 1 |
|
24ec: ea 19 sub r30, r10 |
|
24ee: fb 09 sbc r31, r11 |
|
24f0: d2 01 movw r26, r4 |
|
24f2: ed 93 st X+, r30 |
|
24f4: fc 93 st X, r31 |
|
return OSC_MATCH_ADDRESS_COMPLETE | OSC_MATCH_PATTERN_COMPLETE; |
|
24f6: 83 e0 ldi r24, 0x03 ; 3 |
|
24f8: 90 e0 ldi r25, 0x00 ; 0 |
|
24fa: 2b c1 rjmp .+598 ; 0x2752 <osc_match+0x2c2> |
|
const char *address_start; |
|
|
|
pattern_start = pattern; |
|
address_start = address; |
|
|
|
*pattern_offset = 0; |
|
24fc: f1 01 movw r30, r2 |
|
24fe: 11 82 std Z+1, r1 ; 0x01 |
|
2500: 10 82 st Z, r1 |
|
*address_offset = 0; |
|
2502: d2 01 movw r26, r4 |
|
2504: 1d 92 st X+, r1 |
|
2506: 1c 92 st X, r1 |
|
|
|
while(*address != '\0' && *pattern != '\0'){ |
|
2508: 85 01 movw r16, r10 |
|
250a: dd 82 std Y+5, r13 ; 0x05 |
|
250c: cc 82 std Y+4, r12 ; 0x04 |
|
250e: d8 01 movw r26, r16 |
|
2510: 8c 91 ld r24, X |
|
2512: 81 11 cpse r24, r1 |
|
2514: 1c c0 rjmp .+56 ; 0x254e <osc_match+0xbe> |
|
address++; |
|
} |
|
} |
|
} |
|
|
|
*pattern_offset = pattern - pattern_start; |
|
2516: 8c 81 ldd r24, Y+4 ; 0x04 |
|
2518: 9d 81 ldd r25, Y+5 ; 0x05 |
|
251a: 8c 19 sub r24, r12 |
|
251c: 9d 09 sbc r25, r13 |
|
251e: f1 01 movw r30, r2 |
|
2520: 91 83 std Z+1, r25 ; 0x01 |
|
2522: 80 83 st Z, r24 |
|
*address_offset = address - address_start; |
|
2524: c8 01 movw r24, r16 |
|
2526: 8a 19 sub r24, r10 |
|
2528: 9b 09 sbc r25, r11 |
|
252a: d2 01 movw r26, r4 |
|
252c: 8d 93 st X+, r24 |
|
252e: 9c 93 st X, r25 |
|
|
|
int r = 0; |
|
|
|
if(*address == '\0') { |
|
2530: 31 e0 ldi r19, 0x01 ; 1 |
|
2532: 20 e0 ldi r18, 0x00 ; 0 |
|
2534: f8 01 movw r30, r16 |
|
2536: 80 81 ld r24, Z |
|
2538: 81 11 cpse r24, r1 |
|
253a: 30 e0 ldi r19, 0x00 ; 0 |
|
} |
|
|
|
*pattern_offset = pattern - pattern_start; |
|
*address_offset = address - address_start; |
|
|
|
int r = 0; |
|
253c: 83 2f mov r24, r19 |
|
253e: 92 2f mov r25, r18 |
|
|
|
if(*address == '\0') { |
|
r |= OSC_MATCH_ADDRESS_COMPLETE; |
|
} |
|
|
|
if(*pattern == '\0') { |
|
2540: ac 81 ldd r26, Y+4 ; 0x04 |
|
2542: bd 81 ldd r27, Y+5 ; 0x05 |
|
2544: 2c 91 ld r18, X |
|
2546: 21 11 cpse r18, r1 |
|
2548: 04 c1 rjmp .+520 ; 0x2752 <osc_match+0x2c2> |
|
r |= OSC_MATCH_PATTERN_COMPLETE; |
|
254a: 82 60 ori r24, 0x02 ; 2 |
|
254c: 02 c1 rjmp .+516 ; 0x2752 <osc_match+0x2c2> |
|
address_start = address; |
|
|
|
*pattern_offset = 0; |
|
*address_offset = 0; |
|
|
|
while(*address != '\0' && *pattern != '\0'){ |
|
254e: ec 81 ldd r30, Y+4 ; 0x04 |
|
2550: fd 81 ldd r31, Y+5 ; 0x05 |
|
2552: 20 81 ld r18, Z |
|
2554: 22 23 and r18, r18 |
|
2556: f9 f2 breq .-66 ; 0x2516 <osc_match+0x86> |
|
if(*pattern == '*'){ |
|
2558: 2a 32 cpi r18, 0x2A ; 42 |
|
255a: 09 f0 breq .+2 ; 0x255e <osc_match+0xce> |
|
255c: b6 c0 rjmp .+364 ; 0x26ca <osc_match+0x23a> |
|
255e: f8 01 movw r30, r16 |
|
2560: 4f 01 movw r8, r30 |
|
{ |
|
const char *address_start = address; |
|
const char *pattern_start = pattern; |
|
int num_stars = 0; |
|
if(*address == '\0') { return 0; } |
|
while(*address != '/' && *address != '\0'){ |
|
2562: 81 91 ld r24, Z+ |
|
2564: 8f 32 cpi r24, 0x2F ; 47 |
|
2566: 29 f4 brne .+10 ; 0x2572 <osc_match+0xe2> |
|
|
|
*pattern_offset = 0; |
|
*address_offset = 0; |
|
|
|
while(*address != '\0' && *pattern != '\0'){ |
|
if(*pattern == '*'){ |
|
2568: ec 81 ldd r30, Y+4 ; 0x04 |
|
256a: fd 81 ldd r31, Y+5 ; 0x05 |
|
256c: 80 e0 ldi r24, 0x00 ; 0 |
|
256e: 90 e0 ldi r25, 0x00 ; 0 |
|
2570: 08 c0 rjmp .+16 ; 0x2582 <osc_match+0xf2> |
|
{ |
|
const char *address_start = address; |
|
const char *pattern_start = pattern; |
|
int num_stars = 0; |
|
if(*address == '\0') { return 0; } |
|
while(*address != '/' && *address != '\0'){ |
|
2572: 81 11 cpse r24, r1 |
|
2574: f5 cf rjmp .-22 ; 0x2560 <osc_match+0xd0> |
|
2576: f8 cf rjmp .-16 ; 0x2568 <osc_match+0xd8> |
|
address++; |
|
} |
|
while(*pattern != '/' && *pattern != '\0'){ |
|
2578: 22 23 and r18, r18 |
|
257a: 39 f0 breq .+14 ; 0x258a <osc_match+0xfa> |
|
if(*pattern == '*'){ |
|
257c: 2a 32 cpi r18, 0x2A ; 42 |
|
257e: 09 f4 brne .+2 ; 0x2582 <osc_match+0xf2> |
|
num_stars++; |
|
2580: 01 96 adiw r24, 0x01 ; 1 |
|
2582: 7f 01 movw r14, r30 |
|
int num_stars = 0; |
|
if(*address == '\0') { return 0; } |
|
while(*address != '/' && *address != '\0'){ |
|
address++; |
|
} |
|
while(*pattern != '/' && *pattern != '\0'){ |
|
2584: 21 91 ld r18, Z+ |
|
2586: 2f 32 cpi r18, 0x2F ; 47 |
|
2588: b9 f7 brne .-18 ; 0x2578 <osc_match+0xe8> |
|
if(*pattern == '*'){ |
|
num_stars++; |
|
} |
|
pattern++; |
|
} |
|
pattern--; |
|
258a: b1 e0 ldi r27, 0x01 ; 1 |
|
258c: eb 1a sub r14, r27 |
|
258e: f1 08 sbc r15, r1 |
|
address--; |
|
2590: e1 e0 ldi r30, 0x01 ; 1 |
|
2592: 8e 1a sub r8, r30 |
|
2594: 91 08 sbc r9, r1 |
|
switch(num_stars){ |
|
2596: 81 30 cpi r24, 0x01 ; 1 |
|
2598: 91 05 cpc r25, r1 |
|
259a: a9 f0 breq .+42 ; 0x25c6 <osc_match+0x136> |
|
259c: 02 97 sbiw r24, 0x02 ; 2 |
|
259e: 99 f1 breq .+102 ; 0x2606 <osc_match+0x176> |
|
25a0: 78 c0 rjmp .+240 ; 0x2692 <osc_match+0x202> |
|
case 1: |
|
{ |
|
const char *pp = pattern, *aa = address; |
|
while(*pp != '*'){ |
|
if(!(osc_match_single_char(pp, aa))){ |
|
25a2: b4 01 movw r22, r8 |
|
25a4: c7 01 movw r24, r14 |
|
25a6: 2b 83 std Y+3, r18 ; 0x03 |
|
25a8: 0e 94 cd 11 call 0x239a ; 0x239a <osc_match_single_char> |
|
25ac: 2b 81 ldd r18, Y+3 ; 0x03 |
|
25ae: 00 97 sbiw r24, 0x00 ; 0 |
|
25b0: 09 f4 brne .+2 ; 0x25b4 <osc_match+0x124> |
|
25b2: cf c0 rjmp .+414 ; 0x2752 <osc_match+0x2c2> |
|
return 0; |
|
} |
|
if(*pp == ']' || *pp == '}'){ |
|
25b4: 2f 7d andi r18, 0xDF ; 223 |
|
25b6: 2d 35 cpi r18, 0x5D ; 93 |
|
25b8: 59 f0 breq .+22 ; 0x25d0 <osc_match+0x140> |
|
while(*pp != '[' && *pp != '{'){ |
|
pp--; |
|
} |
|
} |
|
pp--; |
|
25ba: b1 e0 ldi r27, 0x01 ; 1 |
|
25bc: eb 1a sub r14, r27 |
|
25be: f1 08 sbc r15, r1 |
|
aa--; |
|
25c0: e1 e0 ldi r30, 0x01 ; 1 |
|
25c2: 8e 1a sub r8, r30 |
|
25c4: 91 08 sbc r9, r1 |
|
address--; |
|
switch(num_stars){ |
|
case 1: |
|
{ |
|
const char *pp = pattern, *aa = address; |
|
while(*pp != '*'){ |
|
25c6: d7 01 movw r26, r14 |
|
25c8: 2c 91 ld r18, X |
|
25ca: 2a 32 cpi r18, 0x2A ; 42 |
|
25cc: 51 f7 brne .-44 ; 0x25a2 <osc_match+0x112> |
|
25ce: 69 c0 rjmp .+210 ; 0x26a2 <osc_match+0x212> |
|
if(!(osc_match_single_char(pp, aa))){ |
|
return 0; |
|
} |
|
if(*pp == ']' || *pp == '}'){ |
|
while(*pp != '[' && *pp != '{'){ |
|
25d0: d7 01 movw r26, r14 |
|
25d2: 8c 91 ld r24, X |
|
25d4: 8f 7d andi r24, 0xDF ; 223 |
|
25d6: 8b 35 cpi r24, 0x5B ; 91 |
|
25d8: 81 f3 breq .-32 ; 0x25ba <osc_match+0x12a> |
|
pp--; |
|
25da: f1 e0 ldi r31, 0x01 ; 1 |
|
25dc: ef 1a sub r14, r31 |
|
25de: f1 08 sbc r15, r1 |
|
25e0: f7 cf rjmp .-18 ; 0x25d0 <osc_match+0x140> |
|
case 2: |
|
#if (OSC_MATCH_ENABLE_2STARS == 1) |
|
{ |
|
const char *pp = pattern, *aa = address; |
|
while(*pp != '*'){ |
|
if(!(osc_match_single_char(pp, aa))){ |
|
25e2: b4 01 movw r22, r8 |
|
25e4: c7 01 movw r24, r14 |
|
25e6: 2b 83 std Y+3, r18 ; 0x03 |
|
25e8: 0e 94 cd 11 call 0x239a ; 0x239a <osc_match_single_char> |
|
25ec: 2b 81 ldd r18, Y+3 ; 0x03 |
|
25ee: 00 97 sbiw r24, 0x00 ; 0 |
|
25f0: 09 f4 brne .+2 ; 0x25f4 <osc_match+0x164> |
|
25f2: af c0 rjmp .+350 ; 0x2752 <osc_match+0x2c2> |
|
return 0; |
|
} |
|
if(*pp == ']' || *pp == '}'){ |
|
25f4: 2f 7d andi r18, 0xDF ; 223 |
|
25f6: 2d 35 cpi r18, 0x5D ; 93 |
|
25f8: 59 f0 breq .+22 ; 0x2610 <osc_match+0x180> |
|
while(*pp != '[' && *pp != '{'){ |
|
pp--; |
|
} |
|
} |
|
pp--; |
|
25fa: f1 e0 ldi r31, 0x01 ; 1 |
|
25fc: ef 1a sub r14, r31 |
|
25fe: f1 08 sbc r15, r1 |
|
aa--; |
|
2600: 21 e0 ldi r18, 0x01 ; 1 |
|
2602: 82 1a sub r8, r18 |
|
2604: 91 08 sbc r9, r1 |
|
break; |
|
case 2: |
|
#if (OSC_MATCH_ENABLE_2STARS == 1) |
|
{ |
|
const char *pp = pattern, *aa = address; |
|
while(*pp != '*'){ |
|
2606: d7 01 movw r26, r14 |
|
2608: 2c 91 ld r18, X |
|
260a: 2a 32 cpi r18, 0x2A ; 42 |
|
260c: 51 f7 brne .-44 ; 0x25e2 <osc_match+0x152> |
|
260e: 09 c0 rjmp .+18 ; 0x2622 <osc_match+0x192> |
|
if(!(osc_match_single_char(pp, aa))){ |
|
return 0; |
|
} |
|
if(*pp == ']' || *pp == '}'){ |
|
while(*pp != '[' && *pp != '{'){ |
|
2610: f7 01 movw r30, r14 |
|
2612: 80 81 ld r24, Z |
|
2614: 8f 7d andi r24, 0xDF ; 223 |
|
2616: 8b 35 cpi r24, 0x5B ; 91 |
|
2618: 81 f3 breq .-32 ; 0x25fa <osc_match+0x16a> |
|
pp--; |
|
261a: b1 e0 ldi r27, 0x01 ; 1 |
|
261c: eb 1a sub r14, r27 |
|
261e: f1 08 sbc r15, r1 |
|
2620: f7 cf rjmp .-18 ; 0x2610 <osc_match+0x180> |
|
pp--; |
|
aa--; |
|
} |
|
aa++; // we want to start one character forward to allow the star to match nothing |
|
const char *star2 = pp; |
|
const char *test = aa; |
|
2622: bf ef ldi r27, 0xFF ; 255 |
|
2624: 8b 1a sub r8, r27 |
|
2626: 9b 0a sbc r9, r27 |
|
int i = 0; |
|
while(test > address_start){ |
|
pp = star2 - 1; |
|
2628: 97 01 movw r18, r14 |
|
262a: 21 50 subi r18, 0x01 ; 1 |
|
262c: 31 09 sbc r19, r1 |
|
} |
|
aa++; // we want to start one character forward to allow the star to match nothing |
|
const char *star2 = pp; |
|
const char *test = aa; |
|
int i = 0; |
|
while(test > address_start){ |
|
262e: 08 15 cp r16, r8 |
|
2630: 19 05 cpc r17, r9 |
|
2632: 08 f0 brcs .+2 ; 0x2636 <osc_match+0x1a6> |
|
2634: 8c c0 rjmp .+280 ; 0x274e <osc_match+0x2be> |
|
pp = star2 - 1; |
|
2636: 79 01 movw r14, r18 |
|
aa = test - 1; |
|
2638: e1 e0 ldi r30, 0x01 ; 1 |
|
263a: 8e 1a sub r8, r30 |
|
263c: 91 08 sbc r9, r1 |
|
263e: 34 01 movw r6, r8 |
|
i++; |
|
while(*pp != '*'){ |
|
2640: d7 01 movw r26, r14 |
|
2642: 4c 91 ld r20, X |
|
2644: 4a 32 cpi r20, 0x2A ; 42 |
|
2646: 61 f0 breq .+24 ; 0x2660 <osc_match+0x1d0> |
|
if(!osc_match_single_char(pp, aa)){ |
|
2648: b3 01 movw r22, r6 |
|
264a: c7 01 movw r24, r14 |
|
264c: 2b 83 std Y+3, r18 ; 0x03 |
|
264e: 3a 83 std Y+2, r19 ; 0x02 |
|
2650: 49 83 std Y+1, r20 ; 0x01 |
|
2652: 0e 94 cd 11 call 0x239a ; 0x239a <osc_match_single_char> |
|
2656: 2b 81 ldd r18, Y+3 ; 0x03 |
|
2658: 3a 81 ldd r19, Y+2 ; 0x02 |
|
265a: 49 81 ldd r20, Y+1 ; 0x01 |
|
265c: 89 2b or r24, r25 |
|
265e: 31 f4 brne .+12 ; 0x266c <osc_match+0x1dc> |
|
} |
|
} |
|
pp--; |
|
aa--; |
|
} |
|
if(pp == pattern_start){ |
|
2660: 8c 81 ldd r24, Y+4 ; 0x04 |
|
2662: 9d 81 ldd r25, Y+5 ; 0x05 |
|
2664: e8 16 cp r14, r24 |
|
2666: f9 06 cpc r15, r25 |
|
2668: 11 f7 brne .-60 ; 0x262e <osc_match+0x19e> |
|
266a: 1b c0 rjmp .+54 ; 0x26a2 <osc_match+0x212> |
|
i++; |
|
while(*pp != '*'){ |
|
if(!osc_match_single_char(pp, aa)){ |
|
break; |
|
} |
|
if(*pp == ']' || *pp == '}'){ |
|
266c: 4f 7d andi r20, 0xDF ; 223 |
|
266e: 4d 35 cpi r20, 0x5D ; 93 |
|
2670: 49 f4 brne .+18 ; 0x2684 <osc_match+0x1f4> |
|
while(*pp != '[' && *pp != '{'){ |
|
2672: d7 01 movw r26, r14 |
|
2674: 8c 91 ld r24, X |
|
2676: 8f 7d andi r24, 0xDF ; 223 |
|
2678: 8b 35 cpi r24, 0x5B ; 91 |
|
267a: 21 f0 breq .+8 ; 0x2684 <osc_match+0x1f4> |
|
pp--; |
|
267c: 91 e0 ldi r25, 0x01 ; 1 |
|
267e: e9 1a sub r14, r25 |
|
2680: f1 08 sbc r15, r1 |
|
2682: f7 cf rjmp .-18 ; 0x2672 <osc_match+0x1e2> |
|
} |
|
} |
|
pp--; |
|
2684: b1 e0 ldi r27, 0x01 ; 1 |
|
2686: eb 1a sub r14, r27 |
|
2688: f1 08 sbc r15, r1 |
|
aa--; |
|
268a: e1 e0 ldi r30, 0x01 ; 1 |
|
268c: 6e 1a sub r6, r30 |
|
268e: 71 08 sbc r7, r1 |
|
2690: d7 cf rjmp .-82 ; 0x2640 <osc_match+0x1b0> |
|
#else |
|
return 0; |
|
#endif |
|
default: |
|
#if (OSC_MATCH_ENABLE_NSTARS == 1) |
|
return osc_match_star_r(pattern_start, address_start); |
|
2692: b8 01 movw r22, r16 |
|
2694: 8c 81 ldd r24, Y+4 ; 0x04 |
|
2696: 9d 81 ldd r25, Y+5 ; 0x05 |
|
2698: 0e 94 f7 11 call 0x23ee ; 0x23ee <osc_match_star_r> |
|
*pattern_offset = 0; |
|
*address_offset = 0; |
|
|
|
while(*address != '\0' && *pattern != '\0'){ |
|
if(*pattern == '*'){ |
|
if(!osc_match_star(pattern, address)){ |
|
269c: 00 97 sbiw r24, 0x00 ; 0 |
|
269e: 09 f4 brne .+2 ; 0x26a2 <osc_match+0x212> |
|
26a0: 58 c0 rjmp .+176 ; 0x2752 <osc_match+0x2c2> |
|
const char *star2 = pp; |
|
const char *test = aa; |
|
int i = 0; |
|
while(test > address_start){ |
|
pp = star2 - 1; |
|
aa = test - 1; |
|
26a2: ec 81 ldd r30, Y+4 ; 0x04 |
|
26a4: fd 81 ldd r31, Y+5 ; 0x05 |
|
26a6: fd 83 std Y+5, r31 ; 0x05 |
|
26a8: ec 83 std Y+4, r30 ; 0x04 |
|
while(*address != '\0' && *pattern != '\0'){ |
|
if(*pattern == '*'){ |
|
if(!osc_match_star(pattern, address)){ |
|
return 0; |
|
} |
|
while(*pattern != '/' && *pattern != '\0'){ |
|
26aa: 81 91 ld r24, Z+ |
|
26ac: 8f 32 cpi r24, 0x2F ; 47 |
|
26ae: 11 f4 brne .+4 ; 0x26b4 <osc_match+0x224> |
|
const char *star2 = pp; |
|
const char *test = aa; |
|
int i = 0; |
|
while(test > address_start){ |
|
pp = star2 - 1; |
|
aa = test - 1; |
|
26b0: f8 01 movw r30, r16 |
|
26b2: 06 c0 rjmp .+12 ; 0x26c0 <osc_match+0x230> |
|
while(*address != '\0' && *pattern != '\0'){ |
|
if(*pattern == '*'){ |
|
if(!osc_match_star(pattern, address)){ |
|
return 0; |
|
} |
|
while(*pattern != '/' && *pattern != '\0'){ |
|
26b4: 81 11 cpse r24, r1 |
|
26b6: f7 cf rjmp .-18 ; 0x26a6 <osc_match+0x216> |
|
26b8: fb cf rjmp .-10 ; 0x26b0 <osc_match+0x220> |
|
pattern++; |
|
} |
|
while(*address != '/' && *address != '\0'){ |
|
26ba: 88 23 and r24, r24 |
|
26bc: 09 f4 brne .+2 ; 0x26c0 <osc_match+0x230> |
|
26be: 27 cf rjmp .-434 ; 0x250e <osc_match+0x7e> |
|
26c0: 8f 01 movw r16, r30 |
|
26c2: 81 91 ld r24, Z+ |
|
26c4: 8f 32 cpi r24, 0x2F ; 47 |
|
26c6: c9 f7 brne .-14 ; 0x26ba <osc_match+0x22a> |
|
26c8: 22 cf rjmp .-444 ; 0x250e <osc_match+0x7e> |
|
address++; |
|
} |
|
}else if(*address == '*'){ |
|
26ca: 8a 32 cpi r24, 0x2A ; 42 |
|
26cc: a1 f4 brne .+40 ; 0x26f6 <osc_match+0x266> |
|
26ce: ec 81 ldd r30, Y+4 ; 0x04 |
|
26d0: fd 81 ldd r31, Y+5 ; 0x05 |
|
26d2: fd 83 std Y+5, r31 ; 0x05 |
|
26d4: ec 83 std Y+4, r30 ; 0x04 |
|
while(*pattern != '/' && *pattern != '\0'){ |
|
26d6: 81 91 ld r24, Z+ |
|
26d8: 8f 32 cpi r24, 0x2F ; 47 |
|
26da: 11 f4 brne .+4 ; 0x26e0 <osc_match+0x250> |
|
26dc: f8 01 movw r30, r16 |
|
26de: 06 c0 rjmp .+12 ; 0x26ec <osc_match+0x25c> |
|
26e0: 81 11 cpse r24, r1 |
|
26e2: f7 cf rjmp .-18 ; 0x26d2 <osc_match+0x242> |
|
26e4: fb cf rjmp .-10 ; 0x26dc <osc_match+0x24c> |
|
pattern++; |
|
} |
|
while(*address != '/' && *address != '\0'){ |
|
26e6: 88 23 and r24, r24 |
|
26e8: 09 f4 brne .+2 ; 0x26ec <osc_match+0x25c> |
|
26ea: 11 cf rjmp .-478 ; 0x250e <osc_match+0x7e> |
|
26ec: 8f 01 movw r16, r30 |
|
26ee: 81 91 ld r24, Z+ |
|
26f0: 8f 32 cpi r24, 0x2F ; 47 |
|
26f2: c9 f7 brne .-14 ; 0x26e6 <osc_match+0x256> |
|
26f4: 0c cf rjmp .-488 ; 0x250e <osc_match+0x7e> |
|
address++; |
|
} |
|
}else{ |
|
int n = 0; |
|
if(!(n = osc_match_single_char(pattern, address))){ |
|
26f6: b8 01 movw r22, r16 |
|
26f8: 8c 81 ldd r24, Y+4 ; 0x04 |
|
26fa: 9d 81 ldd r25, Y+5 ; 0x05 |
|
26fc: 2b 83 std Y+3, r18 ; 0x03 |
|
26fe: 0e 94 cd 11 call 0x239a ; 0x239a <osc_match_single_char> |
|
2702: 2b 81 ldd r18, Y+3 ; 0x03 |
|
2704: 00 97 sbiw r24, 0x00 ; 0 |
|
2706: 19 f1 breq .+70 ; 0x274e <osc_match+0x2be> |
|
return 0; |
|
} |
|
if(*pattern == '['){ |
|
2708: 2b 35 cpi r18, 0x5B ; 91 |
|
270a: 49 f4 brne .+18 ; 0x271e <osc_match+0x28e> |
|
270c: 8c 81 ldd r24, Y+4 ; 0x04 |
|
270e: 9d 81 ldd r25, Y+5 ; 0x05 |
|
2710: fc 01 movw r30, r24 |
|
2712: 01 96 adiw r24, 0x01 ; 1 |
|
while(*pattern != ']'){ |
|
2714: 20 81 ld r18, Z |
|
2716: 2d 35 cpi r18, 0x5D ; 93 |
|
2718: d9 f7 brne .-10 ; 0x2710 <osc_match+0x280> |
|
pattern++; |
|
} |
|
pattern++; |
|
271a: 9c 01 movw r18, r24 |
|
271c: 13 c0 rjmp .+38 ; 0x2744 <osc_match+0x2b4> |
|
address++; |
|
}else if(*pattern == '{'){ |
|
271e: 2b 37 cpi r18, 0x7B ; 123 |
|
2720: 69 f4 brne .+26 ; 0x273c <osc_match+0x2ac> |
|
2722: 2c 81 ldd r18, Y+4 ; 0x04 |
|
2724: 3d 81 ldd r19, Y+5 ; 0x05 |
|
2726: f9 01 movw r30, r18 |
|
2728: 2f 5f subi r18, 0xFF ; 255 |
|
272a: 3f 4f sbci r19, 0xFF ; 255 |
|
while(*pattern != '}'){ |
|
272c: 40 81 ld r20, Z |
|
272e: 4d 37 cpi r20, 0x7D ; 125 |
|
2730: d1 f7 brne .-12 ; 0x2726 <osc_match+0x296> |
|
pattern++; |
|
} |
|
pattern++; |
|
2732: 3d 83 std Y+5, r19 ; 0x05 |
|
2734: 2c 83 std Y+4, r18 ; 0x04 |
|
address += n; |
|
2736: 08 0f add r16, r24 |
|
2738: 19 1f adc r17, r25 |
|
273a: e9 ce rjmp .-558 ; 0x250e <osc_match+0x7e> |
|
}else{ |
|
pattern++; |
|
273c: 2c 81 ldd r18, Y+4 ; 0x04 |
|
273e: 3d 81 ldd r19, Y+5 ; 0x05 |
|
2740: 2f 5f subi r18, 0xFF ; 255 |
|
2742: 3f 4f sbci r19, 0xFF ; 255 |
|
2744: 3d 83 std Y+5, r19 ; 0x05 |
|
2746: 2c 83 std Y+4, r18 ; 0x04 |
|
address++; |
|
2748: 0f 5f subi r16, 0xFF ; 255 |
|
274a: 1f 4f sbci r17, 0xFF ; 255 |
|
274c: e0 ce rjmp .-576 ; 0x250e <osc_match+0x7e> |
|
*address_offset = 0; |
|
|
|
while(*address != '\0' && *pattern != '\0'){ |
|
if(*pattern == '*'){ |
|
if(!osc_match_star(pattern, address)){ |
|
return 0; |
|
274e: 80 e0 ldi r24, 0x00 ; 0 |
|
2750: 90 e0 ldi r25, 0x00 ; 0 |
|
if(*pattern == '\0') { |
|
r |= OSC_MATCH_PATTERN_COMPLETE; |
|
} |
|
|
|
return r; |
|
} |
|
2752: 0f 90 pop r0 |
|
2754: 0f 90 pop r0 |
|
2756: 0f 90 pop r0 |
|
2758: 0f 90 pop r0 |
|
275a: 0f 90 pop r0 |
|
275c: df 91 pop r29 |
|
275e: cf 91 pop r28 |
|
2760: 1f 91 pop r17 |
|
2762: 0f 91 pop r16 |
|
2764: ff 90 pop r15 |
|
2766: ef 90 pop r14 |
|
2768: df 90 pop r13 |
|
276a: cf 90 pop r12 |
|
276c: bf 90 pop r11 |
|
276e: af 90 pop r10 |
|
2770: 9f 90 pop r9 |
|
2772: 8f 90 pop r8 |
|
2774: 7f 90 pop r7 |
|
2776: 6f 90 pop r6 |
|
2778: 5f 90 pop r5 |
|
277a: 4f 90 pop r4 |
|
277c: 3f 90 pop r3 |
|
277e: 2f 90 pop r2 |
|
2780: 08 95 ret |
|
|
|
00002782 <_ZN7OSCDataC1EPKc>: |
|
overloaded methods for each of the types which will |
|
set the type flag, the size (in bytes), and the data |
|
=============================================================================*/ |
|
|
|
|
|
OSCData::OSCData(const char * s){ |
|
2782: ef 92 push r14 |
|
2784: ff 92 push r15 |
|
2786: 0f 93 push r16 |
|
2788: 1f 93 push r17 |
|
278a: cf 93 push r28 |
|
278c: df 93 push r29 |
|
278e: 00 d0 rcall .+0 ; 0x2790 <_ZN7OSCDataC1EPKc+0xe> |
|
2790: cd b7 in r28, 0x3d ; 61 |
|
2792: de b7 in r29, 0x3e ; 62 |
|
2794: 7c 01 movw r14, r24 |
|
error = OSC_OK; |
|
2796: fc 01 movw r30, r24 |
|
2798: 11 82 std Z+1, r1 ; 0x01 |
|
279a: 10 82 st Z, r1 |
|
type = 's'; |
|
279c: 83 e7 ldi r24, 0x73 ; 115 |
|
279e: 90 e0 ldi r25, 0x00 ; 0 |
|
27a0: 95 83 std Z+5, r25 ; 0x05 |
|
27a2: 84 83 std Z+4, r24 ; 0x04 |
|
bytes = (strlen(s) + 1); |
|
27a4: fb 01 movw r30, r22 |
|
27a6: 01 90 ld r0, Z+ |
|
27a8: 00 20 and r0, r0 |
|
27aa: e9 f7 brne .-6 ; 0x27a6 <_ZN7OSCDataC1EPKc+0x24> |
|
27ac: cf 01 movw r24, r30 |
|
27ae: 86 1b sub r24, r22 |
|
27b0: 97 0b sbc r25, r23 |
|
27b2: f7 01 movw r30, r14 |
|
27b4: 93 83 std Z+3, r25 ; 0x03 |
|
27b6: 82 83 std Z+2, r24 ; 0x02 |
|
//own the data |
|
char * mem = (char *) malloc(bytes); |
|
27b8: 69 83 std Y+1, r22 ; 0x01 |
|
27ba: 7a 83 std Y+2, r23 ; 0x02 |
|
27bc: 0e 94 82 2f call 0x5f04 ; 0x5f04 <malloc> |
|
27c0: 8c 01 movw r16, r24 |
|
if (mem == NULL){ |
|
27c2: 69 81 ldd r22, Y+1 ; 0x01 |
|
27c4: 7a 81 ldd r23, Y+2 ; 0x02 |
|
27c6: 00 97 sbiw r24, 0x00 ; 0 |
|
27c8: 31 f4 brne .+12 ; 0x27d6 <_ZN7OSCDataC1EPKc+0x54> |
|
error = ALLOCFAILED; |
|
27ca: 83 e0 ldi r24, 0x03 ; 3 |
|
27cc: 90 e0 ldi r25, 0x00 ; 0 |
|
27ce: f7 01 movw r30, r14 |
|
27d0: 91 83 std Z+1, r25 ; 0x01 |
|
27d2: 80 83 st Z, r24 |
|
27d4: 05 c0 rjmp .+10 ; 0x27e0 <_ZN7OSCDataC1EPKc+0x5e> |
|
} else { |
|
strcpy(mem, s); |
|
27d6: 0e 94 85 31 call 0x630a ; 0x630a <strcpy> |
|
data.s = mem; |
|
27da: f7 01 movw r30, r14 |
|
27dc: 17 83 std Z+7, r17 ; 0x07 |
|
27de: 06 83 std Z+6, r16 ; 0x06 |
|
} |
|
} |
|
27e0: 0f 90 pop r0 |
|
27e2: 0f 90 pop r0 |
|
27e4: df 91 pop r29 |
|
27e6: cf 91 pop r28 |
|
27e8: 1f 91 pop r17 |
|
27ea: 0f 91 pop r16 |
|
27ec: ff 90 pop r15 |
|
27ee: ef 90 pop r14 |
|
27f0: 08 95 ret |
|
|
|
000027f2 <_ZN7OSCDataC1Ei>: |
|
|
|
OSCData::OSCData(int i){ |
|
27f2: fc 01 movw r30, r24 |
|
error = OSC_OK; |
|
27f4: 11 82 std Z+1, r1 ; 0x01 |
|
27f6: 10 82 st Z, r1 |
|
type = 'i'; |
|
27f8: 89 e6 ldi r24, 0x69 ; 105 |
|
27fa: 90 e0 ldi r25, 0x00 ; 0 |
|
27fc: 95 83 std Z+5, r25 ; 0x05 |
|
27fe: 84 83 std Z+4, r24 ; 0x04 |
|
//cast it to an int32 |
|
bytes = sizeof(int32_t); |
|
2800: 84 e0 ldi r24, 0x04 ; 4 |
|
2802: 90 e0 ldi r25, 0x00 ; 0 |
|
2804: 93 83 std Z+3, r25 ; 0x03 |
|
2806: 82 83 std Z+2, r24 ; 0x02 |
|
int32_t i32 = (int32_t) i; |
|
2808: ab 01 movw r20, r22 |
|
280a: 66 27 eor r22, r22 |
|
280c: 57 fd sbrc r21, 7 |
|
280e: 60 95 com r22 |
|
2810: 76 2f mov r23, r22 |
|
2812: 46 83 std Z+6, r20 ; 0x06 |
|
2814: 57 83 std Z+7, r21 ; 0x07 |
|
2816: 60 87 std Z+8, r22 ; 0x08 |
|
2818: 71 87 std Z+9, r23 ; 0x09 |
|
281a: 08 95 ret |
|
|
|
0000281c <_ZN7OSCDataC1El>: |
|
data.i = i32; |
|
} |
|
|
|
OSCData::OSCData(int32_t i){ |
|
281c: fc 01 movw r30, r24 |
|
error = OSC_OK; |
|
281e: 11 82 std Z+1, r1 ; 0x01 |
|
2820: 10 82 st Z, r1 |
|
type = 'i'; |
|
2822: 89 e6 ldi r24, 0x69 ; 105 |
|
2824: 90 e0 ldi r25, 0x00 ; 0 |
|
2826: 95 83 std Z+5, r25 ; 0x05 |
|
2828: 84 83 std Z+4, r24 ; 0x04 |
|
bytes = sizeof(i); |
|
282a: 84 e0 ldi r24, 0x04 ; 4 |
|
282c: 90 e0 ldi r25, 0x00 ; 0 |
|
282e: 93 83 std Z+3, r25 ; 0x03 |
|
2830: 82 83 std Z+2, r24 ; 0x02 |
|
data.i = i; |
|
2832: 46 83 std Z+6, r20 ; 0x06 |
|
2834: 57 83 std Z+7, r21 ; 0x07 |
|
2836: 60 87 std Z+8, r22 ; 0x08 |
|
2838: 71 87 std Z+9, r23 ; 0x09 |
|
283a: 08 95 ret |
|
|
|
0000283c <_ZN7OSCDataC1Ef>: |
|
} |
|
|
|
|
|
OSCData::OSCData(float f){ |
|
283c: fc 01 movw r30, r24 |
|
error = OSC_OK; |
|
283e: 11 82 std Z+1, r1 ; 0x01 |
|
2840: 10 82 st Z, r1 |
|
type = 'f'; |
|
2842: 86 e6 ldi r24, 0x66 ; 102 |
|
2844: 90 e0 ldi r25, 0x00 ; 0 |
|
2846: 95 83 std Z+5, r25 ; 0x05 |
|
2848: 84 83 std Z+4, r24 ; 0x04 |
|
bytes = sizeof(float); |
|
284a: 84 e0 ldi r24, 0x04 ; 4 |
|
284c: 90 e0 ldi r25, 0x00 ; 0 |
|
284e: 93 83 std Z+3, r25 ; 0x03 |
|
2850: 82 83 std Z+2, r24 ; 0x02 |
|
data.f = f; |
|
2852: 46 83 std Z+6, r20 ; 0x06 |
|
2854: 57 83 std Z+7, r21 ; 0x07 |
|
2856: 60 87 std Z+8, r22 ; 0x08 |
|
2858: 71 87 std Z+9, r23 ; 0x09 |
|
285a: 08 95 ret |
|
|
|
0000285c <_ZN7OSCDataC1Ed>: |
|
} |
|
|
|
|
|
OSCData::OSCData(double d){ |
|
285c: fc 01 movw r30, r24 |
|
error = OSC_OK; |
|
285e: 11 82 std Z+1, r1 ; 0x01 |
|
2860: 10 82 st Z, r1 |
|
bytes = sizeof(double); |
|
2862: 84 e0 ldi r24, 0x04 ; 4 |
|
2864: 90 e0 ldi r25, 0x00 ; 0 |
|
2866: 93 83 std Z+3, r25 ; 0x03 |
|
2868: 82 83 std Z+2, r24 ; 0x02 |
|
//if it's not 8 bits it's not a true double |
|
if (bytes == 8){ |
|
type = 'd'; |
|
data.d = d; |
|
} else { |
|
type = 'f'; |
|
286a: 86 e6 ldi r24, 0x66 ; 102 |
|
286c: 90 e0 ldi r25, 0x00 ; 0 |
|
286e: 95 83 std Z+5, r25 ; 0x05 |
|
2870: 84 83 std Z+4, r24 ; 0x04 |
|
data.f = d; |
|
2872: 46 83 std Z+6, r20 ; 0x06 |
|
2874: 57 83 std Z+7, r21 ; 0x07 |
|
2876: 60 87 std Z+8, r22 ; 0x08 |
|
2878: 71 87 std Z+9, r23 ; 0x09 |
|
287a: 08 95 ret |
|
|
|
0000287c <_ZN7OSCDataC1EPhi>: |
|
} |
|
} |
|
|
|
OSCData::OSCData(uint8_t * b, int len){ |
|
287c: af 92 push r10 |
|
287e: bf 92 push r11 |
|
2880: cf 92 push r12 |
|
2882: df 92 push r13 |
|
2884: ef 92 push r14 |
|
2886: ff 92 push r15 |
|
2888: 0f 93 push r16 |
|
288a: 1f 93 push r17 |
|
288c: cf 93 push r28 |
|
288e: df 93 push r29 |
|
2890: cd b7 in r28, 0x3d ; 61 |
|
2892: de b7 in r29, 0x3e ; 62 |
|
2894: 2c 97 sbiw r28, 0x0c ; 12 |
|
2896: 0f b6 in r0, 0x3f ; 63 |
|
2898: f8 94 cli |
|
289a: de bf out 0x3e, r29 ; 62 |
|
289c: 0f be out 0x3f, r0 ; 63 |
|
289e: cd bf out 0x3d, r28 ; 61 |
|
28a0: 8c 01 movw r16, r24 |
|
error = OSC_OK; |
|
28a2: fc 01 movw r30, r24 |
|
28a4: 11 82 std Z+1, r1 ; 0x01 |
|
28a6: 10 82 st Z, r1 |
|
type = 'b'; |
|
28a8: 82 e6 ldi r24, 0x62 ; 98 |
|
28aa: 90 e0 ldi r25, 0x00 ; 0 |
|
28ac: 95 83 std Z+5, r25 ; 0x05 |
|
28ae: 84 83 std Z+4, r24 ; 0x04 |
|
bytes = len + 4; |
|
28b0: ca 01 movw r24, r20 |
|
28b2: 04 96 adiw r24, 0x04 ; 4 |
|
28b4: 93 83 std Z+3, r25 ; 0x03 |
|
28b6: 82 83 std Z+2, r24 ; 0x02 |
|
//add the size to the front of the blob |
|
uint32_t len32 = (uint32_t) len; |
|
28b8: 6a 01 movw r12, r20 |
|
28ba: ee 24 eor r14, r14 |
|
28bc: d7 fc sbrc r13, 7 |
|
28be: e0 94 com r14 |
|
28c0: fe 2c mov r15, r14 |
|
28c2: cd 82 std Y+5, r12 ; 0x05 |
|
28c4: de 82 std Y+6, r13 ; 0x06 |
|
28c6: ef 82 std Y+7, r14 ; 0x07 |
|
28c8: f8 86 std Y+8, r15 ; 0x08 |
|
28ca: 9e 01 movw r18, r28 |
|
28cc: 2b 5f subi r18, 0xFB ; 251 |
|
28ce: 3f 4f sbci r19, 0xFF ; 255 |
|
28d0: fe 01 movw r30, r28 |
|
28d2: 39 96 adiw r30, 0x09 ; 9 |
|
28d4: de 01 movw r26, r28 |
|
28d6: 11 96 adiw r26, 0x01 ; 1 |
|
if (sig == 0) return x; // for big endian machine just return the input |
|
T ret; |
|
int size = sizeof(T); |
|
char* src = (char*)&x + sizeof(T) - 1; |
|
char* dst = (char*)&ret; |
|
while (size-- > 0){ |
|
28d8: e2 17 cp r30, r18 |
|
28da: f3 07 cpc r31, r19 |
|
28dc: 19 f0 breq .+6 ; 0x28e4 <_ZN7OSCDataC1EPhi+0x68> |
|
*dst++ = *src--; |
|
28de: f2 90 ld r15, -Z |
|
28e0: fd 92 st X+, r15 |
|
28e2: fa cf rjmp .-12 ; 0x28d8 <_ZN7OSCDataC1EPhi+0x5c> |
|
} |
|
return ret; |
|
28e4: c9 80 ldd r12, Y+1 ; 0x01 |
|
28e6: da 80 ldd r13, Y+2 ; 0x02 |
|
28e8: eb 80 ldd r14, Y+3 ; 0x03 |
|
28ea: fc 80 ldd r15, Y+4 ; 0x04 |
|
//make sure the length is endian-safe |
|
len32 = BigEndian(len32); |
|
28ec: cd 82 std Y+5, r12 ; 0x05 |
|
28ee: de 82 std Y+6, r13 ; 0x06 |
|
28f0: ef 82 std Y+7, r14 ; 0x07 |
|
28f2: f8 86 std Y+8, r15 ; 0x08 |
|
uint8_t * lenPtr = (uint8_t *) (& len32); |
|
//own the data |
|
uint8_t * mem = (uint8_t * ) malloc(bytes); |
|
28f4: 4b 87 std Y+11, r20 ; 0x0b |
|
28f6: 5c 87 std Y+12, r21 ; 0x0c |
|
28f8: 69 87 std Y+9, r22 ; 0x09 |
|
28fa: 7a 87 std Y+10, r23 ; 0x0a |
|
28fc: 0e 94 82 2f call 0x5f04 ; 0x5f04 <malloc> |
|
2900: 5c 01 movw r10, r24 |
|
if (mem == NULL){ |
|
2902: 4b 85 ldd r20, Y+11 ; 0x0b |
|
2904: 5c 85 ldd r21, Y+12 ; 0x0c |
|
2906: 69 85 ldd r22, Y+9 ; 0x09 |
|
2908: 7a 85 ldd r23, Y+10 ; 0x0a |
|
290a: 00 97 sbiw r24, 0x00 ; 0 |
|
290c: 31 f4 brne .+12 ; 0x291a <_ZN7OSCDataC1EPhi+0x9e> |
|
error = ALLOCFAILED; |
|
290e: 83 e0 ldi r24, 0x03 ; 3 |
|
2910: 90 e0 ldi r25, 0x00 ; 0 |
|
2912: f8 01 movw r30, r16 |
|
2914: 91 83 std Z+1, r25 ; 0x01 |
|
2916: 80 83 st Z, r24 |
|
2918: 0b c0 rjmp .+22 ; 0x2930 <_ZN7OSCDataC1EPhi+0xb4> |
|
} else { |
|
//copy over the blob length |
|
memcpy(mem, lenPtr, 4); |
|
291a: fc 01 movw r30, r24 |
|
291c: c1 92 st Z+, r12 |
|
291e: d1 92 st Z+, r13 |
|
2920: e1 92 st Z+, r14 |
|
2922: f1 92 st Z+, r15 |
|
2924: cf 01 movw r24, r30 |
|
//copy over the blob data |
|
memcpy(mem + 4, b, len); |
|
2926: 0e 94 73 31 call 0x62e6 ; 0x62e6 <memcpy> |
|
data.b = mem; |
|
292a: f8 01 movw r30, r16 |
|
292c: b7 82 std Z+7, r11 ; 0x07 |
|
292e: a6 82 std Z+6, r10 ; 0x06 |
|
} |
|
} |
|
2930: 2c 96 adiw r28, 0x0c ; 12 |
|
2932: 0f b6 in r0, 0x3f ; 63 |
|
2934: f8 94 cli |
|
2936: de bf out 0x3e, r29 ; 62 |
|
2938: 0f be out 0x3f, r0 ; 63 |
|
293a: cd bf out 0x3d, r28 ; 61 |
|
293c: df 91 pop r29 |
|
293e: cf 91 pop r28 |
|
2940: 1f 91 pop r17 |
|
2942: 0f 91 pop r16 |
|
2944: ff 90 pop r15 |
|
2946: ef 90 pop r14 |
|
2948: df 90 pop r13 |
|
294a: cf 90 pop r12 |
|
294c: bf 90 pop r11 |
|
294e: af 90 pop r10 |
|
2950: 08 95 ret |
|
|
|
00002952 <_ZN7OSCDataD1Ev>: |
|
} |
|
} |
|
} |
|
|
|
//DESTRUCTOR |
|
OSCData::~OSCData(){ |
|
2952: fc 01 movw r30, r24 |
|
//if there are no bytes, there is nothing to free |
|
if (bytes>0){ |
|
2954: 82 81 ldd r24, Z+2 ; 0x02 |
|
2956: 93 81 ldd r25, Z+3 ; 0x03 |
|
2958: 18 16 cp r1, r24 |
|
295a: 19 06 cpc r1, r25 |
|
295c: 64 f4 brge .+24 ; 0x2976 <_ZN7OSCDataD1Ev+0x24> |
|
//if the data is of type 's' or 'b', need to free that memory |
|
if (type == 's'){ |
|
295e: 84 81 ldd r24, Z+4 ; 0x04 |
|
2960: 95 81 ldd r25, Z+5 ; 0x05 |
|
2962: 83 37 cpi r24, 0x73 ; 115 |
|
2964: 91 05 cpc r25, r1 |
|
2966: 21 f4 brne .+8 ; 0x2970 <_ZN7OSCDataD1Ev+0x1e> |
|
free(data.s); |
|
2968: 86 81 ldd r24, Z+6 ; 0x06 |
|
296a: 97 81 ldd r25, Z+7 ; 0x07 |
|
296c: 0c 94 1a 30 jmp 0x6034 ; 0x6034 <free> |
|
}else if( type == 'b'){ |
|
2970: 82 36 cpi r24, 0x62 ; 98 |
|
2972: 91 05 cpc r25, r1 |
|
2974: c9 f3 breq .-14 ; 0x2968 <_ZN7OSCDataD1Ev+0x16> |
|
2976: 08 95 ret |
|
|
|
00002978 <_ZN7OSCDataC1Ec>: |
|
} |
|
} |
|
|
|
//sets just the type as a message placeholder |
|
//no data |
|
OSCData::OSCData(char t){ |
|
2978: fc 01 movw r30, r24 |
|
error = INVALID_OSC; |
|
297a: 82 e0 ldi r24, 0x02 ; 2 |
|
297c: 90 e0 ldi r25, 0x00 ; 0 |
|
297e: 91 83 std Z+1, r25 ; 0x01 |
|
2980: 80 83 st Z, r24 |
|
type = t; |
|
2982: 77 27 eor r23, r23 |
|
2984: 67 fd sbrc r22, 7 |
|
2986: 70 95 com r23 |
|
2988: 75 83 std Z+5, r23 ; 0x05 |
|
298a: 64 83 std Z+4, r22 ; 0x04 |
|
bytes = 0; |
|
298c: 13 82 std Z+3, r1 ; 0x03 |
|
298e: 12 82 std Z+2, r1 ; 0x02 |
|
2990: 08 95 ret |
|
|
|
00002992 <_ZN7OSCData6getIntEv>: |
|
perform a safety check to make sure the data type matches the request |
|
otherwise returns NULL |
|
=============================================================================*/ |
|
|
|
int32_t OSCData::getInt(){ |
|
if (type == 'i'){ |
|
2992: fc 01 movw r30, r24 |
|
2994: 24 81 ldd r18, Z+4 ; 0x04 |
|
2996: 35 81 ldd r19, Z+5 ; 0x05 |
|
2998: 29 36 cpi r18, 0x69 ; 105 |
|
299a: 31 05 cpc r19, r1 |
|
299c: 29 f4 brne .+10 ; 0x29a8 <_ZN7OSCData6getIntEv+0x16> |
|
return data.i; |
|
299e: 66 81 ldd r22, Z+6 ; 0x06 |
|
29a0: 77 81 ldd r23, Z+7 ; 0x07 |
|
29a2: 80 85 ldd r24, Z+8 ; 0x08 |
|
29a4: 91 85 ldd r25, Z+9 ; 0x09 |
|
29a6: 08 95 ret |
|
} else { |
|
return NULL; |
|
29a8: 60 e0 ldi r22, 0x00 ; 0 |
|
29aa: 70 e0 ldi r23, 0x00 ; 0 |
|
29ac: cb 01 movw r24, r22 |
|
} |
|
} |
|
29ae: 08 95 ret |
|
|
|
000029b0 <_ZN7OSCData8getFloatEv>: |
|
|
|
float OSCData::getFloat(){ |
|
if (type == 'f'){ |
|
29b0: fc 01 movw r30, r24 |
|
29b2: 24 81 ldd r18, Z+4 ; 0x04 |
|
29b4: 35 81 ldd r19, Z+5 ; 0x05 |
|
29b6: 26 36 cpi r18, 0x66 ; 102 |
|
29b8: 31 05 cpc r19, r1 |
|
29ba: 29 f4 brne .+10 ; 0x29c6 <_ZN7OSCData8getFloatEv+0x16> |
|
return data.f; |
|
29bc: 66 81 ldd r22, Z+6 ; 0x06 |
|
29be: 77 81 ldd r23, Z+7 ; 0x07 |
|
29c0: 80 85 ldd r24, Z+8 ; 0x08 |
|
29c2: 91 85 ldd r25, Z+9 ; 0x09 |
|
29c4: 08 95 ret |
|
} else { |
|
return NULL; |
|
29c6: 60 e0 ldi r22, 0x00 ; 0 |
|
29c8: 70 e0 ldi r23, 0x00 ; 0 |
|
29ca: cb 01 movw r24, r22 |
|
} |
|
} |
|
29cc: 08 95 ret |
|
|
|
000029ce <_ZN10OscMessage12setupMessageEv>: |
|
setupMessage(_address); |
|
} |
|
*/ |
|
|
|
//sets up a new message |
|
void OscMessage::setupMessage(){ |
|
29ce: fc 01 movw r30, r24 |
|
address = NULL; |
|
29d0: 11 82 std Z+1, r1 ; 0x01 |
|
29d2: 10 82 st Z, r1 |
|
//setup the attributes |
|
dataCount = 0; |
|
29d4: 15 82 std Z+5, r1 ; 0x05 |
|
29d6: 14 82 std Z+4, r1 ; 0x04 |
|
error = OSC_OK; |
|
29d8: 17 82 std Z+7, r1 ; 0x07 |
|
29da: 16 82 std Z+6, r1 ; 0x06 |
|
//setup the space for data |
|
data = NULL; |
|
29dc: 13 82 std Z+3, r1 ; 0x03 |
|
29de: 12 82 std Z+2, r1 ; 0x02 |
|
//setup for filling the message |
|
incomingBuffer = NULL; |
|
29e0: 13 86 std Z+11, r1 ; 0x0b |
|
29e2: 12 86 std Z+10, r1 ; 0x0a |
|
incomingBufferSize = 0; |
|
29e4: 15 86 std Z+13, r1 ; 0x0d |
|
29e6: 14 86 std Z+12, r1 ; 0x0c |
|
//set the decode state |
|
decodeState = STANDBY; |
|
29e8: 11 86 std Z+9, r1 ; 0x09 |
|
29ea: 10 86 std Z+8, r1 ; 0x08 |
|
29ec: 08 95 ret |
|
|
|
000029ee <_ZN10OscMessageC1Ev>: |
|
setAddress(_address); |
|
} |
|
|
|
//constructor with nothing |
|
//just a placeholder since the message is invalid |
|
OscMessage::OscMessage(){ |
|
29ee: cf 93 push r28 |
|
29f0: df 93 push r29 |
|
29f2: ec 01 movw r28, r24 |
|
setupMessage(); |
|
29f4: 0e 94 e7 14 call 0x29ce ; 0x29ce <_ZN10OscMessage12setupMessageEv> |
|
error = INVALID_OSC; |
|
29f8: 82 e0 ldi r24, 0x02 ; 2 |
|
29fa: 90 e0 ldi r25, 0x00 ; 0 |
|
29fc: 9f 83 std Y+7, r25 ; 0x07 |
|
29fe: 8e 83 std Y+6, r24 ; 0x06 |
|
} |
|
2a00: df 91 pop r29 |
|
2a02: cf 91 pop r28 |
|
2a04: 08 95 ret |
|
|
|
00002a06 <_ZN10OscMessage10getOSCDataEi>: |
|
|
|
/*============================================================================= |
|
GETTING DATA |
|
=============================================================================*/ |
|
|
|
OSCData * OscMessage::getOSCData(int position){ |
|
2a06: fc 01 movw r30, r24 |
|
if (position < dataCount){ |
|
2a08: 84 81 ldd r24, Z+4 ; 0x04 |
|
2a0a: 95 81 ldd r25, Z+5 ; 0x05 |
|
2a0c: 68 17 cp r22, r24 |
|
2a0e: 79 07 cpc r23, r25 |
|
2a10: 54 f4 brge .+20 ; 0x2a26 <_ZN10OscMessage10getOSCDataEi+0x20> |
|
OSCData * datum = data[position]; |
|
2a12: 66 0f add r22, r22 |
|
2a14: 77 1f adc r23, r23 |
|
2a16: 02 80 ldd r0, Z+2 ; 0x02 |
|
2a18: f3 81 ldd r31, Z+3 ; 0x03 |
|
2a1a: e0 2d mov r30, r0 |
|
2a1c: e6 0f add r30, r22 |
|
2a1e: f7 1f adc r31, r23 |
|
2a20: 80 81 ld r24, Z |
|
2a22: 91 81 ldd r25, Z+1 ; 0x01 |
|
return datum; |
|
2a24: 08 95 ret |
|
} else { |
|
error = INDEX_OUT_OF_BOUNDS; |
|
2a26: 84 e0 ldi r24, 0x04 ; 4 |
|
2a28: 90 e0 ldi r25, 0x00 ; 0 |
|
2a2a: 97 83 std Z+7, r25 ; 0x07 |
|
2a2c: 86 83 std Z+6, r24 ; 0x06 |
|
return NULL; |
|
2a2e: 80 e0 ldi r24, 0x00 ; 0 |
|
2a30: 90 e0 ldi r25, 0x00 ; 0 |
|
} |
|
} |
|
2a32: 08 95 ret |
|
|
|
00002a34 <_ZN10OscMessage5emptyEv>: |
|
empty(); |
|
//free the filling buffer |
|
free(incomingBuffer); |
|
} |
|
|
|
void OscMessage::empty(){ |
|
2a34: ef 92 push r14 |
|
2a36: ff 92 push r15 |
|
2a38: 0f 93 push r16 |
|
2a3a: 1f 93 push r17 |
|
2a3c: cf 93 push r28 |
|
2a3e: df 93 push r29 |
|
2a40: ec 01 movw r28, r24 |
|
error = OSC_OK; |
|
2a42: 1f 82 std Y+7, r1 ; 0x07 |
|
2a44: 1e 82 std Y+6, r1 ; 0x06 |
|
//free each of hte data in the array |
|
for (int i = 0; i < dataCount; i++){ |
|
2a46: 00 e0 ldi r16, 0x00 ; 0 |
|
2a48: 10 e0 ldi r17, 0x00 ; 0 |
|
2a4a: 8c 81 ldd r24, Y+4 ; 0x04 |
|
2a4c: 9d 81 ldd r25, Y+5 ; 0x05 |
|
2a4e: 08 17 cp r16, r24 |
|
2a50: 19 07 cpc r17, r25 |
|
2a52: 7c f4 brge .+30 ; 0x2a72 <_ZN10OscMessage5emptyEv+0x3e> |
|
OSCData * datum = getOSCData(i); |
|
2a54: b8 01 movw r22, r16 |
|
2a56: ce 01 movw r24, r28 |
|
2a58: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
2a5c: 7c 01 movw r14, r24 |
|
//explicitly destruct the data |
|
//datum->~OSCData(); |
|
delete datum; |
|
2a5e: 00 97 sbiw r24, 0x00 ; 0 |
|
2a60: 29 f0 breq .+10 ; 0x2a6c <_ZN10OscMessage5emptyEv+0x38> |
|
2a62: 0e 94 a9 14 call 0x2952 ; 0x2952 <_ZN7OSCDataD1Ev> |
|
2a66: c7 01 movw r24, r14 |
|
2a68: 0e 94 16 2c call 0x582c ; 0x582c <_ZdlPv> |
|
} |
|
|
|
void OscMessage::empty(){ |
|
error = OSC_OK; |
|
//free each of hte data in the array |
|
for (int i = 0; i < dataCount; i++){ |
|
2a6c: 0f 5f subi r16, 0xFF ; 255 |
|
2a6e: 1f 4f sbci r17, 0xFF ; 255 |
|
2a70: ec cf rjmp .-40 ; 0x2a4a <_ZN10OscMessage5emptyEv+0x16> |
|
//explicitly destruct the data |
|
//datum->~OSCData(); |
|
delete datum; |
|
} |
|
//and free the array |
|
free(data); |
|
2a72: 8a 81 ldd r24, Y+2 ; 0x02 |
|
2a74: 9b 81 ldd r25, Y+3 ; 0x03 |
|
2a76: 0e 94 1a 30 call 0x6034 ; 0x6034 <free> |
|
data = NULL; |
|
2a7a: 1b 82 std Y+3, r1 ; 0x03 |
|
2a7c: 1a 82 std Y+2, r1 ; 0x02 |
|
dataCount = 0; |
|
2a7e: 1d 82 std Y+5, r1 ; 0x05 |
|
2a80: 1c 82 std Y+4, r1 ; 0x04 |
|
} |
|
2a82: df 91 pop r29 |
|
2a84: cf 91 pop r28 |
|
2a86: 1f 91 pop r17 |
|
2a88: 0f 91 pop r16 |
|
2a8a: ff 90 pop r15 |
|
2a8c: ef 90 pop r14 |
|
2a8e: 08 95 ret |
|
|
|
00002a90 <_ZN10OscMessageD1Ev>: |
|
//set the decode state |
|
decodeState = STANDBY; |
|
} |
|
|
|
//DESTRUCTOR |
|
OscMessage::~OscMessage(){ |
|
2a90: cf 93 push r28 |
|
2a92: df 93 push r29 |
|
2a94: ec 01 movw r28, r24 |
|
//free everything that needs to be freed |
|
//free the address |
|
free(address); |
|
2a96: 88 81 ld r24, Y |
|
2a98: 99 81 ldd r25, Y+1 ; 0x01 |
|
2a9a: 0e 94 1a 30 call 0x6034 ; 0x6034 <free> |
|
//free the data |
|
empty(); |
|
2a9e: ce 01 movw r24, r28 |
|
2aa0: 0e 94 1a 15 call 0x2a34 ; 0x2a34 <_ZN10OscMessage5emptyEv> |
|
//free the filling buffer |
|
free(incomingBuffer); |
|
2aa4: 8a 85 ldd r24, Y+10 ; 0x0a |
|
2aa6: 9b 85 ldd r25, Y+11 ; 0x0b |
|
} |
|
2aa8: df 91 pop r29 |
|
2aaa: cf 91 pop r28 |
|
//free the address |
|
free(address); |
|
//free the data |
|
empty(); |
|
//free the filling buffer |
|
free(incomingBuffer); |
|
2aac: 0c 94 1a 30 jmp 0x6034 ; 0x6034 <free> |
|
|
|
00002ab0 <_ZN10OscMessage5resetEv>: |
|
data = NULL; |
|
dataCount = 0; |
|
} |
|
|
|
// ****** NEW ADDITION *** davidb |
|
void OscMessage::reset() { |
|
2ab0: cf 93 push r28 |
|
2ab2: df 93 push r29 |
|
2ab4: ec 01 movw r28, r24 |
|
free(address); |
|
2ab6: 88 81 ld r24, Y |
|
2ab8: 99 81 ldd r25, Y+1 ; 0x01 |
|
2aba: 0e 94 1a 30 call 0x6034 ; 0x6034 <free> |
|
empty(); |
|
2abe: ce 01 movw r24, r28 |
|
2ac0: 0e 94 1a 15 call 0x2a34 ; 0x2a34 <_ZN10OscMessage5emptyEv> |
|
free(incomingBuffer); |
|
2ac4: 8a 85 ldd r24, Y+10 ; 0x0a |
|
2ac6: 9b 85 ldd r25, Y+11 ; 0x0b |
|
2ac8: 0e 94 1a 30 call 0x6034 ; 0x6034 <free> |
|
setupMessage(); |
|
2acc: ce 01 movw r24, r28 |
|
2ace: 0e 94 e7 14 call 0x29ce ; 0x29ce <_ZN10OscMessage12setupMessageEv> |
|
error = INVALID_OSC; |
|
2ad2: 82 e0 ldi r24, 0x02 ; 2 |
|
2ad4: 90 e0 ldi r25, 0x00 ; 0 |
|
2ad6: 9f 83 std Y+7, r25 ; 0x07 |
|
2ad8: 8e 83 std Y+6, r24 ; 0x06 |
|
} |
|
2ada: df 91 pop r29 |
|
2adc: cf 91 pop r28 |
|
2ade: 08 95 ret |
|
|
|
00002ae0 <_ZN10OscMessage3setEiPhi>: |
|
error = INDEX_OUT_OF_BOUNDS; |
|
} |
|
} |
|
|
|
//blob specific setter |
|
void set(int position, uint8_t * blob, int length){ |
|
2ae0: af 92 push r10 |
|
2ae2: bf 92 push r11 |
|
2ae4: cf 92 push r12 |
|
2ae6: df 92 push r13 |
|
2ae8: ef 92 push r14 |
|
2aea: ff 92 push r15 |
|
2aec: 0f 93 push r16 |
|
2aee: 1f 93 push r17 |
|
2af0: cf 93 push r28 |
|
2af2: df 93 push r29 |
|
2af4: ec 01 movw r28, r24 |
|
2af6: 8b 01 movw r16, r22 |
|
2af8: 6a 01 movw r12, r20 |
|
2afa: 59 01 movw r10, r18 |
|
if (position < dataCount){ |
|
2afc: 8c 81 ldd r24, Y+4 ; 0x04 |
|
2afe: 9d 81 ldd r25, Y+5 ; 0x05 |
|
2b00: 68 17 cp r22, r24 |
|
2b02: 79 07 cpc r23, r25 |
|
2b04: 1c f5 brge .+70 ; 0x2b4c <_ZN10OscMessage3setEiPhi+0x6c> |
|
//replace the OSCData with a new one |
|
OSCData * oldDatum = getOSCData(position); |
|
2b06: ce 01 movw r24, r28 |
|
2b08: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
2b0c: 7c 01 movw r14, r24 |
|
//destroy the old one |
|
delete oldDatum; |
|
2b0e: 00 97 sbiw r24, 0x00 ; 0 |
|
2b10: 29 f0 breq .+10 ; 0x2b1c <_ZN10OscMessage3setEiPhi+0x3c> |
|
2b12: 0e 94 a9 14 call 0x2952 ; 0x2952 <_ZN7OSCDataD1Ev> |
|
2b16: c7 01 movw r24, r14 |
|
2b18: 0e 94 16 2c call 0x582c ; 0x582c <_ZdlPv> |
|
//make a new one |
|
OSCData * newDatum = new OSCData(blob, length); |
|
2b1c: 8e e0 ldi r24, 0x0E ; 14 |
|
2b1e: 90 e0 ldi r25, 0x00 ; 0 |
|
2b20: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
2b24: 7c 01 movw r14, r24 |
|
2b26: a5 01 movw r20, r10 |
|
2b28: b6 01 movw r22, r12 |
|
2b2a: 0e 94 3e 14 call 0x287c ; 0x287c <_ZN7OSCDataC1EPhi> |
|
//test if there was an error |
|
if (newDatum->error == ALLOCFAILED){ |
|
2b2e: f7 01 movw r30, r14 |
|
2b30: 80 81 ld r24, Z |
|
2b32: 91 81 ldd r25, Z+1 ; 0x01 |
|
2b34: 83 30 cpi r24, 0x03 ; 3 |
|
2b36: 91 05 cpc r25, r1 |
|
2b38: e1 f1 breq .+120 ; 0x2bb2 <_ZN10OscMessage3setEiPhi+0xd2> |
|
error = ALLOCFAILED; |
|
} else { |
|
//otherwise, put it in the data array |
|
data[position] = newDatum; |
|
2b3a: 00 0f add r16, r16 |
|
2b3c: 11 1f adc r17, r17 |
|
2b3e: ea 81 ldd r30, Y+2 ; 0x02 |
|
2b40: fb 81 ldd r31, Y+3 ; 0x03 |
|
2b42: e0 0f add r30, r16 |
|
2b44: f1 1f adc r31, r17 |
|
2b46: f1 82 std Z+1, r15 ; 0x01 |
|
2b48: e0 82 st Z, r14 |
|
2b4a: 35 c0 rjmp .+106 ; 0x2bb6 <_ZN10OscMessage3setEiPhi+0xd6> |
|
} |
|
} else if (position == (dataCount)){ |
|
2b4c: 68 17 cp r22, r24 |
|
2b4e: 79 07 cpc r23, r25 |
|
2b50: 71 f5 brne .+92 ; 0x2bae <_ZN10OscMessage3setEiPhi+0xce> |
|
} |
|
|
|
//blob specific add |
|
OscMessage& add(uint8_t * blob, int length){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(blob, length); |
|
2b52: 8e e0 ldi r24, 0x0E ; 14 |
|
2b54: 90 e0 ldi r25, 0x00 ; 0 |
|
2b56: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
2b5a: 8c 01 movw r16, r24 |
|
2b5c: a5 01 movw r20, r10 |
|
2b5e: b6 01 movw r22, r12 |
|
2b60: 0e 94 3e 14 call 0x287c ; 0x287c <_ZN7OSCDataC1EPhi> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
2b64: f8 01 movw r30, r16 |
|
2b66: 80 81 ld r24, Z |
|
2b68: 91 81 ldd r25, Z+1 ; 0x01 |
|
2b6a: 83 30 cpi r24, 0x03 ; 3 |
|
2b6c: 91 05 cpc r25, r1 |
|
2b6e: 09 f1 breq .+66 ; 0x2bb2 <_ZN10OscMessage3setEiPhi+0xd2> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
2b70: 6c 81 ldd r22, Y+4 ; 0x04 |
|
2b72: 7d 81 ldd r23, Y+5 ; 0x05 |
|
2b74: 6f 5f subi r22, 0xFF ; 255 |
|
2b76: 7f 4f sbci r23, 0xFF ; 255 |
|
2b78: 66 0f add r22, r22 |
|
2b7a: 77 1f adc r23, r23 |
|
2b7c: 8a 81 ldd r24, Y+2 ; 0x02 |
|
2b7e: 9b 81 ldd r25, Y+3 ; 0x03 |
|
2b80: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
2b84: 00 97 sbiw r24, 0x00 ; 0 |
|
2b86: 19 f4 brne .+6 ; 0x2b8e <_ZN10OscMessage3setEiPhi+0xae> |
|
error = ALLOCFAILED; |
|
2b88: 83 e0 ldi r24, 0x03 ; 3 |
|
2b8a: 90 e0 ldi r25, 0x00 ; 0 |
|
2b8c: 12 c0 rjmp .+36 ; 0x2bb2 <_ZN10OscMessage3setEiPhi+0xd2> |
|
} else { |
|
data = dataMem; |
|
2b8e: 9b 83 std Y+3, r25 ; 0x03 |
|
2b90: 8a 83 std Y+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
2b92: 2c 81 ldd r18, Y+4 ; 0x04 |
|
2b94: 3d 81 ldd r19, Y+5 ; 0x05 |
|
2b96: f9 01 movw r30, r18 |
|
2b98: ee 0f add r30, r30 |
|
2b9a: ff 1f adc r31, r31 |
|
2b9c: e8 0f add r30, r24 |
|
2b9e: f9 1f adc r31, r25 |
|
2ba0: 11 83 std Z+1, r17 ; 0x01 |
|
2ba2: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
2ba4: 2f 5f subi r18, 0xFF ; 255 |
|
2ba6: 3f 4f sbci r19, 0xFF ; 255 |
|
2ba8: 3d 83 std Y+5, r19 ; 0x05 |
|
2baa: 2c 83 std Y+4, r18 ; 0x04 |
|
2bac: 04 c0 rjmp .+8 ; 0x2bb6 <_ZN10OscMessage3setEiPhi+0xd6> |
|
} else if (position == (dataCount)){ |
|
//add the data to the end |
|
add(blob, length); |
|
} else { |
|
//else out of bounds error |
|
error = INDEX_OUT_OF_BOUNDS; |
|
2bae: 84 e0 ldi r24, 0x04 ; 4 |
|
2bb0: 90 e0 ldi r25, 0x00 ; 0 |
|
2bb2: 9f 83 std Y+7, r25 ; 0x07 |
|
2bb4: 8e 83 std Y+6, r24 ; 0x06 |
|
} |
|
} |
|
2bb6: df 91 pop r29 |
|
2bb8: cf 91 pop r28 |
|
2bba: 1f 91 pop r17 |
|
2bbc: 0f 91 pop r16 |
|
2bbe: ff 90 pop r15 |
|
2bc0: ef 90 pop r14 |
|
2bc2: df 90 pop r13 |
|
2bc4: cf 90 pop r12 |
|
2bc6: bf 90 pop r11 |
|
2bc8: af 90 pop r10 |
|
2bca: 08 95 ret |
|
|
|
00002bcc <_ZN10OscMessage9fullMatchEPKci>: |
|
} else { |
|
return 0; |
|
} |
|
} |
|
|
|
bool OscMessage::fullMatch( const char * pattern, int addr_offset){ |
|
2bcc: cf 93 push r28 |
|
2bce: df 93 push r29 |
|
2bd0: 00 d0 rcall .+0 ; 0x2bd2 <_ZN10OscMessage9fullMatchEPKci+0x6> |
|
2bd2: 00 d0 rcall .+0 ; 0x2bd4 <_ZN10OscMessage9fullMatchEPKci+0x8> |
|
2bd4: cd b7 in r28, 0x3d ; 61 |
|
2bd6: de b7 in r29, 0x3e ; 62 |
|
2bd8: fa 01 movw r30, r20 |
|
int pattern_offset; |
|
int address_offset; |
|
int ret = osc_match(address + addr_offset, pattern, &address_offset, &pattern_offset); |
|
2bda: dc 01 movw r26, r24 |
|
2bdc: 8d 91 ld r24, X+ |
|
2bde: 9c 91 ld r25, X |
|
2be0: 9e 01 movw r18, r28 |
|
2be2: 2d 5f subi r18, 0xFD ; 253 |
|
2be4: 3f 4f sbci r19, 0xFF ; 255 |
|
2be6: ae 01 movw r20, r28 |
|
2be8: 4f 5f subi r20, 0xFF ; 255 |
|
2bea: 5f 4f sbci r21, 0xFF ; 255 |
|
2bec: 8e 0f add r24, r30 |
|
2bee: 9f 1f adc r25, r31 |
|
2bf0: 0e 94 48 12 call 0x2490 ; 0x2490 <osc_match> |
|
return (ret==3); |
|
2bf4: 21 e0 ldi r18, 0x01 ; 1 |
|
2bf6: 03 97 sbiw r24, 0x03 ; 3 |
|
2bf8: 09 f0 breq .+2 ; 0x2bfc <_ZN10OscMessage9fullMatchEPKci+0x30> |
|
2bfa: 20 e0 ldi r18, 0x00 ; 0 |
|
} |
|
2bfc: 82 2f mov r24, r18 |
|
2bfe: 0f 90 pop r0 |
|
2c00: 0f 90 pop r0 |
|
2c02: 0f 90 pop r0 |
|
2c04: 0f 90 pop r0 |
|
2c06: df 91 pop r29 |
|
2c08: cf 91 pop r28 |
|
2c0a: 08 95 ret |
|
|
|
00002c0c <_ZN10OscMessage4plugEPKcPFvRS_Ei>: |
|
|
|
bool OscMessage::plug(const char * pattern, void (*callback)(OscMessage &), int addr_offset){ |
|
2c0c: 0f 93 push r16 |
|
2c0e: 1f 93 push r17 |
|
2c10: cf 93 push r28 |
|
2c12: df 93 push r29 |
|
2c14: ec 01 movw r28, r24 |
|
2c16: 8a 01 movw r16, r20 |
|
if (fullMatch(pattern, addr_offset)){ |
|
2c18: a9 01 movw r20, r18 |
|
2c1a: 0e 94 e6 15 call 0x2bcc ; 0x2bcc <_ZN10OscMessage9fullMatchEPKci> |
|
2c1e: 88 23 and r24, r24 |
|
2c20: 29 f0 breq .+10 ; 0x2c2c <_ZN10OscMessage4plugEPKcPFvRS_Ei+0x20> |
|
callback(*this); |
|
2c22: ce 01 movw r24, r28 |
|
2c24: f8 01 movw r30, r16 |
|
2c26: 09 95 icall |
|
return true; |
|
2c28: 81 e0 ldi r24, 0x01 ; 1 |
|
2c2a: 01 c0 rjmp .+2 ; 0x2c2e <_ZN10OscMessage4plugEPKcPFvRS_Ei+0x22> |
|
} else { |
|
return false; |
|
2c2c: 80 e0 ldi r24, 0x00 ; 0 |
|
} |
|
} |
|
2c2e: df 91 pop r29 |
|
2c30: cf 91 pop r28 |
|
2c32: 1f 91 pop r17 |
|
2c34: 0f 91 pop r16 |
|
2c36: 08 95 ret |
|
|
|
00002c38 <_ZN10OscMessage10setAddressEPKc>: |
|
int OscMessage::getAddress(char * buffer, int offset, int len){ |
|
strncpy(buffer, address+offset, len); |
|
return strlen(buffer); |
|
} |
|
|
|
void OscMessage::setAddress(const char * _address){ |
|
2c38: ef 92 push r14 |
|
2c3a: ff 92 push r15 |
|
2c3c: 0f 93 push r16 |
|
2c3e: 1f 93 push r17 |
|
2c40: cf 93 push r28 |
|
2c42: df 93 push r29 |
|
2c44: ec 01 movw r28, r24 |
|
2c46: 8b 01 movw r16, r22 |
|
//free the previous address |
|
free(address); |
|
2c48: 88 81 ld r24, Y |
|
2c4a: 99 81 ldd r25, Y+1 ; 0x01 |
|
2c4c: 0e 94 1a 30 call 0x6034 ; 0x6034 <free> |
|
//copy the address |
|
char * addressMemory = (char *) malloc( (strlen(_address) + 1) * sizeof(char) ); |
|
2c50: f8 01 movw r30, r16 |
|
2c52: 01 90 ld r0, Z+ |
|
2c54: 00 20 and r0, r0 |
|
2c56: e9 f7 brne .-6 ; 0x2c52 <_ZN10OscMessage10setAddressEPKc+0x1a> |
|
2c58: cf 01 movw r24, r30 |
|
2c5a: 80 1b sub r24, r16 |
|
2c5c: 91 0b sbc r25, r17 |
|
2c5e: 0e 94 82 2f call 0x5f04 ; 0x5f04 <malloc> |
|
2c62: 7c 01 movw r14, r24 |
|
if (addressMemory == NULL){ |
|
2c64: 00 97 sbiw r24, 0x00 ; 0 |
|
2c66: 39 f4 brne .+14 ; 0x2c76 <_ZN10OscMessage10setAddressEPKc+0x3e> |
|
error = ALLOCFAILED; |
|
2c68: 83 e0 ldi r24, 0x03 ; 3 |
|
2c6a: 90 e0 ldi r25, 0x00 ; 0 |
|
2c6c: 9f 83 std Y+7, r25 ; 0x07 |
|
2c6e: 8e 83 std Y+6, r24 ; 0x06 |
|
address = NULL; |
|
2c70: 19 82 std Y+1, r1 ; 0x01 |
|
2c72: 18 82 st Y, r1 |
|
2c74: 05 c0 rjmp .+10 ; 0x2c80 <_ZN10OscMessage10setAddressEPKc+0x48> |
|
} else { |
|
strcpy(addressMemory, _address); |
|
2c76: b8 01 movw r22, r16 |
|
2c78: 0e 94 85 31 call 0x630a ; 0x630a <strcpy> |
|
address = addressMemory; |
|
2c7c: f9 82 std Y+1, r15 ; 0x01 |
|
2c7e: e8 82 st Y, r14 |
|
} |
|
} |
|
2c80: df 91 pop r29 |
|
2c82: cf 91 pop r28 |
|
2c84: 1f 91 pop r17 |
|
2c86: 0f 91 pop r16 |
|
2c88: ff 90 pop r15 |
|
2c8a: ef 90 pop r14 |
|
2c8c: 08 95 ret |
|
|
|
00002c8e <_ZN10OscMessageC1EPKc>: |
|
/*============================================================================= |
|
CONSTRUCTORS / DESTRUCTOR |
|
=============================================================================*/ |
|
|
|
//constructor with address |
|
OscMessage::OscMessage(const char * _address){ |
|
2c8e: 0f 93 push r16 |
|
2c90: 1f 93 push r17 |
|
2c92: cf 93 push r28 |
|
2c94: df 93 push r29 |
|
2c96: 00 d0 rcall .+0 ; 0x2c98 <_ZN10OscMessageC1EPKc+0xa> |
|
2c98: cd b7 in r28, 0x3d ; 61 |
|
2c9a: de b7 in r29, 0x3e ; 62 |
|
2c9c: 8c 01 movw r16, r24 |
|
setupMessage(); |
|
2c9e: 69 83 std Y+1, r22 ; 0x01 |
|
2ca0: 7a 83 std Y+2, r23 ; 0x02 |
|
2ca2: 0e 94 e7 14 call 0x29ce ; 0x29ce <_ZN10OscMessage12setupMessageEv> |
|
setAddress(_address); |
|
2ca6: 69 81 ldd r22, Y+1 ; 0x01 |
|
2ca8: 7a 81 ldd r23, Y+2 ; 0x02 |
|
2caa: c8 01 movw r24, r16 |
|
} |
|
2cac: 0f 90 pop r0 |
|
2cae: 0f 90 pop r0 |
|
2cb0: df 91 pop r29 |
|
2cb2: cf 91 pop r28 |
|
2cb4: 1f 91 pop r17 |
|
2cb6: 0f 91 pop r16 |
|
=============================================================================*/ |
|
|
|
//constructor with address |
|
OscMessage::OscMessage(const char * _address){ |
|
setupMessage(); |
|
setAddress(_address); |
|
2cb8: 0c 94 1c 16 jmp 0x2c38 ; 0x2c38 <_ZN10OscMessage10setAddressEPKc> |
|
|
|
00002cbc <_ZN10OscMessage4sizeEv>: |
|
} |
|
|
|
//returns the number of OSCData in the OSCMessage |
|
int OscMessage::size(){ |
|
return dataCount; |
|
} |
|
2cbc: fc 01 movw r30, r24 |
|
2cbe: 84 81 ldd r24, Z+4 ; 0x04 |
|
2cc0: 95 81 ldd r25, Z+5 ; 0x05 |
|
2cc2: 08 95 ret |
|
|
|
00002cc4 <_ZN10OscMessage8hasErrorEv>: |
|
|
|
/*============================================================================= |
|
ERROR HANDLING |
|
=============================================================================*/ |
|
|
|
bool OscMessage::hasError(){ |
|
2cc4: ff 92 push r15 |
|
2cc6: 0f 93 push r16 |
|
2cc8: 1f 93 push r17 |
|
2cca: cf 93 push r28 |
|
2ccc: df 93 push r29 |
|
2cce: 8c 01 movw r16, r24 |
|
bool retError = error != OSC_OK; |
|
2cd0: ff 24 eor r15, r15 |
|
2cd2: f3 94 inc r15 |
|
2cd4: fc 01 movw r30, r24 |
|
2cd6: 26 81 ldd r18, Z+6 ; 0x06 |
|
2cd8: 37 81 ldd r19, Z+7 ; 0x07 |
|
2cda: 23 2b or r18, r19 |
|
2cdc: 09 f4 brne .+2 ; 0x2ce0 <_ZN10OscMessage8hasErrorEv+0x1c> |
|
2cde: f1 2c mov r15, r1 |
|
//test each of the data |
|
for (int i = 0; i < dataCount; i++){ |
|
2ce0: c0 e0 ldi r28, 0x00 ; 0 |
|
2ce2: d0 e0 ldi r29, 0x00 ; 0 |
|
2ce4: f8 01 movw r30, r16 |
|
2ce6: 24 81 ldd r18, Z+4 ; 0x04 |
|
2ce8: 35 81 ldd r19, Z+5 ; 0x05 |
|
2cea: c2 17 cp r28, r18 |
|
2cec: d3 07 cpc r29, r19 |
|
2cee: 74 f4 brge .+28 ; 0x2d0c <_ZN10OscMessage8hasErrorEv+0x48> |
|
OSCData * datum = getOSCData(i); |
|
2cf0: be 01 movw r22, r28 |
|
2cf2: c8 01 movw r24, r16 |
|
2cf4: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
2cf8: fc 01 movw r30, r24 |
|
retError |= datum->error != OSC_OK; |
|
2cfa: 81 e0 ldi r24, 0x01 ; 1 |
|
2cfc: 20 81 ld r18, Z |
|
2cfe: 31 81 ldd r19, Z+1 ; 0x01 |
|
2d00: 23 2b or r18, r19 |
|
2d02: 09 f4 brne .+2 ; 0x2d06 <_ZN10OscMessage8hasErrorEv+0x42> |
|
2d04: 80 e0 ldi r24, 0x00 ; 0 |
|
2d06: f8 2a or r15, r24 |
|
=============================================================================*/ |
|
|
|
bool OscMessage::hasError(){ |
|
bool retError = error != OSC_OK; |
|
//test each of the data |
|
for (int i = 0; i < dataCount; i++){ |
|
2d08: 21 96 adiw r28, 0x01 ; 1 |
|
2d0a: ec cf rjmp .-40 ; 0x2ce4 <_ZN10OscMessage8hasErrorEv+0x20> |
|
OSCData * datum = getOSCData(i); |
|
retError |= datum->error != OSC_OK; |
|
} |
|
return retError; |
|
} |
|
2d0c: 8f 2d mov r24, r15 |
|
2d0e: df 91 pop r29 |
|
2d10: cf 91 pop r28 |
|
2d12: 1f 91 pop r17 |
|
2d14: 0f 91 pop r16 |
|
2d16: ff 90 pop r15 |
|
2d18: 08 95 ret |
|
|
|
00002d1a <_ZN10OscMessage6getIntEi>: |
|
error = INDEX_OUT_OF_BOUNDS; |
|
return NULL; |
|
} |
|
} |
|
|
|
int32_t OscMessage::getInt(int position){ |
|
2d1a: 0f 93 push r16 |
|
2d1c: 1f 93 push r17 |
|
2d1e: cf 93 push r28 |
|
2d20: df 93 push r29 |
|
2d22: ec 01 movw r28, r24 |
|
OSCData * datum = getOSCData(position); |
|
2d24: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
2d28: 8c 01 movw r16, r24 |
|
if (!hasError()){ |
|
2d2a: ce 01 movw r24, r28 |
|
2d2c: 0e 94 62 16 call 0x2cc4 ; 0x2cc4 <_ZN10OscMessage8hasErrorEv> |
|
2d30: 81 11 cpse r24, r1 |
|
2d32: 07 c0 rjmp .+14 ; 0x2d42 <_ZN10OscMessage6getIntEi+0x28> |
|
return datum->getInt(); |
|
2d34: c8 01 movw r24, r16 |
|
} else { |
|
return NULL; |
|
} |
|
} |
|
2d36: df 91 pop r29 |
|
2d38: cf 91 pop r28 |
|
2d3a: 1f 91 pop r17 |
|
2d3c: 0f 91 pop r16 |
|
} |
|
|
|
int32_t OscMessage::getInt(int position){ |
|
OSCData * datum = getOSCData(position); |
|
if (!hasError()){ |
|
return datum->getInt(); |
|
2d3e: 0c 94 c9 14 jmp 0x2992 ; 0x2992 <_ZN7OSCData6getIntEv> |
|
} else { |
|
return NULL; |
|
} |
|
} |
|
2d42: 60 e0 ldi r22, 0x00 ; 0 |
|
2d44: 70 e0 ldi r23, 0x00 ; 0 |
|
2d46: cb 01 movw r24, r22 |
|
2d48: df 91 pop r29 |
|
2d4a: cf 91 pop r28 |
|
2d4c: 1f 91 pop r17 |
|
2d4e: 0f 91 pop r16 |
|
2d50: 08 95 ret |
|
|
|
00002d52 <_ZN10OscMessage8getFloatEi>: |
|
|
|
float OscMessage::getFloat(int position){ |
|
2d52: 0f 93 push r16 |
|
2d54: 1f 93 push r17 |
|
2d56: cf 93 push r28 |
|
2d58: df 93 push r29 |
|
2d5a: ec 01 movw r28, r24 |
|
OSCData * datum = getOSCData(position); |
|
2d5c: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
2d60: 8c 01 movw r16, r24 |
|
if (!hasError()){ |
|
2d62: ce 01 movw r24, r28 |
|
2d64: 0e 94 62 16 call 0x2cc4 ; 0x2cc4 <_ZN10OscMessage8hasErrorEv> |
|
2d68: 81 11 cpse r24, r1 |
|
2d6a: 07 c0 rjmp .+14 ; 0x2d7a <_ZN10OscMessage8getFloatEi+0x28> |
|
return datum->getFloat(); |
|
2d6c: c8 01 movw r24, r16 |
|
} else { |
|
return NULL; |
|
} |
|
} |
|
2d6e: df 91 pop r29 |
|
2d70: cf 91 pop r28 |
|
2d72: 1f 91 pop r17 |
|
2d74: 0f 91 pop r16 |
|
} |
|
|
|
float OscMessage::getFloat(int position){ |
|
OSCData * datum = getOSCData(position); |
|
if (!hasError()){ |
|
return datum->getFloat(); |
|
2d76: 0c 94 d8 14 jmp 0x29b0 ; 0x29b0 <_ZN7OSCData8getFloatEv> |
|
} else { |
|
return NULL; |
|
} |
|
} |
|
2d7a: 60 e0 ldi r22, 0x00 ; 0 |
|
2d7c: 70 e0 ldi r23, 0x00 ; 0 |
|
2d7e: cb 01 movw r24, r22 |
|
2d80: df 91 pop r29 |
|
2d82: cf 91 pop r28 |
|
2d84: 1f 91 pop r17 |
|
2d86: 0f 91 pop r16 |
|
2d88: 08 95 ret |
|
|
|
00002d8a <_ZN10OscMessage7getTypeEi>: |
|
} else { |
|
return NULL; |
|
} |
|
} |
|
|
|
char OscMessage::getType(int position){ |
|
2d8a: 0f 93 push r16 |
|
2d8c: 1f 93 push r17 |
|
2d8e: cf 93 push r28 |
|
2d90: df 93 push r29 |
|
2d92: ec 01 movw r28, r24 |
|
OSCData * datum = getOSCData(position); |
|
2d94: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
2d98: 8c 01 movw r16, r24 |
|
if (!hasError()){ |
|
2d9a: ce 01 movw r24, r28 |
|
2d9c: 0e 94 62 16 call 0x2cc4 ; 0x2cc4 <_ZN10OscMessage8hasErrorEv> |
|
2da0: 81 11 cpse r24, r1 |
|
2da2: 03 c0 rjmp .+6 ; 0x2daa <_ZN10OscMessage7getTypeEi+0x20> |
|
return datum->type; |
|
2da4: f8 01 movw r30, r16 |
|
2da6: 84 81 ldd r24, Z+4 ; 0x04 |
|
2da8: 01 c0 rjmp .+2 ; 0x2dac <_ZN10OscMessage7getTypeEi+0x22> |
|
} else { |
|
return NULL; |
|
2daa: 80 e0 ldi r24, 0x00 ; 0 |
|
} |
|
} |
|
2dac: df 91 pop r29 |
|
2dae: cf 91 pop r28 |
|
2db0: 1f 91 pop r17 |
|
2db2: 0f 91 pop r16 |
|
2db4: 08 95 ret |
|
|
|
00002db6 <_ZN10OscMessage4sendER5Print>: |
|
|
|
/*============================================================================= |
|
SENDING |
|
=============================================================================*/ |
|
|
|
void OscMessage::send(Print &p){ |
|
2db6: 8f 92 push r8 |
|
2db8: 9f 92 push r9 |
|
2dba: af 92 push r10 |
|
2dbc: bf 92 push r11 |
|
2dbe: cf 92 push r12 |
|
2dc0: df 92 push r13 |
|
2dc2: ef 92 push r14 |
|
2dc4: ff 92 push r15 |
|
2dc6: 0f 93 push r16 |
|
2dc8: 1f 93 push r17 |
|
2dca: cf 93 push r28 |
|
2dcc: df 93 push r29 |
|
2dce: 00 d0 rcall .+0 ; 0x2dd0 <_ZN10OscMessage4sendER5Print+0x1a> |
|
2dd0: 00 d0 rcall .+0 ; 0x2dd2 <_ZN10OscMessage4sendER5Print+0x1c> |
|
2dd2: cd b7 in r28, 0x3d ; 61 |
|
2dd4: de b7 in r29, 0x3e ; 62 |
|
2dd6: 6c 01 movw r12, r24 |
|
2dd8: 8b 01 movw r16, r22 |
|
//don't send a message with errors |
|
if (hasError()){ |
|
2dda: 0e 94 62 16 call 0x2cc4 ; 0x2cc4 <_ZN10OscMessage8hasErrorEv> |
|
2dde: 81 11 cpse r24, r1 |
|
2de0: 1c c1 rjmp .+568 ; 0x301a <_ZN10OscMessage4sendER5Print+0x264> |
|
return; |
|
} |
|
uint8_t nullChar = '\0'; |
|
//send the address |
|
int addrLen = strlen(address) + 1; |
|
2de2: d6 01 movw r26, r12 |
|
2de4: 6d 91 ld r22, X+ |
|
2de6: 7c 91 ld r23, X |
|
2de8: fb 01 movw r30, r22 |
|
2dea: 01 90 ld r0, Z+ |
|
2dec: 00 20 and r0, r0 |
|
2dee: e9 f7 brne .-6 ; 0x2dea <_ZN10OscMessage4sendER5Print+0x34> |
|
2df0: 31 97 sbiw r30, 0x01 ; 1 |
|
2df2: e6 1b sub r30, r22 |
|
2df4: f7 0b sbc r31, r23 |
|
2df6: af 01 movw r20, r30 |
|
2df8: 4f 5f subi r20, 0xFF ; 255 |
|
2dfa: 5f 4f sbci r21, 0xFF ; 255 |
|
/*============================================================================= |
|
SIZE |
|
=============================================================================*/ |
|
|
|
int OscMessage::padSize(int _bytes){ |
|
int space = (_bytes + 3) / 4; |
|
2dfc: 7f 01 movw r14, r30 |
|
2dfe: b4 e0 ldi r27, 0x04 ; 4 |
|
2e00: eb 0e add r14, r27 |
|
2e02: f1 1c adc r15, r1 |
|
2e04: f7 fe sbrs r15, 7 |
|
2e06: 04 c0 rjmp .+8 ; 0x2e10 <_ZN10OscMessage4sendER5Print+0x5a> |
|
2e08: 7f 01 movw r14, r30 |
|
2e0a: 27 e0 ldi r18, 0x07 ; 7 |
|
2e0c: e2 0e add r14, r18 |
|
2e0e: f1 1c adc r15, r1 |
|
space *= 4; |
|
2e10: 8c ef ldi r24, 0xFC ; 252 |
|
2e12: e8 22 and r14, r24 |
|
return space - _bytes; |
|
2e14: e4 1a sub r14, r20 |
|
2e16: f5 0a sbc r15, r21 |
|
//send the address |
|
int addrLen = strlen(address) + 1; |
|
//padding amount |
|
int addrPad = padSize(addrLen); |
|
//write it to the stream |
|
p.write((uint8_t *) address, addrLen); |
|
2e18: d8 01 movw r26, r16 |
|
2e1a: ed 91 ld r30, X+ |
|
2e1c: fc 91 ld r31, X |
|
2e1e: 02 80 ldd r0, Z+2 ; 0x02 |
|
2e20: f3 81 ldd r31, Z+3 ; 0x03 |
|
2e22: e0 2d mov r30, r0 |
|
2e24: c8 01 movw r24, r16 |
|
2e26: 09 95 icall |
|
2e28: d8 01 movw r26, r16 |
|
2e2a: ed 91 ld r30, X+ |
|
2e2c: fc 91 ld r31, X |
|
//add the padding |
|
while(addrPad--){ |
|
p.write(nullChar); |
|
2e2e: 01 90 ld r0, Z+ |
|
2e30: f0 81 ld r31, Z |
|
2e32: e0 2d mov r30, r0 |
|
//padding amount |
|
int addrPad = padSize(addrLen); |
|
//write it to the stream |
|
p.write((uint8_t *) address, addrLen); |
|
//add the padding |
|
while(addrPad--){ |
|
2e34: e1 14 cp r14, r1 |
|
2e36: f1 04 cpc r15, r1 |
|
2e38: 39 f0 breq .+14 ; 0x2e48 <_ZN10OscMessage4sendER5Print+0x92> |
|
p.write(nullChar); |
|
2e3a: 60 e0 ldi r22, 0x00 ; 0 |
|
2e3c: c8 01 movw r24, r16 |
|
2e3e: 09 95 icall |
|
2e40: b1 e0 ldi r27, 0x01 ; 1 |
|
2e42: eb 1a sub r14, r27 |
|
2e44: f1 08 sbc r15, r1 |
|
2e46: f0 cf rjmp .-32 ; 0x2e28 <_ZN10OscMessage4sendER5Print+0x72> |
|
} |
|
//add the comma seperator |
|
p.write((uint8_t) ','); |
|
2e48: 6c e2 ldi r22, 0x2C ; 44 |
|
2e4a: c8 01 movw r24, r16 |
|
2e4c: 09 95 icall |
|
//add the types |
|
for (int i = 0; i < dataCount; i++){ |
|
2e4e: e1 2c mov r14, r1 |
|
2e50: f1 2c mov r15, r1 |
|
2e52: d6 01 movw r26, r12 |
|
2e54: 14 96 adiw r26, 0x04 ; 4 |
|
2e56: 2d 91 ld r18, X+ |
|
2e58: 3c 91 ld r19, X |
|
2e5a: 15 97 sbiw r26, 0x05 ; 5 |
|
2e5c: e2 16 cp r14, r18 |
|
2e5e: f3 06 cpc r15, r19 |
|
2e60: 8c f4 brge .+34 ; 0x2e84 <_ZN10OscMessage4sendER5Print+0xce> |
|
p.write((uint8_t) getType(i)); |
|
2e62: d8 01 movw r26, r16 |
|
2e64: ed 91 ld r30, X+ |
|
2e66: fc 91 ld r31, X |
|
2e68: a0 80 ld r10, Z |
|
2e6a: b1 80 ldd r11, Z+1 ; 0x01 |
|
2e6c: b7 01 movw r22, r14 |
|
2e6e: c6 01 movw r24, r12 |
|
2e70: 0e 94 c5 16 call 0x2d8a ; 0x2d8a <_ZN10OscMessage7getTypeEi> |
|
2e74: 68 2f mov r22, r24 |
|
2e76: c8 01 movw r24, r16 |
|
2e78: f5 01 movw r30, r10 |
|
2e7a: 09 95 icall |
|
p.write(nullChar); |
|
} |
|
//add the comma seperator |
|
p.write((uint8_t) ','); |
|
//add the types |
|
for (int i = 0; i < dataCount; i++){ |
|
2e7c: ff ef ldi r31, 0xFF ; 255 |
|
2e7e: ef 1a sub r14, r31 |
|
2e80: ff 0a sbc r15, r31 |
|
2e82: e7 cf rjmp .-50 ; 0x2e52 <_ZN10OscMessage4sendER5Print+0x9c> |
|
/*============================================================================= |
|
SIZE |
|
=============================================================================*/ |
|
|
|
int OscMessage::padSize(int _bytes){ |
|
int space = (_bytes + 3) / 4; |
|
2e84: c9 01 movw r24, r18 |
|
2e86: 04 96 adiw r24, 0x04 ; 4 |
|
2e88: 97 fd sbrc r25, 7 |
|
2e8a: 03 96 adiw r24, 0x03 ; 3 |
|
space *= 4; |
|
2e8c: 8c 7f andi r24, 0xFC ; 252 |
|
//add the types |
|
for (int i = 0; i < dataCount; i++){ |
|
p.write((uint8_t) getType(i)); |
|
} |
|
//pad the types |
|
int typePad = padSize(dataCount + 1); |
|
2e8e: 2f 5f subi r18, 0xFF ; 255 |
|
2e90: 3f 4f sbci r19, 0xFF ; 255 |
|
=============================================================================*/ |
|
|
|
int OscMessage::padSize(int _bytes){ |
|
int space = (_bytes + 3) / 4; |
|
space *= 4; |
|
return space - _bytes; |
|
2e92: 82 1b sub r24, r18 |
|
2e94: 93 0b sbc r25, r19 |
|
for (int i = 0; i < dataCount; i++){ |
|
p.write((uint8_t) getType(i)); |
|
} |
|
//pad the types |
|
int typePad = padSize(dataCount + 1); |
|
if (typePad == 0){ |
|
2e96: 11 f4 brne .+4 ; 0x2e9c <_ZN10OscMessage4sendER5Print+0xe6> |
|
typePad = 4; |
|
2e98: 84 e0 ldi r24, 0x04 ; 4 |
|
2e9a: 90 e0 ldi r25, 0x00 ; 0 |
|
2e9c: 7c 01 movw r14, r24 |
|
} |
|
while(typePad--){ |
|
p.write(nullChar); |
|
2e9e: d8 01 movw r26, r16 |
|
2ea0: ed 91 ld r30, X+ |
|
2ea2: fc 91 ld r31, X |
|
2ea4: 01 90 ld r0, Z+ |
|
2ea6: f0 81 ld r31, Z |
|
2ea8: e0 2d mov r30, r0 |
|
2eaa: 60 e0 ldi r22, 0x00 ; 0 |
|
2eac: c8 01 movw r24, r16 |
|
2eae: 09 95 icall |
|
2eb0: b1 e0 ldi r27, 0x01 ; 1 |
|
2eb2: eb 1a sub r14, r27 |
|
2eb4: f1 08 sbc r15, r1 |
|
//pad the types |
|
int typePad = padSize(dataCount + 1); |
|
if (typePad == 0){ |
|
typePad = 4; |
|
} |
|
while(typePad--){ |
|
2eb6: 99 f7 brne .-26 ; 0x2e9e <_ZN10OscMessage4sendER5Print+0xe8> |
|
2eb8: a1 2c mov r10, r1 |
|
2eba: b1 2c mov r11, r1 |
|
2ebc: fe 01 movw r30, r28 |
|
2ebe: 35 96 adiw r30, 0x05 ; 5 |
|
2ec0: 4f 01 movw r8, r30 |
|
p.write(nullChar); |
|
} |
|
//write the data |
|
for (int i = 0; i < dataCount; i++){ |
|
2ec2: f6 01 movw r30, r12 |
|
2ec4: 84 81 ldd r24, Z+4 ; 0x04 |
|
2ec6: 95 81 ldd r25, Z+5 ; 0x05 |
|
2ec8: a8 16 cp r10, r24 |
|
2eca: b9 06 cpc r11, r25 |
|
2ecc: 0c f0 brlt .+2 ; 0x2ed0 <_ZN10OscMessage4sendER5Print+0x11a> |
|
2ece: a5 c0 rjmp .+330 ; 0x301a <_ZN10OscMessage4sendER5Print+0x264> |
|
OSCData * datum = getOSCData(i); |
|
2ed0: b5 01 movw r22, r10 |
|
2ed2: c6 01 movw r24, r12 |
|
2ed4: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
2ed8: 7c 01 movw r14, r24 |
|
if (datum->type == 's'){ |
|
2eda: dc 01 movw r26, r24 |
|
2edc: 14 96 adiw r26, 0x04 ; 4 |
|
2ede: 8d 91 ld r24, X+ |
|
2ee0: 9c 91 ld r25, X |
|
2ee2: 15 97 sbiw r26, 0x05 ; 5 |
|
2ee4: 83 37 cpi r24, 0x73 ; 115 |
|
2ee6: 91 05 cpc r25, r1 |
|
2ee8: 99 f5 brne .+102 ; 0x2f50 <_ZN10OscMessage4sendER5Print+0x19a> |
|
p.write(datum->data.b, datum->bytes); |
|
2eea: d8 01 movw r26, r16 |
|
2eec: ed 91 ld r30, X+ |
|
2eee: fc 91 ld r31, X |
|
2ef0: d7 01 movw r26, r14 |
|
2ef2: 12 96 adiw r26, 0x02 ; 2 |
|
2ef4: 4d 91 ld r20, X+ |
|
2ef6: 5c 91 ld r21, X |
|
2ef8: 13 97 sbiw r26, 0x03 ; 3 |
|
2efa: 16 96 adiw r26, 0x06 ; 6 |
|
2efc: 6d 91 ld r22, X+ |
|
2efe: 7c 91 ld r23, X |
|
2f00: 17 97 sbiw r26, 0x07 ; 7 |
|
2f02: 02 80 ldd r0, Z+2 ; 0x02 |
|
2f04: f3 81 ldd r31, Z+3 ; 0x03 |
|
2f06: e0 2d mov r30, r0 |
|
2f08: c8 01 movw r24, r16 |
|
2f0a: 09 95 icall |
|
int dataPad = padSize(datum->bytes); |
|
2f0c: f7 01 movw r30, r14 |
|
2f0e: 82 81 ldd r24, Z+2 ; 0x02 |
|
2f10: 93 81 ldd r25, Z+3 ; 0x03 |
|
/*============================================================================= |
|
SIZE |
|
=============================================================================*/ |
|
|
|
int OscMessage::padSize(int _bytes){ |
|
int space = (_bytes + 3) / 4; |
|
2f12: 7c 01 movw r14, r24 |
|
2f14: f3 e0 ldi r31, 0x03 ; 3 |
|
2f16: ef 0e add r14, r31 |
|
2f18: f1 1c adc r15, r1 |
|
2f1a: f7 fe sbrs r15, 7 |
|
2f1c: 04 c0 rjmp .+8 ; 0x2f26 <_ZN10OscMessage4sendER5Print+0x170> |
|
2f1e: 7c 01 movw r14, r24 |
|
2f20: 26 e0 ldi r18, 0x06 ; 6 |
|
2f22: e2 0e add r14, r18 |
|
2f24: f1 1c adc r15, r1 |
|
space *= 4; |
|
2f26: ac ef ldi r26, 0xFC ; 252 |
|
2f28: ea 22 and r14, r26 |
|
return space - _bytes; |
|
2f2a: e8 1a sub r14, r24 |
|
2f2c: f9 0a sbc r15, r25 |
|
for (int i = 0; i < dataCount; i++){ |
|
OSCData * datum = getOSCData(i); |
|
if (datum->type == 's'){ |
|
p.write(datum->data.b, datum->bytes); |
|
int dataPad = padSize(datum->bytes); |
|
while(dataPad--){ |
|
2f2e: e1 14 cp r14, r1 |
|
2f30: f1 04 cpc r15, r1 |
|
2f32: 09 f4 brne .+2 ; 0x2f36 <_ZN10OscMessage4sendER5Print+0x180> |
|
2f34: 6e c0 rjmp .+220 ; 0x3012 <_ZN10OscMessage4sendER5Print+0x25c> |
|
p.write(nullChar); |
|
2f36: d8 01 movw r26, r16 |
|
2f38: ed 91 ld r30, X+ |
|
2f3a: fc 91 ld r31, X |
|
2f3c: 01 90 ld r0, Z+ |
|
2f3e: f0 81 ld r31, Z |
|
2f40: e0 2d mov r30, r0 |
|
2f42: 60 e0 ldi r22, 0x00 ; 0 |
|
2f44: c8 01 movw r24, r16 |
|
2f46: 09 95 icall |
|
2f48: b1 e0 ldi r27, 0x01 ; 1 |
|
2f4a: eb 1a sub r14, r27 |
|
2f4c: f1 08 sbc r15, r1 |
|
2f4e: ef cf rjmp .-34 ; 0x2f2e <_ZN10OscMessage4sendER5Print+0x178> |
|
} |
|
} else if(datum->type == 'b'){ |
|
2f50: 82 36 cpi r24, 0x62 ; 98 |
|
2f52: 91 05 cpc r25, r1 |
|
2f54: 91 f5 brne .+100 ; 0x2fba <_ZN10OscMessage4sendER5Print+0x204> |
|
p.write(datum->data.b, datum->bytes); |
|
2f56: d8 01 movw r26, r16 |
|
2f58: ed 91 ld r30, X+ |
|
2f5a: fc 91 ld r31, X |
|
2f5c: d7 01 movw r26, r14 |
|
2f5e: 12 96 adiw r26, 0x02 ; 2 |
|
2f60: 4d 91 ld r20, X+ |
|
2f62: 5c 91 ld r21, X |
|
2f64: 13 97 sbiw r26, 0x03 ; 3 |
|
2f66: 16 96 adiw r26, 0x06 ; 6 |
|
2f68: 6d 91 ld r22, X+ |
|
2f6a: 7c 91 ld r23, X |
|
2f6c: 17 97 sbiw r26, 0x07 ; 7 |
|
2f6e: 02 80 ldd r0, Z+2 ; 0x02 |
|
2f70: f3 81 ldd r31, Z+3 ; 0x03 |
|
2f72: e0 2d mov r30, r0 |
|
2f74: c8 01 movw r24, r16 |
|
2f76: 09 95 icall |
|
int dataPad = padSize(datum->bytes); |
|
2f78: f7 01 movw r30, r14 |
|
2f7a: 82 81 ldd r24, Z+2 ; 0x02 |
|
2f7c: 93 81 ldd r25, Z+3 ; 0x03 |
|
/*============================================================================= |
|
SIZE |
|
=============================================================================*/ |
|
|
|
int OscMessage::padSize(int _bytes){ |
|
int space = (_bytes + 3) / 4; |
|
2f7e: 7c 01 movw r14, r24 |
|
2f80: f3 e0 ldi r31, 0x03 ; 3 |
|
2f82: ef 0e add r14, r31 |
|
2f84: f1 1c adc r15, r1 |
|
2f86: f7 fe sbrs r15, 7 |
|
2f88: 04 c0 rjmp .+8 ; 0x2f92 <_ZN10OscMessage4sendER5Print+0x1dc> |
|
2f8a: 7c 01 movw r14, r24 |
|
2f8c: 26 e0 ldi r18, 0x06 ; 6 |
|
2f8e: e2 0e add r14, r18 |
|
2f90: f1 1c adc r15, r1 |
|
space *= 4; |
|
2f92: ac ef ldi r26, 0xFC ; 252 |
|
2f94: ea 22 and r14, r26 |
|
return space - _bytes; |
|
2f96: e8 1a sub r14, r24 |
|
2f98: f9 0a sbc r15, r25 |
|
p.write(nullChar); |
|
} |
|
} else if(datum->type == 'b'){ |
|
p.write(datum->data.b, datum->bytes); |
|
int dataPad = padSize(datum->bytes); |
|
while(dataPad--){ |
|
2f9a: e1 14 cp r14, r1 |
|
2f9c: f1 04 cpc r15, r1 |
|
2f9e: c9 f1 breq .+114 ; 0x3012 <_ZN10OscMessage4sendER5Print+0x25c> |
|
p.write(nullChar); |
|
2fa0: d8 01 movw r26, r16 |
|
2fa2: ed 91 ld r30, X+ |
|
2fa4: fc 91 ld r31, X |
|
2fa6: 01 90 ld r0, Z+ |
|
2fa8: f0 81 ld r31, Z |
|
2faa: e0 2d mov r30, r0 |
|
2fac: 60 e0 ldi r22, 0x00 ; 0 |
|
2fae: c8 01 movw r24, r16 |
|
2fb0: 09 95 icall |
|
2fb2: b1 e0 ldi r27, 0x01 ; 1 |
|
2fb4: eb 1a sub r14, r27 |
|
2fb6: f1 08 sbc r15, r1 |
|
2fb8: f0 cf rjmp .-32 ; 0x2f9a <_ZN10OscMessage4sendER5Print+0x1e4> |
|
2fba: d7 01 movw r26, r14 |
|
2fbc: 1a 96 adiw r26, 0x0a ; 10 |
|
2fbe: fe 01 movw r30, r28 |
|
2fc0: 31 96 adiw r30, 0x01 ; 1 |
|
} |
|
} else if (datum->type == 'd'){ |
|
2fc2: 84 36 cpi r24, 0x64 ; 100 |
|
2fc4: 91 05 cpc r25, r1 |
|
2fc6: 79 f4 brne .+30 ; 0x2fe6 <_ZN10OscMessage4sendER5Print+0x230> |
|
if (sig == 0) return x; // for big endian machine just return the input |
|
T ret; |
|
int size = sizeof(T); |
|
char* src = (char*)&x + sizeof(T) - 1; |
|
char* dst = (char*)&ret; |
|
while (size-- > 0){ |
|
2fc8: e8 15 cp r30, r8 |
|
2fca: f9 05 cpc r31, r9 |
|
2fcc: 19 f0 breq .+6 ; 0x2fd4 <_ZN10OscMessage4sendER5Print+0x21e> |
|
*dst++ = *src--; |
|
2fce: 8e 91 ld r24, -X |
|
2fd0: 81 93 st Z+, r24 |
|
2fd2: fa cf rjmp .-12 ; 0x2fc8 <_ZN10OscMessage4sendER5Print+0x212> |
|
double d = BigEndian(datum->data.d); |
|
uint8_t * ptr = (uint8_t *) &d; |
|
p.write(ptr, 8); |
|
2fd4: d8 01 movw r26, r16 |
|
2fd6: ed 91 ld r30, X+ |
|
2fd8: fc 91 ld r31, X |
|
2fda: 02 80 ldd r0, Z+2 ; 0x02 |
|
2fdc: f3 81 ldd r31, Z+3 ; 0x03 |
|
2fde: e0 2d mov r30, r0 |
|
2fe0: 48 e0 ldi r20, 0x08 ; 8 |
|
2fe2: 50 e0 ldi r21, 0x00 ; 0 |
|
2fe4: 11 c0 rjmp .+34 ; 0x3008 <_ZN10OscMessage4sendER5Print+0x252> |
|
if (sig == 0) return x; // for big endian machine just return the input |
|
T ret; |
|
int size = sizeof(T); |
|
char* src = (char*)&x + sizeof(T) - 1; |
|
char* dst = (char*)&ret; |
|
while (size-- > 0){ |
|
2fe6: e8 15 cp r30, r8 |
|
2fe8: f9 05 cpc r31, r9 |
|
2fea: 19 f0 breq .+6 ; 0x2ff2 <_ZN10OscMessage4sendER5Print+0x23c> |
|
*dst++ = *src--; |
|
2fec: 8e 91 ld r24, -X |
|
2fee: 81 93 st Z+, r24 |
|
2ff0: fa cf rjmp .-12 ; 0x2fe6 <_ZN10OscMessage4sendER5Print+0x230> |
|
} else { |
|
uint32_t i = BigEndian(datum->data.i); |
|
uint8_t * ptr = (uint8_t *) &i; |
|
p.write(ptr, datum->bytes); |
|
2ff2: d8 01 movw r26, r16 |
|
2ff4: ed 91 ld r30, X+ |
|
2ff6: fc 91 ld r31, X |
|
2ff8: d7 01 movw r26, r14 |
|
2ffa: 12 96 adiw r26, 0x02 ; 2 |
|
2ffc: 4d 91 ld r20, X+ |
|
2ffe: 5c 91 ld r21, X |
|
3000: 13 97 sbiw r26, 0x03 ; 3 |
|
3002: 02 80 ldd r0, Z+2 ; 0x02 |
|
3004: f3 81 ldd r31, Z+3 ; 0x03 |
|
3006: e0 2d mov r30, r0 |
|
3008: be 01 movw r22, r28 |
|
300a: 6f 5f subi r22, 0xFF ; 255 |
|
300c: 7f 4f sbci r23, 0xFF ; 255 |
|
300e: c8 01 movw r24, r16 |
|
3010: 09 95 icall |
|
} |
|
while(typePad--){ |
|
p.write(nullChar); |
|
} |
|
//write the data |
|
for (int i = 0; i < dataCount; i++){ |
|
3012: bf ef ldi r27, 0xFF ; 255 |
|
3014: ab 1a sub r10, r27 |
|
3016: bb 0a sbc r11, r27 |
|
3018: 54 cf rjmp .-344 ; 0x2ec2 <_ZN10OscMessage4sendER5Print+0x10c> |
|
uint32_t i = BigEndian(datum->data.i); |
|
uint8_t * ptr = (uint8_t *) &i; |
|
p.write(ptr, datum->bytes); |
|
} |
|
} |
|
} |
|
301a: 0f 90 pop r0 |
|
301c: 0f 90 pop r0 |
|
301e: 0f 90 pop r0 |
|
3020: 0f 90 pop r0 |
|
3022: df 91 pop r29 |
|
3024: cf 91 pop r28 |
|
3026: 1f 91 pop r17 |
|
3028: 0f 91 pop r16 |
|
302a: ff 90 pop r15 |
|
302c: ef 90 pop r14 |
|
302e: df 90 pop r13 |
|
3030: cf 90 pop r12 |
|
3032: bf 90 pop r11 |
|
3034: af 90 pop r10 |
|
3036: 9f 90 pop r9 |
|
3038: 8f 90 pop r8 |
|
303a: 08 95 ret |
|
|
|
0000303c <_ZN10OscMessage19addToIncomingBufferEh>: |
|
|
|
/*============================================================================= |
|
INCOMING BUFFER MANAGEMENT |
|
=============================================================================*/ |
|
|
|
void OscMessage::addToIncomingBuffer(uint8_t incomingByte){ |
|
303c: 1f 93 push r17 |
|
303e: cf 93 push r28 |
|
3040: df 93 push r29 |
|
3042: ec 01 movw r28, r24 |
|
3044: 16 2f mov r17, r22 |
|
//realloc some space for the new byte and stick it on the end |
|
incomingBuffer = (uint8_t *) realloc ( incomingBuffer, incomingBufferSize + 1); |
|
3046: 6c 85 ldd r22, Y+12 ; 0x0c |
|
3048: 7d 85 ldd r23, Y+13 ; 0x0d |
|
304a: 6f 5f subi r22, 0xFF ; 255 |
|
304c: 7f 4f sbci r23, 0xFF ; 255 |
|
304e: 8a 85 ldd r24, Y+10 ; 0x0a |
|
3050: 9b 85 ldd r25, Y+11 ; 0x0b |
|
3052: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
3056: 9b 87 std Y+11, r25 ; 0x0b |
|
3058: 8a 87 std Y+10, r24 ; 0x0a |
|
if (incomingBuffer != NULL){ |
|
305a: 00 97 sbiw r24, 0x00 ; 0 |
|
305c: 61 f0 breq .+24 ; 0x3076 <_ZN10OscMessage19addToIncomingBufferEh+0x3a> |
|
incomingBuffer[incomingBufferSize++] = incomingByte; |
|
305e: 2c 85 ldd r18, Y+12 ; 0x0c |
|
3060: 3d 85 ldd r19, Y+13 ; 0x0d |
|
3062: a9 01 movw r20, r18 |
|
3064: 4f 5f subi r20, 0xFF ; 255 |
|
3066: 5f 4f sbci r21, 0xFF ; 255 |
|
3068: 5d 87 std Y+13, r21 ; 0x0d |
|
306a: 4c 87 std Y+12, r20 ; 0x0c |
|
306c: fc 01 movw r30, r24 |
|
306e: e2 0f add r30, r18 |
|
3070: f3 1f adc r31, r19 |
|
3072: 10 83 st Z, r17 |
|
3074: 04 c0 rjmp .+8 ; 0x307e <_ZN10OscMessage19addToIncomingBufferEh+0x42> |
|
} else { |
|
error = ALLOCFAILED; |
|
3076: 83 e0 ldi r24, 0x03 ; 3 |
|
3078: 90 e0 ldi r25, 0x00 ; 0 |
|
307a: 9f 83 std Y+7, r25 ; 0x07 |
|
307c: 8e 83 std Y+6, r24 ; 0x06 |
|
} |
|
} |
|
307e: df 91 pop r29 |
|
3080: cf 91 pop r28 |
|
3082: 1f 91 pop r17 |
|
3084: 08 95 ret |
|
|
|
00003086 <_ZN10OscMessage19clearIncomingBufferEv>: |
|
|
|
void OscMessage::clearIncomingBuffer(){ |
|
3086: cf 93 push r28 |
|
3088: df 93 push r29 |
|
308a: ec 01 movw r28, r24 |
|
incomingBufferSize = 0; |
|
308c: 1d 86 std Y+13, r1 ; 0x0d |
|
308e: 1c 86 std Y+12, r1 ; 0x0c |
|
free(incomingBuffer); |
|
3090: 8a 85 ldd r24, Y+10 ; 0x0a |
|
3092: 9b 85 ldd r25, Y+11 ; 0x0b |
|
3094: 0e 94 1a 30 call 0x6034 ; 0x6034 <free> |
|
incomingBuffer = NULL; |
|
3098: 1b 86 std Y+11, r1 ; 0x0b |
|
309a: 1a 86 std Y+10, r1 ; 0x0a |
|
} |
|
309c: df 91 pop r29 |
|
309e: cf 91 pop r28 |
|
30a0: 08 95 ret |
|
|
|
000030a2 <_ZN10OscMessage13decodeAddressEv>: |
|
|
|
/*============================================================================= |
|
DECODING |
|
=============================================================================*/ |
|
|
|
void OscMessage::decodeAddress(){ |
|
30a2: cf 93 push r28 |
|
30a4: df 93 push r29 |
|
30a6: ec 01 movw r28, r24 |
|
setAddress((char *) incomingBuffer); |
|
30a8: 6a 85 ldd r22, Y+10 ; 0x0a |
|
30aa: 7b 85 ldd r23, Y+11 ; 0x0b |
|
30ac: 0e 94 1c 16 call 0x2c38 ; 0x2c38 <_ZN10OscMessage10setAddressEPKc> |
|
//change the error from invalide message |
|
error = OSC_OK; |
|
30b0: 1f 82 std Y+7, r1 ; 0x07 |
|
30b2: 1e 82 std Y+6, r1 ; 0x06 |
|
clearIncomingBuffer(); |
|
30b4: ce 01 movw r24, r28 |
|
} |
|
30b6: df 91 pop r29 |
|
30b8: cf 91 pop r28 |
|
|
|
void OscMessage::decodeAddress(){ |
|
setAddress((char *) incomingBuffer); |
|
//change the error from invalide message |
|
error = OSC_OK; |
|
clearIncomingBuffer(); |
|
30ba: 0c 94 43 18 jmp 0x3086 ; 0x3086 <_ZN10OscMessage19clearIncomingBufferEv> |
|
|
|
000030be <_ZN10OscMessage3addIcEERS_T_>: |
|
SETTING DATA |
|
=============================================================================*/ |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
30be: ef 92 push r14 |
|
30c0: ff 92 push r15 |
|
30c2: 0f 93 push r16 |
|
30c4: 1f 93 push r17 |
|
30c6: cf 93 push r28 |
|
30c8: df 93 push r29 |
|
30ca: 1f 92 push r1 |
|
30cc: cd b7 in r28, 0x3d ; 61 |
|
30ce: de b7 in r29, 0x3e ; 62 |
|
30d0: 7c 01 movw r14, r24 |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
30d2: 8e e0 ldi r24, 0x0E ; 14 |
|
30d4: 90 e0 ldi r25, 0x00 ; 0 |
|
30d6: 69 83 std Y+1, r22 ; 0x01 |
|
30d8: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
30dc: 8c 01 movw r16, r24 |
|
30de: 69 81 ldd r22, Y+1 ; 0x01 |
|
30e0: 0e 94 bc 14 call 0x2978 ; 0x2978 <_ZN7OSCDataC1Ec> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
30e4: f8 01 movw r30, r16 |
|
30e6: 80 81 ld r24, Z |
|
30e8: 91 81 ldd r25, Z+1 ; 0x01 |
|
error = ALLOCFAILED; |
|
30ea: f7 01 movw r30, r14 |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
30ec: 83 30 cpi r24, 0x03 ; 3 |
|
30ee: 91 05 cpc r25, r1 |
|
30f0: 79 f0 breq .+30 ; 0x3110 <_ZN10OscMessage3addIcEERS_T_+0x52> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
30f2: 64 81 ldd r22, Z+4 ; 0x04 |
|
30f4: 75 81 ldd r23, Z+5 ; 0x05 |
|
30f6: 6f 5f subi r22, 0xFF ; 255 |
|
30f8: 7f 4f sbci r23, 0xFF ; 255 |
|
30fa: 66 0f add r22, r22 |
|
30fc: 77 1f adc r23, r23 |
|
30fe: 82 81 ldd r24, Z+2 ; 0x02 |
|
3100: 93 81 ldd r25, Z+3 ; 0x03 |
|
3102: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
3106: 00 97 sbiw r24, 0x00 ; 0 |
|
3108: 31 f4 brne .+12 ; 0x3116 <_ZN10OscMessage3addIcEERS_T_+0x58> |
|
error = ALLOCFAILED; |
|
310a: 83 e0 ldi r24, 0x03 ; 3 |
|
310c: 90 e0 ldi r25, 0x00 ; 0 |
|
310e: f7 01 movw r30, r14 |
|
3110: 97 83 std Z+7, r25 ; 0x07 |
|
3112: 86 83 std Z+6, r24 ; 0x06 |
|
3114: 11 c0 rjmp .+34 ; 0x3138 <_ZN10OscMessage3addIcEERS_T_+0x7a> |
|
} else { |
|
data = dataMem; |
|
3116: f7 01 movw r30, r14 |
|
3118: 93 83 std Z+3, r25 ; 0x03 |
|
311a: 82 83 std Z+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
311c: 24 81 ldd r18, Z+4 ; 0x04 |
|
311e: 35 81 ldd r19, Z+5 ; 0x05 |
|
3120: f9 01 movw r30, r18 |
|
3122: ee 0f add r30, r30 |
|
3124: ff 1f adc r31, r31 |
|
3126: e8 0f add r30, r24 |
|
3128: f9 1f adc r31, r25 |
|
312a: 11 83 std Z+1, r17 ; 0x01 |
|
312c: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
312e: 2f 5f subi r18, 0xFF ; 255 |
|
3130: 3f 4f sbci r19, 0xFF ; 255 |
|
3132: f7 01 movw r30, r14 |
|
3134: 35 83 std Z+5, r19 ; 0x05 |
|
3136: 24 83 std Z+4, r18 ; 0x04 |
|
} |
|
} |
|
return *this; |
|
} |
|
3138: c7 01 movw r24, r14 |
|
313a: 0f 90 pop r0 |
|
313c: df 91 pop r29 |
|
313e: cf 91 pop r28 |
|
3140: 1f 91 pop r17 |
|
3142: 0f 91 pop r16 |
|
3144: ff 90 pop r15 |
|
3146: ef 90 pop r14 |
|
3148: 08 95 ret |
|
|
|
0000314a <_ZN10OscMessage3setIiEEviT_>: |
|
return *this; |
|
} |
|
|
|
//sets the data at a position |
|
template <typename T> |
|
void set(int position, T datum){ |
|
314a: cf 92 push r12 |
|
314c: df 92 push r13 |
|
314e: ef 92 push r14 |
|
3150: ff 92 push r15 |
|
3152: 0f 93 push r16 |
|
3154: 1f 93 push r17 |
|
3156: cf 93 push r28 |
|
3158: df 93 push r29 |
|
315a: ec 01 movw r28, r24 |
|
315c: 8b 01 movw r16, r22 |
|
315e: 6a 01 movw r12, r20 |
|
if (position < dataCount){ |
|
3160: 8c 81 ldd r24, Y+4 ; 0x04 |
|
3162: 9d 81 ldd r25, Y+5 ; 0x05 |
|
3164: 68 17 cp r22, r24 |
|
3166: 79 07 cpc r23, r25 |
|
3168: 14 f5 brge .+68 ; 0x31ae <_ZN10OscMessage3setIiEEviT_+0x64> |
|
//replace the OSCData with a new one |
|
OSCData * oldDatum = getOSCData(position); |
|
316a: ce 01 movw r24, r28 |
|
316c: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
3170: 7c 01 movw r14, r24 |
|
//destroy the old one |
|
delete oldDatum; |
|
3172: 00 97 sbiw r24, 0x00 ; 0 |
|
3174: 29 f0 breq .+10 ; 0x3180 <_ZN10OscMessage3setIiEEviT_+0x36> |
|
3176: 0e 94 a9 14 call 0x2952 ; 0x2952 <_ZN7OSCDataD1Ev> |
|
317a: c7 01 movw r24, r14 |
|
317c: 0e 94 16 2c call 0x582c ; 0x582c <_ZdlPv> |
|
//make a new one |
|
OSCData * newDatum = new OSCData(datum); |
|
3180: 8e e0 ldi r24, 0x0E ; 14 |
|
3182: 90 e0 ldi r25, 0x00 ; 0 |
|
3184: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
3188: 7c 01 movw r14, r24 |
|
318a: b6 01 movw r22, r12 |
|
318c: 0e 94 f9 13 call 0x27f2 ; 0x27f2 <_ZN7OSCDataC1Ei> |
|
//test if there was an error |
|
if (newDatum->error == ALLOCFAILED){ |
|
3190: f7 01 movw r30, r14 |
|
3192: 80 81 ld r24, Z |
|
3194: 91 81 ldd r25, Z+1 ; 0x01 |
|
3196: 83 30 cpi r24, 0x03 ; 3 |
|
3198: 91 05 cpc r25, r1 |
|
319a: d9 f1 breq .+118 ; 0x3212 <_ZN10OscMessage3setIiEEviT_+0xc8> |
|
error = ALLOCFAILED; |
|
} else { |
|
//otherwise, put it in the data array |
|
data[position] = newDatum; |
|
319c: 00 0f add r16, r16 |
|
319e: 11 1f adc r17, r17 |
|
31a0: ea 81 ldd r30, Y+2 ; 0x02 |
|
31a2: fb 81 ldd r31, Y+3 ; 0x03 |
|
31a4: e0 0f add r30, r16 |
|
31a6: f1 1f adc r31, r17 |
|
31a8: f1 82 std Z+1, r15 ; 0x01 |
|
31aa: e0 82 st Z, r14 |
|
31ac: 34 c0 rjmp .+104 ; 0x3216 <_ZN10OscMessage3setIiEEviT_+0xcc> |
|
} |
|
} else if (position == (dataCount)){ |
|
31ae: 68 17 cp r22, r24 |
|
31b0: 79 07 cpc r23, r25 |
|
31b2: 69 f5 brne .+90 ; 0x320e <_ZN10OscMessage3setIiEEviT_+0xc4> |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
31b4: 8e e0 ldi r24, 0x0E ; 14 |
|
31b6: 90 e0 ldi r25, 0x00 ; 0 |
|
31b8: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
31bc: 8c 01 movw r16, r24 |
|
31be: b6 01 movw r22, r12 |
|
31c0: 0e 94 f9 13 call 0x27f2 ; 0x27f2 <_ZN7OSCDataC1Ei> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
31c4: f8 01 movw r30, r16 |
|
31c6: 80 81 ld r24, Z |
|
31c8: 91 81 ldd r25, Z+1 ; 0x01 |
|
31ca: 83 30 cpi r24, 0x03 ; 3 |
|
31cc: 91 05 cpc r25, r1 |
|
31ce: 09 f1 breq .+66 ; 0x3212 <_ZN10OscMessage3setIiEEviT_+0xc8> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
31d0: 6c 81 ldd r22, Y+4 ; 0x04 |
|
31d2: 7d 81 ldd r23, Y+5 ; 0x05 |
|
31d4: 6f 5f subi r22, 0xFF ; 255 |
|
31d6: 7f 4f sbci r23, 0xFF ; 255 |
|
31d8: 66 0f add r22, r22 |
|
31da: 77 1f adc r23, r23 |
|
31dc: 8a 81 ldd r24, Y+2 ; 0x02 |
|
31de: 9b 81 ldd r25, Y+3 ; 0x03 |
|
31e0: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
31e4: 00 97 sbiw r24, 0x00 ; 0 |
|
31e6: 19 f4 brne .+6 ; 0x31ee <_ZN10OscMessage3setIiEEviT_+0xa4> |
|
error = ALLOCFAILED; |
|
31e8: 83 e0 ldi r24, 0x03 ; 3 |
|
31ea: 90 e0 ldi r25, 0x00 ; 0 |
|
31ec: 12 c0 rjmp .+36 ; 0x3212 <_ZN10OscMessage3setIiEEviT_+0xc8> |
|
} else { |
|
data = dataMem; |
|
31ee: 9b 83 std Y+3, r25 ; 0x03 |
|
31f0: 8a 83 std Y+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
31f2: 2c 81 ldd r18, Y+4 ; 0x04 |
|
31f4: 3d 81 ldd r19, Y+5 ; 0x05 |
|
31f6: f9 01 movw r30, r18 |
|
31f8: ee 0f add r30, r30 |
|
31fa: ff 1f adc r31, r31 |
|
31fc: e8 0f add r30, r24 |
|
31fe: f9 1f adc r31, r25 |
|
3200: 11 83 std Z+1, r17 ; 0x01 |
|
3202: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
3204: 2f 5f subi r18, 0xFF ; 255 |
|
3206: 3f 4f sbci r19, 0xFF ; 255 |
|
3208: 3d 83 std Y+5, r19 ; 0x05 |
|
320a: 2c 83 std Y+4, r18 ; 0x04 |
|
320c: 04 c0 rjmp .+8 ; 0x3216 <_ZN10OscMessage3setIiEEviT_+0xcc> |
|
} else if (position == (dataCount)){ |
|
//add the data to the end |
|
add(datum); |
|
} else { |
|
//else out of bounds error |
|
error = INDEX_OUT_OF_BOUNDS; |
|
320e: 84 e0 ldi r24, 0x04 ; 4 |
|
3210: 90 e0 ldi r25, 0x00 ; 0 |
|
3212: 9f 83 std Y+7, r25 ; 0x07 |
|
3214: 8e 83 std Y+6, r24 ; 0x06 |
|
} |
|
} |
|
3216: df 91 pop r29 |
|
3218: cf 91 pop r28 |
|
321a: 1f 91 pop r17 |
|
321c: 0f 91 pop r16 |
|
321e: ff 90 pop r15 |
|
3220: ef 90 pop r14 |
|
3222: df 90 pop r13 |
|
3224: cf 90 pop r12 |
|
3226: 08 95 ret |
|
|
|
00003228 <_ZN10OscMessage3setIfEEviT_>: |
|
return *this; |
|
} |
|
|
|
//sets the data at a position |
|
template <typename T> |
|
void set(int position, T datum){ |
|
3228: cf 92 push r12 |
|
322a: df 92 push r13 |
|
322c: ef 92 push r14 |
|
322e: ff 92 push r15 |
|
3230: 0f 93 push r16 |
|
3232: 1f 93 push r17 |
|
3234: cf 93 push r28 |
|
3236: df 93 push r29 |
|
3238: 00 d0 rcall .+0 ; 0x323a <_ZN10OscMessage3setIfEEviT_+0x12> |
|
323a: 00 d0 rcall .+0 ; 0x323c <_ZN10OscMessage3setIfEEviT_+0x14> |
|
323c: cd b7 in r28, 0x3d ; 61 |
|
323e: de b7 in r29, 0x3e ; 62 |
|
3240: 6c 01 movw r12, r24 |
|
3242: 8b 01 movw r16, r22 |
|
if (position < dataCount){ |
|
3244: dc 01 movw r26, r24 |
|
3246: 14 96 adiw r26, 0x04 ; 4 |
|
3248: 8d 91 ld r24, X+ |
|
324a: 9c 91 ld r25, X |
|
324c: 15 97 sbiw r26, 0x05 ; 5 |
|
324e: 68 17 cp r22, r24 |
|
3250: 79 07 cpc r23, r25 |
|
3252: d4 f5 brge .+116 ; 0x32c8 <_ZN10OscMessage3setIfEEviT_+0xa0> |
|
//replace the OSCData with a new one |
|
OSCData * oldDatum = getOSCData(position); |
|
3254: c6 01 movw r24, r12 |
|
3256: 29 83 std Y+1, r18 ; 0x01 |
|
3258: 3a 83 std Y+2, r19 ; 0x02 |
|
325a: 4b 83 std Y+3, r20 ; 0x03 |
|
325c: 5c 83 std Y+4, r21 ; 0x04 |
|
325e: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
3262: 7c 01 movw r14, r24 |
|
//destroy the old one |
|
delete oldDatum; |
|
3264: 29 81 ldd r18, Y+1 ; 0x01 |
|
3266: 3a 81 ldd r19, Y+2 ; 0x02 |
|
3268: 4b 81 ldd r20, Y+3 ; 0x03 |
|
326a: 5c 81 ldd r21, Y+4 ; 0x04 |
|
326c: 00 97 sbiw r24, 0x00 ; 0 |
|
326e: 49 f0 breq .+18 ; 0x3282 <_ZN10OscMessage3setIfEEviT_+0x5a> |
|
3270: 0e 94 a9 14 call 0x2952 ; 0x2952 <_ZN7OSCDataD1Ev> |
|
3274: c7 01 movw r24, r14 |
|
3276: 0e 94 16 2c call 0x582c ; 0x582c <_ZdlPv> |
|
327a: 5c 81 ldd r21, Y+4 ; 0x04 |
|
327c: 4b 81 ldd r20, Y+3 ; 0x03 |
|
327e: 3a 81 ldd r19, Y+2 ; 0x02 |
|
3280: 29 81 ldd r18, Y+1 ; 0x01 |
|
//make a new one |
|
OSCData * newDatum = new OSCData(datum); |
|
3282: 8e e0 ldi r24, 0x0E ; 14 |
|
3284: 90 e0 ldi r25, 0x00 ; 0 |
|
3286: 29 83 std Y+1, r18 ; 0x01 |
|
3288: 3a 83 std Y+2, r19 ; 0x02 |
|
328a: 4b 83 std Y+3, r20 ; 0x03 |
|
328c: 5c 83 std Y+4, r21 ; 0x04 |
|
328e: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
3292: 7c 01 movw r14, r24 |
|
3294: 29 81 ldd r18, Y+1 ; 0x01 |
|
3296: 3a 81 ldd r19, Y+2 ; 0x02 |
|
3298: 4b 81 ldd r20, Y+3 ; 0x03 |
|
329a: 5c 81 ldd r21, Y+4 ; 0x04 |
|
329c: ba 01 movw r22, r20 |
|
329e: a9 01 movw r20, r18 |
|
32a0: 0e 94 1e 14 call 0x283c ; 0x283c <_ZN7OSCDataC1Ef> |
|
//test if there was an error |
|
if (newDatum->error == ALLOCFAILED){ |
|
32a4: f7 01 movw r30, r14 |
|
32a6: 80 81 ld r24, Z |
|
32a8: 91 81 ldd r25, Z+1 ; 0x01 |
|
32aa: 83 30 cpi r24, 0x03 ; 3 |
|
32ac: 91 05 cpc r25, r1 |
|
32ae: b1 f1 breq .+108 ; 0x331c <_ZN10OscMessage3setIfEEviT_+0xf4> |
|
error = ALLOCFAILED; |
|
} else { |
|
//otherwise, put it in the data array |
|
data[position] = newDatum; |
|
32b0: 00 0f add r16, r16 |
|
32b2: 11 1f adc r17, r17 |
|
32b4: d6 01 movw r26, r12 |
|
32b6: 12 96 adiw r26, 0x02 ; 2 |
|
32b8: ed 91 ld r30, X+ |
|
32ba: fc 91 ld r31, X |
|
32bc: 13 97 sbiw r26, 0x03 ; 3 |
|
32be: e0 0f add r30, r16 |
|
32c0: f1 1f adc r31, r17 |
|
32c2: f1 82 std Z+1, r15 ; 0x01 |
|
32c4: e0 82 st Z, r14 |
|
32c6: 49 c0 rjmp .+146 ; 0x335a <_ZN10OscMessage3setIfEEviT_+0x132> |
|
} |
|
} else if (position == (dataCount)){ |
|
32c8: 68 17 cp r22, r24 |
|
32ca: 79 07 cpc r23, r25 |
|
32cc: 09 f0 breq .+2 ; 0x32d0 <_ZN10OscMessage3setIfEEviT_+0xa8> |
|
32ce: 40 c0 rjmp .+128 ; 0x3350 <_ZN10OscMessage3setIfEEviT_+0x128> |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
32d0: 8e e0 ldi r24, 0x0E ; 14 |
|
32d2: 90 e0 ldi r25, 0x00 ; 0 |
|
32d4: 29 83 std Y+1, r18 ; 0x01 |
|
32d6: 3a 83 std Y+2, r19 ; 0x02 |
|
32d8: 4b 83 std Y+3, r20 ; 0x03 |
|
32da: 5c 83 std Y+4, r21 ; 0x04 |
|
32dc: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
32e0: 8c 01 movw r16, r24 |
|
32e2: 29 81 ldd r18, Y+1 ; 0x01 |
|
32e4: 3a 81 ldd r19, Y+2 ; 0x02 |
|
32e6: 4b 81 ldd r20, Y+3 ; 0x03 |
|
32e8: 5c 81 ldd r21, Y+4 ; 0x04 |
|
32ea: ba 01 movw r22, r20 |
|
32ec: a9 01 movw r20, r18 |
|
32ee: 0e 94 1e 14 call 0x283c ; 0x283c <_ZN7OSCDataC1Ef> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
32f2: f8 01 movw r30, r16 |
|
32f4: 80 81 ld r24, Z |
|
32f6: 91 81 ldd r25, Z+1 ; 0x01 |
|
32f8: 83 30 cpi r24, 0x03 ; 3 |
|
32fa: 91 05 cpc r25, r1 |
|
32fc: 79 f0 breq .+30 ; 0x331c <_ZN10OscMessage3setIfEEviT_+0xf4> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
32fe: f6 01 movw r30, r12 |
|
3300: 64 81 ldd r22, Z+4 ; 0x04 |
|
3302: 75 81 ldd r23, Z+5 ; 0x05 |
|
3304: 6f 5f subi r22, 0xFF ; 255 |
|
3306: 7f 4f sbci r23, 0xFF ; 255 |
|
3308: 66 0f add r22, r22 |
|
330a: 77 1f adc r23, r23 |
|
330c: 82 81 ldd r24, Z+2 ; 0x02 |
|
330e: 93 81 ldd r25, Z+3 ; 0x03 |
|
3310: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
3314: 00 97 sbiw r24, 0x00 ; 0 |
|
3316: 41 f4 brne .+16 ; 0x3328 <_ZN10OscMessage3setIfEEviT_+0x100> |
|
error = ALLOCFAILED; |
|
3318: 83 e0 ldi r24, 0x03 ; 3 |
|
331a: 90 e0 ldi r25, 0x00 ; 0 |
|
331c: d6 01 movw r26, r12 |
|
331e: 17 96 adiw r26, 0x07 ; 7 |
|
3320: 9c 93 st X, r25 |
|
3322: 8e 93 st -X, r24 |
|
3324: 16 97 sbiw r26, 0x06 ; 6 |
|
3326: 19 c0 rjmp .+50 ; 0x335a <_ZN10OscMessage3setIfEEviT_+0x132> |
|
} else { |
|
data = dataMem; |
|
3328: f6 01 movw r30, r12 |
|
332a: 93 83 std Z+3, r25 ; 0x03 |
|
332c: 82 83 std Z+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
332e: 24 81 ldd r18, Z+4 ; 0x04 |
|
3330: 35 81 ldd r19, Z+5 ; 0x05 |
|
3332: f9 01 movw r30, r18 |
|
3334: ee 0f add r30, r30 |
|
3336: ff 1f adc r31, r31 |
|
3338: e8 0f add r30, r24 |
|
333a: f9 1f adc r31, r25 |
|
333c: 11 83 std Z+1, r17 ; 0x01 |
|
333e: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
3340: 2f 5f subi r18, 0xFF ; 255 |
|
3342: 3f 4f sbci r19, 0xFF ; 255 |
|
3344: d6 01 movw r26, r12 |
|
3346: 15 96 adiw r26, 0x05 ; 5 |
|
3348: 3c 93 st X, r19 |
|
334a: 2e 93 st -X, r18 |
|
334c: 14 97 sbiw r26, 0x04 ; 4 |
|
334e: 05 c0 rjmp .+10 ; 0x335a <_ZN10OscMessage3setIfEEviT_+0x132> |
|
} else if (position == (dataCount)){ |
|
//add the data to the end |
|
add(datum); |
|
} else { |
|
//else out of bounds error |
|
error = INDEX_OUT_OF_BOUNDS; |
|
3350: 84 e0 ldi r24, 0x04 ; 4 |
|
3352: 90 e0 ldi r25, 0x00 ; 0 |
|
3354: f6 01 movw r30, r12 |
|
3356: 97 83 std Z+7, r25 ; 0x07 |
|
3358: 86 83 std Z+6, r24 ; 0x06 |
|
} |
|
} |
|
335a: 0f 90 pop r0 |
|
335c: 0f 90 pop r0 |
|
335e: 0f 90 pop r0 |
|
3360: 0f 90 pop r0 |
|
3362: df 91 pop r29 |
|
3364: cf 91 pop r28 |
|
3366: 1f 91 pop r17 |
|
3368: 0f 91 pop r16 |
|
336a: ff 90 pop r15 |
|
336c: ef 90 pop r14 |
|
336e: df 90 pop r13 |
|
3370: cf 90 pop r12 |
|
3372: 08 95 ret |
|
|
|
00003374 <_ZN10OscMessage3setIdEEviT_>: |
|
return *this; |
|
} |
|
|
|
//sets the data at a position |
|
template <typename T> |
|
void set(int position, T datum){ |
|
3374: cf 92 push r12 |
|
3376: df 92 push r13 |
|
3378: ef 92 push r14 |
|
337a: ff 92 push r15 |
|
337c: 0f 93 push r16 |
|
337e: 1f 93 push r17 |
|
3380: cf 93 push r28 |
|
3382: df 93 push r29 |
|
3384: 00 d0 rcall .+0 ; 0x3386 <_ZN10OscMessage3setIdEEviT_+0x12> |
|
3386: 00 d0 rcall .+0 ; 0x3388 <_ZN10OscMessage3setIdEEviT_+0x14> |
|
3388: cd b7 in r28, 0x3d ; 61 |
|
338a: de b7 in r29, 0x3e ; 62 |
|
338c: 6c 01 movw r12, r24 |
|
338e: 8b 01 movw r16, r22 |
|
if (position < dataCount){ |
|
3390: dc 01 movw r26, r24 |
|
3392: 14 96 adiw r26, 0x04 ; 4 |
|
3394: 8d 91 ld r24, X+ |
|
3396: 9c 91 ld r25, X |
|
3398: 15 97 sbiw r26, 0x05 ; 5 |
|
339a: 68 17 cp r22, r24 |
|
339c: 79 07 cpc r23, r25 |
|
339e: d4 f5 brge .+116 ; 0x3414 <_ZN10OscMessage3setIdEEviT_+0xa0> |
|
//replace the OSCData with a new one |
|
OSCData * oldDatum = getOSCData(position); |
|
33a0: c6 01 movw r24, r12 |
|
33a2: 29 83 std Y+1, r18 ; 0x01 |
|
33a4: 3a 83 std Y+2, r19 ; 0x02 |
|
33a6: 4b 83 std Y+3, r20 ; 0x03 |
|
33a8: 5c 83 std Y+4, r21 ; 0x04 |
|
33aa: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
33ae: 7c 01 movw r14, r24 |
|
//destroy the old one |
|
delete oldDatum; |
|
33b0: 29 81 ldd r18, Y+1 ; 0x01 |
|
33b2: 3a 81 ldd r19, Y+2 ; 0x02 |
|
33b4: 4b 81 ldd r20, Y+3 ; 0x03 |
|
33b6: 5c 81 ldd r21, Y+4 ; 0x04 |
|
33b8: 00 97 sbiw r24, 0x00 ; 0 |
|
33ba: 49 f0 breq .+18 ; 0x33ce <_ZN10OscMessage3setIdEEviT_+0x5a> |
|
33bc: 0e 94 a9 14 call 0x2952 ; 0x2952 <_ZN7OSCDataD1Ev> |
|
33c0: c7 01 movw r24, r14 |
|
33c2: 0e 94 16 2c call 0x582c ; 0x582c <_ZdlPv> |
|
33c6: 5c 81 ldd r21, Y+4 ; 0x04 |
|
33c8: 4b 81 ldd r20, Y+3 ; 0x03 |
|
33ca: 3a 81 ldd r19, Y+2 ; 0x02 |
|
33cc: 29 81 ldd r18, Y+1 ; 0x01 |
|
//make a new one |
|
OSCData * newDatum = new OSCData(datum); |
|
33ce: 8e e0 ldi r24, 0x0E ; 14 |
|
33d0: 90 e0 ldi r25, 0x00 ; 0 |
|
33d2: 29 83 std Y+1, r18 ; 0x01 |
|
33d4: 3a 83 std Y+2, r19 ; 0x02 |
|
33d6: 4b 83 std Y+3, r20 ; 0x03 |
|
33d8: 5c 83 std Y+4, r21 ; 0x04 |
|
33da: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
33de: 7c 01 movw r14, r24 |
|
33e0: 29 81 ldd r18, Y+1 ; 0x01 |
|
33e2: 3a 81 ldd r19, Y+2 ; 0x02 |
|
33e4: 4b 81 ldd r20, Y+3 ; 0x03 |
|
33e6: 5c 81 ldd r21, Y+4 ; 0x04 |
|
33e8: ba 01 movw r22, r20 |
|
33ea: a9 01 movw r20, r18 |
|
33ec: 0e 94 2e 14 call 0x285c ; 0x285c <_ZN7OSCDataC1Ed> |
|
//test if there was an error |
|
if (newDatum->error == ALLOCFAILED){ |
|
33f0: f7 01 movw r30, r14 |
|
33f2: 80 81 ld r24, Z |
|
33f4: 91 81 ldd r25, Z+1 ; 0x01 |
|
33f6: 83 30 cpi r24, 0x03 ; 3 |
|
33f8: 91 05 cpc r25, r1 |
|
33fa: b1 f1 breq .+108 ; 0x3468 <_ZN10OscMessage3setIdEEviT_+0xf4> |
|
error = ALLOCFAILED; |
|
} else { |
|
//otherwise, put it in the data array |
|
data[position] = newDatum; |
|
33fc: 00 0f add r16, r16 |
|
33fe: 11 1f adc r17, r17 |
|
3400: d6 01 movw r26, r12 |
|
3402: 12 96 adiw r26, 0x02 ; 2 |
|
3404: ed 91 ld r30, X+ |
|
3406: fc 91 ld r31, X |
|
3408: 13 97 sbiw r26, 0x03 ; 3 |
|
340a: e0 0f add r30, r16 |
|
340c: f1 1f adc r31, r17 |
|
340e: f1 82 std Z+1, r15 ; 0x01 |
|
3410: e0 82 st Z, r14 |
|
3412: 49 c0 rjmp .+146 ; 0x34a6 <_ZN10OscMessage3setIdEEviT_+0x132> |
|
} |
|
} else if (position == (dataCount)){ |
|
3414: 68 17 cp r22, r24 |
|
3416: 79 07 cpc r23, r25 |
|
3418: 09 f0 breq .+2 ; 0x341c <_ZN10OscMessage3setIdEEviT_+0xa8> |
|
341a: 40 c0 rjmp .+128 ; 0x349c <_ZN10OscMessage3setIdEEviT_+0x128> |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
341c: 8e e0 ldi r24, 0x0E ; 14 |
|
341e: 90 e0 ldi r25, 0x00 ; 0 |
|
3420: 29 83 std Y+1, r18 ; 0x01 |
|
3422: 3a 83 std Y+2, r19 ; 0x02 |
|
3424: 4b 83 std Y+3, r20 ; 0x03 |
|
3426: 5c 83 std Y+4, r21 ; 0x04 |
|
3428: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
342c: 8c 01 movw r16, r24 |
|
342e: 29 81 ldd r18, Y+1 ; 0x01 |
|
3430: 3a 81 ldd r19, Y+2 ; 0x02 |
|
3432: 4b 81 ldd r20, Y+3 ; 0x03 |
|
3434: 5c 81 ldd r21, Y+4 ; 0x04 |
|
3436: ba 01 movw r22, r20 |
|
3438: a9 01 movw r20, r18 |
|
343a: 0e 94 2e 14 call 0x285c ; 0x285c <_ZN7OSCDataC1Ed> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
343e: f8 01 movw r30, r16 |
|
3440: 80 81 ld r24, Z |
|
3442: 91 81 ldd r25, Z+1 ; 0x01 |
|
3444: 83 30 cpi r24, 0x03 ; 3 |
|
3446: 91 05 cpc r25, r1 |
|
3448: 79 f0 breq .+30 ; 0x3468 <_ZN10OscMessage3setIdEEviT_+0xf4> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
344a: f6 01 movw r30, r12 |
|
344c: 64 81 ldd r22, Z+4 ; 0x04 |
|
344e: 75 81 ldd r23, Z+5 ; 0x05 |
|
3450: 6f 5f subi r22, 0xFF ; 255 |
|
3452: 7f 4f sbci r23, 0xFF ; 255 |
|
3454: 66 0f add r22, r22 |
|
3456: 77 1f adc r23, r23 |
|
3458: 82 81 ldd r24, Z+2 ; 0x02 |
|
345a: 93 81 ldd r25, Z+3 ; 0x03 |
|
345c: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
3460: 00 97 sbiw r24, 0x00 ; 0 |
|
3462: 41 f4 brne .+16 ; 0x3474 <_ZN10OscMessage3setIdEEviT_+0x100> |
|
error = ALLOCFAILED; |
|
3464: 83 e0 ldi r24, 0x03 ; 3 |
|
3466: 90 e0 ldi r25, 0x00 ; 0 |
|
3468: d6 01 movw r26, r12 |
|
346a: 17 96 adiw r26, 0x07 ; 7 |
|
346c: 9c 93 st X, r25 |
|
346e: 8e 93 st -X, r24 |
|
3470: 16 97 sbiw r26, 0x06 ; 6 |
|
3472: 19 c0 rjmp .+50 ; 0x34a6 <_ZN10OscMessage3setIdEEviT_+0x132> |
|
} else { |
|
data = dataMem; |
|
3474: f6 01 movw r30, r12 |
|
3476: 93 83 std Z+3, r25 ; 0x03 |
|
3478: 82 83 std Z+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
347a: 24 81 ldd r18, Z+4 ; 0x04 |
|
347c: 35 81 ldd r19, Z+5 ; 0x05 |
|
347e: f9 01 movw r30, r18 |
|
3480: ee 0f add r30, r30 |
|
3482: ff 1f adc r31, r31 |
|
3484: e8 0f add r30, r24 |
|
3486: f9 1f adc r31, r25 |
|
3488: 11 83 std Z+1, r17 ; 0x01 |
|
348a: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
348c: 2f 5f subi r18, 0xFF ; 255 |
|
348e: 3f 4f sbci r19, 0xFF ; 255 |
|
3490: d6 01 movw r26, r12 |
|
3492: 15 96 adiw r26, 0x05 ; 5 |
|
3494: 3c 93 st X, r19 |
|
3496: 2e 93 st -X, r18 |
|
3498: 14 97 sbiw r26, 0x04 ; 4 |
|
349a: 05 c0 rjmp .+10 ; 0x34a6 <_ZN10OscMessage3setIdEEviT_+0x132> |
|
} else if (position == (dataCount)){ |
|
//add the data to the end |
|
add(datum); |
|
} else { |
|
//else out of bounds error |
|
error = INDEX_OUT_OF_BOUNDS; |
|
349c: 84 e0 ldi r24, 0x04 ; 4 |
|
349e: 90 e0 ldi r25, 0x00 ; 0 |
|
34a0: f6 01 movw r30, r12 |
|
34a2: 97 83 std Z+7, r25 ; 0x07 |
|
34a4: 86 83 std Z+6, r24 ; 0x06 |
|
} |
|
} |
|
34a6: 0f 90 pop r0 |
|
34a8: 0f 90 pop r0 |
|
34aa: 0f 90 pop r0 |
|
34ac: 0f 90 pop r0 |
|
34ae: df 91 pop r29 |
|
34b0: cf 91 pop r28 |
|
34b2: 1f 91 pop r17 |
|
34b4: 0f 91 pop r16 |
|
34b6: ff 90 pop r15 |
|
34b8: ef 90 pop r14 |
|
34ba: df 90 pop r13 |
|
34bc: cf 90 pop r12 |
|
34be: 08 95 ret |
|
|
|
000034c0 <_ZN10OscMessage3setIPcEEviT_>: |
|
return *this; |
|
} |
|
|
|
//sets the data at a position |
|
template <typename T> |
|
void set(int position, T datum){ |
|
34c0: cf 92 push r12 |
|
34c2: df 92 push r13 |
|
34c4: ef 92 push r14 |
|
34c6: ff 92 push r15 |
|
34c8: 0f 93 push r16 |
|
34ca: 1f 93 push r17 |
|
34cc: cf 93 push r28 |
|
34ce: df 93 push r29 |
|
34d0: ec 01 movw r28, r24 |
|
34d2: 8b 01 movw r16, r22 |
|
34d4: 6a 01 movw r12, r20 |
|
if (position < dataCount){ |
|
34d6: 8c 81 ldd r24, Y+4 ; 0x04 |
|
34d8: 9d 81 ldd r25, Y+5 ; 0x05 |
|
34da: 68 17 cp r22, r24 |
|
34dc: 79 07 cpc r23, r25 |
|
34de: 14 f5 brge .+68 ; 0x3524 <_ZN10OscMessage3setIPcEEviT_+0x64> |
|
//replace the OSCData with a new one |
|
OSCData * oldDatum = getOSCData(position); |
|
34e0: ce 01 movw r24, r28 |
|
34e2: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
34e6: 7c 01 movw r14, r24 |
|
//destroy the old one |
|
delete oldDatum; |
|
34e8: 00 97 sbiw r24, 0x00 ; 0 |
|
34ea: 29 f0 breq .+10 ; 0x34f6 <_ZN10OscMessage3setIPcEEviT_+0x36> |
|
34ec: 0e 94 a9 14 call 0x2952 ; 0x2952 <_ZN7OSCDataD1Ev> |
|
34f0: c7 01 movw r24, r14 |
|
34f2: 0e 94 16 2c call 0x582c ; 0x582c <_ZdlPv> |
|
//make a new one |
|
OSCData * newDatum = new OSCData(datum); |
|
34f6: 8e e0 ldi r24, 0x0E ; 14 |
|
34f8: 90 e0 ldi r25, 0x00 ; 0 |
|
34fa: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
34fe: 7c 01 movw r14, r24 |
|
3500: b6 01 movw r22, r12 |
|
3502: 0e 94 c1 13 call 0x2782 ; 0x2782 <_ZN7OSCDataC1EPKc> |
|
//test if there was an error |
|
if (newDatum->error == ALLOCFAILED){ |
|
3506: f7 01 movw r30, r14 |
|
3508: 80 81 ld r24, Z |
|
350a: 91 81 ldd r25, Z+1 ; 0x01 |
|
350c: 83 30 cpi r24, 0x03 ; 3 |
|
350e: 91 05 cpc r25, r1 |
|
3510: d9 f1 breq .+118 ; 0x3588 <_ZN10OscMessage3setIPcEEviT_+0xc8> |
|
error = ALLOCFAILED; |
|
} else { |
|
//otherwise, put it in the data array |
|
data[position] = newDatum; |
|
3512: 00 0f add r16, r16 |
|
3514: 11 1f adc r17, r17 |
|
3516: ea 81 ldd r30, Y+2 ; 0x02 |
|
3518: fb 81 ldd r31, Y+3 ; 0x03 |
|
351a: e0 0f add r30, r16 |
|
351c: f1 1f adc r31, r17 |
|
351e: f1 82 std Z+1, r15 ; 0x01 |
|
3520: e0 82 st Z, r14 |
|
3522: 34 c0 rjmp .+104 ; 0x358c <_ZN10OscMessage3setIPcEEviT_+0xcc> |
|
} |
|
} else if (position == (dataCount)){ |
|
3524: 68 17 cp r22, r24 |
|
3526: 79 07 cpc r23, r25 |
|
3528: 69 f5 brne .+90 ; 0x3584 <_ZN10OscMessage3setIPcEEviT_+0xc4> |
|
|
|
//returns the OSCMessage so that multiple 'add's can be strung together |
|
template <typename T> |
|
OscMessage& add(T datum){ |
|
//make a piece of data |
|
OSCData * d = new OSCData(datum); |
|
352a: 8e e0 ldi r24, 0x0E ; 14 |
|
352c: 90 e0 ldi r25, 0x00 ; 0 |
|
352e: 0e 94 14 2c call 0x5828 ; 0x5828 <_Znwj> |
|
3532: 8c 01 movw r16, r24 |
|
3534: b6 01 movw r22, r12 |
|
3536: 0e 94 c1 13 call 0x2782 ; 0x2782 <_ZN7OSCDataC1EPKc> |
|
//check if it has any errors |
|
if (d->error == ALLOCFAILED){ |
|
353a: f8 01 movw r30, r16 |
|
353c: 80 81 ld r24, Z |
|
353e: 91 81 ldd r25, Z+1 ; 0x01 |
|
3540: 83 30 cpi r24, 0x03 ; 3 |
|
3542: 91 05 cpc r25, r1 |
|
3544: 09 f1 breq .+66 ; 0x3588 <_ZN10OscMessage3setIPcEEviT_+0xc8> |
|
error = ALLOCFAILED; |
|
} else { |
|
//resize the data array |
|
OSCData ** dataMem = (OSCData **) realloc(data, sizeof(OSCData *) * (dataCount + 1)); |
|
3546: 6c 81 ldd r22, Y+4 ; 0x04 |
|
3548: 7d 81 ldd r23, Y+5 ; 0x05 |
|
354a: 6f 5f subi r22, 0xFF ; 255 |
|
354c: 7f 4f sbci r23, 0xFF ; 255 |
|
354e: 66 0f add r22, r22 |
|
3550: 77 1f adc r23, r23 |
|
3552: 8a 81 ldd r24, Y+2 ; 0x02 |
|
3554: 9b 81 ldd r25, Y+3 ; 0x03 |
|
3556: 0e 94 a9 30 call 0x6152 ; 0x6152 <realloc> |
|
if (dataMem == NULL){ |
|
355a: 00 97 sbiw r24, 0x00 ; 0 |
|
355c: 19 f4 brne .+6 ; 0x3564 <_ZN10OscMessage3setIPcEEviT_+0xa4> |
|
error = ALLOCFAILED; |
|
355e: 83 e0 ldi r24, 0x03 ; 3 |
|
3560: 90 e0 ldi r25, 0x00 ; 0 |
|
3562: 12 c0 rjmp .+36 ; 0x3588 <_ZN10OscMessage3setIPcEEviT_+0xc8> |
|
} else { |
|
data = dataMem; |
|
3564: 9b 83 std Y+3, r25 ; 0x03 |
|
3566: 8a 83 std Y+2, r24 ; 0x02 |
|
//add data to the end of the array |
|
data[dataCount] = d; |
|
3568: 2c 81 ldd r18, Y+4 ; 0x04 |
|
356a: 3d 81 ldd r19, Y+5 ; 0x05 |
|
356c: f9 01 movw r30, r18 |
|
356e: ee 0f add r30, r30 |
|
3570: ff 1f adc r31, r31 |
|
3572: e8 0f add r30, r24 |
|
3574: f9 1f adc r31, r25 |
|
3576: 11 83 std Z+1, r17 ; 0x01 |
|
3578: 00 83 st Z, r16 |
|
//increment the data size |
|
dataCount++; |
|
357a: 2f 5f subi r18, 0xFF ; 255 |
|
357c: 3f 4f sbci r19, 0xFF ; 255 |
|
357e: 3d 83 std Y+5, r19 ; 0x05 |
|
3580: 2c 83 std Y+4, r18 ; 0x04 |
|
3582: 04 c0 rjmp .+8 ; 0x358c <_ZN10OscMessage3setIPcEEviT_+0xcc> |
|
} else if (position == (dataCount)){ |
|
//add the data to the end |
|
add(datum); |
|
} else { |
|
//else out of bounds error |
|
error = INDEX_OUT_OF_BOUNDS; |
|
3584: 84 e0 ldi r24, 0x04 ; 4 |
|
3586: 90 e0 ldi r25, 0x00 ; 0 |
|
3588: 9f 83 std Y+7, r25 ; 0x07 |
|
358a: 8e 83 std Y+6, r24 ; 0x06 |
|
} |
|
} |
|
358c: df 91 pop r29 |
|
358e: cf 91 pop r28 |
|
3590: 1f 91 pop r17 |
|
3592: 0f 91 pop r16 |
|
3594: ff 90 pop r15 |
|
3596: ef 90 pop r14 |
|
3598: df 90 pop r13 |
|
359a: cf 90 pop r12 |
|
359c: 08 95 ret |
|
|
|
0000359e <_ZN10OscMessage10decodeDataEh>: |
|
void OscMessage::decodeType(uint8_t incomingByte){ |
|
char type = incomingByte; |
|
add(type); |
|
} |
|
|
|
void OscMessage::decodeData(uint8_t incomingByte){ |
|
359e: cf 92 push r12 |
|
35a0: df 92 push r13 |
|
35a2: ef 92 push r14 |
|
35a4: ff 92 push r15 |
|
35a6: 0f 93 push r16 |
|
35a8: 1f 93 push r17 |
|
35aa: cf 93 push r28 |
|
35ac: df 93 push r29 |
|
35ae: cd b7 in r28, 0x3d ; 61 |
|
35b0: de b7 in r29, 0x3e ; 62 |
|
35b2: 2c 97 sbiw r28, 0x0c ; 12 |
|
35b4: 0f b6 in r0, 0x3f ; 63 |
|
35b6: f8 94 cli |
|
35b8: de bf out 0x3e, r29 ; 62 |
|
35ba: 0f be out 0x3f, r0 ; 63 |
|
35bc: cd bf out 0x3d, r28 ; 61 |
|
35be: 8c 01 movw r16, r24 |
|
35c0: d6 2e mov r13, r22 |
|
//get the first OSCData to re-set |
|
for (int i = 0; i < dataCount; i++){ |
|
35c2: e1 2c mov r14, r1 |
|
35c4: f1 2c mov r15, r1 |
|
35c6: f8 01 movw r30, r16 |
|
35c8: 84 81 ldd r24, Z+4 ; 0x04 |
|
35ca: 95 81 ldd r25, Z+5 ; 0x05 |
|
35cc: e8 16 cp r14, r24 |
|
35ce: f9 06 cpc r15, r25 |
|
35d0: 0c f0 brlt .+2 ; 0x35d4 <_ZN10OscMessage10decodeDataEh+0x36> |
|
35d2: ff c0 rjmp .+510 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
OSCData * datum = getOSCData(i); |
|
35d4: b7 01 movw r22, r14 |
|
35d6: c8 01 movw r24, r16 |
|
35d8: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
if (datum->error == INVALID_OSC){ |
|
35dc: dc 01 movw r26, r24 |
|
35de: 2d 91 ld r18, X+ |
|
35e0: 3c 91 ld r19, X |
|
35e2: 11 97 sbiw r26, 0x01 ; 1 |
|
35e4: 22 30 cpi r18, 0x02 ; 2 |
|
35e6: 31 05 cpc r19, r1 |
|
35e8: 09 f0 breq .+2 ; 0x35ec <_ZN10OscMessage10decodeDataEh+0x4e> |
|
35ea: ef c0 rjmp .+478 ; 0x37ca <_ZN10OscMessage10decodeDataEh+0x22c> |
|
//set the contents of datum with the data received |
|
switch (datum->type){ |
|
35ec: 14 96 adiw r26, 0x04 ; 4 |
|
35ee: 8d 91 ld r24, X+ |
|
35f0: 9c 91 ld r25, X |
|
35f2: 15 97 sbiw r26, 0x05 ; 5 |
|
35f4: 86 36 cpi r24, 0x66 ; 102 |
|
35f6: 91 05 cpc r25, r1 |
|
35f8: c1 f1 breq .+112 ; 0x366a <_ZN10OscMessage10decodeDataEh+0xcc> |
|
35fa: 4c f4 brge .+18 ; 0x360e <_ZN10OscMessage10decodeDataEh+0x70> |
|
35fc: 82 36 cpi r24, 0x62 ; 98 |
|
35fe: 91 05 cpc r25, r1 |
|
3600: 09 f4 brne .+2 ; 0x3604 <_ZN10OscMessage10decodeDataEh+0x66> |
|
3602: a4 c0 rjmp .+328 ; 0x374c <_ZN10OscMessage10decodeDataEh+0x1ae> |
|
3604: 84 36 cpi r24, 0x64 ; 100 |
|
3606: 91 05 cpc r25, r1 |
|
3608: 09 f4 brne .+2 ; 0x360c <_ZN10OscMessage10decodeDataEh+0x6e> |
|
360a: 58 c0 rjmp .+176 ; 0x36bc <_ZN10OscMessage10decodeDataEh+0x11e> |
|
360c: e2 c0 rjmp .+452 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
360e: 89 36 cpi r24, 0x69 ; 105 |
|
3610: 91 05 cpc r25, r1 |
|
3612: 29 f0 breq .+10 ; 0x361e <_ZN10OscMessage10decodeDataEh+0x80> |
|
3614: 83 37 cpi r24, 0x73 ; 115 |
|
3616: 91 05 cpc r25, r1 |
|
3618: 09 f4 brne .+2 ; 0x361c <_ZN10OscMessage10decodeDataEh+0x7e> |
|
361a: 84 c0 rjmp .+264 ; 0x3724 <_ZN10OscMessage10decodeDataEh+0x186> |
|
361c: da c0 rjmp .+436 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
case 'i': |
|
if (incomingBufferSize == 4){ |
|
361e: f8 01 movw r30, r16 |
|
3620: 84 85 ldd r24, Z+12 ; 0x0c |
|
3622: 95 85 ldd r25, Z+13 ; 0x0d |
|
3624: 04 97 sbiw r24, 0x04 ; 4 |
|
3626: 09 f0 breq .+2 ; 0x362a <_ZN10OscMessage10decodeDataEh+0x8c> |
|
3628: d4 c0 rjmp .+424 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
//parse the buffer as an int |
|
union { |
|
uint32_t i; |
|
uint8_t b[4]; |
|
} u; |
|
memcpy(u.b, incomingBuffer, 4); |
|
362a: 02 84 ldd r0, Z+10 ; 0x0a |
|
362c: f3 85 ldd r31, Z+11 ; 0x0b |
|
362e: e0 2d mov r30, r0 |
|
3630: 80 81 ld r24, Z |
|
3632: 91 81 ldd r25, Z+1 ; 0x01 |
|
3634: a2 81 ldd r26, Z+2 ; 0x02 |
|
3636: b3 81 ldd r27, Z+3 ; 0x03 |
|
3638: 89 87 std Y+9, r24 ; 0x09 |
|
363a: 9a 87 std Y+10, r25 ; 0x0a |
|
363c: ab 87 std Y+11, r26 ; 0x0b |
|
363e: bc 87 std Y+12, r27 ; 0x0c |
|
3640: ce 01 movw r24, r28 |
|
3642: 09 96 adiw r24, 0x09 ; 9 |
|
3644: fe 01 movw r30, r28 |
|
3646: 3d 96 adiw r30, 0x0d ; 13 |
|
3648: de 01 movw r26, r28 |
|
364a: 11 96 adiw r26, 0x01 ; 1 |
|
if (sig == 0) return x; // for big endian machine just return the input |
|
T ret; |
|
int size = sizeof(T); |
|
char* src = (char*)&x + sizeof(T) - 1; |
|
char* dst = (char*)&ret; |
|
while (size-- > 0){ |
|
364c: e8 17 cp r30, r24 |
|
364e: f9 07 cpc r31, r25 |
|
3650: 19 f0 breq .+6 ; 0x3658 <_ZN10OscMessage10decodeDataEh+0xba> |
|
*dst++ = *src--; |
|
3652: 22 91 ld r18, -Z |
|
3654: 2d 93 st X+, r18 |
|
3656: fa cf rjmp .-12 ; 0x364c <_ZN10OscMessage10decodeDataEh+0xae> |
|
} |
|
return ret; |
|
3658: 49 81 ldd r20, Y+1 ; 0x01 |
|
365a: 5a 81 ldd r21, Y+2 ; 0x02 |
|
365c: 6b 81 ldd r22, Y+3 ; 0x03 |
|
365e: 7c 81 ldd r23, Y+4 ; 0x04 |
|
int dataVal = BigEndian(u.i); |
|
set(i, dataVal); |
|
3660: b7 01 movw r22, r14 |
|
3662: c8 01 movw r24, r16 |
|
3664: 0e 94 a5 18 call 0x314a ; 0x314a <_ZN10OscMessage3setIiEEviT_> |
|
3668: 4c c0 rjmp .+152 ; 0x3702 <_ZN10OscMessage10decodeDataEh+0x164> |
|
clearIncomingBuffer(); |
|
} |
|
break; |
|
case 'f': |
|
if (incomingBufferSize == 4){ |
|
366a: d8 01 movw r26, r16 |
|
366c: 1c 96 adiw r26, 0x0c ; 12 |
|
366e: 8d 91 ld r24, X+ |
|
3670: 9c 91 ld r25, X |
|
3672: 1d 97 sbiw r26, 0x0d ; 13 |
|
3674: 04 97 sbiw r24, 0x04 ; 4 |
|
3676: 09 f0 breq .+2 ; 0x367a <_ZN10OscMessage10decodeDataEh+0xdc> |
|
3678: ac c0 rjmp .+344 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
//parse the buffer as an int |
|
union { |
|
float f; |
|
uint8_t b[4]; |
|
} u; |
|
memcpy(u.b, incomingBuffer, 4); |
|
367a: 1a 96 adiw r26, 0x0a ; 10 |
|
367c: ed 91 ld r30, X+ |
|
367e: fc 91 ld r31, X |
|
3680: 1b 97 sbiw r26, 0x0b ; 11 |
|
3682: 80 81 ld r24, Z |
|
3684: 91 81 ldd r25, Z+1 ; 0x01 |
|
3686: a2 81 ldd r26, Z+2 ; 0x02 |
|
3688: b3 81 ldd r27, Z+3 ; 0x03 |
|
368a: 89 87 std Y+9, r24 ; 0x09 |
|
368c: 9a 87 std Y+10, r25 ; 0x0a |
|
368e: ab 87 std Y+11, r26 ; 0x0b |
|
3690: bc 87 std Y+12, r27 ; 0x0c |
|
3692: ce 01 movw r24, r28 |
|
3694: 09 96 adiw r24, 0x09 ; 9 |
|
3696: fe 01 movw r30, r28 |
|
3698: 3d 96 adiw r30, 0x0d ; 13 |
|
369a: de 01 movw r26, r28 |
|
369c: 11 96 adiw r26, 0x01 ; 1 |
|
if (sig == 0) return x; // for big endian machine just return the input |
|
T ret; |
|
int size = sizeof(T); |
|
char* src = (char*)&x + sizeof(T) - 1; |
|
char* dst = (char*)&ret; |
|
while (size-- > 0){ |
|
369e: e8 17 cp r30, r24 |
|
36a0: f9 07 cpc r31, r25 |
|
36a2: 19 f0 breq .+6 ; 0x36aa <_ZN10OscMessage10decodeDataEh+0x10c> |
|
*dst++ = *src--; |
|
36a4: 22 91 ld r18, -Z |
|
36a6: 2d 93 st X+, r18 |
|
36a8: fa cf rjmp .-12 ; 0x369e <_ZN10OscMessage10decodeDataEh+0x100> |
|
} |
|
return ret; |
|
36aa: 29 81 ldd r18, Y+1 ; 0x01 |
|
36ac: 3a 81 ldd r19, Y+2 ; 0x02 |
|
36ae: 4b 81 ldd r20, Y+3 ; 0x03 |
|
36b0: 5c 81 ldd r21, Y+4 ; 0x04 |
|
float dataVal = BigEndian(u.f); |
|
set(i, dataVal); |
|
36b2: b7 01 movw r22, r14 |
|
36b4: c8 01 movw r24, r16 |
|
36b6: 0e 94 14 19 call 0x3228 ; 0x3228 <_ZN10OscMessage3setIfEEviT_> |
|
36ba: 23 c0 rjmp .+70 ; 0x3702 <_ZN10OscMessage10decodeDataEh+0x164> |
|
clearIncomingBuffer(); |
|
} |
|
break; |
|
case 'd': |
|
if (incomingBufferSize == 8){ |
|
36bc: f8 01 movw r30, r16 |
|
36be: 84 85 ldd r24, Z+12 ; 0x0c |
|
36c0: 95 85 ldd r25, Z+13 ; 0x0d |
|
36c2: 08 97 sbiw r24, 0x08 ; 8 |
|
36c4: 09 f0 breq .+2 ; 0x36c8 <_ZN10OscMessage10decodeDataEh+0x12a> |
|
36c6: 85 c0 rjmp .+266 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
//parse the buffer as an int |
|
union { |
|
double d; |
|
uint8_t b[8]; |
|
} u; |
|
memcpy(u.b, incomingBuffer, 8); |
|
36c8: 02 84 ldd r0, Z+10 ; 0x0a |
|
36ca: f3 85 ldd r31, Z+11 ; 0x0b |
|
36cc: e0 2d mov r30, r0 |
|
36ce: 28 e0 ldi r18, 0x08 ; 8 |
|
36d0: ce 01 movw r24, r28 |
|
36d2: 01 96 adiw r24, 0x01 ; 1 |
|
36d4: dc 01 movw r26, r24 |
|
36d6: 01 90 ld r0, Z+ |
|
36d8: 0d 92 st X+, r0 |
|
36da: 2a 95 dec r18 |
|
36dc: e1 f7 brne .-8 ; 0x36d6 <_ZN10OscMessage10decodeDataEh+0x138> |
|
36de: fe 01 movw r30, r28 |
|
36e0: 35 96 adiw r30, 0x05 ; 5 |
|
36e2: de 01 movw r26, r28 |
|
36e4: 19 96 adiw r26, 0x09 ; 9 |
|
if (sig == 0) return x; // for big endian machine just return the input |
|
T ret; |
|
int size = sizeof(T); |
|
char* src = (char*)&x + sizeof(T) - 1; |
|
char* dst = (char*)&ret; |
|
while (size-- > 0){ |
|
36e6: e8 17 cp r30, r24 |
|
36e8: f9 07 cpc r31, r25 |
|
36ea: 19 f0 breq .+6 ; 0x36f2 <_ZN10OscMessage10decodeDataEh+0x154> |
|
*dst++ = *src--; |
|
36ec: 22 91 ld r18, -Z |
|
36ee: 2d 93 st X+, r18 |
|
36f0: fa cf rjmp .-12 ; 0x36e6 <_ZN10OscMessage10decodeDataEh+0x148> |
|
} |
|
return ret; |
|
36f2: 29 85 ldd r18, Y+9 ; 0x09 |
|
36f4: 3a 85 ldd r19, Y+10 ; 0x0a |
|
36f6: 4b 85 ldd r20, Y+11 ; 0x0b |
|
36f8: 5c 85 ldd r21, Y+12 ; 0x0c |
|
double dataVal = BigEndian(u.d); |
|
set(i, dataVal); |
|
36fa: b7 01 movw r22, r14 |
|
36fc: c8 01 movw r24, r16 |
|
36fe: 0e 94 ba 19 call 0x3374 ; 0x3374 <_ZN10OscMessage3setIdEEviT_> |
|
clearIncomingBuffer(); |
|
3702: c8 01 movw r24, r16 |
|
} |
|
//break out of the for loop once we've selected the first invalid message |
|
break; |
|
} |
|
} |
|
} |
|
3704: 2c 96 adiw r28, 0x0c ; 12 |
|
3706: 0f b6 in r0, 0x3f ; 63 |
|
3708: f8 94 cli |
|
370a: de bf out 0x3e, r29 ; 62 |
|
370c: 0f be out 0x3f, r0 ; 63 |
|
370e: cd bf out 0x3d, r28 ; 61 |
|
3710: df 91 pop r29 |
|
3712: cf 91 pop r28 |
|
3714: 1f 91 pop r17 |
|
3716: 0f 91 pop r16 |
|
3718: ff 90 pop r15 |
|
371a: ef 90 pop r14 |
|
371c: df 90 pop r13 |
|
371e: cf 90 pop r12 |
|
uint8_t b[8]; |
|
} u; |
|
memcpy(u.b, incomingBuffer, 8); |
|
double dataVal = BigEndian(u.d); |
|
set(i, dataVal); |
|
clearIncomingBuffer(); |
|
3720: 0c 94 43 18 jmp 0x3086 ; 0x3086 <_ZN10OscMessage19clearIncomingBufferEv> |
|
} |
|
break; |
|
case 's': |
|
if (incomingByte == 0){ |
|
3724: d1 10 cpse r13, r1 |
|
3726: 55 c0 rjmp .+170 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
char * str = (char *) incomingBuffer; |
|
set(i, str); |
|
3728: d8 01 movw r26, r16 |
|
372a: 1a 96 adiw r26, 0x0a ; 10 |
|
372c: 4d 91 ld r20, X+ |
|
372e: 5c 91 ld r21, X |
|
3730: 1b 97 sbiw r26, 0x0b ; 11 |
|
3732: b7 01 movw r22, r14 |
|
3734: c8 01 movw r24, r16 |
|
3736: 0e 94 60 1a call 0x34c0 ; 0x34c0 <_ZN10OscMessage3setIPcEEviT_> |
|
clearIncomingBuffer(); |
|
373a: c8 01 movw r24, r16 |
|
373c: 0e 94 43 18 call 0x3086 ; 0x3086 <_ZN10OscMessage19clearIncomingBufferEv> |
|
decodeState = DATA_PADDING; |
|
3740: 86 e0 ldi r24, 0x06 ; 6 |
|
3742: 90 e0 ldi r25, 0x00 ; 0 |
|
3744: f8 01 movw r30, r16 |
|
3746: 91 87 std Z+9, r25 ; 0x09 |
|
3748: 80 87 std Z+8, r24 ; 0x08 |
|
374a: 43 c0 rjmp .+134 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
} |
|
break; |
|
case 'b': |
|
if (incomingBufferSize > 4){ |
|
374c: d8 01 movw r26, r16 |
|
374e: 1c 96 adiw r26, 0x0c ; 12 |
|
3750: 6d 91 ld r22, X+ |
|
3752: 7c 91 ld r23, X |
|
3754: 1d 97 sbiw r26, 0x0d ; 13 |
|
3756: 65 30 cpi r22, 0x05 ; 5 |
|
3758: 71 05 cpc r23, r1 |
|
375a: dc f1 brlt .+118 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
//compute the expected blob size |
|
union { |
|
uint32_t i; |
|
uint8_t b[4]; |
|
} u; |
|
memcpy(u.b, incomingBuffer, 4); |
|
375c: 1a 96 adiw r26, 0x0a ; 10 |
|
375e: cd 90 ld r12, X+ |
|
3760: dc 90 ld r13, X |
|
3762: 1b 97 sbiw r26, 0x0b ; 11 |
|
3764: f6 01 movw r30, r12 |
|
3766: 80 81 ld r24, Z |
|
3768: 91 81 ldd r25, Z+1 ; 0x01 |
|
376a: a2 81 ldd r26, Z+2 ; 0x02 |
|
376c: b3 81 ldd r27, Z+3 ; 0x03 |
|
376e: 89 87 std Y+9, r24 ; 0x09 |
|
3770: 9a 87 std Y+10, r25 ; 0x0a |
|
3772: ab 87 std Y+11, r26 ; 0x0b |
|
3774: bc 87 std Y+12, r27 ; 0x0c |
|
3776: 9e 01 movw r18, r28 |
|
3778: 27 5f subi r18, 0xF7 ; 247 |
|
377a: 3f 4f sbci r19, 0xFF ; 255 |
|
377c: de 01 movw r26, r28 |
|
377e: 1d 96 adiw r26, 0x0d ; 13 |
|
3780: ce 01 movw r24, r28 |
|
3782: 01 96 adiw r24, 0x01 ; 1 |
|
if (sig == 0) return x; // for big endian machine just return the input |
|
T ret; |
|
int size = sizeof(T); |
|
char* src = (char*)&x + sizeof(T) - 1; |
|
char* dst = (char*)&ret; |
|
while (size-- > 0){ |
|
3784: a2 17 cp r26, r18 |
|
3786: b3 07 cpc r27, r19 |
|
3788: 29 f0 breq .+10 ; 0x3794 <_ZN10OscMessage10decodeDataEh+0x1f6> |
|
*dst++ = *src--; |
|
378a: 4e 91 ld r20, -X |
|
378c: fc 01 movw r30, r24 |
|
378e: 41 93 st Z+, r20 |
|
3790: cf 01 movw r24, r30 |
|
3792: f8 cf rjmp .-16 ; 0x3784 <_ZN10OscMessage10decodeDataEh+0x1e6> |
|
} |
|
return ret; |
|
3794: 29 81 ldd r18, Y+1 ; 0x01 |
|
3796: 3a 81 ldd r19, Y+2 ; 0x02 |
|
3798: 4b 81 ldd r20, Y+3 ; 0x03 |
|
379a: 5c 81 ldd r21, Y+4 ; 0x04 |
|
int blobLength = BigEndian(u.i); |
|
if (incomingBufferSize == blobLength + 4){ |
|
379c: c9 01 movw r24, r18 |
|
379e: 04 96 adiw r24, 0x04 ; 4 |
|
37a0: 68 17 cp r22, r24 |
|
37a2: 79 07 cpc r23, r25 |
|
37a4: b1 f4 brne .+44 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
set(i, incomingBuffer + 4, blobLength); |
|
37a6: f6 01 movw r30, r12 |
|
37a8: 34 96 adiw r30, 0x04 ; 4 |
|
37aa: af 01 movw r20, r30 |
|
37ac: b7 01 movw r22, r14 |
|
37ae: c8 01 movw r24, r16 |
|
37b0: 0e 94 70 15 call 0x2ae0 ; 0x2ae0 <_ZN10OscMessage3setEiPhi> |
|
clearIncomingBuffer(); |
|
37b4: c8 01 movw r24, r16 |
|
37b6: 0e 94 43 18 call 0x3086 ; 0x3086 <_ZN10OscMessage19clearIncomingBufferEv> |
|
decodeState = DATA_PADDING; |
|
37ba: 86 e0 ldi r24, 0x06 ; 6 |
|
37bc: 90 e0 ldi r25, 0x00 ; 0 |
|
37be: d8 01 movw r26, r16 |
|
37c0: 19 96 adiw r26, 0x09 ; 9 |
|
37c2: 9c 93 st X, r25 |
|
37c4: 8e 93 st -X, r24 |
|
37c6: 18 97 sbiw r26, 0x08 ; 8 |
|
37c8: 04 c0 rjmp .+8 ; 0x37d2 <_ZN10OscMessage10decodeDataEh+0x234> |
|
add(type); |
|
} |
|
|
|
void OscMessage::decodeData(uint8_t incomingByte){ |
|
//get the first OSCData to re-set |
|
for (int i = 0; i < dataCount; i++){ |
|
37ca: bf ef ldi r27, 0xFF ; 255 |
|
37cc: eb 1a sub r14, r27 |
|
37ce: fb 0a sbc r15, r27 |
|
37d0: fa ce rjmp .-524 ; 0x35c6 <_ZN10OscMessage10decodeDataEh+0x28> |
|
} |
|
//break out of the for loop once we've selected the first invalid message |
|
break; |
|
} |
|
} |
|
} |
|
37d2: 2c 96 adiw r28, 0x0c ; 12 |
|
37d4: 0f b6 in r0, 0x3f ; 63 |
|
37d6: f8 94 cli |
|
37d8: de bf out 0x3e, r29 ; 62 |
|
37da: 0f be out 0x3f, r0 ; 63 |
|
37dc: cd bf out 0x3d, r28 ; 61 |
|
37de: df 91 pop r29 |
|
37e0: cf 91 pop r28 |
|
37e2: 1f 91 pop r17 |
|
37e4: 0f 91 pop r16 |
|
37e6: ff 90 pop r15 |
|
37e8: ef 90 pop r14 |
|
37ea: df 90 pop r13 |
|
37ec: cf 90 pop r12 |
|
37ee: 08 95 ret |
|
|
|
000037f0 <_ZN10OscMessage6decodeEh>: |
|
|
|
//does not validate the incoming OSC for correctness |
|
void OscMessage::decode(uint8_t incomingByte){ |
|
37f0: 0f 93 push r16 |
|
37f2: 1f 93 push r17 |
|
37f4: cf 93 push r28 |
|
37f6: df 93 push r29 |
|
37f8: ec 01 movw r28, r24 |
|
37fa: 16 2f mov r17, r22 |
|
addToIncomingBuffer(incomingByte); |
|
37fc: 0e 94 1e 18 call 0x303c ; 0x303c <_ZN10OscMessage19addToIncomingBufferEh> |
|
switch (decodeState){ |
|
3800: e8 85 ldd r30, Y+8 ; 0x08 |
|
3802: f9 85 ldd r31, Y+9 ; 0x09 |
|
3804: e7 30 cpi r30, 0x07 ; 7 |
|
3806: f1 05 cpc r31, r1 |
|
3808: 08 f0 brcs .+2 ; 0x380c <_ZN10OscMessage6decodeEh+0x1c> |
|
380a: 69 c0 rjmp .+210 ; 0x38de <_ZN10OscMessage6decodeEh+0xee> |
|
380c: e3 5c subi r30, 0xC3 ; 195 |
|
380e: ff 4f sbci r31, 0xFF ; 255 |
|
3810: 0c 94 62 2f jmp 0x5ec4 ; 0x5ec4 <__tablejump2__> |
|
case STANDBY: |
|
if (incomingByte == '/'){ |
|
3814: 1f 32 cpi r17, 0x2F ; 47 |
|
3816: 09 f0 breq .+2 ; 0x381a <_ZN10OscMessage6decodeEh+0x2a> |
|
3818: 62 c0 rjmp .+196 ; 0x38de <_ZN10OscMessage6decodeEh+0xee> |
|
decodeState = ADDRESS; |
|
381a: 81 e0 ldi r24, 0x01 ; 1 |
|
381c: 90 e0 ldi r25, 0x00 ; 0 |
|
381e: 5d c0 rjmp .+186 ; 0x38da <_ZN10OscMessage6decodeEh+0xea> |
|
} |
|
break; |
|
case ADDRESS: |
|
if (incomingByte == 0){ |
|
3820: 11 11 cpse r17, r1 |
|
3822: 5d c0 rjmp .+186 ; 0x38de <_ZN10OscMessage6decodeEh+0xee> |
|
//end of the address |
|
//decode the address |
|
decodeAddress(); |
|
3824: ce 01 movw r24, r28 |
|
3826: 0e 94 51 18 call 0x30a2 ; 0x30a2 <_ZN10OscMessage13decodeAddressEv> |
|
//next state |
|
decodeState = ADDRESS_PADDING; |
|
382a: 82 e0 ldi r24, 0x02 ; 2 |
|
382c: 90 e0 ldi r25, 0x00 ; 0 |
|
382e: 55 c0 rjmp .+170 ; 0x38da <_ZN10OscMessage6decodeEh+0xea> |
|
} |
|
break; |
|
case ADDRESS_PADDING: |
|
//it does not count the padding |
|
if (incomingByte==','){ |
|
3830: 1c 32 cpi r17, 0x2C ; 44 |
|
3832: 09 f0 breq .+2 ; 0x3836 <_ZN10OscMessage6decodeEh+0x46> |
|
3834: 54 c0 rjmp .+168 ; 0x38de <_ZN10OscMessage6decodeEh+0xee> |
|
//next state |
|
decodeState = TYPES; |
|
3836: 83 e0 ldi r24, 0x03 ; 3 |
|
3838: 90 e0 ldi r25, 0x00 ; 0 |
|
383a: 99 87 std Y+9, r25 ; 0x09 |
|
383c: 88 87 std Y+8, r24 ; 0x08 |
|
clearIncomingBuffer(); |
|
383e: ce 01 movw r24, r28 |
|
} |
|
} |
|
break; |
|
|
|
} |
|
} |
|
3840: df 91 pop r29 |
|
3842: cf 91 pop r28 |
|
3844: 1f 91 pop r17 |
|
3846: 0f 91 pop r16 |
|
case ADDRESS_PADDING: |
|
//it does not count the padding |
|
if (incomingByte==','){ |
|
//next state |
|
decodeState = TYPES; |
|
clearIncomingBuffer(); |
|
3848: 0c 94 43 18 jmp 0x3086 ; 0x3086 <_ZN10OscMessage19clearIncomingBufferEv> |
|
} |
|
break; |
|
case TYPES: |
|
if (incomingByte != 0){ |
|
384c: 11 23 and r17, r17 |
|
384e: 29 f0 breq .+10 ; 0x385a <_ZN10OscMessage6decodeEh+0x6a> |
|
clearIncomingBuffer(); |
|
} |
|
|
|
void OscMessage::decodeType(uint8_t incomingByte){ |
|
char type = incomingByte; |
|
add(type); |
|
3850: 61 2f mov r22, r17 |
|
3852: ce 01 movw r24, r28 |
|
3854: 0e 94 5f 18 call 0x30be ; 0x30be <_ZN10OscMessage3addIcEERS_T_> |
|
3858: 04 c0 rjmp .+8 ; 0x3862 <_ZN10OscMessage6decodeEh+0x72> |
|
case TYPES: |
|
if (incomingByte != 0){ |
|
//next state |
|
decodeType(incomingByte); |
|
} else { |
|
decodeState = TYPES_PADDING; |
|
385a: 84 e0 ldi r24, 0x04 ; 4 |
|
385c: 90 e0 ldi r25, 0x00 ; 0 |
|
385e: 99 87 std Y+9, r25 ; 0x09 |
|
3860: 88 87 std Y+8, r24 ; 0x08 |
|
} |
|
//FALL THROUGH to test if it should go to the data state |
|
case TYPES_PADDING: { |
|
//compute the padding size for the types |
|
//to determine the start of the data section |
|
int typePad = padSize(dataCount + 1); |
|
3862: 2c 81 ldd r18, Y+4 ; 0x04 |
|
3864: 3d 81 ldd r19, Y+5 ; 0x05 |
|
/*============================================================================= |
|
SIZE |
|
=============================================================================*/ |
|
|
|
int OscMessage::padSize(int _bytes){ |
|
int space = (_bytes + 3) / 4; |
|
3866: c9 01 movw r24, r18 |
|
3868: 04 96 adiw r24, 0x04 ; 4 |
|
386a: 97 fd sbrc r25, 7 |
|
386c: 03 96 adiw r24, 0x03 ; 3 |
|
space *= 4; |
|
386e: 8c 7f andi r24, 0xFC ; 252 |
|
} |
|
//FALL THROUGH to test if it should go to the data state |
|
case TYPES_PADDING: { |
|
//compute the padding size for the types |
|
//to determine the start of the data section |
|
int typePad = padSize(dataCount + 1); |
|
3870: a9 01 movw r20, r18 |
|
3872: 4f 5f subi r20, 0xFF ; 255 |
|
3874: 5f 4f sbci r21, 0xFF ; 255 |
|
=============================================================================*/ |
|
|
|
int OscMessage::padSize(int _bytes){ |
|
int space = (_bytes + 3) / 4; |
|
space *= 4; |
|
return space - _bytes; |
|
3876: 84 1b sub r24, r20 |
|
3878: 95 0b sbc r25, r21 |
|
//FALL THROUGH to test if it should go to the data state |
|
case TYPES_PADDING: { |
|
//compute the padding size for the types |
|
//to determine the start of the data section |
|
int typePad = padSize(dataCount + 1); |
|
if (typePad == 0){ |
|
387a: 11 f4 brne .+4 ; 0x3880 <_ZN10OscMessage6decodeEh+0x90> |
|
typePad = 4; |
|
387c: 84 e0 ldi r24, 0x04 ; 4 |
|
387e: 90 e0 ldi r25, 0x00 ; 0 |
|
} |
|
if (incomingBufferSize == (typePad + dataCount)){ |
|
3880: 82 0f add r24, r18 |
|
3882: 93 1f adc r25, r19 |
|
3884: 20 c0 rjmp .+64 ; 0x38c6 <_ZN10OscMessage6decodeEh+0xd6> |
|
decodeState = DATA; |
|
} |
|
} |
|
break; |
|
case DATA: |
|
decodeData(incomingByte); |
|
3886: 61 2f mov r22, r17 |
|
3888: ce 01 movw r24, r28 |
|
} |
|
} |
|
break; |
|
|
|
} |
|
} |
|
388a: df 91 pop r29 |
|
388c: cf 91 pop r28 |
|
388e: 1f 91 pop r17 |
|
3890: 0f 91 pop r16 |
|
decodeState = DATA; |
|
} |
|
} |
|
break; |
|
case DATA: |
|
decodeData(incomingByte); |
|
3892: 0c 94 cf 1a jmp 0x359e ; 0x359e <_ZN10OscMessage10decodeDataEh> |
|
break; |
|
case DATA_PADDING:{ |
|
//get hte last valid data |
|
for (int i = dataCount - 1; i >= 0; i--){ |
|
3896: 0c 81 ldd r16, Y+4 ; 0x04 |
|
3898: 1d 81 ldd r17, Y+5 ; 0x05 |
|
389a: 01 50 subi r16, 0x01 ; 1 |
|
389c: 11 09 sbc r17, r1 |
|
389e: 17 fd sbrc r17, 7 |
|
38a0: 1e c0 rjmp .+60 ; 0x38de <_ZN10OscMessage6decodeEh+0xee> |
|
OSCData * datum = getOSCData(i); |
|
38a2: b8 01 movw r22, r16 |
|
38a4: ce 01 movw r24, r28 |
|
38a6: 0e 94 03 15 call 0x2a06 ; 0x2a06 <_ZN10OscMessage10getOSCDataEi> |
|
if (datum->error == OSC_OK){ |
|
38aa: fc 01 movw r30, r24 |
|
38ac: 20 81 ld r18, Z |
|
38ae: 31 81 ldd r19, Z+1 ; 0x01 |
|
38b0: 23 2b or r18, r19 |
|
38b2: 99 f7 brne .-26 ; 0x389a <_ZN10OscMessage6decodeEh+0xaa> |
|
//compute the padding size for the data |
|
int dataPad = padSize(datum->bytes); |
|
38b4: 22 81 ldd r18, Z+2 ; 0x02 |
|
38b6: 33 81 ldd r19, Z+3 ; 0x03 |
|
/*============================================================================= |
|
SIZE |
|
=============================================================================*/ |
|
|
|
int OscMessage::padSize(int _bytes){ |
|
int space = (_bytes + 3) / 4; |
|
38b8: c9 01 movw r24, r18 |
|
38ba: 03 96 adiw r24, 0x03 ; 3 |
|
38bc: 97 fd sbrc r25, 7 |
|
38be: 03 96 adiw r24, 0x03 ; 3 |
|
space *= 4; |
|
38c0: 8c 7f andi r24, 0xFC ; 252 |
|
return space - _bytes; |
|
38c2: 82 1b sub r24, r18 |
|
38c4: 93 0b sbc r25, r19 |
|
for (int i = dataCount - 1; i >= 0; i--){ |
|
OSCData * datum = getOSCData(i); |
|
if (datum->error == OSC_OK){ |
|
//compute the padding size for the data |
|
int dataPad = padSize(datum->bytes); |
|
if (incomingBufferSize == dataPad){ |
|
38c6: 2c 85 ldd r18, Y+12 ; 0x0c |
|
38c8: 3d 85 ldd r19, Y+13 ; 0x0d |
|
38ca: 28 17 cp r18, r24 |
|
38cc: 39 07 cpc r19, r25 |
|
38ce: 39 f4 brne .+14 ; 0x38de <_ZN10OscMessage6decodeEh+0xee> |
|
clearIncomingBuffer(); |
|
38d0: ce 01 movw r24, r28 |
|
38d2: 0e 94 43 18 call 0x3086 ; 0x3086 <_ZN10OscMessage19clearIncomingBufferEv> |
|
decodeState = DATA; |
|
38d6: 85 e0 ldi r24, 0x05 ; 5 |
|
38d8: 90 e0 ldi r25, 0x00 ; 0 |
|
38da: 99 87 std Y+9, r25 ; 0x09 |
|
38dc: 88 87 std Y+8, r24 ; 0x08 |
|
} |
|
} |
|
break; |
|
|
|
} |
|
} |
|
38de: df 91 pop r29 |
|
38e0: cf 91 pop r28 |
|
38e2: 1f 91 pop r17 |
|
38e4: 0f 91 pop r16 |
|
38e6: 08 95 ret |
|
|
|
000038e8 <_ZN10OscMessage4fillEh>: |
|
/*============================================================================= |
|
FILLING |
|
=============================================================================*/ |
|
|
|
void OscMessage::fill(uint8_t incomingByte){ |
|
decode(incomingByte); |
|
38e8: 0c 94 f8 1b jmp 0x37f0 ; 0x37f0 <_ZN10OscMessage6decodeEh> |
|
|
|
000038ec <_ZN6OscUDPC1Ev>: |
|
//============================================================================= |
|
|
|
// TODO: write similar wrapper class using the UDP interface |
|
// waiting to solve the blocking kink on the Serial one first |
|
|
|
OscUDP::OscUDP( ){ |
|
38ec: cf 93 push r28 |
|
38ee: df 93 push r29 |
|
38f0: ec 01 movw r28, r24 |
|
38f2: 0e 94 f7 14 call 0x29ee ; 0x29ee <_ZN10OscMessageC1Ev> |
|
38f6: ce 01 movw r24, r28 |
|
38f8: 42 96 adiw r24, 0x12 ; 18 |
|
|
|
; |
|
|
|
} |
|
38fa: df 91 pop r29 |
|
38fc: cf 91 pop r28 |
|
//============================================================================= |
|
|
|
// TODO: write similar wrapper class using the UDP interface |
|
// waiting to solve the blocking kink on the Serial one first |
|
|
|
OscUDP::OscUDP( ){ |
|
38fe: 0c 94 d4 2b jmp 0x57a8 ; 0x57a8 <_ZN9IPAddressC1Ev> |
|
|
|
00003902 <_ZN6OscUDP5beginER11EthernetUDP>: |
|
|
|
} |
|
|
|
void OscUDP::begin(EthernetUDP &u){ |
|
|
|
udp = &u; // &u ? u |
|
3902: fc 01 movw r30, r24 |
|
3904: 77 87 std Z+15, r23 ; 0x0f |
|
3906: 66 87 std Z+14, r22 ; 0x0e |
|
3908: 08 95 ret |
|
|
|
0000390a <_ZN6OscUDP4sendER10OscMessage9IPAddressi>: |
|
void OscUDP::send(OscMessage &msg, NetAddress &na){ |
|
OscUDP::send (msg, na.getIP(), na.getPort() ); |
|
} |
|
|
|
|
|
void OscUDP::send(OscMessage &msg, IPAddress outIp, int outPort) { |
|
390a: af 92 push r10 |
|
390c: bf 92 push r11 |
|
390e: cf 92 push r12 |
|
3910: df 92 push r13 |
|
3912: ef 92 push r14 |
|
3914: ff 92 push r15 |
|
3916: 0f 93 push r16 |
|
3918: 1f 93 push r17 |
|
391a: cf 93 push r28 |
|
391c: df 93 push r29 |
|
391e: 00 d0 rcall .+0 ; 0x3920 <_ZN6OscUDP4sendER10OscMessage9IPAddressi+0x16> |
|
3920: 00 d0 rcall .+0 ; 0x3922 <_ZN6OscUDP4sendER10OscMessage9IPAddressi+0x18> |
|
3922: 00 d0 rcall .+0 ; 0x3924 <_ZN6OscUDP4sendER10OscMessage9IPAddressi+0x1a> |
|
3924: cd b7 in r28, 0x3d ; 61 |
|
3926: de b7 in r29, 0x3e ; 62 |
|
3928: 7c 01 movw r14, r24 |
|
392a: 6b 01 movw r12, r22 |
|
392c: da 01 movw r26, r20 |
|
392e: a9 01 movw r20, r18 |
|
|
|
// SEND BASED ON THIS : |
|
// http://cnmat.berkeley.edu/library/oscuino/omessage |
|
|
|
// we need to do some magic here |
|
udp->beginPacket(outIp, outPort); |
|
3930: fc 01 movw r30, r24 |
|
3932: 86 85 ldd r24, Z+14 ; 0x0e |
|
3934: 97 85 ldd r25, Z+15 ; 0x0f |
|
3936: fc 01 movw r30, r24 |
|
3938: 20 81 ld r18, Z |
|
393a: 31 81 ldd r19, Z+1 ; 0x01 |
|
393c: f9 01 movw r30, r18 |
|
393e: a0 88 ldd r10, Z+16 ; 0x10 |
|
3940: b1 88 ldd r11, Z+17 ; 0x11 |
|
3942: 2c e3 ldi r18, 0x3C ; 60 |
|
3944: 32 e0 ldi r19, 0x02 ; 2 |
|
3946: 3a 83 std Y+2, r19 ; 0x02 |
|
3948: 29 83 std Y+1, r18 ; 0x01 |
|
394a: 12 96 adiw r26, 0x02 ; 2 |
|
394c: 0d 91 ld r16, X+ |
|
394e: 1d 91 ld r17, X+ |
|
3950: 2d 91 ld r18, X+ |
|
3952: 3c 91 ld r19, X |
|
3954: 15 97 sbiw r26, 0x05 ; 5 |
|
3956: 0b 83 std Y+3, r16 ; 0x03 |
|
3958: 1c 83 std Y+4, r17 ; 0x04 |
|
395a: 2d 83 std Y+5, r18 ; 0x05 |
|
395c: 3e 83 std Y+6, r19 ; 0x06 |
|
395e: be 01 movw r22, r28 |
|
3960: 6f 5f subi r22, 0xFF ; 255 |
|
3962: 7f 4f sbci r23, 0xFF ; 255 |
|
3964: f5 01 movw r30, r10 |
|
3966: 09 95 icall |
|
msg.send(*udp); // send the bytes to the SLIP stream |
|
3968: d7 01 movw r26, r14 |
|
396a: 1e 96 adiw r26, 0x0e ; 14 |
|
396c: 6d 91 ld r22, X+ |
|
396e: 7c 91 ld r23, X |
|
3970: 1f 97 sbiw r26, 0x0f ; 15 |
|
3972: c6 01 movw r24, r12 |
|
3974: 0e 94 db 16 call 0x2db6 ; 0x2db6 <_ZN10OscMessage4sendER5Print> |
|
udp->endPacket(); // mark the end of the OSC Packet |
|
3978: f7 01 movw r30, r14 |
|
397a: 86 85 ldd r24, Z+14 ; 0x0e |
|
397c: 97 85 ldd r25, Z+15 ; 0x0f |
|
397e: dc 01 movw r26, r24 |
|
3980: ed 91 ld r30, X+ |
|
3982: fc 91 ld r31, X |
|
3984: 04 88 ldd r0, Z+20 ; 0x14 |
|
3986: f5 89 ldd r31, Z+21 ; 0x15 |
|
3988: e0 2d mov r30, r0 |
|
398a: 09 95 icall |
|
msg.empty(); // free space occupied by message |
|
398c: c6 01 movw r24, r12 |
|
398e: 0e 94 1a 15 call 0x2a34 ; 0x2a34 <_ZN10OscMessage5emptyEv> |
|
|
|
} |
|
3992: 26 96 adiw r28, 0x06 ; 6 |
|
3994: 0f b6 in r0, 0x3f ; 63 |
|
3996: f8 94 cli |
|
3998: de bf out 0x3e, r29 ; 62 |
|
399a: 0f be out 0x3f, r0 ; 63 |
|
399c: cd bf out 0x3d, r28 ; 61 |
|
399e: df 91 pop r29 |
|
39a0: cf 91 pop r28 |
|
39a2: 1f 91 pop r17 |
|
39a4: 0f 91 pop r16 |
|
39a6: ff 90 pop r15 |
|
39a8: ef 90 pop r14 |
|
39aa: df 90 pop r13 |
|
39ac: cf 90 pop r12 |
|
39ae: bf 90 pop r11 |
|
39b0: af 90 pop r10 |
|
39b2: 08 95 ret |
|
|
|
000039b4 <_ZN6OscUDP4sendER10OscMessageR10NetAddress>: |
|
udp = &u; // &u ? u |
|
|
|
} |
|
|
|
|
|
void OscUDP::send(OscMessage &msg, NetAddress &na){ |
|
39b4: cf 93 push r28 |
|
39b6: df 93 push r29 |
|
39b8: 00 d0 rcall .+0 ; 0x39ba <_ZN6OscUDP4sendER10OscMessageR10NetAddress+0x6> |
|
39ba: 00 d0 rcall .+0 ; 0x39bc <_ZN6OscUDP4sendER10OscMessageR10NetAddress+0x8> |
|
39bc: 00 d0 rcall .+0 ; 0x39be <_ZN6OscUDP4sendER10OscMessageR10NetAddress+0xa> |
|
39be: cd b7 in r28, 0x3d ; 61 |
|
39c0: de b7 in r29, 0x3e ; 62 |
|
39c2: fb 01 movw r30, r22 |
|
IPAddress NetAddress :: getIP (){ |
|
return destinationIP; |
|
} |
|
|
|
int NetAddress :: getPort(){ |
|
return destinationPort; |
|
39c4: da 01 movw r26, r20 |
|
39c6: 16 96 adiw r26, 0x06 ; 6 |
|
39c8: 2d 91 ld r18, X+ |
|
39ca: 3c 91 ld r19, X |
|
39cc: 17 97 sbiw r26, 0x07 ; 7 |
|
39ce: 6c e3 ldi r22, 0x3C ; 60 |
|
39d0: 72 e0 ldi r23, 0x02 ; 2 |
|
39d2: 7a 83 std Y+2, r23 ; 0x02 |
|
39d4: 69 83 std Y+1, r22 ; 0x01 |
|
39d6: 12 96 adiw r26, 0x02 ; 2 |
|
39d8: 4d 91 ld r20, X+ |
|
39da: 5d 91 ld r21, X+ |
|
39dc: 6d 91 ld r22, X+ |
|
39de: 7c 91 ld r23, X |
|
39e0: 15 97 sbiw r26, 0x05 ; 5 |
|
39e2: 4b 83 std Y+3, r20 ; 0x03 |
|
39e4: 5c 83 std Y+4, r21 ; 0x04 |
|
39e6: 6d 83 std Y+5, r22 ; 0x05 |
|
39e8: 7e 83 std Y+6, r23 ; 0x06 |
|
|
|
} |
|
|
|
|
|
void OscUDP::send(OscMessage &msg, NetAddress &na){ |
|
OscUDP::send (msg, na.getIP(), na.getPort() ); |
|
39ea: ae 01 movw r20, r28 |
|
39ec: 4f 5f subi r20, 0xFF ; 255 |
|
39ee: 5f 4f sbci r21, 0xFF ; 255 |
|
39f0: bf 01 movw r22, r30 |
|
39f2: 0e 94 85 1c call 0x390a ; 0x390a <_ZN6OscUDP4sendER10OscMessage9IPAddressi> |
|
} |
|
39f6: 26 96 adiw r28, 0x06 ; 6 |
|
39f8: 0f b6 in r0, 0x3f ; 63 |
|
39fa: f8 94 cli |
|
39fc: de bf out 0x3e, r29 ; 62 |
|
39fe: 0f be out 0x3f, r0 ; 63 |
|
3a00: cd bf out 0x3d, r28 ; 61 |
|
3a02: df 91 pop r29 |
|
3a04: cf 91 pop r28 |
|
3a06: 08 95 ret |
|
|
|
00003a08 <_ZN6OscUDP6listenEv>: |
|
udp->endPacket(); // mark the end of the OSC Packet |
|
msg.empty(); // free space occupied by message |
|
|
|
} |
|
|
|
void OscUDP::listen() { |
|
3a08: 0f 93 push r16 |
|
3a0a: 1f 93 push r17 |
|
3a0c: cf 93 push r28 |
|
3a0e: df 93 push r29 |
|
3a10: ec 01 movw r28, r24 |
|
|
|
// need a non-blocking method to read bytes from the UDP stream |
|
// parsePacket us analogous to available |
|
int UDPpacketSize; |
|
|
|
if( (UDPpacketSize = udp->parsePacket()) > 0) { |
|
3a12: 8e 85 ldd r24, Y+14 ; 0x0e |
|
3a14: 9f 85 ldd r25, Y+15 ; 0x0f |
|
3a16: dc 01 movw r26, r24 |
|
3a18: ed 91 ld r30, X+ |
|
3a1a: fc 91 ld r31, X |
|
3a1c: 06 88 ldd r0, Z+22 ; 0x16 |
|
3a1e: f7 89 ldd r31, Z+23 ; 0x17 |
|
3a20: e0 2d mov r30, r0 |
|
3a22: 09 95 icall |
|
3a24: 18 16 cp r1, r24 |
|
3a26: 19 06 cpc r1, r25 |
|
3a28: 04 f5 brge .+64 ; 0x3a6a <_ZN6OscUDP6listenEv+0x62> |
|
3a2a: 8c 01 movw r16, r24 |
|
while(UDPpacketSize--) msgIN.fill(udp->read()); |
|
3a2c: 8e 85 ldd r24, Y+14 ; 0x0e |
|
3a2e: 9f 85 ldd r25, Y+15 ; 0x0f |
|
3a30: dc 01 movw r26, r24 |
|
3a32: ed 91 ld r30, X+ |
|
3a34: fc 91 ld r31, X |
|
3a36: 06 80 ldd r0, Z+6 ; 0x06 |
|
3a38: f7 81 ldd r31, Z+7 ; 0x07 |
|
3a3a: e0 2d mov r30, r0 |
|
3a3c: 09 95 icall |
|
3a3e: 68 2f mov r22, r24 |
|
3a40: ce 01 movw r24, r28 |
|
3a42: 0e 94 74 1c call 0x38e8 ; 0x38e8 <_ZN10OscMessage4fillEh> |
|
3a46: 01 50 subi r16, 0x01 ; 1 |
|
3a48: 11 09 sbc r17, r1 |
|
3a4a: 81 f7 brne .-32 ; 0x3a2c <_ZN6OscUDP6listenEv+0x24> |
|
// i think it says if packet is <= 0 return |
|
} |
|
|
|
|
|
|
|
if (!msgIN.hasError()) { |
|
3a4c: ce 01 movw r24, r28 |
|
3a4e: 0e 94 62 16 call 0x2cc4 ; 0x2cc4 <_ZN10OscMessage8hasErrorEv> |
|
3a52: 81 11 cpse r24, r1 |
|
3a54: 03 c0 rjmp .+6 ; 0x3a5c <_ZN6OscUDP6listenEv+0x54> |
|
oscEvent(msgIN); |
|
3a56: ce 01 movw r24, r28 |
|
3a58: 0e 94 18 08 call 0x1030 ; 0x1030 <_Z8oscEventR10OscMessage> |
|
} |
|
|
|
msgIN.reset(); |
|
3a5c: ce 01 movw r24, r28 |
|
|
|
|
|
} |
|
3a5e: df 91 pop r29 |
|
3a60: cf 91 pop r28 |
|
3a62: 1f 91 pop r17 |
|
3a64: 0f 91 pop r16 |
|
|
|
if (!msgIN.hasError()) { |
|
oscEvent(msgIN); |
|
} |
|
|
|
msgIN.reset(); |
|
3a66: 0c 94 58 15 jmp 0x2ab0 ; 0x2ab0 <_ZN10OscMessage5resetEv> |
|
|
|
|
|
} |
|
3a6a: df 91 pop r29 |
|
3a6c: cf 91 pop r28 |
|
3a6e: 1f 91 pop r17 |
|
3a70: 0f 91 pop r16 |
|
3a72: 08 95 ret |
|
|
|
00003a74 <_ZN10NetAddressC1Ev>: |
|
//============================================================================= |
|
// NetAddress interface |
|
//============================================================================= |
|
|
|
|
|
NetAddress :: NetAddress (){;} // sets up object |
|
3a74: 0c 94 d4 2b jmp 0x57a8 ; 0x57a8 <_ZN9IPAddressC1Ev> |
|
|
|
00003a78 <_ZN10NetAddress3setE9IPAddressi>: |
|
|
|
void NetAddress::set(IPAddress _ip, int _port) { |
|
3a78: 0f 93 push r16 |
|
3a7a: 1f 93 push r17 |
|
3a7c: fb 01 movw r30, r22 |
|
3a7e: 02 81 ldd r16, Z+2 ; 0x02 |
|
3a80: 13 81 ldd r17, Z+3 ; 0x03 |
|
3a82: 24 81 ldd r18, Z+4 ; 0x04 |
|
3a84: 35 81 ldd r19, Z+5 ; 0x05 |
|
3a86: fc 01 movw r30, r24 |
|
3a88: 02 83 std Z+2, r16 ; 0x02 |
|
3a8a: 13 83 std Z+3, r17 ; 0x03 |
|
3a8c: 24 83 std Z+4, r18 ; 0x04 |
|
3a8e: 35 83 std Z+5, r19 ; 0x05 |
|
destinationIP = _ip; |
|
destinationPort = _port; |
|
3a90: 57 83 std Z+7, r21 ; 0x07 |
|
3a92: 46 83 std Z+6, r20 ; 0x06 |
|
} |
|
3a94: 1f 91 pop r17 |
|
3a96: 0f 91 pop r16 |
|
3a98: 08 95 ret |
|
|
|
00003a9a <_GLOBAL__sub_I__ZN6OscUDPC2Ev>: |
|
return destinationIP; |
|
} |
|
|
|
int NetAddress :: getPort(){ |
|
return destinationPort; |
|
} |
|
3a9a: 0f 93 push r16 |
|
friend class Server; |
|
friend class DhcpClass; |
|
friend class DNSClient; |
|
}; |
|
|
|
const IPAddress INADDR_NONE(0,0,0,0); |
|
3a9c: 00 e0 ldi r16, 0x00 ; 0 |
|
3a9e: 20 e0 ldi r18, 0x00 ; 0 |
|
3aa0: 40 e0 ldi r20, 0x00 ; 0 |
|
3aa2: 60 e0 ldi r22, 0x00 ; 0 |
|
3aa4: 8a e1 ldi r24, 0x1A ; 26 |
|
3aa6: 93 e0 ldi r25, 0x03 ; 3 |
|
3aa8: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
3aac: 0f 91 pop r16 |
|
3aae: 08 95 ret |
|
|
|
00003ab0 <_ZN8SPIClass5beginEv>: |
|
#ifdef SPI_TRANSACTION_MISMATCH_LED |
|
uint8_t SPIClass::inTransactionFlag = 0; |
|
#endif |
|
|
|
void SPIClass::begin() |
|
{ |
|
3ab0: cf 93 push r28 |
|
uint8_t sreg = SREG; |
|
3ab2: cf b7 in r28, 0x3f ; 63 |
|
noInterrupts(); // Protect from a scheduler and prevent transactionBegin |
|
3ab4: f8 94 cli |
|
if (!initialized) { |
|
3ab6: 80 91 23 03 lds r24, 0x0323 |
|
3aba: 81 11 cpse r24, r1 |
|
3abc: 16 c0 rjmp .+44 ; 0x3aea <_ZN8SPIClass5beginEv+0x3a> |
|
// Set SS to high so a connected chip will be "deselected" by default |
|
digitalWrite(SS, HIGH); |
|
3abe: 61 e0 ldi r22, 0x01 ; 1 |
|
3ac0: 8a e0 ldi r24, 0x0A ; 10 |
|
3ac2: 0e 94 2d 2b call 0x565a ; 0x565a <digitalWrite> |
|
|
|
// When the SS pin is set as OUTPUT, it can be used as |
|
// a general purpose output port (it doesn't influence |
|
// SPI operations). |
|
pinMode(SS, OUTPUT); |
|
3ac6: 61 e0 ldi r22, 0x01 ; 1 |
|
3ac8: 8a e0 ldi r24, 0x0A ; 10 |
|
3aca: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
|
|
// Warning: if the SS pin ever becomes a LOW INPUT then SPI |
|
// automatically switches to Slave, so the data direction of |
|
// the SS pin MUST be kept as OUTPUT. |
|
SPCR |= _BV(MSTR); |
|
3ace: 8c b5 in r24, 0x2c ; 44 |
|
3ad0: 80 61 ori r24, 0x10 ; 16 |
|
3ad2: 8c bd out 0x2c, r24 ; 44 |
|
SPCR |= _BV(SPE); |
|
3ad4: 8c b5 in r24, 0x2c ; 44 |
|
3ad6: 80 64 ori r24, 0x40 ; 64 |
|
3ad8: 8c bd out 0x2c, r24 ; 44 |
|
// MISO pin automatically overrides to INPUT. |
|
// By doing this AFTER enabling SPI, we avoid accidentally |
|
// clocking in a single bit since the lines go directly |
|
// from "input" to SPI control. |
|
// http://code.google.com/p/arduino/issues/detail?id=888 |
|
pinMode(SCK, OUTPUT); |
|
3ada: 61 e0 ldi r22, 0x01 ; 1 |
|
3adc: 8d e0 ldi r24, 0x0D ; 13 |
|
3ade: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
pinMode(MOSI, OUTPUT); |
|
3ae2: 61 e0 ldi r22, 0x01 ; 1 |
|
3ae4: 8b e0 ldi r24, 0x0B ; 11 |
|
3ae6: 0e 94 f4 2a call 0x55e8 ; 0x55e8 <pinMode> |
|
} |
|
initialized++; // reference count |
|
3aea: 80 91 23 03 lds r24, 0x0323 |
|
3aee: 8f 5f subi r24, 0xFF ; 255 |
|
3af0: 80 93 23 03 sts 0x0323, r24 |
|
SREG = sreg; |
|
3af4: cf bf out 0x3f, r28 ; 63 |
|
} |
|
3af6: cf 91 pop r28 |
|
3af8: 08 95 ret |
|
|
|
00003afa <_GLOBAL__sub_I__ZN9DhcpClass13beginWithDHCPEPhmm>: |
|
unsigned long m = n; |
|
n /= 16; |
|
char c = m - 16 * n; |
|
*str-- = c < 10 ? c + '0' : c + 'A' - 10; |
|
} while(n); |
|
} |
|
3afa: 0f 93 push r16 |
|
3afc: 00 e0 ldi r16, 0x00 ; 0 |
|
3afe: 20 e0 ldi r18, 0x00 ; 0 |
|
3b00: 40 e0 ldi r20, 0x00 ; 0 |
|
3b02: 60 e0 ldi r22, 0x00 ; 0 |
|
3b04: 84 e2 ldi r24, 0x24 ; 36 |
|
3b06: 93 e0 ldi r25, 0x03 ; 3 |
|
3b08: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
3b0c: 0f 91 pop r16 |
|
3b0e: 08 95 ret |
|
|
|
00003b10 <_ZN9DNSClient5beginERK9IPAddress>: |
|
#include <stdint.h> |
|
#include <Printable.h> |
|
|
|
// A class to make it easier to handle and pass around IP addresses |
|
|
|
class IPAddress : public Printable { |
|
3b10: fb 01 movw r30, r22 |
|
3b12: 42 81 ldd r20, Z+2 ; 0x02 |
|
3b14: 53 81 ldd r21, Z+3 ; 0x03 |
|
3b16: 64 81 ldd r22, Z+4 ; 0x04 |
|
3b18: 75 81 ldd r23, Z+5 ; 0x05 |
|
3b1a: fc 01 movw r30, r24 |
|
3b1c: 42 83 std Z+2, r20 ; 0x02 |
|
3b1e: 53 83 std Z+3, r21 ; 0x03 |
|
3b20: 64 83 std Z+4, r22 ; 0x04 |
|
3b22: 75 83 std Z+5, r23 ; 0x05 |
|
#define INVALID_RESPONSE -4 |
|
|
|
void DNSClient::begin(const IPAddress& aDNSServer) |
|
{ |
|
iDNSServer = aDNSServer; |
|
iRequestId = 0; |
|
3b24: 17 82 std Z+7, r1 ; 0x07 |
|
3b26: 16 82 std Z+6, r1 ; 0x06 |
|
3b28: 08 95 ret |
|
|
|
00003b2a <_ZN9DNSClient9inet_atonEPKcR9IPAddress>: |
|
} |
|
|
|
|
|
int DNSClient::inet_aton(const char* aIPAddrString, IPAddress& aResult) |
|
{ |
|
3b2a: cf 93 push r28 |
|
// See if we've been given a valid IP address |
|
const char* p =aIPAddrString; |
|
while (*p && |
|
3b2c: fb 01 movw r30, r22 |
|
3b2e: 81 91 ld r24, Z+ |
|
3b30: 81 11 cpse r24, r1 |
|
3b32: fd cf rjmp .-6 ; 0x3b2e <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x4> |
|
3b34: fb 01 movw r30, r22 |
|
3b36: 80 e0 ldi r24, 0x00 ; 0 |
|
3b38: 90 e0 ldi r25, 0x00 ; 0 |
|
3b3a: 20 e0 ldi r18, 0x00 ; 0 |
|
3b3c: 30 e0 ldi r19, 0x00 ; 0 |
|
} |
|
} |
|
else |
|
{ |
|
// Next digit |
|
segmentValue = (segmentValue*10)+(*p - '0'); |
|
3b3e: ca e0 ldi r28, 0x0A ; 10 |
|
{ |
|
// It's looking promising, we haven't found any invalid characters |
|
p = aIPAddrString; |
|
int segment =0; |
|
int segmentValue =0; |
|
while (*p && (segment < 4)) |
|
3b40: 61 91 ld r22, Z+ |
|
3b42: 66 23 and r22, r22 |
|
3b44: 09 f1 breq .+66 ; 0x3b88 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x5e> |
|
3b46: 24 30 cpi r18, 0x04 ; 4 |
|
3b48: 31 05 cpc r19, r1 |
|
3b4a: 64 f5 brge .+88 ; 0x3ba4 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x7a> |
|
{ |
|
if (*p == '.') |
|
3b4c: 6e 32 cpi r22, 0x2E ; 46 |
|
3b4e: 71 f4 brne .+28 ; 0x3b6c <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x42> |
|
{ |
|
// We've reached the end of a segment |
|
if (segmentValue > 255) |
|
3b50: 8f 3f cpi r24, 0xFF ; 255 |
|
3b52: 91 05 cpc r25, r1 |
|
3b54: 09 f0 breq .+2 ; 0x3b58 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x2e> |
|
3b56: 34 f5 brge .+76 ; 0x3ba4 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x7a> |
|
// You can't have IP address segments that don't fit in a byte |
|
return 0; |
|
} |
|
else |
|
{ |
|
aResult[segment] = (byte)segmentValue; |
|
3b58: da 01 movw r26, r20 |
|
3b5a: a2 0f add r26, r18 |
|
3b5c: b3 1f adc r27, r19 |
|
3b5e: 12 96 adiw r26, 0x02 ; 2 |
|
3b60: 8c 93 st X, r24 |
|
segment++; |
|
3b62: 2f 5f subi r18, 0xFF ; 255 |
|
3b64: 3f 4f sbci r19, 0xFF ; 255 |
|
segmentValue = 0; |
|
3b66: 80 e0 ldi r24, 0x00 ; 0 |
|
3b68: 90 e0 ldi r25, 0x00 ; 0 |
|
3b6a: ea cf rjmp .-44 ; 0x3b40 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x16> |
|
} |
|
} |
|
else |
|
{ |
|
// Next digit |
|
segmentValue = (segmentValue*10)+(*p - '0'); |
|
3b6c: dc 01 movw r26, r24 |
|
3b6e: ca 9f mul r28, r26 |
|
3b70: c0 01 movw r24, r0 |
|
3b72: cb 9f mul r28, r27 |
|
3b74: 90 0d add r25, r0 |
|
3b76: 11 24 eor r1, r1 |
|
3b78: 77 27 eor r23, r23 |
|
3b7a: 67 fd sbrc r22, 7 |
|
3b7c: 70 95 com r23 |
|
3b7e: 60 53 subi r22, 0x30 ; 48 |
|
3b80: 71 09 sbc r23, r1 |
|
3b82: 86 0f add r24, r22 |
|
3b84: 97 1f adc r25, r23 |
|
3b86: dc cf rjmp .-72 ; 0x3b40 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x16> |
|
} |
|
p++; |
|
} |
|
// We've reached the end of address, but there'll still be the last |
|
// segment to deal with |
|
if ((segmentValue > 255) || (segment > 3)) |
|
3b88: 8f 3f cpi r24, 0xFF ; 255 |
|
3b8a: 91 05 cpc r25, r1 |
|
3b8c: 09 f0 breq .+2 ; 0x3b90 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x66> |
|
3b8e: 54 f4 brge .+20 ; 0x3ba4 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x7a> |
|
3b90: 24 30 cpi r18, 0x04 ; 4 |
|
3b92: 31 05 cpc r19, r1 |
|
3b94: 3c f4 brge .+14 ; 0x3ba4 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x7a> |
|
// or more than four segments |
|
return 0; |
|
} |
|
else |
|
{ |
|
aResult[segment] = (byte)segmentValue; |
|
3b96: fa 01 movw r30, r20 |
|
3b98: e2 0f add r30, r18 |
|
3b9a: f3 1f adc r31, r19 |
|
3b9c: 82 83 std Z+2, r24 ; 0x02 |
|
return 1; |
|
3b9e: 81 e0 ldi r24, 0x01 ; 1 |
|
3ba0: 90 e0 ldi r25, 0x00 ; 0 |
|
3ba2: 02 c0 rjmp .+4 ; 0x3ba8 <_ZN9DNSClient9inet_atonEPKcR9IPAddress+0x7e> |
|
{ |
|
// We've reached the end of a segment |
|
if (segmentValue > 255) |
|
{ |
|
// You can't have IP address segments that don't fit in a byte |
|
return 0; |
|
3ba4: 80 e0 ldi r24, 0x00 ; 0 |
|
3ba6: 90 e0 ldi r25, 0x00 ; 0 |
|
} |
|
else |
|
{ |
|
return 0; |
|
} |
|
} |
|
3ba8: cf 91 pop r28 |
|
3baa: 08 95 ret |
|
|
|
00003bac <_GLOBAL__sub_I__ZN9DNSClient5beginERK9IPAddress>: |
|
// Mark the entire packet as read |
|
iUdp.flush(); |
|
|
|
// If we get here then we haven't found an answer |
|
return -10;//INVALID_RESPONSE; |
|
} |
|
3bac: 0f 93 push r16 |
|
friend class Server; |
|
friend class DhcpClass; |
|
friend class DNSClient; |
|
}; |
|
|
|
const IPAddress INADDR_NONE(0,0,0,0); |
|
3bae: 00 e0 ldi r16, 0x00 ; 0 |
|
3bb0: 20 e0 ldi r18, 0x00 ; 0 |
|
3bb2: 40 e0 ldi r20, 0x00 ; 0 |
|
3bb4: 60 e0 ldi r22, 0x00 ; 0 |
|
3bb6: 8a e2 ldi r24, 0x2A ; 42 |
|
3bb8: 93 e0 ldi r25, 0x03 ; 3 |
|
3bba: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
3bbe: 0f 91 pop r16 |
|
3bc0: 08 95 ret |
|
|
|
00003bc2 <_ZN9DNSClient12BuildRequestEPKc>: |
|
|
|
return ret; |
|
} |
|
|
|
uint16_t DNSClient::BuildRequest(const char* aName) |
|
{ |
|
3bc2: af 92 push r10 |
|
3bc4: bf 92 push r11 |
|
3bc6: cf 92 push r12 |
|
3bc8: df 92 push r13 |
|
3bca: ef 92 push r14 |
|
3bcc: ff 92 push r15 |
|
3bce: 0f 93 push r16 |
|
3bd0: 1f 93 push r17 |
|
3bd2: cf 93 push r28 |
|
3bd4: df 93 push r29 |
|
3bd6: 00 d0 rcall .+0 ; 0x3bd8 <_ZN9DNSClient12BuildRequestEPKc+0x16> |
|
3bd8: 1f 92 push r1 |
|
3bda: cd b7 in r28, 0x3d ; 61 |
|
3bdc: de b7 in r29, 0x3e ; 62 |
|
3bde: 6c 01 movw r12, r24 |
|
3be0: 7b 01 movw r14, r22 |
|
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
|
// | ARCOUNT | |
|
// +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |
|
// As we only support one request at a time at present, we can simplify |
|
// some of this header |
|
iRequestId = millis(); // generate a random ID |
|
3be2: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
3be6: f6 01 movw r30, r12 |
|
3be8: 77 83 std Z+7, r23 ; 0x07 |
|
3bea: 66 83 std Z+6, r22 ; 0x06 |
|
uint16_t twoByteBuffer; |
|
|
|
// FIXME We should also check that there's enough space available to write to, rather |
|
// FIXME than assume there's enough space (as the code does at present) |
|
iUdp.write((uint8_t*)&iRequestId, sizeof(iRequestId)); |
|
3bec: 86 01 movw r16, r12 |
|
3bee: 08 5f subi r16, 0xF8 ; 248 |
|
3bf0: 1f 4f sbci r17, 0xFF ; 255 |
|
3bf2: b6 01 movw r22, r12 |
|
3bf4: 6a 5f subi r22, 0xFA ; 250 |
|
3bf6: 7f 4f sbci r23, 0xFF ; 255 |
|
3bf8: 42 e0 ldi r20, 0x02 ; 2 |
|
3bfa: 50 e0 ldi r21, 0x00 ; 0 |
|
3bfc: c8 01 movw r24, r16 |
|
3bfe: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
|
|
twoByteBuffer = htons(QUERY_FLAG | OPCODE_STANDARD_QUERY | RECURSION_DESIRED_FLAG); |
|
3c02: 81 e0 ldi r24, 0x01 ; 1 |
|
3c04: 90 e0 ldi r25, 0x00 ; 0 |
|
3c06: 9a 83 std Y+2, r25 ; 0x02 |
|
3c08: 89 83 std Y+1, r24 ; 0x01 |
|
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer)); |
|
3c0a: 42 e0 ldi r20, 0x02 ; 2 |
|
3c0c: 50 e0 ldi r21, 0x00 ; 0 |
|
3c0e: be 01 movw r22, r28 |
|
3c10: 6f 5f subi r22, 0xFF ; 255 |
|
3c12: 7f 4f sbci r23, 0xFF ; 255 |
|
3c14: c8 01 movw r24, r16 |
|
3c16: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
|
|
twoByteBuffer = htons(1); // One question record |
|
3c1a: 80 e0 ldi r24, 0x00 ; 0 |
|
3c1c: 91 e0 ldi r25, 0x01 ; 1 |
|
3c1e: 9a 83 std Y+2, r25 ; 0x02 |
|
3c20: 89 83 std Y+1, r24 ; 0x01 |
|
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer)); |
|
3c22: 42 e0 ldi r20, 0x02 ; 2 |
|
3c24: 50 e0 ldi r21, 0x00 ; 0 |
|
3c26: be 01 movw r22, r28 |
|
3c28: 6f 5f subi r22, 0xFF ; 255 |
|
3c2a: 7f 4f sbci r23, 0xFF ; 255 |
|
3c2c: c8 01 movw r24, r16 |
|
3c2e: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
|
|
twoByteBuffer = 0; // Zero answer records |
|
3c32: 1a 82 std Y+2, r1 ; 0x02 |
|
3c34: 19 82 std Y+1, r1 ; 0x01 |
|
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer)); |
|
3c36: 42 e0 ldi r20, 0x02 ; 2 |
|
3c38: 50 e0 ldi r21, 0x00 ; 0 |
|
3c3a: be 01 movw r22, r28 |
|
3c3c: 6f 5f subi r22, 0xFF ; 255 |
|
3c3e: 7f 4f sbci r23, 0xFF ; 255 |
|
3c40: c8 01 movw r24, r16 |
|
3c42: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
|
|
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer)); |
|
3c46: 42 e0 ldi r20, 0x02 ; 2 |
|
3c48: 50 e0 ldi r21, 0x00 ; 0 |
|
3c4a: be 01 movw r22, r28 |
|
3c4c: 6f 5f subi r22, 0xFF ; 255 |
|
3c4e: 7f 4f sbci r23, 0xFF ; 255 |
|
3c50: c8 01 movw r24, r16 |
|
3c52: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
// and zero additional records |
|
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer)); |
|
3c56: 42 e0 ldi r20, 0x02 ; 2 |
|
3c58: 50 e0 ldi r21, 0x00 ; 0 |
|
3c5a: be 01 movw r22, r28 |
|
3c5c: 6f 5f subi r22, 0xFF ; 255 |
|
3c5e: 7f 4f sbci r23, 0xFF ; 255 |
|
3c60: c8 01 movw r24, r16 |
|
3c62: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
|
|
// Build question |
|
const char* start =aName; |
|
const char* end =start; |
|
3c66: 67 01 movw r12, r14 |
|
uint8_t len; |
|
// Run through the name being requested |
|
while (*end) |
|
3c68: f6 01 movw r30, r12 |
|
3c6a: 80 81 ld r24, Z |
|
3c6c: 88 23 and r24, r24 |
|
3c6e: 11 f1 breq .+68 ; 0x3cb4 <_ZN9DNSClient12BuildRequestEPKc+0xf2> |
|
3c70: f7 01 movw r30, r14 |
|
3c72: 6f 01 movw r12, r30 |
|
{ |
|
// Find out how long this section of the name is |
|
end = start; |
|
while (*end && (*end != '.') ) |
|
3c74: 81 91 ld r24, Z+ |
|
3c76: 81 11 cpse r24, r1 |
|
3c78: 15 c0 rjmp .+42 ; 0x3ca4 <_ZN9DNSClient12BuildRequestEPKc+0xe2> |
|
{ |
|
end++; |
|
} |
|
|
|
if (end-start > 0) |
|
3c7a: 56 01 movw r10, r12 |
|
3c7c: ae 18 sub r10, r14 |
|
3c7e: bf 08 sbc r11, r15 |
|
3c80: 1a 14 cp r1, r10 |
|
3c82: 1b 04 cpc r1, r11 |
|
3c84: 94 f4 brge .+36 ; 0x3caa <_ZN9DNSClient12BuildRequestEPKc+0xe8> |
|
{ |
|
// Write out the size of this section |
|
len = end-start; |
|
3c86: ab 82 std Y+3, r10 ; 0x03 |
|
iUdp.write(&len, sizeof(len)); |
|
3c88: 41 e0 ldi r20, 0x01 ; 1 |
|
3c8a: 50 e0 ldi r21, 0x00 ; 0 |
|
3c8c: be 01 movw r22, r28 |
|
3c8e: 6d 5f subi r22, 0xFD ; 253 |
|
3c90: 7f 4f sbci r23, 0xFF ; 255 |
|
3c92: c8 01 movw r24, r16 |
|
3c94: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
// And then write out the section |
|
iUdp.write((uint8_t*)start, end-start); |
|
3c98: a5 01 movw r20, r10 |
|
3c9a: b7 01 movw r22, r14 |
|
3c9c: c8 01 movw r24, r16 |
|
3c9e: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
3ca2: 03 c0 rjmp .+6 ; 0x3caa <_ZN9DNSClient12BuildRequestEPKc+0xe8> |
|
// Run through the name being requested |
|
while (*end) |
|
{ |
|
// Find out how long this section of the name is |
|
end = start; |
|
while (*end && (*end != '.') ) |
|
3ca4: 8e 32 cpi r24, 0x2E ; 46 |
|
3ca6: 29 f7 brne .-54 ; 0x3c72 <_ZN9DNSClient12BuildRequestEPKc+0xb0> |
|
3ca8: e8 cf rjmp .-48 ; 0x3c7a <_ZN9DNSClient12BuildRequestEPKc+0xb8> |
|
len = end-start; |
|
iUdp.write(&len, sizeof(len)); |
|
// And then write out the section |
|
iUdp.write((uint8_t*)start, end-start); |
|
} |
|
start = end+1; |
|
3caa: 76 01 movw r14, r12 |
|
3cac: ff ef ldi r31, 0xFF ; 255 |
|
3cae: ef 1a sub r14, r31 |
|
3cb0: ff 0a sbc r15, r31 |
|
3cb2: da cf rjmp .-76 ; 0x3c68 <_ZN9DNSClient12BuildRequestEPKc+0xa6> |
|
} |
|
|
|
// We've got to the end of the question name, so |
|
// terminate it with a zero-length section |
|
len = 0; |
|
3cb4: 1b 82 std Y+3, r1 ; 0x03 |
|
iUdp.write(&len, sizeof(len)); |
|
3cb6: 41 e0 ldi r20, 0x01 ; 1 |
|
3cb8: 50 e0 ldi r21, 0x00 ; 0 |
|
3cba: be 01 movw r22, r28 |
|
3cbc: 6d 5f subi r22, 0xFD ; 253 |
|
3cbe: 7f 4f sbci r23, 0xFF ; 255 |
|
3cc0: c8 01 movw r24, r16 |
|
3cc2: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
// Finally the type and class of question |
|
twoByteBuffer = htons(TYPE_A); |
|
3cc6: e1 2c mov r14, r1 |
|
3cc8: ff 24 eor r15, r15 |
|
3cca: f3 94 inc r15 |
|
3ccc: fa 82 std Y+2, r15 ; 0x02 |
|
3cce: e9 82 std Y+1, r14 ; 0x01 |
|
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer)); |
|
3cd0: 42 e0 ldi r20, 0x02 ; 2 |
|
3cd2: 50 e0 ldi r21, 0x00 ; 0 |
|
3cd4: be 01 movw r22, r28 |
|
3cd6: 6f 5f subi r22, 0xFF ; 255 |
|
3cd8: 7f 4f sbci r23, 0xFF ; 255 |
|
3cda: c8 01 movw r24, r16 |
|
3cdc: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
|
|
twoByteBuffer = htons(CLASS_IN); // Internet class of question |
|
3ce0: fa 82 std Y+2, r15 ; 0x02 |
|
3ce2: e9 82 std Y+1, r14 ; 0x01 |
|
iUdp.write((uint8_t*)&twoByteBuffer, sizeof(twoByteBuffer)); |
|
3ce4: 42 e0 ldi r20, 0x02 ; 2 |
|
3ce6: 50 e0 ldi r21, 0x00 ; 0 |
|
3ce8: be 01 movw r22, r28 |
|
3cea: 6f 5f subi r22, 0xFF ; 255 |
|
3cec: 7f 4f sbci r23, 0xFF ; 255 |
|
3cee: c8 01 movw r24, r16 |
|
3cf0: 0e 94 b1 22 call 0x4562 ; 0x4562 <_ZN11EthernetUDP5writeEPKhj> |
|
// Success! Everything buffered okay |
|
return 1; |
|
} |
|
3cf4: 81 e0 ldi r24, 0x01 ; 1 |
|
3cf6: 90 e0 ldi r25, 0x00 ; 0 |
|
3cf8: 0f 90 pop r0 |
|
3cfa: 0f 90 pop r0 |
|
3cfc: 0f 90 pop r0 |
|
3cfe: df 91 pop r29 |
|
3d00: cf 91 pop r28 |
|
3d02: 1f 91 pop r17 |
|
3d04: 0f 91 pop r16 |
|
3d06: ff 90 pop r15 |
|
3d08: ef 90 pop r14 |
|
3d0a: df 90 pop r13 |
|
3d0c: cf 90 pop r12 |
|
3d0e: bf 90 pop r11 |
|
3d10: af 90 pop r10 |
|
3d12: 08 95 ret |
|
|
|
00003d14 <_ZN9DNSClient15ProcessResponseEjR9IPAddress>: |
|
|
|
|
|
uint16_t DNSClient::ProcessResponse(uint16_t aTimeout, IPAddress& aAddress) |
|
{ |
|
3d14: 4f 92 push r4 |
|
3d16: 5f 92 push r5 |
|
3d18: 6f 92 push r6 |
|
3d1a: 7f 92 push r7 |
|
3d1c: 8f 92 push r8 |
|
3d1e: 9f 92 push r9 |
|
3d20: af 92 push r10 |
|
3d22: bf 92 push r11 |
|
3d24: cf 92 push r12 |
|
3d26: df 92 push r13 |
|
3d28: ef 92 push r14 |
|
3d2a: ff 92 push r15 |
|
3d2c: 0f 93 push r16 |
|
3d2e: 1f 93 push r17 |
|
3d30: cf 93 push r28 |
|
3d32: df 93 push r29 |
|
3d34: cd b7 in r28, 0x3d ; 61 |
|
3d36: de b7 in r29, 0x3e ; 62 |
|
3d38: 63 97 sbiw r28, 0x13 ; 19 |
|
3d3a: 0f b6 in r0, 0x3f ; 63 |
|
3d3c: f8 94 cli |
|
3d3e: de bf out 0x3e, r29 ; 62 |
|
3d40: 0f be out 0x3f, r0 ; 63 |
|
3d42: cd bf out 0x3d, r28 ; 61 |
|
3d44: 7c 01 movw r14, r24 |
|
3d46: 5b 01 movw r10, r22 |
|
3d48: 6a 01 movw r12, r20 |
|
uint32_t startTime = millis(); |
|
3d4a: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
3d4e: 2b 01 movw r4, r22 |
|
3d50: 3c 01 movw r6, r24 |
|
|
|
// Wait for a response packet |
|
while(iUdp.parsePacket() <= 0) |
|
3d52: 87 01 movw r16, r14 |
|
3d54: 08 5f subi r16, 0xF8 ; 248 |
|
3d56: 1f 4f sbci r17, 0xFF ; 255 |
|
{ |
|
if((millis() - startTime) > aTimeout) |
|
3d58: 45 01 movw r8, r10 |
|
3d5a: a1 2c mov r10, r1 |
|
3d5c: b1 2c mov r11, r1 |
|
uint16_t DNSClient::ProcessResponse(uint16_t aTimeout, IPAddress& aAddress) |
|
{ |
|
uint32_t startTime = millis(); |
|
|
|
// Wait for a response packet |
|
while(iUdp.parsePacket() <= 0) |
|
3d5e: c8 01 movw r24, r16 |
|
3d60: 0e 94 51 23 call 0x46a2 ; 0x46a2 <_ZN11EthernetUDP11parsePacketEv> |
|
3d64: 18 16 cp r1, r24 |
|
3d66: 19 06 cpc r1, r25 |
|
3d68: 94 f0 brlt .+36 ; 0x3d8e <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x7a> |
|
{ |
|
if((millis() - startTime) > aTimeout) |
|
3d6a: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
3d6e: 64 19 sub r22, r4 |
|
3d70: 75 09 sbc r23, r5 |
|
3d72: 86 09 sbc r24, r6 |
|
3d74: 97 09 sbc r25, r7 |
|
3d76: 86 16 cp r8, r22 |
|
3d78: 97 06 cpc r9, r23 |
|
3d7a: a8 06 cpc r10, r24 |
|
3d7c: b9 06 cpc r11, r25 |
|
3d7e: d0 f0 brcs .+52 ; 0x3db4 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0xa0> |
|
return TIMED_OUT; |
|
delay(50); |
|
3d80: 62 e3 ldi r22, 0x32 ; 50 |
|
3d82: 70 e0 ldi r23, 0x00 ; 0 |
|
3d84: 80 e0 ldi r24, 0x00 ; 0 |
|
3d86: 90 e0 ldi r25, 0x00 ; 0 |
|
3d88: 0e 94 68 2a call 0x54d0 ; 0x54d0 <delay> |
|
3d8c: e8 cf rjmp .-48 ; 0x3d5e <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x4a> |
|
|
|
// We've had a reply! |
|
// Read the UDP header |
|
uint8_t header[DNS_HEADER_SIZE]; // Enough space to reuse for the DNS header |
|
// Check that it's a response from the right server and the right port |
|
if ( (iDNSServer != iUdp.remoteIP()) || |
|
3d8e: f7 01 movw r30, r14 |
|
3d90: 42 81 ldd r20, Z+2 ; 0x02 |
|
3d92: 53 81 ldd r21, Z+3 ; 0x03 |
|
3d94: 64 81 ldd r22, Z+4 ; 0x04 |
|
3d96: 75 81 ldd r23, Z+5 ; 0x05 |
|
3d98: 81 8d ldd r24, Z+25 ; 0x19 |
|
3d9a: 92 8d ldd r25, Z+26 ; 0x1a |
|
3d9c: a3 8d ldd r26, Z+27 ; 0x1b |
|
3d9e: b4 8d ldd r27, Z+28 ; 0x1c |
|
3da0: 48 17 cp r20, r24 |
|
3da2: 59 07 cpc r21, r25 |
|
3da4: 6a 07 cpc r22, r26 |
|
3da6: 7b 07 cpc r23, r27 |
|
3da8: 41 f4 brne .+16 ; 0x3dba <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0xa6> |
|
3daa: 85 8d ldd r24, Z+29 ; 0x1d |
|
3dac: 96 8d ldd r25, Z+30 ; 0x1e |
|
3dae: c5 97 sbiw r24, 0x35 ; 53 |
|
3db0: 21 f4 brne .+8 ; 0x3dba <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0xa6> |
|
3db2: 06 c0 rjmp .+12 ; 0x3dc0 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0xac> |
|
|
|
// Wait for a response packet |
|
while(iUdp.parsePacket() <= 0) |
|
{ |
|
if((millis() - startTime) > aTimeout) |
|
return TIMED_OUT; |
|
3db4: 8f ef ldi r24, 0xFF ; 255 |
|
3db6: 9f ef ldi r25, 0xFF ; 255 |
|
3db8: f9 c0 rjmp .+498 ; 0x3fac <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x298> |
|
// Check that it's a response from the right server and the right port |
|
if ( (iDNSServer != iUdp.remoteIP()) || |
|
(iUdp.remotePort() != DNS_PORT) ) |
|
{ |
|
// It's not from who we expected |
|
return INVALID_SERVER; |
|
3dba: 8e ef ldi r24, 0xFE ; 254 |
|
3dbc: 9f ef ldi r25, 0xFF ; 255 |
|
3dbe: f6 c0 rjmp .+492 ; 0x3fac <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x298> |
|
} |
|
|
|
// Read through the rest of the response |
|
if (iUdp.available() < DNS_HEADER_SIZE) |
|
3dc0: c8 01 movw r24, r16 |
|
3dc2: 0e 94 64 22 call 0x44c8 ; 0x44c8 <_ZN11EthernetUDP9availableEv> |
|
3dc6: 0c 97 sbiw r24, 0x0c ; 12 |
|
3dc8: 0c f4 brge .+2 ; 0x3dcc <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0xb8> |
|
3dca: ee c0 rjmp .+476 ; 0x3fa8 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x294> |
|
{ |
|
return TRUNCATED; |
|
} |
|
iUdp.read(header, DNS_HEADER_SIZE); |
|
3dcc: 4c e0 ldi r20, 0x0C ; 12 |
|
3dce: 50 e0 ldi r21, 0x00 ; 0 |
|
3dd0: be 01 movw r22, r28 |
|
3dd2: 6f 5f subi r22, 0xFF ; 255 |
|
3dd4: 7f 4f sbci r23, 0xFF ; 255 |
|
3dd6: c8 01 movw r24, r16 |
|
3dd8: 0e 94 ee 22 call 0x45dc ; 0x45dc <_ZN11EthernetUDP4readEPhj> |
|
|
|
uint16_t header_flags = htons(*((uint16_t*)&header[2])); |
|
3ddc: 8b 81 ldd r24, Y+3 ; 0x03 |
|
3dde: 9c 81 ldd r25, Y+4 ; 0x04 |
|
3de0: 98 27 eor r25, r24 |
|
3de2: 89 27 eor r24, r25 |
|
3de4: 98 27 eor r25, r24 |
|
3de6: 9a 8b std Y+18, r25 ; 0x12 |
|
3de8: 89 8b std Y+17, r24 ; 0x11 |
|
// Check that it's a response to this request |
|
if ( ( iRequestId != (*((uint16_t*)&header[0])) ) || |
|
3dea: f7 01 movw r30, r14 |
|
3dec: 46 81 ldd r20, Z+6 ; 0x06 |
|
3dee: 57 81 ldd r21, Z+7 ; 0x07 |
|
3df0: 29 81 ldd r18, Y+1 ; 0x01 |
|
3df2: 3a 81 ldd r19, Y+2 ; 0x02 |
|
3df4: 42 17 cp r20, r18 |
|
3df6: 53 07 cpc r21, r19 |
|
3df8: 11 f4 brne .+4 ; 0x3dfe <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0xea> |
|
3dfa: 97 fd sbrc r25, 7 |
|
3dfc: 06 c0 rjmp .+12 ; 0x3e0a <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0xf6> |
|
((header_flags & QUERY_RESPONSE_MASK) != (uint16_t)RESPONSE_FLAG) ) |
|
{ |
|
// Mark the entire packet as read |
|
iUdp.flush(); |
|
3dfe: c8 01 movw r24, r16 |
|
3e00: 0e 94 7e 22 call 0x44fc ; 0x44fc <_ZN11EthernetUDP5flushEv> |
|
return INVALID_RESPONSE; |
|
3e04: 8c ef ldi r24, 0xFC ; 252 |
|
3e06: 9f ef ldi r25, 0xFF ; 255 |
|
3e08: d1 c0 rjmp .+418 ; 0x3fac <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x298> |
|
3e0a: 8f 70 andi r24, 0x0F ; 15 |
|
3e0c: 92 70 andi r25, 0x02 ; 2 |
|
} |
|
// Check for any errors in the response (or in our request) |
|
// although we don't do anything to get round these |
|
if ( (header_flags & TRUNCATION_FLAG) || (header_flags & RESP_MASK) ) |
|
3e0e: 89 2b or r24, r25 |
|
3e10: 31 f0 breq .+12 ; 0x3e1e <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x10a> |
|
{ |
|
// Mark the entire packet as read |
|
iUdp.flush(); |
|
3e12: c8 01 movw r24, r16 |
|
3e14: 0e 94 7e 22 call 0x44fc ; 0x44fc <_ZN11EthernetUDP5flushEv> |
|
return -5; //INVALID_RESPONSE; |
|
3e18: 8b ef ldi r24, 0xFB ; 251 |
|
3e1a: 9f ef ldi r25, 0xFF ; 255 |
|
3e1c: c7 c0 rjmp .+398 ; 0x3fac <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x298> |
|
} |
|
|
|
// And make sure we've got (at least) one answer |
|
uint16_t answerCount = htons(*((uint16_t*)&header[6])); |
|
3e1e: af 80 ldd r10, Y+7 ; 0x07 |
|
3e20: b8 84 ldd r11, Y+8 ; 0x08 |
|
3e22: ba 24 eor r11, r10 |
|
3e24: ab 24 eor r10, r11 |
|
3e26: ba 24 eor r11, r10 |
|
if (answerCount == 0 ) |
|
3e28: a1 14 cp r10, r1 |
|
3e2a: b1 04 cpc r11, r1 |
|
3e2c: 19 f0 breq .+6 ; 0x3e34 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x120> |
|
3e2e: e1 2c mov r14, r1 |
|
3e30: f1 2c mov r15, r1 |
|
3e32: 23 c0 rjmp .+70 ; 0x3e7a <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x166> |
|
{ |
|
// Mark the entire packet as read |
|
iUdp.flush(); |
|
3e34: c8 01 movw r24, r16 |
|
3e36: 0e 94 7e 22 call 0x44fc ; 0x44fc <_ZN11EthernetUDP5flushEv> |
|
return -6; //INVALID_RESPONSE; |
|
3e3a: 8a ef ldi r24, 0xFA ; 250 |
|
3e3c: 9f ef ldi r25, 0xFF ; 255 |
|
3e3e: b6 c0 rjmp .+364 ; 0x3fac <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x298> |
|
{ |
|
// Skip over the name |
|
uint8_t len; |
|
do |
|
{ |
|
iUdp.read(&len, sizeof(len)); |
|
3e40: 41 e0 ldi r20, 0x01 ; 1 |
|
3e42: 50 e0 ldi r21, 0x00 ; 0 |
|
3e44: be 01 movw r22, r28 |
|
3e46: 63 5f subi r22, 0xF3 ; 243 |
|
3e48: 7f 4f sbci r23, 0xFF ; 255 |
|
3e4a: c8 01 movw r24, r16 |
|
3e4c: 0e 94 ee 22 call 0x45dc ; 0x45dc <_ZN11EthernetUDP4readEPhj> |
|
if (len > 0) |
|
3e50: 8d 85 ldd r24, Y+13 ; 0x0d |
|
3e52: 81 11 cpse r24, r1 |
|
3e54: 1b c0 rjmp .+54 ; 0x3e8c <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x178> |
|
// Skip over any questions |
|
for (uint16_t i =0; i < htons(*((uint16_t*)&header[4])); i++) |
|
{ |
|
// Skip over the name |
|
uint8_t len; |
|
do |
|
3e56: 8d 85 ldd r24, Y+13 ; 0x0d |
|
3e58: 81 11 cpse r24, r1 |
|
3e5a: f2 cf rjmp .-28 ; 0x3e40 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x12c> |
|
} while (len != 0); |
|
|
|
// Now jump over the type and class |
|
for (int i =0; i < 4; i++) |
|
{ |
|
iUdp.read(); // we don't care about the returned byte |
|
3e5c: c8 01 movw r24, r16 |
|
3e5e: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
3e62: c8 01 movw r24, r16 |
|
3e64: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
3e68: c8 01 movw r24, r16 |
|
3e6a: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
3e6e: c8 01 movw r24, r16 |
|
3e70: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
iUdp.flush(); |
|
return -6; //INVALID_RESPONSE; |
|
} |
|
|
|
// Skip over any questions |
|
for (uint16_t i =0; i < htons(*((uint16_t*)&header[4])); i++) |
|
3e74: ff ef ldi r31, 0xFF ; 255 |
|
3e76: ef 1a sub r14, r31 |
|
3e78: ff 0a sbc r15, r31 |
|
3e7a: 8d 81 ldd r24, Y+5 ; 0x05 |
|
3e7c: 9e 81 ldd r25, Y+6 ; 0x06 |
|
3e7e: 98 27 eor r25, r24 |
|
3e80: 89 27 eor r24, r25 |
|
3e82: 98 27 eor r25, r24 |
|
3e84: e8 16 cp r14, r24 |
|
3e86: f9 06 cpc r15, r25 |
|
3e88: d8 f2 brcs .-74 ; 0x3e40 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x12c> |
|
3e8a: 0a c0 rjmp .+20 ; 0x3ea0 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x18c> |
|
iUdp.read(&len, sizeof(len)); |
|
if (len > 0) |
|
{ |
|
// Don't need to actually read the data out for the string, just |
|
// advance ptr to beyond it |
|
while(len--) |
|
3e8c: 8d 85 ldd r24, Y+13 ; 0x0d |
|
3e8e: 9f ef ldi r25, 0xFF ; 255 |
|
3e90: 98 0f add r25, r24 |
|
3e92: 9d 87 std Y+13, r25 ; 0x0d |
|
3e94: 88 23 and r24, r24 |
|
3e96: f9 f2 breq .-66 ; 0x3e56 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x142> |
|
{ |
|
iUdp.read(); // we don't care about the returned byte |
|
3e98: c8 01 movw r24, r16 |
|
3e9a: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
3e9e: f6 cf rjmp .-20 ; 0x3e8c <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x178> |
|
iUdp.flush(); |
|
return -6; //INVALID_RESPONSE; |
|
} |
|
|
|
// Skip over any questions |
|
for (uint16_t i =0; i < htons(*((uint16_t*)&header[4])); i++) |
|
3ea0: e1 2c mov r14, r1 |
|
3ea2: f1 2c mov r15, r1 |
|
{ |
|
// Skip the name |
|
uint8_t len; |
|
do |
|
{ |
|
iUdp.read(&len, sizeof(len)); |
|
3ea4: 41 e0 ldi r20, 0x01 ; 1 |
|
3ea6: 50 e0 ldi r21, 0x00 ; 0 |
|
3ea8: be 01 movw r22, r28 |
|
3eaa: 6d 5e subi r22, 0xED ; 237 |
|
3eac: 7f 4f sbci r23, 0xFF ; 255 |
|
3eae: c8 01 movw r24, r16 |
|
3eb0: 0e 94 ee 22 call 0x45dc ; 0x45dc <_ZN11EthernetUDP4readEPhj> |
|
if ((len & LABEL_COMPRESSION_MASK) == 0) |
|
3eb4: 8b 89 ldd r24, Y+19 ; 0x13 |
|
3eb6: 98 2f mov r25, r24 |
|
3eb8: 90 7c andi r25, 0xC0 ; 192 |
|
3eba: 61 f4 brne .+24 ; 0x3ed4 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x1c0> |
|
{ |
|
// It's just a normal label |
|
if (len > 0) |
|
3ebc: 88 23 and r24, r24 |
|
3ebe: 71 f0 breq .+28 ; 0x3edc <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x1c8> |
|
{ |
|
// And it's got a length |
|
// Don't need to actually read the data out for the string, |
|
// just advance ptr to beyond it |
|
while(len--) |
|
3ec0: 8b 89 ldd r24, Y+19 ; 0x13 |
|
3ec2: 9f ef ldi r25, 0xFF ; 255 |
|
3ec4: 98 0f add r25, r24 |
|
3ec6: 9b 8b std Y+19, r25 ; 0x13 |
|
3ec8: 88 23 and r24, r24 |
|
3eca: 41 f0 breq .+16 ; 0x3edc <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x1c8> |
|
{ |
|
iUdp.read(); // we don't care about the returned byte |
|
3ecc: c8 01 movw r24, r16 |
|
3ece: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
3ed2: f6 cf rjmp .-20 ; 0x3ec0 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x1ac> |
|
// says that a name is either a sequence of labels ended with a |
|
// 0 length octet or a pointer or a sequence of labels ending in |
|
// a pointer. Either way, when we get here we're at the end of |
|
// the name |
|
// Skip over the pointer |
|
iUdp.read(); // we don't care about the returned byte |
|
3ed4: c8 01 movw r24, r16 |
|
3ed6: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
// And set len so that we drop out of the name loop |
|
len = 0; |
|
3eda: 1b 8a std Y+19, r1 ; 0x13 |
|
|
|
for (uint16_t i =0; i < answerCount; i++) |
|
{ |
|
// Skip the name |
|
uint8_t len; |
|
do |
|
3edc: 8b 89 ldd r24, Y+19 ; 0x13 |
|
3ede: 81 11 cpse r24, r1 |
|
3ee0: e1 cf rjmp .-62 ; 0x3ea4 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x190> |
|
} while (len != 0); |
|
|
|
// Check the type and class |
|
uint16_t answerType; |
|
uint16_t answerClass; |
|
iUdp.read((uint8_t*)&answerType, sizeof(answerType)); |
|
3ee2: 42 e0 ldi r20, 0x02 ; 2 |
|
3ee4: 50 e0 ldi r21, 0x00 ; 0 |
|
3ee6: be 01 movw r22, r28 |
|
3ee8: 61 5f subi r22, 0xF1 ; 241 |
|
3eea: 7f 4f sbci r23, 0xFF ; 255 |
|
3eec: c8 01 movw r24, r16 |
|
3eee: 0e 94 ee 22 call 0x45dc ; 0x45dc <_ZN11EthernetUDP4readEPhj> |
|
iUdp.read((uint8_t*)&answerClass, sizeof(answerClass)); |
|
3ef2: 42 e0 ldi r20, 0x02 ; 2 |
|
3ef4: 50 e0 ldi r21, 0x00 ; 0 |
|
3ef6: be 01 movw r22, r28 |
|
3ef8: 63 5f subi r22, 0xF3 ; 243 |
|
3efa: 7f 4f sbci r23, 0xFF ; 255 |
|
3efc: c8 01 movw r24, r16 |
|
3efe: 0e 94 ee 22 call 0x45dc ; 0x45dc <_ZN11EthernetUDP4readEPhj> |
|
|
|
// Ignore the Time-To-Live as we don't do any caching |
|
for (int i =0; i < TTL_SIZE; i++) |
|
{ |
|
iUdp.read(); // we don't care about the returned byte |
|
3f02: c8 01 movw r24, r16 |
|
3f04: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
3f08: c8 01 movw r24, r16 |
|
3f0a: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
3f0e: c8 01 movw r24, r16 |
|
3f10: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
3f14: c8 01 movw r24, r16 |
|
3f16: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
} |
|
|
|
// And read out the length of this answer |
|
// Don't need header_flags anymore, so we can reuse it here |
|
iUdp.read((uint8_t*)&header_flags, sizeof(header_flags)); |
|
3f1a: 42 e0 ldi r20, 0x02 ; 2 |
|
3f1c: 50 e0 ldi r21, 0x00 ; 0 |
|
3f1e: be 01 movw r22, r28 |
|
3f20: 6f 5e subi r22, 0xEF ; 239 |
|
3f22: 7f 4f sbci r23, 0xFF ; 255 |
|
3f24: c8 01 movw r24, r16 |
|
3f26: 0e 94 ee 22 call 0x45dc ; 0x45dc <_ZN11EthernetUDP4readEPhj> |
|
|
|
if ( (htons(answerType) == TYPE_A) && (htons(answerClass) == CLASS_IN) ) |
|
3f2a: 8f 85 ldd r24, Y+15 ; 0x0f |
|
3f2c: 98 89 ldd r25, Y+16 ; 0x10 |
|
3f2e: 81 15 cp r24, r1 |
|
3f30: 91 40 sbci r25, 0x01 ; 1 |
|
3f32: 29 f4 brne .+10 ; 0x3f3e <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x22a> |
|
3f34: 8d 85 ldd r24, Y+13 ; 0x0d |
|
3f36: 9e 85 ldd r25, Y+14 ; 0x0e |
|
3f38: 81 15 cp r24, r1 |
|
3f3a: 91 40 sbci r25, 0x01 ; 1 |
|
3f3c: 19 f0 breq .+6 ; 0x3f44 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x230> |
|
iUdp.flush(); |
|
return -6; //INVALID_RESPONSE; |
|
} |
|
|
|
// Skip over any questions |
|
for (uint16_t i =0; i < htons(*((uint16_t*)&header[4])); i++) |
|
3f3e: 81 2c mov r8, r1 |
|
3f40: 91 2c mov r9, r1 |
|
3f42: 16 c0 rjmp .+44 ; 0x3f70 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x25c> |
|
// Don't need header_flags anymore, so we can reuse it here |
|
iUdp.read((uint8_t*)&header_flags, sizeof(header_flags)); |
|
|
|
if ( (htons(answerType) == TYPE_A) && (htons(answerClass) == CLASS_IN) ) |
|
{ |
|
if (htons(header_flags) != 4) |
|
3f44: 89 89 ldd r24, Y+17 ; 0x11 |
|
3f46: 9a 89 ldd r25, Y+18 ; 0x12 |
|
3f48: 81 15 cp r24, r1 |
|
3f4a: 94 40 sbci r25, 0x04 ; 4 |
|
3f4c: 31 f0 breq .+12 ; 0x3f5a <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x246> |
|
{ |
|
// It's a weird size |
|
// Mark the entire packet as read |
|
iUdp.flush(); |
|
3f4e: c8 01 movw r24, r16 |
|
3f50: 0e 94 7e 22 call 0x44fc ; 0x44fc <_ZN11EthernetUDP5flushEv> |
|
return -9;//INVALID_RESPONSE; |
|
3f54: 87 ef ldi r24, 0xF7 ; 247 |
|
3f56: 9f ef ldi r25, 0xFF ; 255 |
|
3f58: 29 c0 rjmp .+82 ; 0x3fac <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x298> |
|
} |
|
iUdp.read(aAddress.raw_address(), 4); |
|
3f5a: b6 01 movw r22, r12 |
|
3f5c: 6e 5f subi r22, 0xFE ; 254 |
|
3f5e: 7f 4f sbci r23, 0xFF ; 255 |
|
3f60: 44 e0 ldi r20, 0x04 ; 4 |
|
3f62: 50 e0 ldi r21, 0x00 ; 0 |
|
3f64: c8 01 movw r24, r16 |
|
3f66: 0e 94 ee 22 call 0x45dc ; 0x45dc <_ZN11EthernetUDP4readEPhj> |
|
return SUCCESS; |
|
3f6a: 81 e0 ldi r24, 0x01 ; 1 |
|
3f6c: 90 e0 ldi r25, 0x00 ; 0 |
|
3f6e: 1e c0 rjmp .+60 ; 0x3fac <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x298> |
|
} |
|
else |
|
{ |
|
// This isn't an answer type we're after, move onto the next one |
|
for (uint16_t i =0; i < htons(header_flags); i++) |
|
3f70: 89 89 ldd r24, Y+17 ; 0x11 |
|
3f72: 9a 89 ldd r25, Y+18 ; 0x12 |
|
3f74: 98 27 eor r25, r24 |
|
3f76: 89 27 eor r24, r25 |
|
3f78: 98 27 eor r25, r24 |
|
3f7a: 88 16 cp r8, r24 |
|
3f7c: 99 06 cpc r9, r25 |
|
3f7e: 38 f4 brcc .+14 ; 0x3f8e <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x27a> |
|
{ |
|
iUdp.read(); // we don't care about the returned byte |
|
3f80: c8 01 movw r24, r16 |
|
3f82: 0e 94 c5 22 call 0x458a ; 0x458a <_ZN11EthernetUDP4readEv> |
|
return SUCCESS; |
|
} |
|
else |
|
{ |
|
// This isn't an answer type we're after, move onto the next one |
|
for (uint16_t i =0; i < htons(header_flags); i++) |
|
3f86: 2f ef ldi r18, 0xFF ; 255 |
|
3f88: 82 1a sub r8, r18 |
|
3f8a: 92 0a sbc r9, r18 |
|
3f8c: f1 cf rjmp .-30 ; 0x3f70 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x25c> |
|
// Now we're up to the bit we're interested in, the answer |
|
// There might be more than one answer (although we'll just use the first |
|
// type A answer) and some authority and additional resource records but |
|
// we're going to ignore all of them. |
|
|
|
for (uint16_t i =0; i < answerCount; i++) |
|
3f8e: 8f ef ldi r24, 0xFF ; 255 |
|
3f90: e8 1a sub r14, r24 |
|
3f92: f8 0a sbc r15, r24 |
|
3f94: ea 14 cp r14, r10 |
|
3f96: fb 04 cpc r15, r11 |
|
3f98: 09 f0 breq .+2 ; 0x3f9c <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x288> |
|
3f9a: 84 cf rjmp .-248 ; 0x3ea4 <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x190> |
|
} |
|
} |
|
} |
|
|
|
// Mark the entire packet as read |
|
iUdp.flush(); |
|
3f9c: c8 01 movw r24, r16 |
|
3f9e: 0e 94 7e 22 call 0x44fc ; 0x44fc <_ZN11EthernetUDP5flushEv> |
|
|
|
// If we get here then we haven't found an answer |
|
return -10;//INVALID_RESPONSE; |
|
3fa2: 86 ef ldi r24, 0xF6 ; 246 |
|
3fa4: 9f ef ldi r25, 0xFF ; 255 |
|
3fa6: 02 c0 rjmp .+4 ; 0x3fac <_ZN9DNSClient15ProcessResponseEjR9IPAddress+0x298> |
|
} |
|
|
|
// Read through the rest of the response |
|
if (iUdp.available() < DNS_HEADER_SIZE) |
|
{ |
|
return TRUNCATED; |
|
3fa8: 8d ef ldi r24, 0xFD ; 253 |
|
3faa: 9f ef ldi r25, 0xFF ; 255 |
|
// Mark the entire packet as read |
|
iUdp.flush(); |
|
|
|
// If we get here then we haven't found an answer |
|
return -10;//INVALID_RESPONSE; |
|
} |
|
3fac: 63 96 adiw r28, 0x13 ; 19 |
|
3fae: 0f b6 in r0, 0x3f ; 63 |
|
3fb0: f8 94 cli |
|
3fb2: de bf out 0x3e, r29 ; 62 |
|
3fb4: 0f be out 0x3f, r0 ; 63 |
|
3fb6: cd bf out 0x3d, r28 ; 61 |
|
3fb8: df 91 pop r29 |
|
3fba: cf 91 pop r28 |
|
3fbc: 1f 91 pop r17 |
|
3fbe: 0f 91 pop r16 |
|
3fc0: ff 90 pop r15 |
|
3fc2: ef 90 pop r14 |
|
3fc4: df 90 pop r13 |
|
3fc6: cf 90 pop r12 |
|
3fc8: bf 90 pop r11 |
|
3fca: af 90 pop r10 |
|
3fcc: 9f 90 pop r9 |
|
3fce: 8f 90 pop r8 |
|
3fd0: 7f 90 pop r7 |
|
3fd2: 6f 90 pop r6 |
|
3fd4: 5f 90 pop r5 |
|
3fd6: 4f 90 pop r4 |
|
3fd8: 08 95 ret |
|
|
|
00003fda <_ZN9DNSClient13getHostByNameEPKcR9IPAddress>: |
|
return 0; |
|
} |
|
} |
|
|
|
int DNSClient::getHostByName(const char* aHostname, IPAddress& aResult) |
|
{ |
|
3fda: 8f 92 push r8 |
|
3fdc: 9f 92 push r9 |
|
3fde: af 92 push r10 |
|
3fe0: bf 92 push r11 |
|
3fe2: cf 92 push r12 |
|
3fe4: df 92 push r13 |
|
3fe6: ef 92 push r14 |
|
3fe8: ff 92 push r15 |
|
3fea: 0f 93 push r16 |
|
3fec: 1f 93 push r17 |
|
3fee: cf 93 push r28 |
|
3ff0: df 93 push r29 |
|
3ff2: 00 d0 rcall .+0 ; 0x3ff4 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0x1a> |
|
3ff4: 00 d0 rcall .+0 ; 0x3ff6 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0x1c> |
|
3ff6: 00 d0 rcall .+0 ; 0x3ff8 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0x1e> |
|
3ff8: cd b7 in r28, 0x3d ; 61 |
|
3ffa: de b7 in r29, 0x3e ; 62 |
|
3ffc: 8c 01 movw r16, r24 |
|
3ffe: 5b 01 movw r10, r22 |
|
4000: 6a 01 movw r12, r20 |
|
int ret =0; |
|
|
|
// See if it's a numeric IP address |
|
if (inet_aton(aHostname, aResult)) |
|
4002: 0e 94 95 1d call 0x3b2a ; 0x3b2a <_ZN9DNSClient9inet_atonEPKcR9IPAddress> |
|
4006: 4c 01 movw r8, r24 |
|
4008: 00 97 sbiw r24, 0x00 ; 0 |
|
400a: 09 f0 breq .+2 ; 0x400e <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0x34> |
|
400c: 5d c0 rjmp .+186 ; 0x40c8 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xee> |
|
// It is, our work here is done |
|
return 1; |
|
} |
|
|
|
// Check we've got a valid DNS server to use |
|
if (iDNSServer == INADDR_NONE) |
|
400e: f8 01 movw r30, r16 |
|
4010: 42 81 ldd r20, Z+2 ; 0x02 |
|
4012: 53 81 ldd r21, Z+3 ; 0x03 |
|
4014: 64 81 ldd r22, Z+4 ; 0x04 |
|
4016: 75 81 ldd r23, Z+5 ; 0x05 |
|
4018: 80 91 2c 03 lds r24, 0x032C |
|
401c: 90 91 2d 03 lds r25, 0x032D |
|
4020: a0 91 2e 03 lds r26, 0x032E |
|
4024: b0 91 2f 03 lds r27, 0x032F |
|
4028: 48 17 cp r20, r24 |
|
402a: 59 07 cpc r21, r25 |
|
402c: 6a 07 cpc r22, r26 |
|
402e: 7b 07 cpc r23, r27 |
|
4030: 09 f4 brne .+2 ; 0x4034 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0x5a> |
|
4032: 4e c0 rjmp .+156 ; 0x40d0 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xf6> |
|
{ |
|
return INVALID_SERVER; |
|
} |
|
|
|
// Find a socket to use |
|
if (iUdp.begin(1024+(millis() & 0xF)) == 1) |
|
4034: 0e 94 39 2a call 0x5472 ; 0x5472 <millis> |
|
4038: 78 01 movw r14, r16 |
|
403a: f8 e0 ldi r31, 0x08 ; 8 |
|
403c: ef 0e add r14, r31 |
|
403e: f1 1c adc r15, r1 |
|
4040: 6f 70 andi r22, 0x0F ; 15 |
|
4042: 77 27 eor r23, r23 |
|
4044: 7c 5f subi r23, 0xFC ; 252 |
|
4046: c7 01 movw r24, r14 |
|
4048: 0e 94 24 23 call 0x4648 ; 0x4648 <_ZN11EthernetUDP5beginEj> |
|
404c: 81 30 cpi r24, 0x01 ; 1 |
|
404e: 09 f0 breq .+2 ; 0x4052 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0x78> |
|
4050: 43 c0 rjmp .+134 ; 0x40d8 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xfe> |
|
#include <stdint.h> |
|
#include <Printable.h> |
|
|
|
// A class to make it easier to handle and pass around IP addresses |
|
|
|
class IPAddress : public Printable { |
|
4052: 8c e3 ldi r24, 0x3C ; 60 |
|
4054: 92 e0 ldi r25, 0x02 ; 2 |
|
4056: 9a 83 std Y+2, r25 ; 0x02 |
|
4058: 89 83 std Y+1, r24 ; 0x01 |
|
405a: f8 01 movw r30, r16 |
|
405c: 82 81 ldd r24, Z+2 ; 0x02 |
|
405e: 93 81 ldd r25, Z+3 ; 0x03 |
|
4060: a4 81 ldd r26, Z+4 ; 0x04 |
|
4062: b5 81 ldd r27, Z+5 ; 0x05 |
|
4064: 8b 83 std Y+3, r24 ; 0x03 |
|
4066: 9c 83 std Y+4, r25 ; 0x04 |
|
4068: ad 83 std Y+5, r26 ; 0x05 |
|
406a: be 83 std Y+6, r27 ; 0x06 |
|
// Try up to three times |
|
int retries = 0; |
|
// while ((retries < 3) && (ret <= 0)) |
|
{ |
|
// Send DNS request |
|
ret = iUdp.beginPacket(iDNSServer, DNS_PORT); |
|
406c: 45 e3 ldi r20, 0x35 ; 53 |
|
406e: 50 e0 ldi r21, 0x00 ; 0 |
|
4070: be 01 movw r22, r28 |
|
4072: 6f 5f subi r22, 0xFF ; 255 |
|
4074: 7f 4f sbci r23, 0xFF ; 255 |
|
4076: c7 01 movw r24, r14 |
|
4078: 0e 94 a5 22 call 0x454a ; 0x454a <_ZN11EthernetUDP11beginPacketE9IPAddressj> |
|
if (ret != 0) |
|
407c: 89 2b or r24, r25 |
|
407e: 19 f4 brne .+6 ; 0x4086 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xac> |
|
ret = BuildRequest(aHostname); |
|
if (ret != 0) |
|
{ |
|
// And finally send the request |
|
ret = iUdp.endPacket(); |
|
if (ret != 0) |
|
4080: 81 2c mov r8, r1 |
|
4082: 91 2c mov r9, r1 |
|
4084: 1d c0 rjmp .+58 ; 0x40c0 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xe6> |
|
// Send DNS request |
|
ret = iUdp.beginPacket(iDNSServer, DNS_PORT); |
|
if (ret != 0) |
|
{ |
|
// Now output the request data |
|
ret = BuildRequest(aHostname); |
|
4086: b5 01 movw r22, r10 |
|
4088: c8 01 movw r24, r16 |
|
408a: 0e 94 e1 1d call 0x3bc2 ; 0x3bc2 <_ZN9DNSClient12BuildRequestEPKc> |
|
if (ret != 0) |
|
408e: 89 2b or r24, r25 |
|
4090: b9 f3 breq .-18 ; 0x4080 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xa6> |
|
{ |
|
// And finally send the request |
|
ret = iUdp.endPacket(); |
|
4092: c7 01 movw r24, r14 |
|
4094: 0e 94 ad 22 call 0x455a ; 0x455a <_ZN11EthernetUDP9endPacketEv> |
|
if (ret != 0) |
|
4098: 89 2b or r24, r25 |
|
409a: 91 f3 breq .-28 ; 0x4080 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xa6> |
|
409c: 33 e0 ldi r19, 0x03 ; 3 |
|
409e: a3 2e mov r10, r19 |
|
40a0: b1 2c mov r11, r1 |
|
// Now wait for a response |
|
int wait_retries = 0; |
|
ret = TIMED_OUT; |
|
while ((wait_retries < 3) && (ret == TIMED_OUT)) |
|
{ |
|
ret = ProcessResponse(5000, aResult); |
|
40a2: a6 01 movw r20, r12 |
|
40a4: 68 e8 ldi r22, 0x88 ; 136 |
|
40a6: 73 e1 ldi r23, 0x13 ; 19 |
|
40a8: c8 01 movw r24, r16 |
|
40aa: 0e 94 8a 1e call 0x3d14 ; 0x3d14 <_ZN9DNSClient15ProcessResponseEjR9IPAddress> |
|
40ae: 4c 01 movw r8, r24 |
|
40b0: f1 e0 ldi r31, 0x01 ; 1 |
|
40b2: af 1a sub r10, r31 |
|
40b4: b1 08 sbc r11, r1 |
|
if (ret != 0) |
|
{ |
|
// Now wait for a response |
|
int wait_retries = 0; |
|
ret = TIMED_OUT; |
|
while ((wait_retries < 3) && (ret == TIMED_OUT)) |
|
40b6: 21 f0 breq .+8 ; 0x40c0 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xe6> |
|
40b8: 8f 3f cpi r24, 0xFF ; 255 |
|
40ba: 2f ef ldi r18, 0xFF ; 255 |
|
40bc: 92 07 cpc r25, r18 |
|
40be: 89 f3 breq .-30 ; 0x40a2 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xc8> |
|
} |
|
retries++; |
|
} |
|
|
|
// We're done with the socket now |
|
iUdp.stop(); |
|
40c0: c7 01 movw r24, r14 |
|
40c2: 0e 94 90 22 call 0x4520 ; 0x4520 <_ZN11EthernetUDP4stopEv> |
|
40c6: 08 c0 rjmp .+16 ; 0x40d8 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xfe> |
|
|
|
// See if it's a numeric IP address |
|
if (inet_aton(aHostname, aResult)) |
|
{ |
|
// It is, our work here is done |
|
return 1; |
|
40c8: 88 24 eor r8, r8 |
|
40ca: 83 94 inc r8 |
|
40cc: 91 2c mov r9, r1 |
|
40ce: 04 c0 rjmp .+8 ; 0x40d8 <_ZN9DNSClient13getHostByNameEPKcR9IPAddress+0xfe> |
|
} |
|
|
|
// Check we've got a valid DNS server to use |
|
if (iDNSServer == INADDR_NONE) |
|
{ |
|
return INVALID_SERVER; |
|
40d0: 9e ef ldi r25, 0xFE ; 254 |
|
40d2: 89 2e mov r8, r25 |
|
40d4: 99 24 eor r9, r9 |
|
40d6: 9a 94 dec r9 |
|
// We're done with the socket now |
|
iUdp.stop(); |
|
} |
|
|
|
return ret; |
|
} |
|
40d8: c4 01 movw r24, r8 |
|
40da: 26 96 adiw r28, 0x06 ; 6 |
|
40dc: 0f b6 in r0, 0x3f ; 63 |
|
40de: f8 94 cli |
|
40e0: de bf out 0x3e, r29 ; 62 |
|
40e2: 0f be out 0x3f, r0 ; 63 |
|
40e4: cd bf out 0x3d, r28 ; 61 |
|
40e6: df 91 pop r29 |
|
40e8: cf 91 pop r28 |
|
40ea: 1f 91 pop r17 |
|
40ec: 0f 91 pop r16 |
|
40ee: ff 90 pop r15 |
|
40f0: ef 90 pop r14 |
|
40f2: df 90 pop r13 |
|
40f4: cf 90 pop r12 |
|
40f6: bf 90 pop r11 |
|
40f8: af 90 pop r10 |
|
40fa: 9f 90 pop r9 |
|
40fc: 8f 90 pop r8 |
|
40fe: 08 95 ret |
|
|
|
00004100 <_ZN8SPIClass16beginTransactionE11SPISettings>: |
|
|
|
// Before using SPI.transfer() or asserting chip select pins, |
|
// this function is used to gain exclusive access to the SPI bus |
|
// and configure the correct settings. |
|
inline static void beginTransaction(SPISettings settings) { |
|
if (interruptMode > 0) { |
|
4100: 20 91 22 03 lds r18, 0x0322 |
|
4104: 22 23 and r18, r18 |
|
4106: 99 f0 breq .+38 ; 0x412e <_ZN8SPIClass16beginTransactionE11SPISettings+0x2e> |
|
uint8_t sreg = SREG; |
|
4108: 3f b7 in r19, 0x3f ; 63 |
|
noInterrupts(); |
|
410a: f8 94 cli |
|
|
|
#ifdef SPI_AVR_EIMSK |
|
if (interruptMode == 1) { |
|
410c: 20 91 22 03 lds r18, 0x0322 |
|
4110: 21 30 cpi r18, 0x01 ; 1 |
|
4112: 59 f4 brne .+22 ; 0x412a <_ZN8SPIClass16beginTransactionE11SPISettings+0x2a> |
|
interruptSave = SPI_AVR_EIMSK; |
|
4114: 2d b3 in r18, 0x1d ; 29 |
|
4116: 20 93 20 03 sts 0x0320, r18 |
|
SPI_AVR_EIMSK &= ~interruptMask; |
|
411a: 4d b3 in r20, 0x1d ; 29 |
|
411c: 20 91 21 03 lds r18, 0x0321 |
|
4120: 20 95 com r18 |
|
4122: 24 23 and r18, r20 |
|
4124: 2d bb out 0x1d, r18 ; 29 |
|
SREG = sreg; |
|
4126: 3f bf out 0x3f, r19 ; 63 |
|
4128: 02 c0 rjmp .+4 ; 0x412e <_ZN8SPIClass16beginTransactionE11SPISettings+0x2e> |
|
} else |
|
#endif |
|
{ |
|
interruptSave = sreg; |
|
412a: 30 93 20 03 sts 0x0320, r19 |
|
digitalWrite(SPI_TRANSACTION_MISMATCH_LED, HIGH); |
|
} |
|
inTransactionFlag = 1; |
|
#endif |
|
|
|
SPCR = settings.spcr; |
|
412e: 8c bd out 0x2c, r24 ; 44 |
|
SPSR = settings.spsr; |
|
4130: 9d bd out 0x2d, r25 ; 45 |
|
4132: 08 95 ret |
|
|
|
00004134 <_ZN8SPIClass14endTransactionEv>: |
|
digitalWrite(SPI_TRANSACTION_MISMATCH_LED, HIGH); |
|
} |
|
inTransactionFlag = 0; |
|
#endif |
|
|
|
if (interruptMode > 0) { |
|
4134: 80 91 22 03 lds r24, 0x0322 |
|
4138: 88 23 and r24, r24 |
|
413a: 61 f0 breq .+24 ; 0x4154 <_ZN8SPIClass14endTransactionEv+0x20> |
|
#ifdef SPI_AVR_EIMSK |
|
uint8_t sreg = SREG; |
|
413c: 9f b7 in r25, 0x3f ; 63 |
|
#endif |
|
noInterrupts(); |
|
413e: f8 94 cli |
|
#ifdef SPI_AVR_EIMSK |
|
if (interruptMode == 1) { |
|
4140: 20 91 22 03 lds r18, 0x0322 |
|
4144: 80 91 20 03 lds r24, 0x0320 |
|
4148: 21 30 cpi r18, 0x01 ; 1 |
|
414a: 19 f4 brne .+6 ; 0x4152 <_ZN8SPIClass14endTransactionEv+0x1e> |
|
SPI_AVR_EIMSK = interruptSave; |
|
414c: 8d bb out 0x1d, r24 ; 29 |
|
SREG = sreg; |
|
414e: 9f bf out 0x3f, r25 ; 63 |
|
4150: 08 95 ret |
|
} else |
|
#endif |
|
{ |
|
SREG = interruptSave; |
|
4152: 8f bf out 0x3f, r24 ; 63 |
|
4154: 08 95 ret |
|
|
|
00004156 <_ZN10W5100Class8writeGAREPh>: |
|
return read(address, _buff, size); \ |
|
} |
|
|
|
public: |
|
__GP_REGISTER8 (MR, 0x0000); // Mode |
|
__GP_REGISTER_N(GAR, 0x0001, 4); // Gateway IP address |
|
4156: 44 e0 ldi r20, 0x04 ; 4 |
|
4158: 50 e0 ldi r21, 0x00 ; 0 |
|
415a: bc 01 movw r22, r24 |
|
415c: 81 e0 ldi r24, 0x01 ; 1 |
|
415e: 90 e0 ldi r25, 0x00 ; 0 |
|
4160: 0c 94 6f 27 jmp 0x4ede ; 0x4ede <_ZN10W5100Class5writeEjPKhj> |
|
|
|
00004164 <_ZN10W5100Class9writeSUBREPh>: |
|
__GP_REGISTER_N(SUBR, 0x0005, 4); // Subnet mask address |
|
4164: 44 e0 ldi r20, 0x04 ; 4 |
|
4166: 50 e0 ldi r21, 0x00 ; 0 |
|
4168: bc 01 movw r22, r24 |
|
416a: 85 e0 ldi r24, 0x05 ; 5 |
|
416c: 90 e0 ldi r25, 0x00 ; 0 |
|
416e: 0c 94 6f 27 jmp 0x4ede ; 0x4ede <_ZN10W5100Class5writeEjPKhj> |
|
|
|
00004172 <_ZN10W5100Class9writeSIPREPh>: |
|
__GP_REGISTER_N(SHAR, 0x0009, 6); // Source MAC address |
|
__GP_REGISTER_N(SIPR, 0x000F, 4); // Source IP address |
|
4172: 44 e0 ldi r20, 0x04 ; 4 |
|
4174: 50 e0 ldi r21, 0x00 ; 0 |
|
4176: bc 01 movw r22, r24 |
|
4178: 8f e0 ldi r24, 0x0F ; 15 |
|
417a: 90 e0 ldi r25, 0x00 ; 0 |
|
417c: 0c 94 6f 27 jmp 0x4ede ; 0x4ede <_ZN10W5100Class5writeEjPKhj> |
|
|
|
00004180 <_ZN13EthernetClass5beginEPh9IPAddressS1_S1_S1_>: |
|
IPAddress subnet(255, 255, 255, 0); |
|
begin(mac_address, local_ip, dns_server, gateway, subnet); |
|
} |
|
|
|
void EthernetClass::begin(uint8_t *mac, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet) |
|
{ |
|
4180: 8f 92 push r8 |
|
4182: 9f 92 push r9 |
|
4184: af 92 push r10 |
|
4186: bf 92 push r11 |
|
4188: cf 92 push r12 |
|
418a: df 92 push r13 |
|
418c: ef 92 push r14 |
|
418e: ff 92 push r15 |
|
4190: 0f 93 push r16 |
|
4192: 1f 93 push r17 |
|
4194: cf 93 push r28 |
|
4196: df 93 push r29 |
|
4198: 00 d0 rcall .+0 ; 0x419a <_ZN13EthernetClass5beginEPh9IPAddressS1_S1_S1_+0x1a> |
|
419a: cd b7 in r28, 0x3d ; 61 |
|
419c: de b7 in r29, 0x3e ; 62 |
|
419e: 4c 01 movw r8, r24 |
|
41a0: 6a 01 movw r12, r20 |
|
41a2: 59 01 movw r10, r18 |
|
W5100.init(); |
|
41a4: 8a e5 ldi r24, 0x5A ; 90 |
|
41a6: 93 e0 ldi r25, 0x03 ; 3 |
|
41a8: 69 83 std Y+1, r22 ; 0x01 |
|
41aa: 7a 83 std Y+2, r23 ; 0x02 |
|
41ac: 0e 94 07 27 call 0x4e0e ; 0x4e0e <_ZN10W5100Class4initEv> |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
41b0: 80 e5 ldi r24, 0x50 ; 80 |
|
41b2: 90 e0 ldi r25, 0x00 ; 0 |
|
41b4: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
|
|
public: |
|
__GP_REGISTER8 (MR, 0x0000); // Mode |
|
__GP_REGISTER_N(GAR, 0x0001, 4); // Gateway IP address |
|
__GP_REGISTER_N(SUBR, 0x0005, 4); // Subnet mask address |
|
__GP_REGISTER_N(SHAR, 0x0009, 6); // Source MAC address |
|
41b8: 46 e0 ldi r20, 0x06 ; 6 |
|
41ba: 50 e0 ldi r21, 0x00 ; 0 |
|
41bc: 69 81 ldd r22, Y+1 ; 0x01 |
|
41be: 7a 81 ldd r23, Y+2 ; 0x02 |
|
41c0: 89 e0 ldi r24, 0x09 ; 9 |
|
41c2: 90 e0 ldi r25, 0x00 ; 0 |
|
41c4: 0e 94 6f 27 call 0x4ede ; 0x4ede <_ZN10W5100Class5writeEjPKhj> |
|
void W5100Class::getIPAddress(uint8_t *_addr) { |
|
readSIPR(_addr); |
|
} |
|
|
|
void W5100Class::setIPAddress(uint8_t *_addr) { |
|
writeSIPR(_addr); |
|
41c8: c6 01 movw r24, r12 |
|
41ca: 02 96 adiw r24, 0x02 ; 2 |
|
41cc: 0e 94 b9 20 call 0x4172 ; 0x4172 <_ZN10W5100Class9writeSIPREPh> |
|
void W5100Class::getGatewayIp(uint8_t *_addr) { |
|
readGAR(_addr); |
|
} |
|
|
|
void W5100Class::setGatewayIp(uint8_t *_addr) { |
|
writeGAR(_addr); |
|
41d0: c8 01 movw r24, r16 |
|
41d2: 02 96 adiw r24, 0x02 ; 2 |
|
41d4: 0e 94 ab 20 call 0x4156 ; 0x4156 <_ZN10W5100Class8writeGAREPh> |
|
void W5100Class::getSubnetMask(uint8_t *_addr) { |
|
readSUBR(_addr); |
|
} |
|
|
|
void W5100Class::setSubnetMask(uint8_t *_addr) { |
|
writeSUBR(_addr); |
|
41d8: c7 01 movw r24, r14 |
|
41da: 02 96 adiw r24, 0x02 ; 2 |
|
41dc: 0e 94 b2 20 call 0x4164 ; 0x4164 <_ZN10W5100Class9writeSUBREPh> |
|
W5100.setMACAddress(mac); |
|
W5100.setIPAddress(local_ip.raw_address()); |
|
W5100.setGatewayIp(gateway.raw_address()); |
|
W5100.setSubnetMask(subnet.raw_address()); |
|
SPI.endTransaction(); |
|
41e0: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
41e4: f5 01 movw r30, r10 |
|
41e6: 42 81 ldd r20, Z+2 ; 0x02 |
|
41e8: 53 81 ldd r21, Z+3 ; 0x03 |
|
41ea: 64 81 ldd r22, Z+4 ; 0x04 |
|
41ec: 75 81 ldd r23, Z+5 ; 0x05 |
|
41ee: f4 01 movw r30, r8 |
|
41f0: 42 83 std Z+2, r20 ; 0x02 |
|
41f2: 53 83 std Z+3, r21 ; 0x03 |
|
41f4: 64 83 std Z+4, r22 ; 0x04 |
|
41f6: 75 83 std Z+5, r23 ; 0x05 |
|
_dnsServerAddress = dns_server; |
|
} |
|
41f8: 0f 90 pop r0 |
|
41fa: 0f 90 pop r0 |
|
41fc: df 91 pop r29 |
|
41fe: cf 91 pop r28 |
|
4200: 1f 91 pop r17 |
|
4202: 0f 91 pop r16 |
|
4204: ff 90 pop r15 |
|
4206: ef 90 pop r14 |
|
4208: df 90 pop r13 |
|
420a: cf 90 pop r12 |
|
420c: bf 90 pop r11 |
|
420e: af 90 pop r10 |
|
4210: 9f 90 pop r9 |
|
4212: 8f 90 pop r8 |
|
4214: 08 95 ret |
|
|
|
00004216 <_ZN13EthernetClass5beginEPh9IPAddressS1_S1_>: |
|
gateway[3] = 1; |
|
begin(mac_address, local_ip, dns_server, gateway); |
|
} |
|
|
|
void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway) |
|
{ |
|
4216: 6f 92 push r6 |
|
4218: 7f 92 push r7 |
|
421a: 8f 92 push r8 |
|
421c: 9f 92 push r9 |
|
421e: af 92 push r10 |
|
4220: bf 92 push r11 |
|
4222: cf 92 push r12 |
|
4224: df 92 push r13 |
|
4226: ef 92 push r14 |
|
4228: ff 92 push r15 |
|
422a: 0f 93 push r16 |
|
422c: 1f 93 push r17 |
|
422e: cf 93 push r28 |
|
4230: df 93 push r29 |
|
4232: cd b7 in r28, 0x3d ; 61 |
|
4234: de b7 in r29, 0x3e ; 62 |
|
4236: 6e 97 sbiw r28, 0x1e ; 30 |
|
4238: 0f b6 in r0, 0x3f ; 63 |
|
423a: f8 94 cli |
|
423c: de bf out 0x3e, r29 ; 62 |
|
423e: 0f be out 0x3f, r0 ; 63 |
|
4240: cd bf out 0x3d, r28 ; 61 |
|
4242: 6c 01 movw r12, r24 |
|
4244: 5b 01 movw r10, r22 |
|
4246: 7a 01 movw r14, r20 |
|
4248: 49 01 movw r8, r18 |
|
424a: 38 01 movw r6, r16 |
|
IPAddress subnet(255, 255, 255, 0); |
|
424c: 00 e0 ldi r16, 0x00 ; 0 |
|
424e: 2f ef ldi r18, 0xFF ; 255 |
|
4250: 4f ef ldi r20, 0xFF ; 255 |
|
4252: 6f ef ldi r22, 0xFF ; 255 |
|
4254: ce 01 movw r24, r28 |
|
4256: 49 96 adiw r24, 0x19 ; 25 |
|
4258: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
425c: 2c e3 ldi r18, 0x3C ; 60 |
|
425e: 32 e0 ldi r19, 0x02 ; 2 |
|
4260: 3a 83 std Y+2, r19 ; 0x02 |
|
4262: 29 83 std Y+1, r18 ; 0x01 |
|
4264: 8b 8d ldd r24, Y+27 ; 0x1b |
|
4266: 9c 8d ldd r25, Y+28 ; 0x1c |
|
4268: ad 8d ldd r26, Y+29 ; 0x1d |
|
426a: be 8d ldd r27, Y+30 ; 0x1e |
|
426c: 8b 83 std Y+3, r24 ; 0x03 |
|
426e: 9c 83 std Y+4, r25 ; 0x04 |
|
4270: ad 83 std Y+5, r26 ; 0x05 |
|
4272: be 83 std Y+6, r27 ; 0x06 |
|
4274: 38 87 std Y+8, r19 ; 0x08 |
|
4276: 2f 83 std Y+7, r18 ; 0x07 |
|
4278: f3 01 movw r30, r6 |
|
427a: 82 81 ldd r24, Z+2 ; 0x02 |
|
427c: 93 81 ldd r25, Z+3 ; 0x03 |
|
427e: a4 81 ldd r26, Z+4 ; 0x04 |
|
4280: b5 81 ldd r27, Z+5 ; 0x05 |
|
4282: 89 87 std Y+9, r24 ; 0x09 |
|
4284: 9a 87 std Y+10, r25 ; 0x0a |
|
4286: ab 87 std Y+11, r26 ; 0x0b |
|
4288: bc 87 std Y+12, r27 ; 0x0c |
|
428a: 3e 87 std Y+14, r19 ; 0x0e |
|
428c: 2d 87 std Y+13, r18 ; 0x0d |
|
428e: f4 01 movw r30, r8 |
|
4290: 82 81 ldd r24, Z+2 ; 0x02 |
|
4292: 93 81 ldd r25, Z+3 ; 0x03 |
|
4294: a4 81 ldd r26, Z+4 ; 0x04 |
|
4296: b5 81 ldd r27, Z+5 ; 0x05 |
|
4298: 8f 87 std Y+15, r24 ; 0x0f |
|
429a: 98 8b std Y+16, r25 ; 0x10 |
|
429c: a9 8b std Y+17, r26 ; 0x11 |
|
429e: ba 8b std Y+18, r27 ; 0x12 |
|
42a0: 3c 8b std Y+20, r19 ; 0x14 |
|
42a2: 2b 8b std Y+19, r18 ; 0x13 |
|
42a4: f7 01 movw r30, r14 |
|
42a6: 42 81 ldd r20, Z+2 ; 0x02 |
|
42a8: 53 81 ldd r21, Z+3 ; 0x03 |
|
42aa: 64 81 ldd r22, Z+4 ; 0x04 |
|
42ac: 75 81 ldd r23, Z+5 ; 0x05 |
|
42ae: 4d 8b std Y+21, r20 ; 0x15 |
|
42b0: 5e 8b std Y+22, r21 ; 0x16 |
|
42b2: 6f 8b std Y+23, r22 ; 0x17 |
|
42b4: 78 8f std Y+24, r23 ; 0x18 |
|
begin(mac_address, local_ip, dns_server, gateway, subnet); |
|
42b6: ce 01 movw r24, r28 |
|
42b8: 01 96 adiw r24, 0x01 ; 1 |
|
42ba: 7c 01 movw r14, r24 |
|
42bc: 8e 01 movw r16, r28 |
|
42be: 09 5f subi r16, 0xF9 ; 249 |
|
42c0: 1f 4f sbci r17, 0xFF ; 255 |
|
42c2: 9e 01 movw r18, r28 |
|
42c4: 23 5f subi r18, 0xF3 ; 243 |
|
42c6: 3f 4f sbci r19, 0xFF ; 255 |
|
42c8: ae 01 movw r20, r28 |
|
42ca: 4d 5e subi r20, 0xED ; 237 |
|
42cc: 5f 4f sbci r21, 0xFF ; 255 |
|
42ce: b5 01 movw r22, r10 |
|
42d0: c6 01 movw r24, r12 |
|
42d2: 0e 94 c0 20 call 0x4180 ; 0x4180 <_ZN13EthernetClass5beginEPh9IPAddressS1_S1_S1_> |
|
} |
|
42d6: 6e 96 adiw r28, 0x1e ; 30 |
|
42d8: 0f b6 in r0, 0x3f ; 63 |
|
42da: f8 94 cli |
|
42dc: de bf out 0x3e, r29 ; 62 |
|
42de: 0f be out 0x3f, r0 ; 63 |
|
42e0: cd bf out 0x3d, r28 ; 61 |
|
42e2: df 91 pop r29 |
|
42e4: cf 91 pop r28 |
|
42e6: 1f 91 pop r17 |
|
42e8: 0f 91 pop r16 |
|
42ea: ff 90 pop r15 |
|
42ec: ef 90 pop r14 |
|
42ee: df 90 pop r13 |
|
42f0: cf 90 pop r12 |
|
42f2: bf 90 pop r11 |
|
42f4: af 90 pop r10 |
|
42f6: 9f 90 pop r9 |
|
42f8: 8f 90 pop r8 |
|
42fa: 7f 90 pop r7 |
|
42fc: 6f 90 pop r6 |
|
42fe: 08 95 ret |
|
|
|
00004300 <_ZN13EthernetClass5beginEPh9IPAddressS1_>: |
|
dns_server[3] = 1; |
|
begin(mac_address, local_ip, dns_server); |
|
} |
|
|
|
void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server) |
|
{ |
|
4300: cf 92 push r12 |
|
4302: df 92 push r13 |
|
4304: ef 92 push r14 |
|
4306: ff 92 push r15 |
|
4308: 0f 93 push r16 |
|
430a: 1f 93 push r17 |
|
430c: cf 93 push r28 |
|
430e: df 93 push r29 |
|
4310: cd b7 in r28, 0x3d ; 61 |
|
4312: de b7 in r29, 0x3e ; 62 |
|
4314: 68 97 sbiw r28, 0x18 ; 24 |
|
4316: 0f b6 in r0, 0x3f ; 63 |
|
4318: f8 94 cli |
|
431a: de bf out 0x3e, r29 ; 62 |
|
431c: 0f be out 0x3f, r0 ; 63 |
|
431e: cd bf out 0x3d, r28 ; 61 |
|
4320: 6b 01 movw r12, r22 |
|
4322: 79 01 movw r14, r18 |
|
4324: da 01 movw r26, r20 |
|
4326: 12 96 adiw r26, 0x02 ; 2 |
|
4328: 4d 91 ld r20, X+ |
|
432a: 5d 91 ld r21, X+ |
|
432c: 6d 91 ld r22, X+ |
|
432e: 7c 91 ld r23, X |
|
4330: 15 97 sbiw r26, 0x05 ; 5 |
|
4332: 4d 8b std Y+21, r20 ; 0x15 |
|
4334: 5e 8b std Y+22, r21 ; 0x16 |
|
4336: 6f 8b std Y+23, r22 ; 0x17 |
|
4338: 78 8f std Y+24, r23 ; 0x18 |
|
433a: ac e3 ldi r26, 0x3C ; 60 |
|
433c: b2 e0 ldi r27, 0x02 ; 2 |
|
433e: ba 83 std Y+2, r27 ; 0x02 |
|
4340: a9 83 std Y+1, r26 ; 0x01 |
|
4342: 21 e0 ldi r18, 0x01 ; 1 |
|
4344: 28 8f std Y+24, r18 ; 0x18 |
|
4346: 0d 89 ldd r16, Y+21 ; 0x15 |
|
4348: 1e 89 ldd r17, Y+22 ; 0x16 |
|
434a: 2f 89 ldd r18, Y+23 ; 0x17 |
|
434c: 38 8d ldd r19, Y+24 ; 0x18 |
|
434e: 0b 83 std Y+3, r16 ; 0x03 |
|
4350: 1c 83 std Y+4, r17 ; 0x04 |
|
4352: 2d 83 std Y+5, r18 ; 0x05 |
|
4354: 3e 83 std Y+6, r19 ; 0x06 |
|
4356: b8 87 std Y+8, r27 ; 0x08 |
|
4358: af 83 std Y+7, r26 ; 0x07 |
|
435a: f7 01 movw r30, r14 |
|
435c: 02 81 ldd r16, Z+2 ; 0x02 |
|
435e: 13 81 ldd r17, Z+3 ; 0x03 |
|
4360: 24 81 ldd r18, Z+4 ; 0x04 |
|
4362: 35 81 ldd r19, Z+5 ; 0x05 |
|
4364: 09 87 std Y+9, r16 ; 0x09 |
|
4366: 1a 87 std Y+10, r17 ; 0x0a |
|
4368: 2b 87 std Y+11, r18 ; 0x0b |
|
436a: 3c 87 std Y+12, r19 ; 0x0c |
|
436c: be 87 std Y+14, r27 ; 0x0e |
|
436e: ad 87 std Y+13, r26 ; 0x0d |
|
4370: 4f 87 std Y+15, r20 ; 0x0f |
|
4372: 58 8b std Y+16, r21 ; 0x10 |
|
4374: 69 8b std Y+17, r22 ; 0x11 |
|
4376: 7a 8b std Y+18, r23 ; 0x12 |
|
// Assume the gateway will be the machine on the same network as the local IP |
|
// but with last octet being '1' |
|
IPAddress gateway = local_ip; |
|
gateway[3] = 1; |
|
begin(mac_address, local_ip, dns_server, gateway); |
|
4378: 8e 01 movw r16, r28 |
|
437a: 0f 5f subi r16, 0xFF ; 255 |
|
437c: 1f 4f sbci r17, 0xFF ; 255 |
|
437e: 9e 01 movw r18, r28 |
|
4380: 29 5f subi r18, 0xF9 ; 249 |
|
4382: 3f 4f sbci r19, 0xFF ; 255 |
|
4384: ae 01 movw r20, r28 |
|
4386: 43 5f subi r20, 0xF3 ; 243 |
|
4388: 5f 4f sbci r21, 0xFF ; 255 |
|
438a: b6 01 movw r22, r12 |
|
438c: 0e 94 0b 21 call 0x4216 ; 0x4216 <_ZN13EthernetClass5beginEPh9IPAddressS1_S1_> |
|
} |
|
4390: 68 96 adiw r28, 0x18 ; 24 |
|
4392: 0f b6 in r0, 0x3f ; 63 |
|
4394: f8 94 cli |
|
4396: de bf out 0x3e, r29 ; 62 |
|
4398: 0f be out 0x3f, r0 ; 63 |
|
439a: cd bf out 0x3d, r28 ; 61 |
|
439c: df 91 pop r29 |
|
439e: cf 91 pop r28 |
|
43a0: 1f 91 pop r17 |
|
43a2: 0f 91 pop r16 |
|
43a4: ff 90 pop r15 |
|
43a6: ef 90 pop r14 |
|
43a8: df 90 pop r13 |
|
43aa: cf 90 pop r12 |
|
43ac: 08 95 ret |
|
|
|
000043ae <_ZN13EthernetClass5beginEPh9IPAddress>: |
|
|
|
return ret; |
|
} |
|
|
|
void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip) |
|
{ |
|
43ae: 0f 93 push r16 |
|
43b0: 1f 93 push r17 |
|
43b2: cf 93 push r28 |
|
43b4: df 93 push r29 |
|
43b6: cd b7 in r28, 0x3d ; 61 |
|
43b8: de b7 in r29, 0x3e ; 62 |
|
43ba: 62 97 sbiw r28, 0x12 ; 18 |
|
43bc: 0f b6 in r0, 0x3f ; 63 |
|
43be: f8 94 cli |
|
43c0: de bf out 0x3e, r29 ; 62 |
|
43c2: 0f be out 0x3f, r0 ; 63 |
|
43c4: cd bf out 0x3d, r28 ; 61 |
|
43c6: db 01 movw r26, r22 |
|
43c8: fa 01 movw r30, r20 |
|
43ca: 42 81 ldd r20, Z+2 ; 0x02 |
|
43cc: 53 81 ldd r21, Z+3 ; 0x03 |
|
43ce: 64 81 ldd r22, Z+4 ; 0x04 |
|
43d0: 75 81 ldd r23, Z+5 ; 0x05 |
|
43d2: 4f 87 std Y+15, r20 ; 0x0f |
|
43d4: 58 8b std Y+16, r21 ; 0x10 |
|
43d6: 69 8b std Y+17, r22 ; 0x11 |
|
43d8: 7a 8b std Y+18, r23 ; 0x12 |
|
43da: ec e3 ldi r30, 0x3C ; 60 |
|
43dc: f2 e0 ldi r31, 0x02 ; 2 |
|
43de: fa 83 std Y+2, r31 ; 0x02 |
|
43e0: e9 83 std Y+1, r30 ; 0x01 |
|
43e2: 21 e0 ldi r18, 0x01 ; 1 |
|
43e4: 2a 8b std Y+18, r18 ; 0x12 |
|
43e6: 0f 85 ldd r16, Y+15 ; 0x0f |
|
43e8: 18 89 ldd r17, Y+16 ; 0x10 |
|
43ea: 29 89 ldd r18, Y+17 ; 0x11 |
|
43ec: 3a 89 ldd r19, Y+18 ; 0x12 |
|
43ee: 0b 83 std Y+3, r16 ; 0x03 |
|
43f0: 1c 83 std Y+4, r17 ; 0x04 |
|
43f2: 2d 83 std Y+5, r18 ; 0x05 |
|
43f4: 3e 83 std Y+6, r19 ; 0x06 |
|
43f6: f8 87 std Y+8, r31 ; 0x08 |
|
43f8: ef 83 std Y+7, r30 ; 0x07 |
|
43fa: 49 87 std Y+9, r20 ; 0x09 |
|
43fc: 5a 87 std Y+10, r21 ; 0x0a |
|
43fe: 6b 87 std Y+11, r22 ; 0x0b |
|
4400: 7c 87 std Y+12, r23 ; 0x0c |
|
// Assume the DNS server will be the machine on the same network as the local IP |
|
// but with last octet being '1' |
|
IPAddress dns_server = local_ip; |
|
dns_server[3] = 1; |
|
begin(mac_address, local_ip, dns_server); |
|
4402: 9e 01 movw r18, r28 |
|
4404: 2f 5f subi r18, 0xFF ; 255 |
|
4406: 3f 4f sbci r19, 0xFF ; 255 |
|
4408: ae 01 movw r20, r28 |
|
440a: 49 5f subi r20, 0xF9 ; 249 |
|
440c: 5f 4f sbci r21, 0xFF ; 255 |
|
440e: bd 01 movw r22, r26 |
|
4410: 0e 94 80 21 call 0x4300 ; 0x4300 <_ZN13EthernetClass5beginEPh9IPAddressS1_> |
|
} |
|
4414: 62 96 adiw r28, 0x12 ; 18 |
|
4416: 0f b6 in r0, 0x3f ; 63 |
|
4418: f8 94 cli |
|
441a: de bf out 0x3e, r29 ; 62 |
|
441c: 0f be out 0x3f, r0 ; 63 |
|
441e: cd bf out 0x3d, r28 ; 61 |
|
4420: df 91 pop r29 |
|
4422: cf 91 pop r28 |
|
4424: 1f 91 pop r17 |
|
4426: 0f 91 pop r16 |
|
4428: 08 95 ret |
|
|
|
0000442a <_ZN13EthernetClass11dnsServerIPEv>: |
|
442a: 2c e3 ldi r18, 0x3C ; 60 |
|
442c: 32 e0 ldi r19, 0x02 ; 2 |
|
442e: fc 01 movw r30, r24 |
|
4430: 31 83 std Z+1, r19 ; 0x01 |
|
4432: 20 83 st Z, r18 |
|
4434: fb 01 movw r30, r22 |
|
4436: 42 81 ldd r20, Z+2 ; 0x02 |
|
4438: 53 81 ldd r21, Z+3 ; 0x03 |
|
443a: 64 81 ldd r22, Z+4 ; 0x04 |
|
443c: 75 81 ldd r23, Z+5 ; 0x05 |
|
443e: fc 01 movw r30, r24 |
|
4440: 42 83 std Z+2, r20 ; 0x02 |
|
4442: 53 83 std Z+3, r21 ; 0x03 |
|
4444: 64 83 std Z+4, r22 ; 0x04 |
|
4446: 75 83 std Z+5, r23 ; 0x05 |
|
} |
|
|
|
IPAddress EthernetClass::dnsServerIP() |
|
{ |
|
return _dnsServerAddress; |
|
} |
|
4448: 08 95 ret |
|
|
|
0000444a <_GLOBAL__sub_I__ZN13EthernetClass6_stateE>: |
|
|
|
EthernetClass Ethernet; |
|
444a: 0f 93 push r16 |
|
friend class Server; |
|
friend class DhcpClass; |
|
friend class DNSClient; |
|
}; |
|
|
|
const IPAddress INADDR_NONE(0,0,0,0); |
|
444c: 00 e0 ldi r16, 0x00 ; 0 |
|
444e: 20 e0 ldi r18, 0x00 ; 0 |
|
4450: 40 e0 ldi r20, 0x00 ; 0 |
|
4452: 60 e0 ldi r22, 0x00 ; 0 |
|
4454: 80 e4 ldi r24, 0x40 ; 64 |
|
4456: 93 e0 ldi r25, 0x03 ; 3 |
|
4458: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
#include "EthernetServer.h" |
|
#include "Dhcp.h" |
|
|
|
#define MAX_SOCK_NUM 4 |
|
|
|
class EthernetClass { |
|
445c: 80 e3 ldi r24, 0x30 ; 48 |
|
445e: 93 e0 ldi r25, 0x03 ; 3 |
|
4460: 0f 91 pop r16 |
|
4462: 0c 94 d4 2b jmp 0x57a8 ; 0x57a8 <_ZN9IPAddressC1Ev> |
|
|
|
00004466 <_GLOBAL__sub_I__ZN14EthernetClient8_srcportE>: |
|
return _sock != MAX_SOCK_NUM; |
|
} |
|
|
|
bool EthernetClient::operator==(const EthernetClient& rhs) { |
|
return _sock == rhs._sock && _sock != MAX_SOCK_NUM && rhs._sock != MAX_SOCK_NUM; |
|
} |
|
4466: 0f 93 push r16 |
|
4468: 00 e0 ldi r16, 0x00 ; 0 |
|
446a: 20 e0 ldi r18, 0x00 ; 0 |
|
446c: 40 e0 ldi r20, 0x00 ; 0 |
|
446e: 60 e0 ldi r22, 0x00 ; 0 |
|
4470: 86 e4 ldi r24, 0x46 ; 70 |
|
4472: 93 e0 ldi r25, 0x03 ; 3 |
|
4474: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
4478: 0f 91 pop r16 |
|
447a: 08 95 ret |
|
|
|
0000447c <_GLOBAL__sub_I__ZN14EthernetServerC2Ej>: |
|
n += client.write(buffer, size); |
|
} |
|
} |
|
|
|
return n; |
|
} |
|
447c: 0f 93 push r16 |
|
447e: 00 e0 ldi r16, 0x00 ; 0 |
|
4480: 20 e0 ldi r18, 0x00 ; 0 |
|
4482: 40 e0 ldi r20, 0x00 ; 0 |
|
4484: 60 e0 ldi r22, 0x00 ; 0 |
|
4486: 8c e4 ldi r24, 0x4C ; 76 |
|
4488: 93 e0 ldi r25, 0x03 ; 3 |
|
448a: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
448e: 0f 91 pop r16 |
|
4490: 08 95 ret |
|
|
|
00004492 <_ZN11EthernetUDP4readEPcj>: |
|
// Read up to len bytes from the current packet and place them into buffer |
|
// Returns the number of bytes read, or 0 if none are available |
|
virtual int read(unsigned char* buffer, size_t len); |
|
// Read up to len characters from the current packet and place them into buffer |
|
// Returns the number of characters read, or 0 if none are available |
|
virtual int read(char* buffer, size_t len) { return read((unsigned char*)buffer, len); }; |
|
4492: dc 01 movw r26, r24 |
|
4494: ed 91 ld r30, X+ |
|
4496: fc 91 ld r31, X |
|
4498: 00 8c ldd r0, Z+24 ; 0x18 |
|
449a: f1 8d ldd r31, Z+25 ; 0x19 |
|
449c: e0 2d mov r30, r0 |
|
449e: 09 94 ijmp |
|
|
|
000044a0 <_ZN11EthernetUDP8remoteIPEv>: |
|
#include <stdint.h> |
|
#include <Printable.h> |
|
|
|
// A class to make it easier to handle and pass around IP addresses |
|
|
|
class IPAddress : public Printable { |
|
44a0: 2c e3 ldi r18, 0x3C ; 60 |
|
44a2: 32 e0 ldi r19, 0x02 ; 2 |
|
44a4: fc 01 movw r30, r24 |
|
44a6: 31 83 std Z+1, r19 ; 0x01 |
|
44a8: 20 83 st Z, r18 |
|
44aa: fb 01 movw r30, r22 |
|
44ac: 41 89 ldd r20, Z+17 ; 0x11 |
|
44ae: 52 89 ldd r21, Z+18 ; 0x12 |
|
44b0: 63 89 ldd r22, Z+19 ; 0x13 |
|
44b2: 74 89 ldd r23, Z+20 ; 0x14 |
|
44b4: fc 01 movw r30, r24 |
|
44b6: 42 83 std Z+2, r20 ; 0x02 |
|
44b8: 53 83 std Z+3, r21 ; 0x03 |
|
44ba: 64 83 std Z+4, r22 ; 0x04 |
|
44bc: 75 83 std Z+5, r23 ; 0x05 |
|
// Return the next byte from the current packet without moving on to the next byte |
|
virtual int peek(); |
|
virtual void flush(); // Finish reading the current packet |
|
|
|
// Return the IP address of the host who sent the current incoming packet |
|
virtual IPAddress remoteIP() { return _remoteIP; }; |
|
44be: 08 95 ret |
|
|
|
000044c0 <_ZN11EthernetUDP10remotePortEv>: |
|
// Return the port of the host who sent the current incoming packet |
|
virtual uint16_t remotePort() { return _remotePort; }; |
|
44c0: fc 01 movw r30, r24 |
|
44c2: 85 89 ldd r24, Z+21 ; 0x15 |
|
44c4: 96 89 ldd r25, Z+22 ; 0x16 |
|
44c6: 08 95 ret |
|
|
|
000044c8 <_ZN11EthernetUDP9availableEv>: |
|
|
|
/* return number of bytes available in the current packet, |
|
will return zero if parsePacket hasn't been called yet */ |
|
int EthernetUDP::available() { |
|
return _remaining; |
|
} |
|
44c8: fc 01 movw r30, r24 |
|
44ca: 81 8d ldd r24, Z+25 ; 0x19 |
|
44cc: 92 8d ldd r25, Z+26 ; 0x1a |
|
44ce: 08 95 ret |
|
|
|
000044d0 <_ZN11EthernetUDP5writeEh>: |
|
{ |
|
return sendUDP(_sock); |
|
} |
|
|
|
size_t EthernetUDP::write(uint8_t byte) |
|
{ |
|
44d0: cf 93 push r28 |
|
44d2: df 93 push r29 |
|
44d4: 1f 92 push r1 |
|
44d6: cd b7 in r28, 0x3d ; 61 |
|
44d8: de b7 in r29, 0x3e ; 62 |
|
44da: 69 83 std Y+1, r22 ; 0x01 |
|
return write(&byte, 1); |
|
44dc: dc 01 movw r26, r24 |
|
44de: ed 91 ld r30, X+ |
|
44e0: fc 91 ld r31, X |
|
44e2: 02 80 ldd r0, Z+2 ; 0x02 |
|
44e4: f3 81 ldd r31, Z+3 ; 0x03 |
|
44e6: e0 2d mov r30, r0 |
|
44e8: 41 e0 ldi r20, 0x01 ; 1 |
|
44ea: 50 e0 ldi r21, 0x00 ; 0 |
|
44ec: be 01 movw r22, r28 |
|
44ee: 6f 5f subi r22, 0xFF ; 255 |
|
44f0: 7f 4f sbci r23, 0xFF ; 255 |
|
44f2: 09 95 icall |
|
} |
|
44f4: 0f 90 pop r0 |
|
44f6: df 91 pop r29 |
|
44f8: cf 91 pop r28 |
|
44fa: 08 95 ret |
|
|
|
000044fc <_ZN11EthernetUDP5flushEv>: |
|
::peek(_sock, &b); |
|
return b; |
|
} |
|
|
|
void EthernetUDP::flush() |
|
{ |
|
44fc: cf 93 push r28 |
|
44fe: df 93 push r29 |
|
4500: ec 01 movw r28, r24 |
|
// could this fail (loop endlessly) if _remaining > 0 and recv in read fails? |
|
// should only occur if recv fails after telling us the data is there, lets |
|
// hope the w5100 always behaves :) |
|
|
|
while (_remaining) |
|
4502: 89 8d ldd r24, Y+25 ; 0x19 |
|
4504: 9a 8d ldd r25, Y+26 ; 0x1a |
|
4506: 89 2b or r24, r25 |
|
4508: 41 f0 breq .+16 ; 0x451a <_ZN11EthernetUDP5flushEv+0x1e> |
|
{ |
|
read(); |
|
450a: e8 81 ld r30, Y |
|
450c: f9 81 ldd r31, Y+1 ; 0x01 |
|
450e: 06 80 ldd r0, Z+6 ; 0x06 |
|
4510: f7 81 ldd r31, Z+7 ; 0x07 |
|
4512: e0 2d mov r30, r0 |
|
4514: ce 01 movw r24, r28 |
|
4516: 09 95 icall |
|
4518: f4 cf rjmp .-24 ; 0x4502 <_ZN11EthernetUDP5flushEv+0x6> |
|
} |
|
} |
|
451a: df 91 pop r29 |
|
451c: cf 91 pop r28 |
|
451e: 08 95 ret |
|
|
|
00004520 <_ZN11EthernetUDP4stopEv>: |
|
return _remaining; |
|
} |
|
|
|
/* Release any resources being used by this EthernetUDP instance */ |
|
void EthernetUDP::stop() |
|
{ |
|
4520: cf 93 push r28 |
|
4522: df 93 push r29 |
|
4524: ec 01 movw r28, r24 |
|
if (_sock == MAX_SOCK_NUM) |
|
4526: 8c 85 ldd r24, Y+12 ; 0x0c |
|
4528: 84 30 cpi r24, 0x04 ; 4 |
|
452a: 61 f0 breq .+24 ; 0x4544 <_ZN11EthernetUDP4stopEv+0x24> |
|
return; |
|
|
|
close(_sock); |
|
452c: 0e 94 c3 24 call 0x4986 ; 0x4986 <_Z5closeh> |
|
|
|
EthernetClass::_server_port[_sock] = 0; |
|
4530: ec 85 ldd r30, Y+12 ; 0x0c |
|
4532: f0 e0 ldi r31, 0x00 ; 0 |
|
4534: ee 0f add r30, r30 |
|
4536: ff 1f adc r31, r31 |
|
4538: e8 5c subi r30, 0xC8 ; 200 |
|
453a: fc 4f sbci r31, 0xFC ; 252 |
|
453c: 11 82 std Z+1, r1 ; 0x01 |
|
453e: 10 82 st Z, r1 |
|
_sock = MAX_SOCK_NUM; |
|
4540: 84 e0 ldi r24, 0x04 ; 4 |
|
4542: 8c 87 std Y+12, r24 ; 0x0c |
|
} |
|
4544: df 91 pop r29 |
|
4546: cf 91 pop r28 |
|
4548: 08 95 ret |
|
|
|
0000454a <_ZN11EthernetUDP11beginPacketE9IPAddressj>: |
|
} |
|
} |
|
|
|
int EthernetUDP::beginPacket(IPAddress ip, uint16_t port) |
|
{ |
|
_offset = 0; |
|
454a: fc 01 movw r30, r24 |
|
454c: 10 8e std Z+24, r1 ; 0x18 |
|
454e: 17 8a std Z+23, r1 ; 0x17 |
|
return startUDP(_sock, rawIPAddress(ip), port); |
|
4550: 6e 5f subi r22, 0xFE ; 254 |
|
4552: 7f 4f sbci r23, 0xFF ; 255 |
|
4554: 84 85 ldd r24, Z+12 ; 0x0c |
|
4556: 0c 94 42 26 jmp 0x4c84 ; 0x4c84 <_Z8startUDPhPhj> |
|
|
|
0000455a <_ZN11EthernetUDP9endPacketEv>: |
|
} |
|
|
|
int EthernetUDP::endPacket() |
|
{ |
|
return sendUDP(_sock); |
|
455a: fc 01 movw r30, r24 |
|
455c: 84 85 ldd r24, Z+12 ; 0x0c |
|
455e: 0c 94 88 26 jmp 0x4d10 ; 0x4d10 <_Z7sendUDPh> |
|
|
|
00004562 <_ZN11EthernetUDP5writeEPKhj>: |
|
{ |
|
return write(&byte, 1); |
|
} |
|
|
|
size_t EthernetUDP::write(const uint8_t *buffer, size_t size) |
|
{ |
|
4562: cf 93 push r28 |
|
4564: df 93 push r29 |
|
4566: ec 01 movw r28, r24 |
|
4568: 9a 01 movw r18, r20 |
|
uint16_t bytes_written = bufferData(_sock, _offset, buffer, size); |
|
456a: 8f 89 ldd r24, Y+23 ; 0x17 |
|
456c: 98 8d ldd r25, Y+24 ; 0x18 |
|
456e: ab 01 movw r20, r22 |
|
4570: bc 01 movw r22, r24 |
|
4572: 8c 85 ldd r24, Y+12 ; 0x0c |
|
4574: 0e 94 fb 25 call 0x4bf6 ; 0x4bf6 <_Z10bufferDatahjPKhj> |
|
_offset += bytes_written; |
|
4578: 2f 89 ldd r18, Y+23 ; 0x17 |
|
457a: 38 8d ldd r19, Y+24 ; 0x18 |
|
457c: 28 0f add r18, r24 |
|
457e: 39 1f adc r19, r25 |
|
4580: 38 8f std Y+24, r19 ; 0x18 |
|
4582: 2f 8b std Y+23, r18 ; 0x17 |
|
return bytes_written; |
|
} |
|
4584: df 91 pop r29 |
|
4586: cf 91 pop r28 |
|
4588: 08 95 ret |
|
|
|
0000458a <_ZN11EthernetUDP4readEv>: |
|
// There aren't any packets available |
|
return 0; |
|
} |
|
|
|
int EthernetUDP::read() |
|
{ |
|
458a: 0f 93 push r16 |
|
458c: 1f 93 push r17 |
|
458e: cf 93 push r28 |
|
4590: df 93 push r29 |
|
4592: 1f 92 push r1 |
|
4594: cd b7 in r28, 0x3d ; 61 |
|
4596: de b7 in r29, 0x3e ; 62 |
|
4598: 8c 01 movw r16, r24 |
|
uint8_t byte; |
|
|
|
if ((_remaining > 0) && (recv(_sock, &byte, 1) > 0)) |
|
459a: fc 01 movw r30, r24 |
|
459c: 81 8d ldd r24, Z+25 ; 0x19 |
|
459e: 92 8d ldd r25, Z+26 ; 0x1a |
|
45a0: 89 2b or r24, r25 |
|
45a2: 59 f0 breq .+22 ; 0x45ba <_ZN11EthernetUDP4readEv+0x30> |
|
45a4: 41 e0 ldi r20, 0x01 ; 1 |
|
45a6: 50 e0 ldi r21, 0x00 ; 0 |
|
45a8: be 01 movw r22, r28 |
|
45aa: 6f 5f subi r22, 0xFF ; 255 |
|
45ac: 7f 4f sbci r23, 0xFF ; 255 |
|
45ae: 84 85 ldd r24, Z+12 ; 0x0c |
|
45b0: 0e 94 41 25 call 0x4a82 ; 0x4a82 <_Z4recvhPhi> |
|
45b4: 18 16 cp r1, r24 |
|
45b6: 19 06 cpc r1, r25 |
|
45b8: 1c f0 brlt .+6 ; 0x45c0 <_ZN11EthernetUDP4readEv+0x36> |
|
_remaining--; |
|
return byte; |
|
} |
|
|
|
// If we get here, there's no data available |
|
return -1; |
|
45ba: 8f ef ldi r24, 0xFF ; 255 |
|
45bc: 9f ef ldi r25, 0xFF ; 255 |
|
45be: 08 c0 rjmp .+16 ; 0x45d0 <_ZN11EthernetUDP4readEv+0x46> |
|
uint8_t byte; |
|
|
|
if ((_remaining > 0) && (recv(_sock, &byte, 1) > 0)) |
|
{ |
|
// We read things without any problems |
|
_remaining--; |
|
45c0: f8 01 movw r30, r16 |
|
45c2: 81 8d ldd r24, Z+25 ; 0x19 |
|
45c4: 92 8d ldd r25, Z+26 ; 0x1a |
|
45c6: 01 97 sbiw r24, 0x01 ; 1 |
|
45c8: 92 8f std Z+26, r25 ; 0x1a |
|
45ca: 81 8f std Z+25, r24 ; 0x19 |
|
return byte; |
|
45cc: 89 81 ldd r24, Y+1 ; 0x01 |
|
45ce: 90 e0 ldi r25, 0x00 ; 0 |
|
} |
|
|
|
// If we get here, there's no data available |
|
return -1; |
|
} |
|
45d0: 0f 90 pop r0 |
|
45d2: df 91 pop r29 |
|
45d4: cf 91 pop r28 |
|
45d6: 1f 91 pop r17 |
|
45d8: 0f 91 pop r16 |
|
45da: 08 95 ret |
|
|
|
000045dc <_ZN11EthernetUDP4readEPhj>: |
|
|
|
int EthernetUDP::read(unsigned char* buffer, size_t len) |
|
{ |
|
45dc: cf 93 push r28 |
|
45de: df 93 push r29 |
|
45e0: ec 01 movw r28, r24 |
|
|
|
if (_remaining > 0) |
|
45e2: 89 8d ldd r24, Y+25 ; 0x19 |
|
45e4: 9a 8d ldd r25, Y+26 ; 0x1a |
|
45e6: 00 97 sbiw r24, 0x00 ; 0 |
|
45e8: 19 f4 brne .+6 ; 0x45f0 <_ZN11EthernetUDP4readEPhj+0x14> |
|
} |
|
|
|
} |
|
|
|
// If we get here, there's no data available or recv failed |
|
return -1; |
|
45ea: 8f ef ldi r24, 0xFF ; 255 |
|
45ec: 9f ef ldi r25, 0xFF ; 255 |
|
45ee: 10 c0 rjmp .+32 ; 0x4610 <_ZN11EthernetUDP4readEPhj+0x34> |
|
if (_remaining > 0) |
|
{ |
|
|
|
int got; |
|
|
|
if (_remaining <= len) |
|
45f0: 48 17 cp r20, r24 |
|
45f2: 59 07 cpc r21, r25 |
|
45f4: 08 f0 brcs .+2 ; 0x45f8 <_ZN11EthernetUDP4readEPhj+0x1c> |
|
{ |
|
// data should fit in the buffer |
|
got = recv(_sock, buffer, _remaining); |
|
45f6: ac 01 movw r20, r24 |
|
} |
|
else |
|
{ |
|
// too much data for the buffer, |
|
// grab as much as will fit |
|
got = recv(_sock, buffer, len); |
|
45f8: 8c 85 ldd r24, Y+12 ; 0x0c |
|
45fa: 0e 94 41 25 call 0x4a82 ; 0x4a82 <_Z4recvhPhi> |
|
} |
|
|
|
if (got > 0) |
|
45fe: 18 16 cp r1, r24 |
|
4600: 19 06 cpc r1, r25 |
|
4602: 9c f7 brge .-26 ; 0x45ea <_ZN11EthernetUDP4readEPhj+0xe> |
|
{ |
|
_remaining -= got; |
|
4604: 29 8d ldd r18, Y+25 ; 0x19 |
|
4606: 3a 8d ldd r19, Y+26 ; 0x1a |
|
4608: 28 1b sub r18, r24 |
|
460a: 39 0b sbc r19, r25 |
|
460c: 3a 8f std Y+26, r19 ; 0x1a |
|
460e: 29 8f std Y+25, r18 ; 0x19 |
|
} |
|
|
|
// If we get here, there's no data available or recv failed |
|
return -1; |
|
|
|
} |
|
4610: df 91 pop r29 |
|
4612: cf 91 pop r28 |
|
4614: 08 95 ret |
|
|
|
00004616 <_ZN11EthernetUDP4peekEv>: |
|
|
|
int EthernetUDP::peek() |
|
{ |
|
4616: cf 93 push r28 |
|
4618: df 93 push r29 |
|
461a: 1f 92 push r1 |
|
461c: cd b7 in r28, 0x3d ; 61 |
|
461e: de b7 in r29, 0x3e ; 62 |
|
uint8_t b; |
|
// Unlike recv, peek doesn't check to see if there's any data available, so we must. |
|
// If the user hasn't called parsePacket yet then return nothing otherwise they |
|
// may get the UDP header |
|
if (!_remaining) |
|
4620: fc 01 movw r30, r24 |
|
4622: 21 8d ldd r18, Z+25 ; 0x19 |
|
4624: 32 8d ldd r19, Z+26 ; 0x1a |
|
4626: 23 2b or r18, r19 |
|
4628: 49 f0 breq .+18 ; 0x463c <_ZN11EthernetUDP4peekEv+0x26> |
|
return -1; |
|
::peek(_sock, &b); |
|
462a: be 01 movw r22, r28 |
|
462c: 6f 5f subi r22, 0xFF ; 255 |
|
462e: 7f 4f sbci r23, 0xFF ; 255 |
|
4630: 84 85 ldd r24, Z+12 ; 0x0c |
|
4632: 0e 94 cc 25 call 0x4b98 ; 0x4b98 <_Z4peekhPh> |
|
return b; |
|
4636: 89 81 ldd r24, Y+1 ; 0x01 |
|
4638: 90 e0 ldi r25, 0x00 ; 0 |
|
463a: 02 c0 rjmp .+4 ; 0x4640 <_ZN11EthernetUDP4peekEv+0x2a> |
|
uint8_t b; |
|
// Unlike recv, peek doesn't check to see if there's any data available, so we must. |
|
// If the user hasn't called parsePacket yet then return nothing otherwise they |
|
// may get the UDP header |
|
if (!_remaining) |
|
return -1; |
|
463c: 8f ef ldi r24, 0xFF ; 255 |
|
463e: 9f ef ldi r25, 0xFF ; 255 |
|
::peek(_sock, &b); |
|
return b; |
|
} |
|
4640: 0f 90 pop r0 |
|
4642: df 91 pop r29 |
|
4644: cf 91 pop r28 |
|
4646: 08 95 ret |
|
|
|
00004648 <_ZN11EthernetUDP5beginEj>: |
|
|
|
/* Constructor */ |
|
EthernetUDP::EthernetUDP() : _sock(MAX_SOCK_NUM) {} |
|
|
|
/* Start EthernetUDP socket, listening at local port PORT */ |
|
uint8_t EthernetUDP::begin(uint16_t port) { |
|
4648: ff 92 push r15 |
|
464a: 0f 93 push r16 |
|
464c: 1f 93 push r17 |
|
464e: cf 93 push r28 |
|
4650: df 93 push r29 |
|
4652: ec 01 movw r28, r24 |
|
4654: 8b 01 movw r16, r22 |
|
if (_sock != MAX_SOCK_NUM) |
|
4656: 8c 85 ldd r24, Y+12 ; 0x0c |
|
4658: 84 30 cpi r24, 0x04 ; 4 |
|
465a: e1 f4 brne .+56 ; 0x4694 <_ZN11EthernetUDP5beginEj+0x4c> |
|
465c: f1 2c mov r15, r1 |
|
return 0; |
|
|
|
for (int i = 0; i < MAX_SOCK_NUM; i++) { |
|
uint8_t s = socketStatus(i); |
|
465e: 8f 2d mov r24, r15 |
|
4660: 0e 94 9b 24 call 0x4936 ; 0x4936 <_Z12socketStatush> |
|
if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) { |
|
4664: 81 11 cpse r24, r1 |
|
4666: 02 c0 rjmp .+4 ; 0x466c <_ZN11EthernetUDP5beginEj+0x24> |
|
_sock = i; |
|
4668: fc 86 std Y+12, r15 ; 0x0c |
|
466a: 06 c0 rjmp .+12 ; 0x4678 <_ZN11EthernetUDP5beginEj+0x30> |
|
if (_sock != MAX_SOCK_NUM) |
|
return 0; |
|
|
|
for (int i = 0; i < MAX_SOCK_NUM; i++) { |
|
uint8_t s = socketStatus(i); |
|
if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) { |
|
466c: 88 31 cpi r24, 0x18 ; 24 |
|
466e: e1 f3 breq .-8 ; 0x4668 <_ZN11EthernetUDP5beginEj+0x20> |
|
4670: f3 94 inc r15 |
|
/* Start EthernetUDP socket, listening at local port PORT */ |
|
uint8_t EthernetUDP::begin(uint16_t port) { |
|
if (_sock != MAX_SOCK_NUM) |
|
return 0; |
|
|
|
for (int i = 0; i < MAX_SOCK_NUM; i++) { |
|
4672: 84 e0 ldi r24, 0x04 ; 4 |
|
4674: f8 12 cpse r15, r24 |
|
4676: f3 cf rjmp .-26 ; 0x465e <_ZN11EthernetUDP5beginEj+0x16> |
|
_sock = i; |
|
break; |
|
} |
|
} |
|
|
|
if (_sock == MAX_SOCK_NUM) |
|
4678: 8c 85 ldd r24, Y+12 ; 0x0c |
|
467a: 84 30 cpi r24, 0x04 ; 4 |
|
467c: 59 f0 breq .+22 ; 0x4694 <_ZN11EthernetUDP5beginEj+0x4c> |
|
return 0; |
|
|
|
_port = port; |
|
467e: 1e 87 std Y+14, r17 ; 0x0e |
|
4680: 0d 87 std Y+13, r16 ; 0x0d |
|
_remaining = 0; |
|
4682: 1a 8e std Y+26, r1 ; 0x1a |
|
4684: 19 8e std Y+25, r1 ; 0x19 |
|
socket(_sock, SnMR::UDP, _port, 0); |
|
4686: 20 e0 ldi r18, 0x00 ; 0 |
|
4688: a8 01 movw r20, r16 |
|
468a: 62 e0 ldi r22, 0x02 ; 2 |
|
468c: 0e 94 ed 24 call 0x49da ; 0x49da <_Z6sockethhjh> |
|
|
|
return 1; |
|
4690: 81 e0 ldi r24, 0x01 ; 1 |
|
4692: 01 c0 rjmp .+2 ; 0x4696 <_ZN11EthernetUDP5beginEj+0x4e> |
|
EthernetUDP::EthernetUDP() : _sock(MAX_SOCK_NUM) {} |
|
|
|
/* Start EthernetUDP socket, listening at local port PORT */ |
|
uint8_t EthernetUDP::begin(uint16_t port) { |
|
if (_sock != MAX_SOCK_NUM) |
|
return 0; |
|
4694: 80 e0 ldi r24, 0x00 ; 0 |
|
_port = port; |
|
_remaining = 0; |
|
socket(_sock, SnMR::UDP, _port, 0); |
|
|
|
return 1; |
|
} |
|
4696: df 91 pop r29 |
|
4698: cf 91 pop r28 |
|
469a: 1f 91 pop r17 |
|
469c: 0f 91 pop r16 |
|
469e: ff 90 pop r15 |
|
46a0: 08 95 ret |
|
|
|
000046a2 <_ZN11EthernetUDP11parsePacketEv>: |
|
_offset += bytes_written; |
|
return bytes_written; |
|
} |
|
|
|
int EthernetUDP::parsePacket() |
|
{ |
|
46a2: 0f 93 push r16 |
|
46a4: 1f 93 push r17 |
|
46a6: cf 93 push r28 |
|
46a8: df 93 push r29 |
|
46aa: cd b7 in r28, 0x3d ; 61 |
|
46ac: de b7 in r29, 0x3e ; 62 |
|
46ae: 28 97 sbiw r28, 0x08 ; 8 |
|
46b0: 0f b6 in r0, 0x3f ; 63 |
|
46b2: f8 94 cli |
|
46b4: de bf out 0x3e, r29 ; 62 |
|
46b6: 0f be out 0x3f, r0 ; 63 |
|
46b8: cd bf out 0x3d, r28 ; 61 |
|
46ba: 8c 01 movw r16, r24 |
|
// discard any remaining bytes in the last packet |
|
flush(); |
|
46bc: dc 01 movw r26, r24 |
|
46be: ed 91 ld r30, X+ |
|
46c0: fc 91 ld r31, X |
|
46c2: 02 84 ldd r0, Z+10 ; 0x0a |
|
46c4: f3 85 ldd r31, Z+11 ; 0x0b |
|
46c6: e0 2d mov r30, r0 |
|
46c8: 09 95 icall |
|
|
|
if (recvAvailable(_sock) > 0) |
|
46ca: f8 01 movw r30, r16 |
|
46cc: 84 85 ldd r24, Z+12 ; 0x0c |
|
46ce: 0e 94 a1 25 call 0x4b42 ; 0x4b42 <_Z13recvAvailableh> |
|
46d2: 18 16 cp r1, r24 |
|
46d4: 19 06 cpc r1, r25 |
|
46d6: 44 f5 brge .+80 ; 0x4728 <_ZN11EthernetUDP11parsePacketEv+0x86> |
|
{ |
|
//HACK - hand-parse the UDP packet using TCP recv method |
|
uint8_t tmpBuf[8]; |
|
int ret =0; |
|
//read 8 header bytes and get IP and port from it |
|
ret = recv(_sock,tmpBuf,8); |
|
46d8: 48 e0 ldi r20, 0x08 ; 8 |
|
46da: 50 e0 ldi r21, 0x00 ; 0 |
|
46dc: be 01 movw r22, r28 |
|
46de: 6f 5f subi r22, 0xFF ; 255 |
|
46e0: 7f 4f sbci r23, 0xFF ; 255 |
|
46e2: d8 01 movw r26, r16 |
|
46e4: 1c 96 adiw r26, 0x0c ; 12 |
|
46e6: 8c 91 ld r24, X |
|
46e8: 0e 94 41 25 call 0x4a82 ; 0x4a82 <_Z4recvhPhi> |
|
if (ret > 0) |
|
46ec: 18 16 cp r1, r24 |
|
46ee: 19 06 cpc r1, r25 |
|
46f0: ec f4 brge .+58 ; 0x472c <_ZN11EthernetUDP11parsePacketEv+0x8a> |
|
{ |
|
_remoteIP = tmpBuf; |
|
46f2: be 01 movw r22, r28 |
|
46f4: 6f 5f subi r22, 0xFF ; 255 |
|
46f6: 7f 4f sbci r23, 0xFF ; 255 |
|
46f8: c8 01 movw r24, r16 |
|
46fa: 0f 96 adiw r24, 0x0f ; 15 |
|
46fc: 0e 94 ea 2b call 0x57d4 ; 0x57d4 <_ZN9IPAddressaSEPKh> |
|
_remotePort = tmpBuf[4]; |
|
4700: 8d 81 ldd r24, Y+5 ; 0x05 |
|
4702: 90 e0 ldi r25, 0x00 ; 0 |
|
_remotePort = (_remotePort << 8) + tmpBuf[5]; |
|
4704: 98 2f mov r25, r24 |
|
4706: 88 27 eor r24, r24 |
|
4708: 2e 81 ldd r18, Y+6 ; 0x06 |
|
470a: 82 0f add r24, r18 |
|
470c: 91 1d adc r25, r1 |
|
470e: f8 01 movw r30, r16 |
|
4710: 96 8b std Z+22, r25 ; 0x16 |
|
4712: 85 8b std Z+21, r24 ; 0x15 |
|
_remaining = tmpBuf[6]; |
|
4714: 8f 81 ldd r24, Y+7 ; 0x07 |
|
4716: 90 e0 ldi r25, 0x00 ; 0 |
|
_remaining = (_remaining << 8) + tmpBuf[7]; |
|
4718: 98 2f mov r25, r24 |
|
471a: 88 27 eor r24, r24 |
|
471c: 28 85 ldd r18, Y+8 ; 0x08 |
|
471e: 82 0f add r24, r18 |
|
4720: 91 1d adc r25, r1 |
|
4722: 92 8f std Z+26, r25 ; 0x1a |
|
4724: 81 8f std Z+25, r24 ; 0x19 |
|
4726: 02 c0 rjmp .+4 ; 0x472c <_ZN11EthernetUDP11parsePacketEv+0x8a> |
|
ret = _remaining; |
|
} |
|
return ret; |
|
} |
|
// There aren't any packets available |
|
return 0; |
|
4728: 80 e0 ldi r24, 0x00 ; 0 |
|
472a: 90 e0 ldi r25, 0x00 ; 0 |
|
} |
|
472c: 28 96 adiw r28, 0x08 ; 8 |
|
472e: 0f b6 in r0, 0x3f ; 63 |
|
4730: f8 94 cli |
|
4732: de bf out 0x3e, r29 ; 62 |
|
4734: 0f be out 0x3f, r0 ; 63 |
|
4736: cd bf out 0x3d, r28 ; 61 |
|
4738: df 91 pop r29 |
|
473a: cf 91 pop r28 |
|
473c: 1f 91 pop r17 |
|
473e: 0f 91 pop r16 |
|
4740: 08 95 ret |
|
|
|
00004742 <_ZN11EthernetUDPC1Ev>: |
|
#include "Ethernet.h" |
|
#include "Udp.h" |
|
#include "Dns.h" |
|
|
|
/* Constructor */ |
|
EthernetUDP::EthernetUDP() : _sock(MAX_SOCK_NUM) {} |
|
4742: fc 01 movw r30, r24 |
|
size_t printNumber(unsigned long, uint8_t); |
|
size_t printFloat(double, uint8_t); |
|
protected: |
|
void setWriteError(int err = 1) { write_error = err; } |
|
public: |
|
Print() : write_error(0) {} |
|
4744: 13 82 std Z+3, r1 ; 0x03 |
|
4746: 12 82 std Z+2, r1 ; 0x02 |
|
virtual int available() = 0; |
|
virtual int read() = 0; |
|
virtual int peek() = 0; |
|
virtual void flush() = 0; |
|
|
|
Stream() {_timeout=1000;} |
|
4748: 48 ee ldi r20, 0xE8 ; 232 |
|
474a: 53 e0 ldi r21, 0x03 ; 3 |
|
474c: 60 e0 ldi r22, 0x00 ; 0 |
|
474e: 70 e0 ldi r23, 0x00 ; 0 |
|
4750: 44 83 std Z+4, r20 ; 0x04 |
|
4752: 55 83 std Z+5, r21 ; 0x05 |
|
4754: 66 83 std Z+6, r22 ; 0x06 |
|
4756: 77 83 std Z+7, r23 ; 0x07 |
|
4758: 88 e1 ldi r24, 0x18 ; 24 |
|
475a: 92 e0 ldi r25, 0x02 ; 2 |
|
475c: 91 83 std Z+1, r25 ; 0x01 |
|
475e: 80 83 st Z, r24 |
|
4760: 84 e0 ldi r24, 0x04 ; 4 |
|
4762: 84 87 std Z+12, r24 ; 0x0c |
|
4764: cf 01 movw r24, r30 |
|
4766: 0f 96 adiw r24, 0x0f ; 15 |
|
4768: 0c 94 d4 2b jmp 0x57a8 ; 0x57a8 <_ZN9IPAddressC1Ev> |
|
|
|
0000476c <_ZN11EthernetUDP11beginPacketEPKcj>: |
|
EthernetClass::_server_port[_sock] = 0; |
|
_sock = MAX_SOCK_NUM; |
|
} |
|
|
|
int EthernetUDP::beginPacket(const char *host, uint16_t port) |
|
{ |
|
476c: cf 92 push r12 |
|
476e: df 92 push r13 |
|
4770: ef 92 push r14 |
|
4772: ff 92 push r15 |
|
4774: 0f 93 push r16 |
|
4776: 1f 93 push r17 |
|
4778: cf 93 push r28 |
|
477a: df 93 push r29 |
|
477c: cd b7 in r28, 0x3d ; 61 |
|
477e: de b7 in r29, 0x3e ; 62 |
|
4780: af 97 sbiw r28, 0x2f ; 47 |
|
4782: 0f b6 in r0, 0x3f ; 63 |
|
4784: f8 94 cli |
|
4786: de bf out 0x3e, r29 ; 62 |
|
4788: 0f be out 0x3f, r0 ; 63 |
|
478a: cd bf out 0x3d, r28 ; 61 |
|
478c: 7c 01 movw r14, r24 |
|
478e: 8b 01 movw r16, r22 |
|
4790: 6a 01 movw r12, r20 |
|
#ifndef DNSClient_h |
|
#define DNSClient_h |
|
|
|
#include <EthernetUdp.h> |
|
|
|
class DNSClient |
|
4792: ce 01 movw r24, r28 |
|
4794: 01 96 adiw r24, 0x01 ; 1 |
|
4796: 0e 94 d4 2b call 0x57a8 ; 0x57a8 <_ZN9IPAddressC1Ev> |
|
479a: ce 01 movw r24, r28 |
|
479c: 09 96 adiw r24, 0x09 ; 9 |
|
479e: 0e 94 a1 23 call 0x4742 ; 0x4742 <_ZN11EthernetUDPC1Ev> |
|
// Look up the host first |
|
int ret = 0; |
|
DNSClient dns; |
|
IPAddress remote_addr; |
|
47a2: ce 01 movw r24, r28 |
|
47a4: 8a 96 adiw r24, 0x2a ; 42 |
|
47a6: 0e 94 d4 2b call 0x57a8 ; 0x57a8 <_ZN9IPAddressC1Ev> |
|
|
|
dns.begin(Ethernet.dnsServerIP()); |
|
47aa: 60 e3 ldi r22, 0x30 ; 48 |
|
47ac: 73 e0 ldi r23, 0x03 ; 3 |
|
47ae: ce 01 movw r24, r28 |
|
47b0: 84 96 adiw r24, 0x24 ; 36 |
|
47b2: 0e 94 15 22 call 0x442a ; 0x442a <_ZN13EthernetClass11dnsServerIPEv> |
|
47b6: be 01 movw r22, r28 |
|
47b8: 6c 5d subi r22, 0xDC ; 220 |
|
47ba: 7f 4f sbci r23, 0xFF ; 255 |
|
47bc: ce 01 movw r24, r28 |
|
47be: 01 96 adiw r24, 0x01 ; 1 |
|
47c0: 0e 94 88 1d call 0x3b10 ; 0x3b10 <_ZN9DNSClient5beginERK9IPAddress> |
|
ret = dns.getHostByName(host, remote_addr); |
|
47c4: ae 01 movw r20, r28 |
|
47c6: 46 5d subi r20, 0xD6 ; 214 |
|
47c8: 5f 4f sbci r21, 0xFF ; 255 |
|
47ca: b8 01 movw r22, r16 |
|
47cc: ce 01 movw r24, r28 |
|
47ce: 01 96 adiw r24, 0x01 ; 1 |
|
47d0: 0e 94 ed 1f call 0x3fda ; 0x3fda <_ZN9DNSClient13getHostByNameEPKcR9IPAddress> |
|
if (ret == 1) { |
|
47d4: 81 30 cpi r24, 0x01 ; 1 |
|
47d6: 91 05 cpc r25, r1 |
|
47d8: c1 f4 brne .+48 ; 0x480a <_ZN11EthernetUDP11beginPacketEPKcj+0x9e> |
|
return beginPacket(remote_addr, port); |
|
47da: d7 01 movw r26, r14 |
|
47dc: ed 91 ld r30, X+ |
|
47de: fc 91 ld r31, X |
|
47e0: 00 88 ldd r0, Z+16 ; 0x10 |
|
47e2: f1 89 ldd r31, Z+17 ; 0x11 |
|
47e4: e0 2d mov r30, r0 |
|
47e6: 8c e3 ldi r24, 0x3C ; 60 |
|
47e8: 92 e0 ldi r25, 0x02 ; 2 |
|
47ea: 9d a3 std Y+37, r25 ; 0x25 |
|
47ec: 8c a3 std Y+36, r24 ; 0x24 |
|
47ee: 0c a5 ldd r16, Y+44 ; 0x2c |
|
47f0: 1d a5 ldd r17, Y+45 ; 0x2d |
|
47f2: 2e a5 ldd r18, Y+46 ; 0x2e |
|
47f4: 3f a5 ldd r19, Y+47 ; 0x2f |
|
47f6: 0e a3 std Y+38, r16 ; 0x26 |
|
47f8: 1f a3 std Y+39, r17 ; 0x27 |
|
47fa: 28 a7 std Y+40, r18 ; 0x28 |
|
47fc: 39 a7 std Y+41, r19 ; 0x29 |
|
47fe: a6 01 movw r20, r12 |
|
4800: be 01 movw r22, r28 |
|
4802: 6c 5d subi r22, 0xDC ; 220 |
|
4804: 7f 4f sbci r23, 0xFF ; 255 |
|
4806: c7 01 movw r24, r14 |
|
4808: 09 95 icall |
|
} else { |
|
return ret; |
|
} |
|
} |
|
480a: af 96 adiw r28, 0x2f ; 47 |
|
480c: 0f b6 in r0, 0x3f ; 63 |
|
480e: f8 94 cli |
|
4810: de bf out 0x3e, r29 ; 62 |
|
4812: 0f be out 0x3f, r0 ; 63 |
|
4814: cd bf out 0x3d, r28 ; 61 |
|
4816: df 91 pop r29 |
|
4818: cf 91 pop r28 |
|
481a: 1f 91 pop r17 |
|
481c: 0f 91 pop r16 |
|
481e: ff 90 pop r15 |
|
4820: ef 90 pop r14 |
|
4822: df 90 pop r13 |
|
4824: cf 90 pop r12 |
|
4826: 08 95 ret |
|
|
|
00004828 <_GLOBAL__sub_I__ZN11EthernetUDPC2Ev>: |
|
|
|
while (_remaining) |
|
{ |
|
read(); |
|
} |
|
} |
|
4828: 0f 93 push r16 |
|
friend class Server; |
|
friend class DhcpClass; |
|
friend class DNSClient; |
|
}; |
|
|
|
const IPAddress INADDR_NONE(0,0,0,0); |
|
482a: 00 e0 ldi r16, 0x00 ; 0 |
|
482c: 20 e0 ldi r18, 0x00 ; 0 |
|
482e: 40 e0 ldi r20, 0x00 ; 0 |
|
4830: 60 e0 ldi r22, 0x00 ; 0 |
|
4832: 82 e5 ldi r24, 0x52 ; 82 |
|
4834: 93 e0 ldi r25, 0x03 ; 3 |
|
4836: 0e 94 de 2b call 0x57bc ; 0x57bc <_ZN9IPAddressC1Ehhhh> |
|
483a: 0f 91 pop r16 |
|
483c: 08 95 ret |
|
|
|
0000483e <_ZN11SPISettingsC1Emhh>: |
|
#define SPI_AVR_EIMSK GIMSK |
|
#endif |
|
|
|
class SPISettings { |
|
public: |
|
SPISettings(uint32_t clock, uint8_t bitOrder, uint8_t dataMode) { |
|
483e: cf 92 push r12 |
|
4840: df 92 push r13 |
|
4842: ef 92 push r14 |
|
4844: ff 92 push r15 |
|
4846: 0f 93 push r16 |
|
4848: 30 e0 ldi r19, 0x00 ; 0 |
|
484a: c1 2c mov r12, r1 |
|
484c: f2 e1 ldi r31, 0x12 ; 18 |
|
484e: df 2e mov r13, r31 |
|
4850: fa e7 ldi r31, 0x7A ; 122 |
|
4852: ef 2e mov r14, r31 |
|
4854: f1 2c mov r15, r1 |
|
clockDiv = 6; |
|
} |
|
} else { |
|
uint32_t clockSetting = F_CPU / 2; |
|
clockDiv = 0; |
|
while (clockDiv < 6 && clock < clockSetting) { |
|
4856: 4c 15 cp r20, r12 |
|
4858: 5d 05 cpc r21, r13 |
|
485a: 6e 05 cpc r22, r14 |
|
485c: 7f 05 cpc r23, r15 |
|
485e: 40 f4 brcc .+16 ; 0x4870 <_ZN11SPISettingsC1Emhh+0x32> |
|
clockSetting /= 2; |
|
4860: f6 94 lsr r15 |
|
4862: e7 94 ror r14 |
|
4864: d7 94 ror r13 |
|
4866: c7 94 ror r12 |
|
clockDiv++; |
|
4868: 3f 5f subi r19, 0xFF ; 255 |
|
clockDiv = 6; |
|
} |
|
} else { |
|
uint32_t clockSetting = F_CPU / 2; |
|
clockDiv = 0; |
|
while (clockDiv < 6 && clock < clockSetting) { |
|
486a: 36 30 cpi r19, 0x06 ; 6 |
|
486c: a1 f7 brne .-24 ; 0x4856 <_ZN11SPISettingsC1Emhh+0x18> |
|
} |
|
} |
|
|
|
// Compensate for the duplicate fosc/64 |
|
if (clockDiv == 6) |
|
clockDiv = 7; |
|
486e: 37 e0 ldi r19, 0x07 ; 7 |
|
|
|
// Invert the SPI2X bit |
|
clockDiv ^= 0x1; |
|
4870: 41 e0 ldi r20, 0x01 ; 1 |
|
4872: 43 27 eor r20, r19 |
|
|
|
// Pack into the SPISettings class |
|
spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) | |
|
(dataMode & SPI_MODE_MASK) | ((clockDiv >> 1) & SPI_CLOCK_MASK); |
|
4874: 21 11 cpse r18, r1 |
|
4876: 02 c0 rjmp .+4 ; 0x487c <_ZN11SPISettingsC1Emhh+0x3e> |
|
4878: 50 e7 ldi r21, 0x70 ; 112 |
|
487a: 01 c0 rjmp .+2 ; 0x487e <_ZN11SPISettingsC1Emhh+0x40> |
|
487c: 50 e5 ldi r21, 0x50 ; 80 |
|
487e: 24 2f mov r18, r20 |
|
4880: 30 e0 ldi r19, 0x00 ; 0 |
|
4882: 35 95 asr r19 |
|
4884: 27 95 ror r18 |
|
4886: 23 70 andi r18, 0x03 ; 3 |
|
4888: 0c 70 andi r16, 0x0C ; 12 |
|
488a: 20 2b or r18, r16 |
|
488c: 25 2b or r18, r21 |
|
488e: fc 01 movw r30, r24 |
|
4890: 20 83 st Z, r18 |
|
spsr = clockDiv & SPI_2XCLOCK_MASK; |
|
4892: 41 70 andi r20, 0x01 ; 1 |
|
4894: 41 83 std Z+1, r20 ; 0x01 |
|
if (__builtin_constant_p(clock)) { |
|
init_AlwaysInline(clock, bitOrder, dataMode); |
|
} else { |
|
init_MightInline(clock, bitOrder, dataMode); |
|
} |
|
} |
|
4896: 0f 91 pop r16 |
|
4898: ff 90 pop r15 |
|
489a: ef 90 pop r14 |
|
489c: df 90 pop r13 |
|
489e: cf 90 pop r12 |
|
48a0: 08 95 ret |
|
|
|
000048a2 <_ZN10W5100Class11writeSnDIPREhPh>: |
|
uint16_t W5100Class::readSn(SOCKET _s, uint16_t _addr, uint8_t *_buf, uint16_t _len) { |
|
return read(CH_BASE + _s * CH_SIZE + _addr, _buf, _len); |
|
} |
|
|
|
uint16_t W5100Class::writeSn(SOCKET _s, uint16_t _addr, uint8_t *_buf, uint16_t _len) { |
|
return write(CH_BASE + _s * CH_SIZE + _addr, _buf, _len); |
|
48a2: 90 e0 ldi r25, 0x00 ; 0 |
|
48a4: 98 2f mov r25, r24 |
|
48a6: 88 27 eor r24, r24 |
|
48a8: 44 e0 ldi r20, 0x04 ; 4 |
|
48aa: 50 e0 ldi r21, 0x00 ; 0 |
|
48ac: 84 5f subi r24, 0xF4 ; 244 |
|
48ae: 9b 4f sbci r25, 0xFB ; 251 |
|
48b0: 0c 94 6f 27 jmp 0x4ede ; 0x4ede <_ZN10W5100Class5writeEjPKhj> |
|
|
|
000048b4 <_ZN10W5100Class6readSnEhj>: |
|
}; |
|
|
|
extern W5100Class W5100; |
|
|
|
uint8_t W5100Class::readSn(SOCKET _s, uint16_t _addr) { |
|
return read(CH_BASE + _s * CH_SIZE + _addr); |
|
48b4: 28 2f mov r18, r24 |
|
48b6: 30 e0 ldi r19, 0x00 ; 0 |
|
48b8: 2c 5f subi r18, 0xFC ; 252 |
|
48ba: 3f 4f sbci r19, 0xFF ; 255 |
|
48bc: 92 2f mov r25, r18 |
|
48be: 88 27 eor r24, r24 |
|
48c0: 86 0f add r24, r22 |
|
48c2: 97 1f adc r25, r23 |
|
48c4: 0c 94 9e 27 jmp 0x4f3c ; 0x4f3c <_ZN10W5100Class4readEj> |
|
|
|
000048c8 <_ZN10W5100Class8readSnIREh>: |
|
} |
|
|
|
public: |
|
__SOCKET_REGISTER8(SnMR, 0x0000) // Mode |
|
__SOCKET_REGISTER8(SnCR, 0x0001) // Command |
|
__SOCKET_REGISTER8(SnIR, 0x0002) // Interrupt |
|
48c8: 62 e0 ldi r22, 0x02 ; 2 |
|
48ca: 70 e0 ldi r23, 0x00 ; 0 |
|
48cc: 0c 94 5a 24 jmp 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
|
|
000048d0 <_ZN10W5100Class7writeSnEhjh>: |
|
|
|
uint8_t W5100Class::readSn(SOCKET _s, uint16_t _addr) { |
|
return read(CH_BASE + _s * CH_SIZE + _addr); |
|
} |
|
|
|
uint8_t W5100Class::writeSn(SOCKET _s, uint16_t _addr, uint8_t _data) { |
|
48d0: fb 01 movw r30, r22 |
|
return write(CH_BASE + _s * CH_SIZE + _addr, _data); |
|
48d2: 28 2f mov r18, r24 |
|
48d4: 30 e0 ldi r19, 0x00 ; 0 |
|
48d6: 2c 5f subi r18, 0xFC ; 252 |
|
48d8: 3f 4f sbci r19, 0xFF ; 255 |
|
48da: 92 2f mov r25, r18 |
|
48dc: 88 27 eor r24, r24 |
|
48de: 64 2f mov r22, r20 |
|
48e0: 8e 0f add r24, r30 |
|
48e2: 9f 1f adc r25, r31 |
|
48e4: 0c 94 e5 26 jmp 0x4dca ; 0x4dca <_ZN10W5100Class5writeEjh> |
|
|
|
000048e8 <_ZN10W5100Class11writeSnPORTEhj>: |
|
public: |
|
__SOCKET_REGISTER8(SnMR, 0x0000) // Mode |
|
__SOCKET_REGISTER8(SnCR, 0x0001) // Command |
|
__SOCKET_REGISTER8(SnIR, 0x0002) // Interrupt |
|
__SOCKET_REGISTER8(SnSR, 0x0003) // Status |
|
__SOCKET_REGISTER16(SnPORT, 0x0004) // Source Port |
|
48e8: cf 93 push r28 |
|
48ea: df 93 push r29 |
|
48ec: c8 2f mov r28, r24 |
|
48ee: d6 2f mov r29, r22 |
|
48f0: 47 2f mov r20, r23 |
|
48f2: 64 e0 ldi r22, 0x04 ; 4 |
|
48f4: 70 e0 ldi r23, 0x00 ; 0 |
|
48f6: 0e 94 68 24 call 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
48fa: 4d 2f mov r20, r29 |
|
48fc: 65 e0 ldi r22, 0x05 ; 5 |
|
48fe: 70 e0 ldi r23, 0x00 ; 0 |
|
4900: 8c 2f mov r24, r28 |
|
4902: df 91 pop r29 |
|
4904: cf 91 pop r28 |
|
4906: 0c 94 68 24 jmp 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
|
|
0000490a <_ZN10W5100Class9writeSnIREhh>: |
|
} |
|
|
|
public: |
|
__SOCKET_REGISTER8(SnMR, 0x0000) // Mode |
|
__SOCKET_REGISTER8(SnCR, 0x0001) // Command |
|
__SOCKET_REGISTER8(SnIR, 0x0002) // Interrupt |
|
490a: 46 2f mov r20, r22 |
|
490c: 62 e0 ldi r22, 0x02 ; 2 |
|
490e: 70 e0 ldi r23, 0x00 ; 0 |
|
4910: 0c 94 68 24 jmp 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
|
|
00004914 <_ZN10W5100Class12writeSnDPORTEhj>: |
|
__SOCKET_REGISTER8(SnSR, 0x0003) // Status |
|
__SOCKET_REGISTER16(SnPORT, 0x0004) // Source Port |
|
__SOCKET_REGISTER_N(SnDHAR, 0x0006, 6) // Destination Hardw Addr |
|
__SOCKET_REGISTER_N(SnDIPR, 0x000C, 4) // Destination IP Addr |
|
__SOCKET_REGISTER16(SnDPORT, 0x0010) // Destination Port |
|
4914: cf 93 push r28 |
|
4916: df 93 push r29 |
|
4918: c8 2f mov r28, r24 |
|
491a: d6 2f mov r29, r22 |
|
491c: 47 2f mov r20, r23 |
|
491e: 60 e1 ldi r22, 0x10 ; 16 |
|
4920: 70 e0 ldi r23, 0x00 ; 0 |
|
4922: 0e 94 68 24 call 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
4926: 4d 2f mov r20, r29 |
|
4928: 61 e1 ldi r22, 0x11 ; 17 |
|
492a: 70 e0 ldi r23, 0x00 ; 0 |
|
492c: 8c 2f mov r24, r28 |
|
492e: df 91 pop r29 |
|
4930: cf 91 pop r28 |
|
4932: 0c 94 68 24 jmp 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
|
|
00004936 <_Z12socketStatush>: |
|
return 0; |
|
} |
|
|
|
|
|
uint8_t socketStatus(SOCKET s) |
|
{ |
|
4936: 0f 93 push r16 |
|
4938: 1f 93 push r17 |
|
493a: cf 93 push r28 |
|
493c: df 93 push r29 |
|
493e: 00 d0 rcall .+0 ; 0x4940 <_Z12socketStatush+0xa> |
|
4940: 1f 92 push r1 |
|
4942: cd b7 in r28, 0x3d ; 61 |
|
4944: de b7 in r29, 0x3e ; 62 |
|
4946: 18 2f mov r17, r24 |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4948: 00 e0 ldi r16, 0x00 ; 0 |
|
494a: 21 e0 ldi r18, 0x01 ; 1 |
|
494c: 40 e0 ldi r20, 0x00 ; 0 |
|
494e: 59 e0 ldi r21, 0x09 ; 9 |
|
4950: 6d e3 ldi r22, 0x3D ; 61 |
|
4952: 70 e0 ldi r23, 0x00 ; 0 |
|
4954: ce 01 movw r24, r28 |
|
4956: 01 96 adiw r24, 0x01 ; 1 |
|
4958: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
495c: 89 81 ldd r24, Y+1 ; 0x01 |
|
495e: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4960: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
|
|
public: |
|
__SOCKET_REGISTER8(SnMR, 0x0000) // Mode |
|
__SOCKET_REGISTER8(SnCR, 0x0001) // Command |
|
__SOCKET_REGISTER8(SnIR, 0x0002) // Interrupt |
|
__SOCKET_REGISTER8(SnSR, 0x0003) // Status |
|
4964: 63 e0 ldi r22, 0x03 ; 3 |
|
4966: 70 e0 ldi r23, 0x00 ; 0 |
|
4968: 81 2f mov r24, r17 |
|
496a: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
uint8_t status = W5100.readSnSR(s); |
|
SPI.endTransaction(); |
|
496e: 8b 83 std Y+3, r24 ; 0x03 |
|
4970: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
return status; |
|
} |
|
4974: 8b 81 ldd r24, Y+3 ; 0x03 |
|
4976: 0f 90 pop r0 |
|
4978: 0f 90 pop r0 |
|
497a: 0f 90 pop r0 |
|
497c: df 91 pop r29 |
|
497e: cf 91 pop r28 |
|
4980: 1f 91 pop r17 |
|
4982: 0f 91 pop r16 |
|
4984: 08 95 ret |
|
|
|
00004986 <_Z5closeh>: |
|
|
|
/** |
|
* @brief This function close the socket and parameter is "s" which represent the socket number |
|
*/ |
|
void close(SOCKET s) |
|
{ |
|
4986: 0f 93 push r16 |
|
4988: 1f 93 push r17 |
|
498a: cf 93 push r28 |
|
498c: df 93 push r29 |
|
498e: 00 d0 rcall .+0 ; 0x4990 <_Z5closeh+0xa> |
|
4990: cd b7 in r28, 0x3d ; 61 |
|
4992: de b7 in r29, 0x3e ; 62 |
|
4994: 18 2f mov r17, r24 |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4996: 00 e0 ldi r16, 0x00 ; 0 |
|
4998: 21 e0 ldi r18, 0x01 ; 1 |
|
499a: 40 e0 ldi r20, 0x00 ; 0 |
|
499c: 59 e0 ldi r21, 0x09 ; 9 |
|
499e: 6d e3 ldi r22, 0x3D ; 61 |
|
49a0: 70 e0 ldi r23, 0x00 ; 0 |
|
49a2: ce 01 movw r24, r28 |
|
49a4: 01 96 adiw r24, 0x01 ; 1 |
|
49a6: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
49aa: 89 81 ldd r24, Y+1 ; 0x01 |
|
49ac: 9a 81 ldd r25, Y+2 ; 0x02 |
|
49ae: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
W5100.execCmdSn(s, Sock_CLOSE); |
|
49b2: 40 e1 ldi r20, 0x10 ; 16 |
|
49b4: 50 e0 ldi r21, 0x00 ; 0 |
|
49b6: 61 2f mov r22, r17 |
|
49b8: 8a e5 ldi r24, 0x5A ; 90 |
|
49ba: 93 e0 ldi r25, 0x03 ; 3 |
|
49bc: 0e 94 5d 29 call 0x52ba ; 0x52ba <_ZN10W5100Class9execCmdSnEh7SockCMD> |
|
W5100.writeSnIR(s, 0xFF); |
|
49c0: 6f ef ldi r22, 0xFF ; 255 |
|
49c2: 81 2f mov r24, r17 |
|
49c4: 0e 94 85 24 call 0x490a ; 0x490a <_ZN10W5100Class9writeSnIREhh> |
|
SPI.endTransaction(); |
|
49c8: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
} |
|
49cc: 0f 90 pop r0 |
|
49ce: 0f 90 pop r0 |
|
49d0: df 91 pop r29 |
|
49d2: cf 91 pop r28 |
|
49d4: 1f 91 pop r17 |
|
49d6: 0f 91 pop r16 |
|
49d8: 08 95 ret |
|
|
|
000049da <_Z6sockethhjh>: |
|
/** |
|
* @brief This Socket function initialize the channel in perticular mode, and set the port and wait for W5100 done it. |
|
* @return 1 for success else 0. |
|
*/ |
|
uint8_t socket(SOCKET s, uint8_t protocol, uint16_t port, uint8_t flag) |
|
{ |
|
49da: cf 92 push r12 |
|
49dc: df 92 push r13 |
|
49de: ef 92 push r14 |
|
49e0: ff 92 push r15 |
|
49e2: 0f 93 push r16 |
|
49e4: 1f 93 push r17 |
|
49e6: cf 93 push r28 |
|
49e8: df 93 push r29 |
|
49ea: 00 d0 rcall .+0 ; 0x49ec <_Z6sockethhjh+0x12> |
|
49ec: cd b7 in r28, 0x3d ; 61 |
|
49ee: de b7 in r29, 0x3e ; 62 |
|
49f0: 18 2f mov r17, r24 |
|
49f2: d6 2e mov r13, r22 |
|
49f4: 7a 01 movw r14, r20 |
|
49f6: c2 2e mov r12, r18 |
|
if ((protocol == SnMR::TCP) || (protocol == SnMR::UDP) || (protocol == SnMR::IPRAW) || (protocol == SnMR::MACRAW) || (protocol == SnMR::PPPOE)) |
|
49f8: 8f ef ldi r24, 0xFF ; 255 |
|
49fa: 86 0f add r24, r22 |
|
49fc: 85 30 cpi r24, 0x05 ; 5 |
|
49fe: a8 f5 brcc .+106 ; 0x4a6a <_Z6sockethhjh+0x90> |
|
{ |
|
close(s); |
|
4a00: 81 2f mov r24, r17 |
|
4a02: 0e 94 c3 24 call 0x4986 ; 0x4986 <_Z5closeh> |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4a06: 00 e0 ldi r16, 0x00 ; 0 |
|
4a08: 21 e0 ldi r18, 0x01 ; 1 |
|
4a0a: 40 e0 ldi r20, 0x00 ; 0 |
|
4a0c: 59 e0 ldi r21, 0x09 ; 9 |
|
4a0e: 6d e3 ldi r22, 0x3D ; 61 |
|
4a10: 70 e0 ldi r23, 0x00 ; 0 |
|
4a12: ce 01 movw r24, r28 |
|
4a14: 01 96 adiw r24, 0x01 ; 1 |
|
4a16: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
4a1a: 89 81 ldd r24, Y+1 ; 0x01 |
|
4a1c: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4a1e: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
W5100.writeSnMR(s, protocol | flag); |
|
4a22: 4d 2d mov r20, r13 |
|
4a24: 4c 29 or r20, r12 |
|
static uint16_t read##name(SOCKET _s, uint8_t *_buff) { \ |
|
return readSn(_s, address, _buff, size); \ |
|
} |
|
|
|
public: |
|
__SOCKET_REGISTER8(SnMR, 0x0000) // Mode |
|
4a26: 60 e0 ldi r22, 0x00 ; 0 |
|
4a28: 70 e0 ldi r23, 0x00 ; 0 |
|
4a2a: 81 2f mov r24, r17 |
|
4a2c: 0e 94 68 24 call 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
if (port != 0) { |
|
4a30: e1 14 cp r14, r1 |
|
4a32: f1 04 cpc r15, r1 |
|
4a34: 11 f0 breq .+4 ; 0x4a3a <_Z6sockethhjh+0x60> |
|
W5100.writeSnPORT(s, port); |
|
4a36: b7 01 movw r22, r14 |
|
4a38: 0a c0 rjmp .+20 ; 0x4a4e <_Z6sockethhjh+0x74> |
|
} |
|
else { |
|
local_port++; // if don't set the source port, set local_port number. |
|
4a3a: 60 91 58 03 lds r22, 0x0358 |
|
4a3e: 70 91 59 03 lds r23, 0x0359 |
|
4a42: 6f 5f subi r22, 0xFF ; 255 |
|
4a44: 7f 4f sbci r23, 0xFF ; 255 |
|
4a46: 70 93 59 03 sts 0x0359, r23 |
|
4a4a: 60 93 58 03 sts 0x0358, r22 |
|
W5100.writeSnPORT(s, local_port); |
|
4a4e: 81 2f mov r24, r17 |
|
4a50: 0e 94 74 24 call 0x48e8 ; 0x48e8 <_ZN10W5100Class11writeSnPORTEhj> |
|
} |
|
|
|
W5100.execCmdSn(s, Sock_OPEN); |
|
4a54: 41 e0 ldi r20, 0x01 ; 1 |
|
4a56: 50 e0 ldi r21, 0x00 ; 0 |
|
4a58: 61 2f mov r22, r17 |
|
4a5a: 8a e5 ldi r24, 0x5A ; 90 |
|
4a5c: 93 e0 ldi r25, 0x03 ; 3 |
|
4a5e: 0e 94 5d 29 call 0x52ba ; 0x52ba <_ZN10W5100Class9execCmdSnEh7SockCMD> |
|
SPI.endTransaction(); |
|
4a62: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
return 1; |
|
4a66: 81 e0 ldi r24, 0x01 ; 1 |
|
4a68: 01 c0 rjmp .+2 ; 0x4a6c <_Z6sockethhjh+0x92> |
|
} |
|
|
|
return 0; |
|
4a6a: 80 e0 ldi r24, 0x00 ; 0 |
|
} |
|
4a6c: 0f 90 pop r0 |
|
4a6e: 0f 90 pop r0 |
|
4a70: df 91 pop r29 |
|
4a72: cf 91 pop r28 |
|
4a74: 1f 91 pop r17 |
|
4a76: 0f 91 pop r16 |
|
4a78: ff 90 pop r15 |
|
4a7a: ef 90 pop r14 |
|
4a7c: df 90 pop r13 |
|
4a7e: cf 90 pop r12 |
|
4a80: 08 95 ret |
|
|
|
00004a82 <_Z4recvhPhi>: |
|
* It continues to wait for data as much as the application wants to receive. |
|
* |
|
* @return received data size for success else -1. |
|
*/ |
|
int16_t recv(SOCKET s, uint8_t *buf, int16_t len) |
|
{ |
|
4a82: af 92 push r10 |
|
4a84: bf 92 push r11 |
|
4a86: cf 92 push r12 |
|
4a88: df 92 push r13 |
|
4a8a: ef 92 push r14 |
|
4a8c: ff 92 push r15 |
|
4a8e: 0f 93 push r16 |
|
4a90: 1f 93 push r17 |
|
4a92: cf 93 push r28 |
|
4a94: df 93 push r29 |
|
4a96: 00 d0 rcall .+0 ; 0x4a98 <_Z4recvhPhi+0x16> |
|
4a98: cd b7 in r28, 0x3d ; 61 |
|
4a9a: de b7 in r29, 0x3e ; 62 |
|
4a9c: 18 2f mov r17, r24 |
|
4a9e: 5b 01 movw r10, r22 |
|
4aa0: 6a 01 movw r12, r20 |
|
// Check how much data is available |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4aa2: 00 e0 ldi r16, 0x00 ; 0 |
|
4aa4: 21 e0 ldi r18, 0x01 ; 1 |
|
4aa6: 40 e0 ldi r20, 0x00 ; 0 |
|
4aa8: 59 e0 ldi r21, 0x09 ; 9 |
|
4aaa: 6d e3 ldi r22, 0x3D ; 61 |
|
4aac: 70 e0 ldi r23, 0x00 ; 0 |
|
4aae: ce 01 movw r24, r28 |
|
4ab0: 01 96 adiw r24, 0x01 ; 1 |
|
4ab2: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
4ab6: 89 81 ldd r24, Y+1 ; 0x01 |
|
4ab8: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4aba: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
int16_t ret = W5100.getRXReceivedSize(s); |
|
4abe: 61 2f mov r22, r17 |
|
4ac0: 8a e5 ldi r24, 0x5A ; 90 |
|
4ac2: 93 e0 ldi r25, 0x03 ; 3 |
|
4ac4: 0e 94 0a 28 call 0x5014 ; 0x5014 <_ZN10W5100Class17getRXReceivedSizeEh> |
|
4ac8: 7c 01 movw r14, r24 |
|
if ( ret == 0 ) |
|
4aca: 00 97 sbiw r24, 0x00 ; 0 |
|
4acc: a1 f4 brne .+40 ; 0x4af6 <_Z4recvhPhi+0x74> |
|
__SOCKET_REGISTER8(SnCR, 0x0001) // Command |
|
__SOCKET_REGISTER8(SnIR, 0x0002) // Interrupt |
|
__SOCKET_REGISTER8(SnSR, 0x0003) // Status |
|
4ace: 63 e0 ldi r22, 0x03 ; 3 |
|
4ad0: 70 e0 ldi r23, 0x00 ; 0 |
|
4ad2: 81 2f mov r24, r17 |
|
4ad4: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
{ |
|
// No data available. |
|
uint8_t status = W5100.readSnSR(s); |
|
if ( status == SnSR::LISTEN || status == SnSR::CLOSED || status == SnSR::CLOSE_WAIT ) |
|
4ad8: 84 31 cpi r24, 0x14 ; 20 |
|
4ada: 19 f1 breq .+70 ; 0x4b22 <_Z4recvhPhi+0xa0> |
|
4adc: 88 23 and r24, r24 |
|
4ade: 09 f1 breq .+66 ; 0x4b22 <_Z4recvhPhi+0xa0> |
|
4ae0: 21 e0 ldi r18, 0x01 ; 1 |
|
4ae2: 30 e0 ldi r19, 0x00 ; 0 |
|
4ae4: 8c 31 cpi r24, 0x1C ; 28 |
|
4ae6: 11 f4 brne .+4 ; 0x4aec <_Z4recvhPhi+0x6a> |
|
4ae8: 20 e0 ldi r18, 0x00 ; 0 |
|
4aea: 30 e0 ldi r19, 0x00 ; 0 |
|
4aec: ee 24 eor r14, r14 |
|
4aee: ff 24 eor r15, r15 |
|
4af0: e2 1a sub r14, r18 |
|
4af2: f3 0a sbc r15, r19 |
|
4af4: 16 c0 rjmp .+44 ; 0x4b22 <_Z4recvhPhi+0xa0> |
|
4af6: c8 16 cp r12, r24 |
|
4af8: d9 06 cpc r13, r25 |
|
4afa: 0c f4 brge .+2 ; 0x4afe <_Z4recvhPhi+0x7c> |
|
4afc: 76 01 movw r14, r12 |
|
else if (ret > len) |
|
{ |
|
ret = len; |
|
} |
|
|
|
if ( ret > 0 ) |
|
4afe: 1e 14 cp r1, r14 |
|
4b00: 1f 04 cpc r1, r15 |
|
4b02: 7c f4 brge .+30 ; 0x4b22 <_Z4recvhPhi+0xa0> |
|
{ |
|
W5100.recv_data_processing(s, buf, ret); |
|
4b04: 00 e0 ldi r16, 0x00 ; 0 |
|
4b06: 97 01 movw r18, r14 |
|
4b08: a5 01 movw r20, r10 |
|
4b0a: 61 2f mov r22, r17 |
|
4b0c: 8a e5 ldi r24, 0x5A ; 90 |
|
4b0e: 93 e0 ldi r25, 0x03 ; 3 |
|
4b10: 0e 94 0d 29 call 0x521a ; 0x521a <_ZN10W5100Class20recv_data_processingEhPhjh> |
|
W5100.execCmdSn(s, Sock_RECV); |
|
4b14: 40 e4 ldi r20, 0x40 ; 64 |
|
4b16: 50 e0 ldi r21, 0x00 ; 0 |
|
4b18: 61 2f mov r22, r17 |
|
4b1a: 8a e5 ldi r24, 0x5A ; 90 |
|
4b1c: 93 e0 ldi r25, 0x03 ; 3 |
|
4b1e: 0e 94 5d 29 call 0x52ba ; 0x52ba <_ZN10W5100Class9execCmdSnEh7SockCMD> |
|
} |
|
SPI.endTransaction(); |
|
4b22: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
return ret; |
|
} |
|
4b26: c7 01 movw r24, r14 |
|
4b28: 0f 90 pop r0 |
|
4b2a: 0f 90 pop r0 |
|
4b2c: df 91 pop r29 |
|
4b2e: cf 91 pop r28 |
|
4b30: 1f 91 pop r17 |
|
4b32: 0f 91 pop r16 |
|
4b34: ff 90 pop r15 |
|
4b36: ef 90 pop r14 |
|
4b38: df 90 pop r13 |
|
4b3a: cf 90 pop r12 |
|
4b3c: bf 90 pop r11 |
|
4b3e: af 90 pop r10 |
|
4b40: 08 95 ret |
|
|
|
00004b42 <_Z13recvAvailableh>: |
|
|
|
|
|
int16_t recvAvailable(SOCKET s) |
|
{ |
|
4b42: 0f 93 push r16 |
|
4b44: 1f 93 push r17 |
|
4b46: cf 93 push r28 |
|
4b48: df 93 push r29 |
|
4b4a: 00 d0 rcall .+0 ; 0x4b4c <_Z13recvAvailableh+0xa> |
|
4b4c: 00 d0 rcall .+0 ; 0x4b4e <_Z13recvAvailableh+0xc> |
|
4b4e: cd b7 in r28, 0x3d ; 61 |
|
4b50: de b7 in r29, 0x3e ; 62 |
|
4b52: 18 2f mov r17, r24 |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4b54: 00 e0 ldi r16, 0x00 ; 0 |
|
4b56: 21 e0 ldi r18, 0x01 ; 1 |
|
4b58: 40 e0 ldi r20, 0x00 ; 0 |
|
4b5a: 59 e0 ldi r21, 0x09 ; 9 |
|
4b5c: 6d e3 ldi r22, 0x3D ; 61 |
|
4b5e: 70 e0 ldi r23, 0x00 ; 0 |
|
4b60: ce 01 movw r24, r28 |
|
4b62: 01 96 adiw r24, 0x01 ; 1 |
|
4b64: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
4b68: 89 81 ldd r24, Y+1 ; 0x01 |
|
4b6a: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4b6c: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
int16_t ret = W5100.getRXReceivedSize(s); |
|
4b70: 61 2f mov r22, r17 |
|
4b72: 8a e5 ldi r24, 0x5A ; 90 |
|
4b74: 93 e0 ldi r25, 0x03 ; 3 |
|
4b76: 0e 94 0a 28 call 0x5014 ; 0x5014 <_ZN10W5100Class17getRXReceivedSizeEh> |
|
SPI.endTransaction(); |
|
4b7a: 8b 83 std Y+3, r24 ; 0x03 |
|
4b7c: 9c 83 std Y+4, r25 ; 0x04 |
|
4b7e: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
return ret; |
|
} |
|
4b82: 8b 81 ldd r24, Y+3 ; 0x03 |
|
4b84: 9c 81 ldd r25, Y+4 ; 0x04 |
|
4b86: 0f 90 pop r0 |
|
4b88: 0f 90 pop r0 |
|
4b8a: 0f 90 pop r0 |
|
4b8c: 0f 90 pop r0 |
|
4b8e: df 91 pop r29 |
|
4b90: cf 91 pop r28 |
|
4b92: 1f 91 pop r17 |
|
4b94: 0f 91 pop r16 |
|
4b96: 08 95 ret |
|
|
|
00004b98 <_Z4peekhPh>: |
|
* @brief Returns the first byte in the receive queue (no checking) |
|
* |
|
* @return |
|
*/ |
|
uint16_t peek(SOCKET s, uint8_t *buf) |
|
{ |
|
4b98: ef 92 push r14 |
|
4b9a: ff 92 push r15 |
|
4b9c: 0f 93 push r16 |
|
4b9e: 1f 93 push r17 |
|
4ba0: cf 93 push r28 |
|
4ba2: df 93 push r29 |
|
4ba4: 00 d0 rcall .+0 ; 0x4ba6 <_Z4peekhPh+0xe> |
|
4ba6: cd b7 in r28, 0x3d ; 61 |
|
4ba8: de b7 in r29, 0x3e ; 62 |
|
4baa: 18 2f mov r17, r24 |
|
4bac: 7b 01 movw r14, r22 |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4bae: 00 e0 ldi r16, 0x00 ; 0 |
|
4bb0: 21 e0 ldi r18, 0x01 ; 1 |
|
4bb2: 40 e0 ldi r20, 0x00 ; 0 |
|
4bb4: 59 e0 ldi r21, 0x09 ; 9 |
|
4bb6: 6d e3 ldi r22, 0x3D ; 61 |
|
4bb8: 70 e0 ldi r23, 0x00 ; 0 |
|
4bba: ce 01 movw r24, r28 |
|
4bbc: 01 96 adiw r24, 0x01 ; 1 |
|
4bbe: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
4bc2: 89 81 ldd r24, Y+1 ; 0x01 |
|
4bc4: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4bc6: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
W5100.recv_data_processing(s, buf, 1, 1); |
|
4bca: 01 e0 ldi r16, 0x01 ; 1 |
|
4bcc: 21 e0 ldi r18, 0x01 ; 1 |
|
4bce: 30 e0 ldi r19, 0x00 ; 0 |
|
4bd0: a7 01 movw r20, r14 |
|
4bd2: 61 2f mov r22, r17 |
|
4bd4: 8a e5 ldi r24, 0x5A ; 90 |
|
4bd6: 93 e0 ldi r25, 0x03 ; 3 |
|
4bd8: 0e 94 0d 29 call 0x521a ; 0x521a <_ZN10W5100Class20recv_data_processingEhPhjh> |
|
SPI.endTransaction(); |
|
4bdc: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
return 1; |
|
} |
|
4be0: 81 e0 ldi r24, 0x01 ; 1 |
|
4be2: 90 e0 ldi r25, 0x00 ; 0 |
|
4be4: 0f 90 pop r0 |
|
4be6: 0f 90 pop r0 |
|
4be8: df 91 pop r29 |
|
4bea: cf 91 pop r28 |
|
4bec: 1f 91 pop r17 |
|
4bee: 0f 91 pop r16 |
|
4bf0: ff 90 pop r15 |
|
4bf2: ef 90 pop r14 |
|
4bf4: 08 95 ret |
|
|
|
00004bf6 <_Z10bufferDatahjPKhj>: |
|
SPI.endTransaction(); |
|
return ret; |
|
} |
|
|
|
uint16_t bufferData(SOCKET s, uint16_t offset, const uint8_t* buf, uint16_t len) |
|
{ |
|
4bf6: 9f 92 push r9 |
|
4bf8: af 92 push r10 |
|
4bfa: bf 92 push r11 |
|
4bfc: cf 92 push r12 |
|
4bfe: df 92 push r13 |
|
4c00: ef 92 push r14 |
|
4c02: ff 92 push r15 |
|
4c04: 0f 93 push r16 |
|
4c06: 1f 93 push r17 |
|
4c08: cf 93 push r28 |
|
4c0a: df 93 push r29 |
|
4c0c: 00 d0 rcall .+0 ; 0x4c0e <_Z10bufferDatahjPKhj+0x18> |
|
4c0e: cd b7 in r28, 0x3d ; 61 |
|
4c10: de b7 in r29, 0x3e ; 62 |
|
4c12: 98 2e mov r9, r24 |
|
4c14: 6b 01 movw r12, r22 |
|
4c16: 5a 01 movw r10, r20 |
|
4c18: 79 01 movw r14, r18 |
|
uint16_t ret =0; |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4c1a: 00 e0 ldi r16, 0x00 ; 0 |
|
4c1c: 21 e0 ldi r18, 0x01 ; 1 |
|
4c1e: 40 e0 ldi r20, 0x00 ; 0 |
|
4c20: 59 e0 ldi r21, 0x09 ; 9 |
|
4c22: 6d e3 ldi r22, 0x3D ; 61 |
|
4c24: 70 e0 ldi r23, 0x00 ; 0 |
|
4c26: ce 01 movw r24, r28 |
|
4c28: 01 96 adiw r24, 0x01 ; 1 |
|
4c2a: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
4c2e: 89 81 ldd r24, Y+1 ; 0x01 |
|
4c30: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4c32: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
if (len > W5100.getTXFreeSize(s)) |
|
4c36: 69 2d mov r22, r9 |
|
4c38: 8a e5 ldi r24, 0x5A ; 90 |
|
4c3a: 93 e0 ldi r25, 0x03 ; 3 |
|
4c3c: 0e 94 d6 27 call 0x4fac ; 0x4fac <_ZN10W5100Class13getTXFreeSizeEh> |
|
4c40: 8e 15 cp r24, r14 |
|
4c42: 9f 05 cpc r25, r15 |
|
4c44: 30 f4 brcc .+12 ; 0x4c52 <_Z10bufferDatahjPKhj+0x5c> |
|
{ |
|
ret = W5100.getTXFreeSize(s); // check size not to exceed MAX size. |
|
4c46: 69 2d mov r22, r9 |
|
4c48: 8a e5 ldi r24, 0x5A ; 90 |
|
4c4a: 93 e0 ldi r25, 0x03 ; 3 |
|
4c4c: 0e 94 d6 27 call 0x4fac ; 0x4fac <_ZN10W5100Class13getTXFreeSizeEh> |
|
4c50: 7c 01 movw r14, r24 |
|
} |
|
else |
|
{ |
|
ret = len; |
|
} |
|
W5100.send_data_processing_offset(s, offset, buf, ret); |
|
4c52: 87 01 movw r16, r14 |
|
4c54: 95 01 movw r18, r10 |
|
4c56: a6 01 movw r20, r12 |
|
4c58: 69 2d mov r22, r9 |
|
4c5a: 8a e5 ldi r24, 0x5A ; 90 |
|
4c5c: 93 e0 ldi r25, 0x03 ; 3 |
|
4c5e: 0e 94 26 28 call 0x504c ; 0x504c <_ZN10W5100Class27send_data_processing_offsetEhjPKhj> |
|
SPI.endTransaction(); |
|
4c62: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
return ret; |
|
} |
|
4c66: c7 01 movw r24, r14 |
|
4c68: 0f 90 pop r0 |
|
4c6a: 0f 90 pop r0 |
|
4c6c: df 91 pop r29 |
|
4c6e: cf 91 pop r28 |
|
4c70: 1f 91 pop r17 |
|
4c72: 0f 91 pop r16 |
|
4c74: ff 90 pop r15 |
|
4c76: ef 90 pop r14 |
|
4c78: df 90 pop r13 |
|
4c7a: cf 90 pop r12 |
|
4c7c: bf 90 pop r11 |
|
4c7e: af 90 pop r10 |
|
4c80: 9f 90 pop r9 |
|
4c82: 08 95 ret |
|
|
|
00004c84 <_Z8startUDPhPhj>: |
|
|
|
int startUDP(SOCKET s, uint8_t* addr, uint16_t port) |
|
{ |
|
4c84: cf 92 push r12 |
|
4c86: df 92 push r13 |
|
4c88: ef 92 push r14 |
|
4c8a: ff 92 push r15 |
|
4c8c: 0f 93 push r16 |
|
4c8e: 1f 93 push r17 |
|
4c90: cf 93 push r28 |
|
4c92: df 93 push r29 |
|
4c94: 00 d0 rcall .+0 ; 0x4c96 <_Z8startUDPhPhj+0x12> |
|
4c96: cd b7 in r28, 0x3d ; 61 |
|
4c98: de b7 in r29, 0x3e ; 62 |
|
4c9a: 18 2f mov r17, r24 |
|
4c9c: 7b 01 movw r14, r22 |
|
4c9e: 6a 01 movw r12, r20 |
|
if |
|
4ca0: fb 01 movw r30, r22 |
|
4ca2: 80 81 ld r24, Z |
|
4ca4: 81 11 cpse r24, r1 |
|
4ca6: 09 c0 rjmp .+18 ; 0x4cba <_Z8startUDPhPhj+0x36> |
|
( |
|
((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && (addr[3] == 0x00)) || |
|
4ca8: 81 81 ldd r24, Z+1 ; 0x01 |
|
4caa: 81 11 cpse r24, r1 |
|
4cac: 06 c0 rjmp .+12 ; 0x4cba <_Z8startUDPhPhj+0x36> |
|
4cae: 82 81 ldd r24, Z+2 ; 0x02 |
|
4cb0: 81 11 cpse r24, r1 |
|
4cb2: 03 c0 rjmp .+6 ; 0x4cba <_Z8startUDPhPhj+0x36> |
|
4cb4: 83 81 ldd r24, Z+3 ; 0x03 |
|
4cb6: 88 23 and r24, r24 |
|
4cb8: f1 f0 breq .+60 ; 0x4cf6 <_Z8startUDPhPhj+0x72> |
|
4cba: c1 14 cp r12, r1 |
|
4cbc: d1 04 cpc r13, r1 |
|
4cbe: d9 f0 breq .+54 ; 0x4cf6 <_Z8startUDPhPhj+0x72> |
|
{ |
|
return 0; |
|
} |
|
else |
|
{ |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4cc0: 00 e0 ldi r16, 0x00 ; 0 |
|
4cc2: 21 e0 ldi r18, 0x01 ; 1 |
|
4cc4: 40 e0 ldi r20, 0x00 ; 0 |
|
4cc6: 59 e0 ldi r21, 0x09 ; 9 |
|
4cc8: 6d e3 ldi r22, 0x3D ; 61 |
|
4cca: 70 e0 ldi r23, 0x00 ; 0 |
|
4ccc: ce 01 movw r24, r28 |
|
4cce: 01 96 adiw r24, 0x01 ; 1 |
|
4cd0: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
4cd4: 89 81 ldd r24, Y+1 ; 0x01 |
|
4cd6: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4cd8: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
W5100.writeSnDIPR(s, addr); |
|
4cdc: b7 01 movw r22, r14 |
|
4cde: 81 2f mov r24, r17 |
|
4ce0: 0e 94 51 24 call 0x48a2 ; 0x48a2 <_ZN10W5100Class11writeSnDIPREhPh> |
|
W5100.writeSnDPORT(s, port); |
|
4ce4: b6 01 movw r22, r12 |
|
4ce6: 81 2f mov r24, r17 |
|
4ce8: 0e 94 8a 24 call 0x4914 ; 0x4914 <_ZN10W5100Class12writeSnDPORTEhj> |
|
SPI.endTransaction(); |
|
4cec: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
return 1; |
|
4cf0: 81 e0 ldi r24, 0x01 ; 1 |
|
4cf2: 90 e0 ldi r25, 0x00 ; 0 |
|
4cf4: 02 c0 rjmp .+4 ; 0x4cfa <_Z8startUDPhPhj+0x76> |
|
( |
|
((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && (addr[3] == 0x00)) || |
|
((port == 0x00)) |
|
) |
|
{ |
|
return 0; |
|
4cf6: 80 e0 ldi r24, 0x00 ; 0 |
|
4cf8: 90 e0 ldi r25, 0x00 ; 0 |
|
W5100.writeSnDIPR(s, addr); |
|
W5100.writeSnDPORT(s, port); |
|
SPI.endTransaction(); |
|
return 1; |
|
} |
|
} |
|
4cfa: 0f 90 pop r0 |
|
4cfc: 0f 90 pop r0 |
|
4cfe: df 91 pop r29 |
|
4d00: cf 91 pop r28 |
|
4d02: 1f 91 pop r17 |
|
4d04: 0f 91 pop r16 |
|
4d06: ff 90 pop r15 |
|
4d08: ef 90 pop r14 |
|
4d0a: df 90 pop r13 |
|
4d0c: cf 90 pop r12 |
|
4d0e: 08 95 ret |
|
|
|
00004d10 <_Z7sendUDPh>: |
|
|
|
int sendUDP(SOCKET s) |
|
{ |
|
4d10: 0f 93 push r16 |
|
4d12: 1f 93 push r17 |
|
4d14: cf 93 push r28 |
|
4d16: df 93 push r29 |
|
4d18: 00 d0 rcall .+0 ; 0x4d1a <_Z7sendUDPh+0xa> |
|
4d1a: cd b7 in r28, 0x3d ; 61 |
|
4d1c: de b7 in r29, 0x3e ; 62 |
|
4d1e: 18 2f mov r17, r24 |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4d20: 00 e0 ldi r16, 0x00 ; 0 |
|
4d22: 21 e0 ldi r18, 0x01 ; 1 |
|
4d24: 40 e0 ldi r20, 0x00 ; 0 |
|
4d26: 59 e0 ldi r21, 0x09 ; 9 |
|
4d28: 6d e3 ldi r22, 0x3D ; 61 |
|
4d2a: 70 e0 ldi r23, 0x00 ; 0 |
|
4d2c: ce 01 movw r24, r28 |
|
4d2e: 01 96 adiw r24, 0x01 ; 1 |
|
4d30: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
4d34: 89 81 ldd r24, Y+1 ; 0x01 |
|
4d36: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4d38: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
W5100.execCmdSn(s, Sock_SEND); |
|
4d3c: 40 e2 ldi r20, 0x20 ; 32 |
|
4d3e: 50 e0 ldi r21, 0x00 ; 0 |
|
4d40: 61 2f mov r22, r17 |
|
4d42: 8a e5 ldi r24, 0x5A ; 90 |
|
4d44: 93 e0 ldi r25, 0x03 ; 3 |
|
4d46: 0e 94 5d 29 call 0x52ba ; 0x52ba <_ZN10W5100Class9execCmdSnEh7SockCMD> |
|
|
|
/* +2008.01 bj */ |
|
while ( (W5100.readSnIR(s) & SnIR::SEND_OK) != SnIR::SEND_OK ) |
|
4d4a: 81 2f mov r24, r17 |
|
4d4c: 0e 94 64 24 call 0x48c8 ; 0x48c8 <_ZN10W5100Class8readSnIREh> |
|
4d50: 84 fd sbrc r24, 4 |
|
4d52: 21 c0 rjmp .+66 ; 0x4d96 <_Z7sendUDPh+0x86> |
|
{ |
|
if (W5100.readSnIR(s) & SnIR::TIMEOUT) |
|
4d54: 81 2f mov r24, r17 |
|
4d56: 0e 94 64 24 call 0x48c8 ; 0x48c8 <_ZN10W5100Class8readSnIREh> |
|
4d5a: 83 ff sbrs r24, 3 |
|
4d5c: 09 c0 rjmp .+18 ; 0x4d70 <_Z7sendUDPh+0x60> |
|
{ |
|
/* +2008.01 [bj]: clear interrupt */ |
|
W5100.writeSnIR(s, (SnIR::SEND_OK|SnIR::TIMEOUT)); |
|
4d5e: 68 e1 ldi r22, 0x18 ; 24 |
|
4d60: 81 2f mov r24, r17 |
|
4d62: 0e 94 85 24 call 0x490a ; 0x490a <_ZN10W5100Class9writeSnIREhh> |
|
SPI.endTransaction(); |
|
4d66: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
return 0; |
|
4d6a: 80 e0 ldi r24, 0x00 ; 0 |
|
4d6c: 90 e0 ldi r25, 0x00 ; 0 |
|
4d6e: 1b c0 rjmp .+54 ; 0x4da6 <_Z7sendUDPh+0x96> |
|
} |
|
SPI.endTransaction(); |
|
4d70: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
yield(); |
|
4d74: 0e 94 74 29 call 0x52e8 ; 0x52e8 <yield> |
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS); |
|
4d78: 00 e0 ldi r16, 0x00 ; 0 |
|
4d7a: 21 e0 ldi r18, 0x01 ; 1 |
|
4d7c: 40 e0 ldi r20, 0x00 ; 0 |
|
4d7e: 59 e0 ldi r21, 0x09 ; 9 |
|
4d80: 6d e3 ldi r22, 0x3D ; 61 |
|
4d82: 70 e0 ldi r23, 0x00 ; 0 |
|
4d84: ce 01 movw r24, r28 |
|
4d86: 01 96 adiw r24, 0x01 ; 1 |
|
4d88: 0e 94 1f 24 call 0x483e ; 0x483e <_ZN11SPISettingsC1Emhh> |
|
4d8c: 89 81 ldd r24, Y+1 ; 0x01 |
|
4d8e: 9a 81 ldd r25, Y+2 ; 0x02 |
|
4d90: 0e 94 80 20 call 0x4100 ; 0x4100 <_ZN8SPIClass16beginTransactionE11SPISettings> |
|
4d94: da cf rjmp .-76 ; 0x4d4a <_Z7sendUDPh+0x3a> |
|
} |
|
|
|
/* +2008.01 bj */ |
|
W5100.writeSnIR(s, SnIR::SEND_OK); |
|
4d96: 60 e1 ldi r22, 0x10 ; 16 |
|
4d98: 81 2f mov r24, r17 |
|
4d9a: 0e 94 85 24 call 0x490a ; 0x490a <_ZN10W5100Class9writeSnIREhh> |
|
SPI.endTransaction(); |
|
4d9e: 0e 94 9a 20 call 0x4134 ; 0x4134 <_ZN8SPIClass14endTransactionEv> |
|
|
|
/* Sent ok */ |
|
return 1; |
|
4da2: 81 e0 ldi r24, 0x01 ; 1 |
|
4da4: 90 e0 ldi r25, 0x00 ; 0 |
|
} |
|
4da6: 0f 90 pop r0 |
|
4da8: 0f 90 pop r0 |
|
4daa: df 91 pop r29 |
|
4dac: cf 91 pop r28 |
|
4dae: 1f 91 pop r17 |
|
4db0: 0f 91 pop r16 |
|
4db2: 08 95 ret |
|
|
|
00004db4 <_ZN8SPIClass8transferEh>: |
|
SPSR = settings.spsr; |
|
} |
|
|
|
// Write to the SPI bus (MOSI pin) and also receive (MISO pin) |
|
inline static uint8_t transfer(uint8_t data) { |
|
SPDR = data; |
|
4db4: 8e bd out 0x2e, r24 ; 46 |
|
* The following NOP introduces a small delay that can prevent the wait |
|
* loop form iterating when running at the maximum speed. This gives |
|
* about 10% more speed, even if it seems counter-intuitive. At lower |
|
* speeds it is unnoticed. |
|
*/ |
|
asm volatile("nop"); |
|
4db6: 00 00 nop |
|
while (!(SPSR & _BV(SPIF))) ; // wait |
|
4db8: 0d b4 in r0, 0x2d ; 45 |
|
4dba: 07 fe sbrs r0, 7 |
|
4dbc: fd cf rjmp .-6 ; 0x4db8 <_ZN8SPIClass8transferEh+0x4> |
|
return SPDR; |
|
4dbe: 8e b5 in r24, 0x2e ; 46 |
|
} |
|
4dc0: 08 95 ret |
|
|
|
00004dc2 <_ZN10W5100Class5setSSEv>: |
|
inline static void initSS() { DDRB |= _BV(0); }; |
|
inline static void setSS() { PORTB &= ~_BV(0); }; |
|
inline static void resetSS() { PORTB |= _BV(0); }; |
|
#else |
|
inline static void initSS() { DDRB |= _BV(2); }; |
|
inline static void setSS() { PORTB &= ~_BV(2); }; |
|
4dc2: 2a 98 cbi 0x05, 2 ; 5 |
|
4dc4: 08 95 ret |
|
|
|
00004dc6 <_ZN10W5100Class7resetSSEv>: |
|
inline static void resetSS() { PORTB |= _BV(2); }; |
|
4dc6: 2a 9a sbi 0x05, 2 ; 5 |
|
4dc8: 08 95 ret |
|
|
|
00004dca <_ZN10W5100Class5writeEjh>: |
|
read(src_ptr, (uint8_t *) dst, len); |
|
} |
|
|
|
|
|
uint8_t W5100Class::write(uint16_t _addr, uint8_t _data) |
|
{ |
|
4dca: 1f 93 push r17 |
|
4dcc: cf 93 push r28 |
|
4dce: df 93 push r29 |
|
4dd0: 00 d0 rcall .+0 ; 0x4dd2 <_ZN10W5100Class5writeEjh+0x8> |
|
4dd2: cd b7 in r28, 0x3d ; 61 |
|
4dd4: de b7 in r29, 0x3e ; 62 |
|
4dd6: 18 2f mov r17, r24 |
|
#if defined(ARDUINO_ARCH_AVR) |
|
setSS(); |
|
4dd8: 6a 83 std Y+2, r22 ; 0x02 |
|
4dda: 99 83 std Y+1, r25 ; 0x01 |
|
4ddc: 0e 94 e1 26 call 0x4dc2 ; 0x4dc2 <_ZN10W5100Class5setSSEv> |
|
SPI.transfer(0xF0); |
|
4de0: 80 ef ldi r24, 0xF0 ; 240 |
|
4de2: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_addr >> 8); |
|
4de6: 99 81 ldd r25, Y+1 ; 0x01 |
|
4de8: 89 2f mov r24, r25 |
|
4dea: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_addr & 0xFF); |
|
4dee: 81 2f mov r24, r17 |
|
4df0: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_data); |
|
4df4: 6a 81 ldd r22, Y+2 ; 0x02 |
|
4df6: 86 2f mov r24, r22 |
|
4df8: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
resetSS(); |
|
4dfc: 0e 94 e3 26 call 0x4dc6 ; 0x4dc6 <_ZN10W5100Class7resetSSEv> |
|
SPI.transfer(SPI_CS, _addr >> 8, SPI_CONTINUE); |
|
SPI.transfer(SPI_CS, _addr & 0xFF, SPI_CONTINUE); |
|
SPI.transfer(SPI_CS, _data); |
|
#endif |
|
return 1; |
|
} |
|
4e00: 81 e0 ldi r24, 0x01 ; 1 |
|
4e02: 0f 90 pop r0 |
|
4e04: 0f 90 pop r0 |
|
4e06: df 91 pop r29 |
|
4e08: cf 91 pop r28 |
|
4e0a: 1f 91 pop r17 |
|
4e0c: 08 95 ret |
|
|
|
00004e0e <_ZN10W5100Class4initEv>: |
|
|
|
#define TXBUF_BASE 0x4000 |
|
#define RXBUF_BASE 0x6000 |
|
|
|
void W5100Class::init(void) |
|
{ |
|
4e0e: cf 93 push r28 |
|
4e10: df 93 push r29 |
|
4e12: ec 01 movw r28, r24 |
|
delay(300); |
|
4e14: 6c e2 ldi r22, 0x2C ; 44 |
|
4e16: 71 e0 ldi r23, 0x01 ; 1 |
|
4e18: 80 e0 ldi r24, 0x00 ; 0 |
|
4e1a: 90 e0 ldi r25, 0x00 ; 0 |
|
4e1c: 0e 94 68 2a call 0x54d0 ; 0x54d0 <delay> |
|
|
|
#if defined(ARDUINO_ARCH_AVR) |
|
SPI.begin(); |
|
4e20: 0e 94 58 1d call 0x3ab0 ; 0x3ab0 <_ZN8SPIClass5beginEv> |
|
#elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB162__) |
|
inline static void initSS() { DDRB |= _BV(0); }; |
|
inline static void setSS() { PORTB &= ~_BV(0); }; |
|
inline static void resetSS() { PORTB |= _BV(0); }; |
|
#else |
|
inline static void initSS() { DDRB |= _BV(2); }; |
|
4e24: 22 9a sbi 0x04, 2 ; 4 |
|
|
|
// Before using SPI.transfer() or asserting chip select pins, |
|
// this function is used to gain exclusive access to the SPI bus |
|
// and configure the correct settings. |
|
inline static void beginTransaction(SPISettings settings) { |
|
if (interruptMode > 0) { |
|
4e26: 80 91 22 03 lds r24, 0x0322 |
|
4e2a: 88 23 and r24, r24 |
|
4e2c: 99 f0 breq .+38 ; 0x4e54 <_ZN10W5100Class4initEv+0x46> |
|
uint8_t sreg = SREG; |
|
4e2e: 9f b7 in r25, 0x3f ; 63 |
|
noInterrupts(); |
|
4e30: f8 94 cli |
|
|
|
#ifdef SPI_AVR_EIMSK |
|
if (interruptMode == 1) { |
|
4e32: 80 91 22 03 lds r24, 0x0322 |
|
4e36: 81 30 cpi r24, 0x01 ; 1 |
|
4e38: 59 f4 brne .+22 ; 0x4e50 <_ZN10W5100Class4initEv+0x42> |
|
interruptSave = SPI_AVR_EIMSK; |
|
4e3a: 8d b3 in r24, 0x1d ; 29 |
|
4e3c: 80 93 20 03 sts 0x0320, r24 |
|
SPI_AVR_EIMSK &= ~interruptMask; |
|
4e40: 2d b3 in r18, 0x1d ; 29 |
|
4e42: 80 91 21 03 lds r24, 0x0321 |
|
4e46: 80 95 com r24 |
|
4e48: 82 23 and r24, r18 |
|
4e4a: 8d bb out 0x1d, r24 ; 29 |
|
SREG = sreg; |
|
4e4c: 9f bf out 0x3f, r25 ; 63 |
|
4e4e: 02 c0 rjmp .+4 ; 0x4e54 <_ZN10W5100Class4initEv+0x46> |
|
} else |
|
#endif |
|
{ |
|
interruptSave = sreg; |
|
4e50: 90 93 20 03 sts 0x0320, r25 |
|
digitalWrite(SPI_TRANSACTION_MISMATCH_LED, HIGH); |
|
} |
|
inTransactionFlag = 1; |
|
#endif |
|
|
|
SPCR = settings.spcr; |
|
4e54: 80 e5 ldi r24, 0x50 ; 80 |
|
4e56: 8c bd out 0x2c, r24 ; 44 |
|
SPSR = settings.spsr; |
|
4e58: 1d bc out 0x2d, r1 ; 45 |
|
static uint16_t read##name(uint8_t *_buff) { \ |
|
return read(address, _buff, size); \ |
|
} |
|
|
|
public: |
|
__GP_REGISTER8 (MR, 0x0000); // Mode |
|
4e5a: 60 e8 ldi r22, 0x80 ; 128 |
|
4e5c: 80 e0 ldi r24, 0x00 ; 0 |
|
4e5e: 90 e0 ldi r25, 0x00 ; 0 |
|
4e60: 0e 94 e5 26 call 0x4dca ; 0x4dca <_ZN10W5100Class5writeEjh> |
|
__GP_REGISTER8 (IR, 0x0015); // Interrupt |
|
__GP_REGISTER8 (IMR, 0x0016); // Interrupt Mask |
|
__GP_REGISTER16(RTR, 0x0017); // Timeout address |
|
__GP_REGISTER8 (RCR, 0x0019); // Retry count |
|
__GP_REGISTER8 (RMSR, 0x001A); // Receive memory size |
|
__GP_REGISTER8 (TMSR, 0x001B); // Transmit memory size |
|
4e64: 65 e5 ldi r22, 0x55 ; 85 |
|
4e66: 8b e1 ldi r24, 0x1B ; 27 |
|
4e68: 90 e0 ldi r25, 0x00 ; 0 |
|
4e6a: 0e 94 e5 26 call 0x4dca ; 0x4dca <_ZN10W5100Class5writeEjh> |
|
__GP_REGISTER_N(SIPR, 0x000F, 4); // Source IP address |
|
__GP_REGISTER8 (IR, 0x0015); // Interrupt |
|
__GP_REGISTER8 (IMR, 0x0016); // Interrupt Mask |
|
__GP_REGISTER16(RTR, 0x0017); // Timeout address |
|
__GP_REGISTER8 (RCR, 0x0019); // Retry count |
|
__GP_REGISTER8 (RMSR, 0x001A); // Receive memory size |
|
4e6e: 65 e5 ldi r22, 0x55 ; 85 |
|
4e70: 8a e1 ldi r24, 0x1A ; 26 |
|
4e72: 90 e0 ldi r25, 0x00 ; 0 |
|
4e74: 0e 94 e5 26 call 0x4dca ; 0x4dca <_ZN10W5100Class5writeEjh> |
|
digitalWrite(SPI_TRANSACTION_MISMATCH_LED, HIGH); |
|
} |
|
inTransactionFlag = 0; |
|
#endif |
|
|
|
if (interruptMode > 0) { |
|
4e78: 80 91 22 03 lds r24, 0x0322 |
|
4e7c: 88 23 and r24, r24 |
|
4e7e: 61 f0 breq .+24 ; 0x4e98 <_ZN10W5100Class4initEv+0x8a> |
|
#ifdef SPI_AVR_EIMSK |
|
uint8_t sreg = SREG; |
|
4e80: 9f b7 in r25, 0x3f ; 63 |
|
#endif |
|
noInterrupts(); |
|
4e82: f8 94 cli |
|
#ifdef SPI_AVR_EIMSK |
|
if (interruptMode == 1) { |
|
4e84: 20 91 22 03 lds r18, 0x0322 |
|
4e88: 80 91 20 03 lds r24, 0x0320 |
|
4e8c: 21 30 cpi r18, 0x01 ; 1 |
|
4e8e: 19 f4 brne .+6 ; 0x4e96 <_ZN10W5100Class4initEv+0x88> |
|
SPI_AVR_EIMSK = interruptSave; |
|
4e90: 8d bb out 0x1d, r24 ; 29 |
|
SREG = sreg; |
|
4e92: 9f bf out 0x3f, r25 ; 63 |
|
4e94: 01 c0 rjmp .+2 ; 0x4e98 <_ZN10W5100Class4initEv+0x8a> |
|
} else |
|
#endif |
|
{ |
|
SREG = interruptSave; |
|
4e96: 8f bf out 0x3f, r24 ; 63 |
|
writeTMSR(0x55); |
|
writeRMSR(0x55); |
|
SPI.endTransaction(); |
|
|
|
for (int i=0; i<MAX_SOCK_NUM; i++) { |
|
SBASE[i] = TXBUF_BASE + SSIZE * i; |
|
4e98: 80 e0 ldi r24, 0x00 ; 0 |
|
4e9a: 90 e4 ldi r25, 0x40 ; 64 |
|
4e9c: 99 83 std Y+1, r25 ; 0x01 |
|
4e9e: 88 83 st Y, r24 |
|
RBASE[i] = RXBUF_BASE + RSIZE * i; |
|
4ea0: 80 e0 ldi r24, 0x00 ; 0 |
|
4ea2: 90 e6 ldi r25, 0x60 ; 96 |
|
4ea4: 99 87 std Y+9, r25 ; 0x09 |
|
4ea6: 88 87 std Y+8, r24 ; 0x08 |
|
writeTMSR(0x55); |
|
writeRMSR(0x55); |
|
SPI.endTransaction(); |
|
|
|
for (int i=0; i<MAX_SOCK_NUM; i++) { |
|
SBASE[i] = TXBUF_BASE + SSIZE * i; |
|
4ea8: 80 e0 ldi r24, 0x00 ; 0 |
|
4eaa: 98 e4 ldi r25, 0x48 ; 72 |
|
4eac: 9b 83 std Y+3, r25 ; 0x03 |
|
4eae: 8a 83 std Y+2, r24 ; 0x02 |
|
RBASE[i] = RXBUF_BASE + RSIZE * i; |
|
4eb0: 80 e0 ldi r24, 0x00 ; 0 |
|
4eb2: 98 e6 ldi r25, 0x68 ; 104 |
|
4eb4: 9b 87 std Y+11, r25 ; 0x0b |
|
4eb6: 8a 87 std Y+10, r24 ; 0x0a |
|
writeTMSR(0x55); |
|
writeRMSR(0x55); |
|
SPI.endTransaction(); |
|
|
|
for (int i=0; i<MAX_SOCK_NUM; i++) { |
|
SBASE[i] = TXBUF_BASE + SSIZE * i; |
|
4eb8: 80 e0 ldi r24, 0x00 ; 0 |
|
4eba: 90 e5 ldi r25, 0x50 ; 80 |
|
4ebc: 9d 83 std Y+5, r25 ; 0x05 |
|
4ebe: 8c 83 std Y+4, r24 ; 0x04 |
|
RBASE[i] = RXBUF_BASE + RSIZE * i; |
|
4ec0: 80 e0 ldi r24, 0x00 ; 0 |
|
4ec2: 90 e7 ldi r25, 0x70 ; 112 |
|
4ec4: 9d 87 std Y+13, r25 ; 0x0d |
|
4ec6: 8c 87 std Y+12, r24 ; 0x0c |
|
writeTMSR(0x55); |
|
writeRMSR(0x55); |
|
SPI.endTransaction(); |
|
|
|
for (int i=0; i<MAX_SOCK_NUM; i++) { |
|
SBASE[i] = TXBUF_BASE + SSIZE * i; |
|
4ec8: 80 e0 ldi r24, 0x00 ; 0 |
|
4eca: 98 e5 ldi r25, 0x58 ; 88 |
|
4ecc: 9f 83 std Y+7, r25 ; 0x07 |
|
4ece: 8e 83 std Y+6, r24 ; 0x06 |
|
RBASE[i] = RXBUF_BASE + RSIZE * i; |
|
4ed0: 80 e0 ldi r24, 0x00 ; 0 |
|
4ed2: 98 e7 ldi r25, 0x78 ; 120 |
|
4ed4: 9f 87 std Y+15, r25 ; 0x0f |
|
4ed6: 8e 87 std Y+14, r24 ; 0x0e |
|
} |
|
} |
|
4ed8: df 91 pop r29 |
|
4eda: cf 91 pop r28 |
|
4edc: 08 95 ret |
|
|
|
00004ede <_ZN10W5100Class5writeEjPKhj>: |
|
#endif |
|
return 1; |
|
} |
|
|
|
uint16_t W5100Class::write(uint16_t _addr, const uint8_t *_buf, uint16_t _len) |
|
{ |
|
4ede: cf 92 push r12 |
|
4ee0: df 92 push r13 |
|
4ee2: ef 92 push r14 |
|
4ee4: ff 92 push r15 |
|
4ee6: 0f 93 push r16 |
|
4ee8: 1f 93 push r17 |
|
4eea: cf 93 push r28 |
|
4eec: df 93 push r29 |
|
4eee: ec 01 movw r28, r24 |
|
4ef0: 7a 01 movw r14, r20 |
|
4ef2: 8b 01 movw r16, r22 |
|
4ef4: 6c 01 movw r12, r24 |
|
4ef6: c4 0e add r12, r20 |
|
4ef8: d5 1e adc r13, r21 |
|
for (uint16_t i=0; i<_len; i++) |
|
4efa: cc 15 cp r28, r12 |
|
4efc: dd 05 cpc r29, r13 |
|
4efe: a1 f0 breq .+40 ; 0x4f28 <_ZN10W5100Class5writeEjPKhj+0x4a> |
|
{ |
|
#if defined(ARDUINO_ARCH_AVR) |
|
setSS(); |
|
4f00: 0e 94 e1 26 call 0x4dc2 ; 0x4dc2 <_ZN10W5100Class5setSSEv> |
|
SPI.transfer(0xF0); |
|
4f04: 80 ef ldi r24, 0xF0 ; 240 |
|
4f06: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_addr >> 8); |
|
4f0a: 8d 2f mov r24, r29 |
|
4f0c: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_addr & 0xFF); |
|
4f10: 8c 2f mov r24, r28 |
|
4f12: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
_addr++; |
|
4f16: 21 96 adiw r28, 0x01 ; 1 |
|
SPI.transfer(_buf[i]); |
|
4f18: f8 01 movw r30, r16 |
|
4f1a: 81 91 ld r24, Z+ |
|
4f1c: 8f 01 movw r16, r30 |
|
4f1e: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
resetSS(); |
|
4f22: 0e 94 e3 26 call 0x4dc6 ; 0x4dc6 <_ZN10W5100Class7resetSSEv> |
|
4f26: e9 cf rjmp .-46 ; 0x4efa <_ZN10W5100Class5writeEjPKhj+0x1c> |
|
SPI.transfer(SPI_CS, _buf[i]); |
|
_addr++; |
|
#endif |
|
} |
|
return _len; |
|
} |
|
4f28: c7 01 movw r24, r14 |
|
4f2a: df 91 pop r29 |
|
4f2c: cf 91 pop r28 |
|
4f2e: 1f 91 pop r17 |
|
4f30: 0f 91 pop r16 |
|
4f32: ff 90 pop r15 |
|
4f34: ef 90 pop r14 |
|
4f36: df 90 pop r13 |
|
4f38: cf 90 pop r12 |
|
4f3a: 08 95 ret |
|
|
|
00004f3c <_ZN10W5100Class4readEj>: |
|
|
|
uint8_t W5100Class::read(uint16_t _addr) |
|
{ |
|
4f3c: 1f 93 push r17 |
|
4f3e: cf 93 push r28 |
|
4f40: df 93 push r29 |
|
4f42: 1f 92 push r1 |
|
4f44: cd b7 in r28, 0x3d ; 61 |
|
4f46: de b7 in r29, 0x3e ; 62 |
|
4f48: 18 2f mov r17, r24 |
|
#if defined(ARDUINO_ARCH_AVR) |
|
setSS(); |
|
4f4a: 99 83 std Y+1, r25 ; 0x01 |
|
4f4c: 0e 94 e1 26 call 0x4dc2 ; 0x4dc2 <_ZN10W5100Class5setSSEv> |
|
SPI.transfer(0x0F); |
|
4f50: 8f e0 ldi r24, 0x0F ; 15 |
|
4f52: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_addr >> 8); |
|
4f56: 99 81 ldd r25, Y+1 ; 0x01 |
|
4f58: 89 2f mov r24, r25 |
|
4f5a: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_addr & 0xFF); |
|
4f5e: 81 2f mov r24, r17 |
|
4f60: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
uint8_t _data = SPI.transfer(0); |
|
4f64: 80 e0 ldi r24, 0x00 ; 0 |
|
4f66: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
resetSS(); |
|
4f6a: 89 83 std Y+1, r24 ; 0x01 |
|
4f6c: 0e 94 e3 26 call 0x4dc6 ; 0x4dc6 <_ZN10W5100Class7resetSSEv> |
|
SPI.transfer(SPI_CS, _addr >> 8, SPI_CONTINUE); |
|
SPI.transfer(SPI_CS, _addr & 0xFF, SPI_CONTINUE); |
|
uint8_t _data = SPI.transfer(SPI_CS, 0); |
|
#endif |
|
return _data; |
|
} |
|
4f70: 89 81 ldd r24, Y+1 ; 0x01 |
|
4f72: 0f 90 pop r0 |
|
4f74: df 91 pop r29 |
|
4f76: cf 91 pop r28 |
|
4f78: 1f 91 pop r17 |
|
4f7a: 08 95 ret |
|
|
|
00004f7c <_ZN10W5100Class12readSnTX_FSREh>: |
|
__SOCKET_REGISTER16(SnDPORT, 0x0010) // Destination Port |
|
__SOCKET_REGISTER16(SnMSSR, 0x0012) // Max Segment Size |
|
__SOCKET_REGISTER8(SnPROTO, 0x0014) // Protocol in IP RAW Mode |
|
__SOCKET_REGISTER8(SnTOS, 0x0015) // IP TOS |
|
__SOCKET_REGISTER8(SnTTL, 0x0016) // IP TTL |
|
__SOCKET_REGISTER16(SnTX_FSR, 0x0020) // TX Free Size |
|
4f7c: 1f 93 push r17 |
|
4f7e: cf 93 push r28 |
|
4f80: df 93 push r29 |
|
4f82: 18 2f mov r17, r24 |
|
4f84: 60 e2 ldi r22, 0x20 ; 32 |
|
4f86: 70 e0 ldi r23, 0x00 ; 0 |
|
4f88: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
4f8c: c8 2f mov r28, r24 |
|
4f8e: d0 e0 ldi r29, 0x00 ; 0 |
|
4f90: 61 e2 ldi r22, 0x21 ; 33 |
|
4f92: 70 e0 ldi r23, 0x00 ; 0 |
|
4f94: 81 2f mov r24, r17 |
|
4f96: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
4f9a: dc 2f mov r29, r28 |
|
4f9c: cc 27 eor r28, r28 |
|
4f9e: 9e 01 movw r18, r28 |
|
4fa0: 28 2b or r18, r24 |
|
4fa2: c9 01 movw r24, r18 |
|
4fa4: df 91 pop r29 |
|
4fa6: cf 91 pop r28 |
|
4fa8: 1f 91 pop r17 |
|
4faa: 08 95 ret |
|
|
|
00004fac <_ZN10W5100Class13getTXFreeSizeEh>: |
|
RBASE[i] = RXBUF_BASE + RSIZE * i; |
|
} |
|
} |
|
|
|
uint16_t W5100Class::getTXFreeSize(SOCKET s) |
|
{ |
|
4fac: ff 92 push r15 |
|
4fae: 0f 93 push r16 |
|
4fb0: 1f 93 push r17 |
|
4fb2: cf 93 push r28 |
|
4fb4: df 93 push r29 |
|
4fb6: f6 2e mov r15, r22 |
|
uint16_t val=0, val1=0; |
|
4fb8: c0 e0 ldi r28, 0x00 ; 0 |
|
4fba: d0 e0 ldi r29, 0x00 ; 0 |
|
do { |
|
val1 = readSnTX_FSR(s); |
|
4fbc: 8f 2d mov r24, r15 |
|
4fbe: 0e 94 be 27 call 0x4f7c ; 0x4f7c <_ZN10W5100Class12readSnTX_FSREh> |
|
4fc2: 8c 01 movw r16, r24 |
|
if (val1 != 0) |
|
4fc4: 00 97 sbiw r24, 0x00 ; 0 |
|
4fc6: 21 f0 breq .+8 ; 0x4fd0 <_ZN10W5100Class13getTXFreeSizeEh+0x24> |
|
val = readSnTX_FSR(s); |
|
4fc8: 8f 2d mov r24, r15 |
|
4fca: 0e 94 be 27 call 0x4f7c ; 0x4f7c <_ZN10W5100Class12readSnTX_FSREh> |
|
4fce: ec 01 movw r28, r24 |
|
} |
|
|
|
uint16_t W5100Class::getTXFreeSize(SOCKET s) |
|
{ |
|
uint16_t val=0, val1=0; |
|
do { |
|
4fd0: c0 17 cp r28, r16 |
|
4fd2: d1 07 cpc r29, r17 |
|
4fd4: 99 f7 brne .-26 ; 0x4fbc <_ZN10W5100Class13getTXFreeSizeEh+0x10> |
|
if (val1 != 0) |
|
val = readSnTX_FSR(s); |
|
} |
|
while (val != val1); |
|
return val; |
|
} |
|
4fd6: ce 01 movw r24, r28 |
|
4fd8: df 91 pop r29 |
|
4fda: cf 91 pop r28 |
|
4fdc: 1f 91 pop r17 |
|
4fde: 0f 91 pop r16 |
|
4fe0: ff 90 pop r15 |
|
4fe2: 08 95 ret |
|
|
|
00004fe4 <_ZN10W5100Class12readSnRX_RSREh>: |
|
__SOCKET_REGISTER16(SnTX_RD, 0x0022) // TX Read Pointer |
|
__SOCKET_REGISTER16(SnTX_WR, 0x0024) // TX Write Pointer |
|
__SOCKET_REGISTER16(SnRX_RSR, 0x0026) // RX Free Size |
|
4fe4: 1f 93 push r17 |
|
4fe6: cf 93 push r28 |
|
4fe8: df 93 push r29 |
|
4fea: 18 2f mov r17, r24 |
|
4fec: 66 e2 ldi r22, 0x26 ; 38 |
|
4fee: 70 e0 ldi r23, 0x00 ; 0 |
|
4ff0: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
4ff4: c8 2f mov r28, r24 |
|
4ff6: d0 e0 ldi r29, 0x00 ; 0 |
|
4ff8: 67 e2 ldi r22, 0x27 ; 39 |
|
4ffa: 70 e0 ldi r23, 0x00 ; 0 |
|
4ffc: 81 2f mov r24, r17 |
|
4ffe: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
5002: dc 2f mov r29, r28 |
|
5004: cc 27 eor r28, r28 |
|
5006: 9e 01 movw r18, r28 |
|
5008: 28 2b or r18, r24 |
|
500a: c9 01 movw r24, r18 |
|
500c: df 91 pop r29 |
|
500e: cf 91 pop r28 |
|
5010: 1f 91 pop r17 |
|
5012: 08 95 ret |
|
|
|
00005014 <_ZN10W5100Class17getRXReceivedSizeEh>: |
|
|
|
uint16_t W5100Class::getRXReceivedSize(SOCKET s) |
|
{ |
|
5014: ff 92 push r15 |
|
5016: 0f 93 push r16 |
|
5018: 1f 93 push r17 |
|
501a: cf 93 push r28 |
|
501c: df 93 push r29 |
|
501e: f6 2e mov r15, r22 |
|
uint16_t val=0,val1=0; |
|
5020: c0 e0 ldi r28, 0x00 ; 0 |
|
5022: d0 e0 ldi r29, 0x00 ; 0 |
|
do { |
|
val1 = readSnRX_RSR(s); |
|
5024: 8f 2d mov r24, r15 |
|
5026: 0e 94 f2 27 call 0x4fe4 ; 0x4fe4 <_ZN10W5100Class12readSnRX_RSREh> |
|
502a: 8c 01 movw r16, r24 |
|
if (val1 != 0) |
|
502c: 00 97 sbiw r24, 0x00 ; 0 |
|
502e: 21 f0 breq .+8 ; 0x5038 <_ZN10W5100Class17getRXReceivedSizeEh+0x24> |
|
val = readSnRX_RSR(s); |
|
5030: 8f 2d mov r24, r15 |
|
5032: 0e 94 f2 27 call 0x4fe4 ; 0x4fe4 <_ZN10W5100Class12readSnRX_RSREh> |
|
5036: ec 01 movw r28, r24 |
|
} |
|
|
|
uint16_t W5100Class::getRXReceivedSize(SOCKET s) |
|
{ |
|
uint16_t val=0,val1=0; |
|
do { |
|
5038: c0 17 cp r28, r16 |
|
503a: d1 07 cpc r29, r17 |
|
503c: 99 f7 brne .-26 ; 0x5024 <_ZN10W5100Class17getRXReceivedSizeEh+0x10> |
|
if (val1 != 0) |
|
val = readSnRX_RSR(s); |
|
} |
|
while (val != val1); |
|
return val; |
|
} |
|
503e: ce 01 movw r24, r28 |
|
5040: df 91 pop r29 |
|
5042: cf 91 pop r28 |
|
5044: 1f 91 pop r17 |
|
5046: 0f 91 pop r16 |
|
5048: ff 90 pop r15 |
|
504a: 08 95 ret |
|
|
|
0000504c <_ZN10W5100Class27send_data_processing_offsetEhjPKhj>: |
|
// This is same as having no offset in a call to send_data_processing_offset |
|
send_data_processing_offset(s, 0, data, len); |
|
} |
|
|
|
void W5100Class::send_data_processing_offset(SOCKET s, uint16_t data_offset, const uint8_t *data, uint16_t len) |
|
{ |
|
504c: 6f 92 push r6 |
|
504e: 7f 92 push r7 |
|
5050: 9f 92 push r9 |
|
5052: af 92 push r10 |
|
5054: bf 92 push r11 |
|
5056: cf 92 push r12 |
|
5058: df 92 push r13 |
|
505a: ef 92 push r14 |
|
505c: ff 92 push r15 |
|
505e: 0f 93 push r16 |
|
5060: 1f 93 push r17 |
|
5062: cf 93 push r28 |
|
5064: df 93 push r29 |
|
5066: 1f 92 push r1 |
|
5068: cd b7 in r28, 0x3d ; 61 |
|
506a: de b7 in r29, 0x3e ; 62 |
|
506c: d8 2e mov r13, r24 |
|
506e: 96 2e mov r9, r22 |
|
5070: 3a 01 movw r6, r20 |
|
5072: 59 01 movw r10, r18 |
|
__SOCKET_REGISTER8(SnPROTO, 0x0014) // Protocol in IP RAW Mode |
|
__SOCKET_REGISTER8(SnTOS, 0x0015) // IP TOS |
|
__SOCKET_REGISTER8(SnTTL, 0x0016) // IP TTL |
|
__SOCKET_REGISTER16(SnTX_FSR, 0x0020) // TX Free Size |
|
__SOCKET_REGISTER16(SnTX_RD, 0x0022) // TX Read Pointer |
|
__SOCKET_REGISTER16(SnTX_WR, 0x0024) // TX Write Pointer |
|
5074: 64 e2 ldi r22, 0x24 ; 36 |
|
5076: 70 e0 ldi r23, 0x00 ; 0 |
|
5078: 89 2d mov r24, r9 |
|
507a: 99 83 std Y+1, r25 ; 0x01 |
|
507c: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
5080: e8 2e mov r14, r24 |
|
5082: f1 2c mov r15, r1 |
|
5084: 65 e2 ldi r22, 0x25 ; 37 |
|
5086: 70 e0 ldi r23, 0x00 ; 0 |
|
5088: 89 2d mov r24, r9 |
|
508a: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
508e: fe 2c mov r15, r14 |
|
5090: ee 24 eor r14, r14 |
|
5092: e8 2a or r14, r24 |
|
uint16_t ptr = readSnTX_WR(s); |
|
ptr += data_offset; |
|
5094: e6 0c add r14, r6 |
|
5096: f7 1c adc r15, r7 |
|
uint16_t offset = ptr & SMASK; |
|
5098: 97 01 movw r18, r14 |
|
509a: 37 70 andi r19, 0x07 ; 7 |
|
509c: 6d 2c mov r6, r13 |
|
509e: 99 81 ldd r25, Y+1 ; 0x01 |
|
50a0: 79 2e mov r7, r25 |
|
50a2: 69 0c add r6, r9 |
|
50a4: 71 1c adc r7, r1 |
|
50a6: 69 0c add r6, r9 |
|
50a8: 71 1c adc r7, r1 |
|
uint16_t dstAddr = offset + SBASE[s]; |
|
50aa: d3 01 movw r26, r6 |
|
50ac: ed 91 ld r30, X+ |
|
50ae: fc 91 ld r31, X |
|
50b0: e2 0f add r30, r18 |
|
50b2: f3 1f adc r31, r19 |
|
|
|
if (offset + len > SSIZE) |
|
50b4: c9 01 movw r24, r18 |
|
50b6: 80 0f add r24, r16 |
|
50b8: 91 1f adc r25, r17 |
|
50ba: 81 30 cpi r24, 0x01 ; 1 |
|
50bc: 98 40 sbci r25, 0x08 ; 8 |
|
50be: a0 f0 brcs .+40 ; 0x50e8 <_ZN10W5100Class27send_data_processing_offsetEhjPKhj+0x9c> |
|
{ |
|
// Wrap around circular buffer |
|
uint16_t size = SSIZE - offset; |
|
50c0: c1 2c mov r12, r1 |
|
50c2: 48 e0 ldi r20, 0x08 ; 8 |
|
50c4: d4 2e mov r13, r20 |
|
50c6: c2 1a sub r12, r18 |
|
50c8: d3 0a sbc r13, r19 |
|
write(dstAddr, data, size); |
|
50ca: a6 01 movw r20, r12 |
|
50cc: b5 01 movw r22, r10 |
|
50ce: cf 01 movw r24, r30 |
|
50d0: 0e 94 6f 27 call 0x4ede ; 0x4ede <_ZN10W5100Class5writeEjPKhj> |
|
write(SBASE[s], data + size, len - size); |
|
50d4: a8 01 movw r20, r16 |
|
50d6: 4c 19 sub r20, r12 |
|
50d8: 5d 09 sbc r21, r13 |
|
50da: b5 01 movw r22, r10 |
|
50dc: 6c 0d add r22, r12 |
|
50de: 7d 1d adc r23, r13 |
|
50e0: f3 01 movw r30, r6 |
|
50e2: 80 81 ld r24, Z |
|
50e4: 91 81 ldd r25, Z+1 ; 0x01 |
|
50e6: 03 c0 rjmp .+6 ; 0x50ee <_ZN10W5100Class27send_data_processing_offsetEhjPKhj+0xa2> |
|
} |
|
else { |
|
write(dstAddr, data, len); |
|
50e8: a8 01 movw r20, r16 |
|
50ea: b5 01 movw r22, r10 |
|
50ec: cf 01 movw r24, r30 |
|
50ee: 0e 94 6f 27 call 0x4ede ; 0x4ede <_ZN10W5100Class5writeEjPKhj> |
|
} |
|
|
|
ptr += len; |
|
50f2: e0 0e add r14, r16 |
|
50f4: f1 1e adc r15, r17 |
|
50f6: 4f 2d mov r20, r15 |
|
50f8: 64 e2 ldi r22, 0x24 ; 36 |
|
50fa: 70 e0 ldi r23, 0x00 ; 0 |
|
50fc: 89 2d mov r24, r9 |
|
50fe: 0e 94 68 24 call 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
5102: 4e 2d mov r20, r14 |
|
5104: 65 e2 ldi r22, 0x25 ; 37 |
|
5106: 70 e0 ldi r23, 0x00 ; 0 |
|
5108: 89 2d mov r24, r9 |
|
writeSnTX_WR(s, ptr); |
|
} |
|
510a: 0f 90 pop r0 |
|
510c: df 91 pop r29 |
|
510e: cf 91 pop r28 |
|
5110: 1f 91 pop r17 |
|
5112: 0f 91 pop r16 |
|
5114: ff 90 pop r15 |
|
5116: ef 90 pop r14 |
|
5118: df 90 pop r13 |
|
511a: cf 90 pop r12 |
|
511c: bf 90 pop r11 |
|
511e: af 90 pop r10 |
|
5120: 9f 90 pop r9 |
|
5122: 7f 90 pop r7 |
|
5124: 6f 90 pop r6 |
|
5126: 0c 94 68 24 jmp 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
|
|
0000512a <_ZN10W5100Class4readEjPhj>: |
|
#endif |
|
return _data; |
|
} |
|
|
|
uint16_t W5100Class::read(uint16_t _addr, uint8_t *_buf, uint16_t _len) |
|
{ |
|
512a: cf 92 push r12 |
|
512c: df 92 push r13 |
|
512e: ef 92 push r14 |
|
5130: ff 92 push r15 |
|
5132: 0f 93 push r16 |
|
5134: 1f 93 push r17 |
|
5136: cf 93 push r28 |
|
5138: df 93 push r29 |
|
513a: ec 01 movw r28, r24 |
|
513c: 7a 01 movw r14, r20 |
|
513e: 8b 01 movw r16, r22 |
|
5140: 6c 01 movw r12, r24 |
|
5142: c4 0e add r12, r20 |
|
5144: d5 1e adc r13, r21 |
|
for (uint16_t i=0; i<_len; i++) |
|
5146: cc 15 cp r28, r12 |
|
5148: dd 05 cpc r29, r13 |
|
514a: a9 f0 breq .+42 ; 0x5176 <_ZN10W5100Class4readEjPhj+0x4c> |
|
{ |
|
#if defined(ARDUINO_ARCH_AVR) |
|
setSS(); |
|
514c: 0e 94 e1 26 call 0x4dc2 ; 0x4dc2 <_ZN10W5100Class5setSSEv> |
|
SPI.transfer(0x0F); |
|
5150: 8f e0 ldi r24, 0x0F ; 15 |
|
5152: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_addr >> 8); |
|
5156: 8d 2f mov r24, r29 |
|
5158: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
SPI.transfer(_addr & 0xFF); |
|
515c: 8c 2f mov r24, r28 |
|
515e: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
_addr++; |
|
5162: 21 96 adiw r28, 0x01 ; 1 |
|
_buf[i] = SPI.transfer(0); |
|
5164: 80 e0 ldi r24, 0x00 ; 0 |
|
5166: 0e 94 da 26 call 0x4db4 ; 0x4db4 <_ZN8SPIClass8transferEh> |
|
516a: f8 01 movw r30, r16 |
|
516c: 81 93 st Z+, r24 |
|
516e: 8f 01 movw r16, r30 |
|
resetSS(); |
|
5170: 0e 94 e3 26 call 0x4dc6 ; 0x4dc6 <_ZN10W5100Class7resetSSEv> |
|
5174: e8 cf rjmp .-48 ; 0x5146 <_ZN10W5100Class4readEjPhj+0x1c> |
|
_buf[i] = SPI.transfer(SPI_CS, 0); |
|
_addr++; |
|
#endif |
|
} |
|
return _len; |
|
} |
|
5176: c7 01 movw r24, r14 |
|
5178: df 91 pop r29 |
|
517a: cf 91 pop r28 |
|
517c: 1f 91 pop r17 |
|
517e: 0f 91 pop r16 |
|
5180: ff 90 pop r15 |
|
5182: ef 90 pop r14 |
|
5184: df 90 pop r13 |
|
5186: cf 90 pop r12 |
|
5188: 08 95 ret |
|
|
|
0000518a <_ZN10W5100Class9read_dataEhjPVhj>: |
|
writeSnRX_RD(s, ptr); |
|
} |
|
} |
|
|
|
void W5100Class::read_data(SOCKET s, volatile uint16_t src, volatile uint8_t *dst, uint16_t len) |
|
{ |
|
518a: af 92 push r10 |
|
518c: bf 92 push r11 |
|
518e: cf 92 push r12 |
|
5190: df 92 push r13 |
|
5192: ef 92 push r14 |
|
5194: ff 92 push r15 |
|
5196: 0f 93 push r16 |
|
5198: 1f 93 push r17 |
|
519a: cf 93 push r28 |
|
519c: df 93 push r29 |
|
519e: 00 d0 rcall .+0 ; 0x51a0 <_ZN10W5100Class9read_dataEhjPVhj+0x16> |
|
51a0: cd b7 in r28, 0x3d ; 61 |
|
51a2: de b7 in r29, 0x3e ; 62 |
|
51a4: 5a 83 std Y+2, r21 ; 0x02 |
|
51a6: 49 83 std Y+1, r20 ; 0x01 |
|
51a8: 59 01 movw r10, r18 |
|
uint16_t size; |
|
uint16_t src_mask; |
|
uint16_t src_ptr; |
|
|
|
src_mask = src & RMASK; |
|
51aa: e9 81 ldd r30, Y+1 ; 0x01 |
|
51ac: fa 81 ldd r31, Y+2 ; 0x02 |
|
51ae: f7 70 andi r31, 0x07 ; 7 |
|
51b0: 7c 01 movw r14, r24 |
|
51b2: e6 0e add r14, r22 |
|
51b4: f1 1c adc r15, r1 |
|
51b6: e6 0e add r14, r22 |
|
51b8: f1 1c adc r15, r1 |
|
src_ptr = RBASE[s] + src_mask; |
|
51ba: d7 01 movw r26, r14 |
|
51bc: 18 96 adiw r26, 0x08 ; 8 |
|
51be: 8d 91 ld r24, X+ |
|
51c0: 9c 91 ld r25, X |
|
51c2: 19 97 sbiw r26, 0x09 ; 9 |
|
51c4: 8e 0f add r24, r30 |
|
51c6: 9f 1f adc r25, r31 |
|
|
|
if( (src_mask + len) > RSIZE ) |
|
51c8: 98 01 movw r18, r16 |
|
51ca: 2e 0f add r18, r30 |
|
51cc: 3f 1f adc r19, r31 |
|
51ce: 21 30 cpi r18, 0x01 ; 1 |
|
51d0: 38 40 sbci r19, 0x08 ; 8 |
|
51d2: 98 f0 brcs .+38 ; 0x51fa <_ZN10W5100Class9read_dataEhjPVhj+0x70> |
|
{ |
|
size = RSIZE - src_mask; |
|
51d4: c1 2c mov r12, r1 |
|
51d6: 68 e0 ldi r22, 0x08 ; 8 |
|
51d8: d6 2e mov r13, r22 |
|
51da: ce 1a sub r12, r30 |
|
51dc: df 0a sbc r13, r31 |
|
read(src_ptr, (uint8_t *)dst, size); |
|
51de: a6 01 movw r20, r12 |
|
51e0: b5 01 movw r22, r10 |
|
51e2: 0e 94 95 28 call 0x512a ; 0x512a <_ZN10W5100Class4readEjPhj> |
|
dst += size; |
|
read(RBASE[s], (uint8_t *) dst, len - size); |
|
51e6: a8 01 movw r20, r16 |
|
51e8: 4c 19 sub r20, r12 |
|
51ea: 5d 09 sbc r21, r13 |
|
|
|
if( (src_mask + len) > RSIZE ) |
|
{ |
|
size = RSIZE - src_mask; |
|
read(src_ptr, (uint8_t *)dst, size); |
|
dst += size; |
|
51ec: b5 01 movw r22, r10 |
|
51ee: 6c 0d add r22, r12 |
|
51f0: 7d 1d adc r23, r13 |
|
read(RBASE[s], (uint8_t *) dst, len - size); |
|
51f2: f7 01 movw r30, r14 |
|
51f4: 80 85 ldd r24, Z+8 ; 0x08 |
|
51f6: 91 85 ldd r25, Z+9 ; 0x09 |
|
51f8: 02 c0 rjmp .+4 ; 0x51fe <_ZN10W5100Class9read_dataEhjPVhj+0x74> |
|
} |
|
else |
|
read(src_ptr, (uint8_t *) dst, len); |
|
51fa: a8 01 movw r20, r16 |
|
51fc: b5 01 movw r22, r10 |
|
} |
|
51fe: 0f 90 pop r0 |
|
5200: 0f 90 pop r0 |
|
5202: df 91 pop r29 |
|
5204: cf 91 pop r28 |
|
5206: 1f 91 pop r17 |
|
5208: 0f 91 pop r16 |
|
520a: ff 90 pop r15 |
|
520c: ef 90 pop r14 |
|
520e: df 90 pop r13 |
|
5210: cf 90 pop r12 |
|
5212: bf 90 pop r11 |
|
5214: af 90 pop r10 |
|
read(src_ptr, (uint8_t *)dst, size); |
|
dst += size; |
|
read(RBASE[s], (uint8_t *) dst, len - size); |
|
} |
|
else |
|
read(src_ptr, (uint8_t *) dst, len); |
|
5216: 0c 94 95 28 jmp 0x512a ; 0x512a <_ZN10W5100Class4readEjPhj> |
|
|
|
0000521a <_ZN10W5100Class20recv_data_processingEhPhjh>: |
|
writeSnTX_WR(s, ptr); |
|
} |
|
|
|
|
|
void W5100Class::recv_data_processing(SOCKET s, uint8_t *data, uint16_t len, uint8_t peek) |
|
{ |
|
521a: 8f 92 push r8 |
|
521c: 9f 92 push r9 |
|
521e: af 92 push r10 |
|
5220: bf 92 push r11 |
|
5222: cf 92 push r12 |
|
5224: df 92 push r13 |
|
5226: ef 92 push r14 |
|
5228: ff 92 push r15 |
|
522a: 0f 93 push r16 |
|
522c: 1f 93 push r17 |
|
522e: cf 93 push r28 |
|
5230: df 93 push r29 |
|
5232: 6c 01 movw r12, r24 |
|
5234: 96 2e mov r9, r22 |
|
5236: 5a 01 movw r10, r20 |
|
5238: 79 01 movw r14, r18 |
|
523a: 80 2e mov r8, r16 |
|
__SOCKET_REGISTER16(SnRX_RSR, 0x0026) // RX Free Size |
|
__SOCKET_REGISTER16(SnRX_RD, 0x0028) // RX Read Pointer |
|
523c: 68 e2 ldi r22, 0x28 ; 40 |
|
523e: 70 e0 ldi r23, 0x00 ; 0 |
|
5240: 89 2d mov r24, r9 |
|
5242: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
5246: c8 2f mov r28, r24 |
|
5248: d0 e0 ldi r29, 0x00 ; 0 |
|
524a: 69 e2 ldi r22, 0x29 ; 41 |
|
524c: 70 e0 ldi r23, 0x00 ; 0 |
|
524e: 89 2d mov r24, r9 |
|
5250: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
5254: dc 2f mov r29, r28 |
|
5256: cc 27 eor r28, r28 |
|
5258: c8 2b or r28, r24 |
|
uint16_t ptr; |
|
ptr = readSnRX_RD(s); |
|
read_data(s, ptr, data, len); |
|
525a: 87 01 movw r16, r14 |
|
525c: 95 01 movw r18, r10 |
|
525e: ae 01 movw r20, r28 |
|
5260: 69 2d mov r22, r9 |
|
5262: c6 01 movw r24, r12 |
|
5264: 0e 94 c5 28 call 0x518a ; 0x518a <_ZN10W5100Class9read_dataEhjPVhj> |
|
if (!peek) |
|
5268: 81 10 cpse r8, r1 |
|
526a: 1a c0 rjmp .+52 ; 0x52a0 <_ZN10W5100Class20recv_data_processingEhPhjh+0x86> |
|
{ |
|
ptr += len; |
|
526c: ce 0d add r28, r14 |
|
526e: df 1d adc r29, r15 |
|
5270: 4d 2f mov r20, r29 |
|
5272: 68 e2 ldi r22, 0x28 ; 40 |
|
5274: 70 e0 ldi r23, 0x00 ; 0 |
|
5276: 89 2d mov r24, r9 |
|
5278: 0e 94 68 24 call 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
527c: 4c 2f mov r20, r28 |
|
527e: 69 e2 ldi r22, 0x29 ; 41 |
|
5280: 70 e0 ldi r23, 0x00 ; 0 |
|
5282: 89 2d mov r24, r9 |
|
writeSnRX_RD(s, ptr); |
|
} |
|
} |
|
5284: df 91 pop r29 |
|
5286: cf 91 pop r28 |
|
5288: 1f 91 pop r17 |
|
528a: 0f 91 pop r16 |
|
528c: ff 90 pop r15 |
|
528e: ef 90 pop r14 |
|
5290: df 90 pop r13 |
|
5292: cf 90 pop r12 |
|
5294: bf 90 pop r11 |
|
5296: af 90 pop r10 |
|
5298: 9f 90 pop r9 |
|
529a: 8f 90 pop r8 |
|
529c: 0c 94 68 24 jmp 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
52a0: df 91 pop r29 |
|
52a2: cf 91 pop r28 |
|
52a4: 1f 91 pop r17 |
|
52a6: 0f 91 pop r16 |
|
52a8: ff 90 pop r15 |
|
52aa: ef 90 pop r14 |
|
52ac: df 90 pop r13 |
|
52ae: cf 90 pop r12 |
|
52b0: bf 90 pop r11 |
|
52b2: af 90 pop r10 |
|
52b4: 9f 90 pop r9 |
|
52b6: 8f 90 pop r8 |
|
52b8: 08 95 ret |
|
|
|
000052ba <_ZN10W5100Class9execCmdSnEh7SockCMD>: |
|
#endif |
|
} |
|
return _len; |
|
} |
|
|
|
void W5100Class::execCmdSn(SOCKET s, SockCMD _cmd) { |
|
52ba: cf 93 push r28 |
|
52bc: c6 2f mov r28, r22 |
|
return readSn(_s, address, _buff, size); \ |
|
} |
|
|
|
public: |
|
__SOCKET_REGISTER8(SnMR, 0x0000) // Mode |
|
__SOCKET_REGISTER8(SnCR, 0x0001) // Command |
|
52be: 61 e0 ldi r22, 0x01 ; 1 |
|
52c0: 70 e0 ldi r23, 0x00 ; 0 |
|
52c2: 8c 2f mov r24, r28 |
|
52c4: 0e 94 68 24 call 0x48d0 ; 0x48d0 <_ZN10W5100Class7writeSnEhjh> |
|
52c8: 61 e0 ldi r22, 0x01 ; 1 |
|
52ca: 70 e0 ldi r23, 0x00 ; 0 |
|
52cc: 8c 2f mov r24, r28 |
|
52ce: 0e 94 5a 24 call 0x48b4 ; 0x48b4 <_ZN10W5100Class6readSnEhj> |
|
// Send command to socket |
|
writeSnCR(s, _cmd); |
|
// Wait for command to complete |
|
while (readSnCR(s)) |
|
52d2: 81 11 cpse r24, r1 |
|
52d4: f9 cf rjmp .-14 ; 0x52c8 <_ZN10W5100Class9execCmdSnEh7SockCMD+0xe> |
|
; |
|
} |
|
52d6: cf 91 pop r28 |
|
52d8: 08 95 ret |
|
|
|
000052da <_ZN11EEPROMClass4readEi>: |
|
/****************************************************************************** |
|
* User API |
|
******************************************************************************/ |
|
|
|
uint8_t EEPROMClass::read(int address) |
|
{ |
|
52da: cb 01 movw r24, r22 |
|
return eeprom_read_byte((unsigned char *) address); |
|
52dc: 0c 94 9a 31 jmp 0x6334 ; 0x6334 <__eerd_byte_m328p> |
|
|
|
000052e0 <_ZN11EEPROMClass5writeEih>: |
|
} |
|
|
|
void EEPROMClass::write(int address, uint8_t value) |
|
{ |
|
52e0: cb 01 movw r24, r22 |
|
eeprom_write_byte((unsigned char *) address, value); |
|
52e2: 64 2f mov r22, r20 |
|
52e4: 0c 94 a2 31 jmp 0x6344 ; 0x6344 <__eewr_byte_m328p> |
|
|
|
000052e8 <yield>: |
|
* libraries or sketches that supports cooperative threads. |
|
* |
|
* Its defined as a weak symbol and it can be redefined to implement a |
|
* real cooperative scheduler. |
|
*/ |
|
static void __empty() { |
|
52e8: 08 95 ret |
|
|
|
000052ea <attachInterrupt>: |
|
|
|
static volatile voidFuncPtr intFunc[EXTERNAL_NUM_INTERRUPTS]; |
|
// volatile static voidFuncPtr twiIntFunc; |
|
|
|
void attachInterrupt(uint8_t interruptNum, void (*userFunc)(void), int mode) { |
|
if(interruptNum < EXTERNAL_NUM_INTERRUPTS) { |
|
52ea: 82 30 cpi r24, 0x02 ; 2 |
|
52ec: e8 f4 brcc .+58 ; 0x5328 <attachInterrupt+0x3e> |
|
intFunc[interruptNum] = userFunc; |
|
52ee: e8 2f mov r30, r24 |
|
52f0: f0 e0 ldi r31, 0x00 ; 0 |
|
52f2: ee 0f add r30, r30 |
|
52f4: ff 1f adc r31, r31 |
|
52f6: e5 59 subi r30, 0x95 ; 149 |
|
52f8: fc 4f sbci r31, 0xFC ; 252 |
|
52fa: 71 83 std Z+1, r23 ; 0x01 |
|
52fc: 60 83 st Z, r22 |
|
// to the configuration bits in the hardware register, so we simply shift |
|
// the mode into place. |
|
|
|
// Enable the interrupt. |
|
|
|
switch (interruptNum) { |
|
52fe: 81 30 cpi r24, 0x01 ; 1 |
|
5300: 41 f0 breq .+16 ; 0x5312 <attachInterrupt+0x28> |
|
EIMSK |= (1 << INT7); |
|
break; |
|
#else |
|
case 0: |
|
#if defined(EICRA) && defined(ISC00) && defined(EIMSK) |
|
EICRA = (EICRA & ~((1 << ISC00) | (1 << ISC01))) | (mode << ISC00); |
|
5302: 80 91 69 00 lds r24, 0x0069 |
|
5306: 8c 7f andi r24, 0xFC ; 252 |
|
5308: 84 2b or r24, r20 |
|
530a: 80 93 69 00 sts 0x0069, r24 |
|
EIMSK |= (1 << INT0); |
|
530e: e8 9a sbi 0x1d, 0 ; 29 |
|
MCUCR = (MCUCR & ~((1 << ISC00) | (1 << ISC01))) | (mode << ISC00); |
|
GIMSK |= (1 << INT0); |
|
#else |
|
#error attachInterrupt not finished for this CPU (case 0) |
|
#endif |
|
break; |
|
5310: 08 95 ret |
|
|
|
case 1: |
|
#if defined(EICRA) && defined(ISC10) && defined(ISC11) && defined(EIMSK) |
|
EICRA = (EICRA & ~((1 << ISC10) | (1 << ISC11))) | (mode << ISC10); |
|
5312: 80 91 69 00 lds r24, 0x0069 |
|
5316: 44 0f add r20, r20 |
|
5318: 55 1f adc r21, r21 |
|
531a: 44 0f add r20, r20 |
|
531c: 55 1f adc r21, r21 |
|
531e: 83 7f andi r24, 0xF3 ; 243 |
|
5320: 84 2b or r24, r20 |
|
5322: 80 93 69 00 sts 0x0069, r24 |
|
EIMSK |= (1 << INT1); |
|
5326: e9 9a sbi 0x1d, 1 ; 29 |
|
5328: 08 95 ret |
|
|
|
0000532a <__vector_1>: |
|
intFunc[EXTERNAL_INT_7](); |
|
} |
|
|
|
#else |
|
|
|
ISR(INT0_vect) { |
|
532a: 1f 92 push r1 |
|
532c: 0f 92 push r0 |
|
532e: 0f b6 in r0, 0x3f ; 63 |
|
5330: 0f 92 push r0 |
|
5332: 11 24 eor r1, r1 |
|
5334: 2f 93 push r18 |
|
5336: 3f 93 push r19 |
|
5338: 4f 93 push r20 |
|
533a: 5f 93 push r21 |
|
533c: 6f 93 push r22 |
|
533e: 7f 93 push r23 |
|
5340: 8f 93 push r24 |
|
5342: 9f 93 push r25 |
|
5344: af 93 push r26 |
|
5346: bf 93 push r27 |
|
5348: ef 93 push r30 |
|
534a: ff 93 push r31 |
|
if(intFunc[EXTERNAL_INT_0]) |
|
534c: 80 91 6b 03 lds r24, 0x036B |
|
5350: 90 91 6c 03 lds r25, 0x036C |
|
5354: 89 2b or r24, r25 |
|
5356: 29 f0 breq .+10 ; 0x5362 <__vector_1+0x38> |
|
intFunc[EXTERNAL_INT_0](); |
|
5358: e0 91 6b 03 lds r30, 0x036B |
|
535c: f0 91 6c 03 lds r31, 0x036C |
|
5360: 09 95 icall |
|
} |
|
5362: ff 91 pop r31 |
|
5364: ef 91 pop r30 |
|
5366: bf 91 pop r27 |
|
5368: af 91 pop r26 |
|
536a: 9f 91 pop r25 |
|
536c: 8f 91 pop r24 |
|
536e: 7f 91 pop r23 |
|
5370: 6f 91 pop r22 |
|
5372: 5f 91 pop r21 |
|
5374: 4f 91 pop r20 |
|
5376: 3f 91 pop r19 |
|
5378: 2f 91 pop r18 |
|
537a: 0f 90 pop r0 |
|
537c: 0f be out 0x3f, r0 ; 63 |
|
537e: 0f 90 pop r0 |
|
5380: 1f 90 pop r1 |
|
5382: 18 95 reti |
|
|
|
00005384 <__vector_2>: |
|
|
|
ISR(INT1_vect) { |
|
5384: 1f 92 push r1 |
|
5386: 0f 92 push r0 |
|
5388: 0f b6 in r0, 0x3f ; 63 |
|
538a: 0f 92 push r0 |
|
538c: 11 24 eor r1, r1 |
|
538e: 2f 93 push r18 |
|
5390: 3f 93 push r19 |
|
5392: 4f 93 push r20 |
|
5394: 5f 93 push r21 |
|
5396: 6f 93 push r22 |
|
5398: 7f 93 push r23 |
|
539a: 8f 93 push r24 |
|
539c: 9f 93 push r25 |
|
539e: af 93 push r26 |
|
53a0: bf 93 push r27 |
|
53a2: ef 93 push r30 |
|
53a4: ff 93 push r31 |
|
if(intFunc[EXTERNAL_INT_1]) |
|
53a6: 80 91 6d 03 lds r24, 0x036D |
|
53aa: 90 91 6e 03 lds r25, 0x036E |
|
53ae: 89 2b or r24, r25 |
|
53b0: 29 f0 breq .+10 ; 0x53bc <__vector_2+0x38> |
|
intFunc[EXTERNAL_INT_1](); |
|
53b2: e0 91 6d 03 lds r30, 0x036D |
|
53b6: f0 91 6e 03 lds r31, 0x036E |
|
53ba: 09 95 icall |
|
} |
|
53bc: ff 91 pop r31 |
|
53be: ef 91 pop r30 |
|
53c0: bf 91 pop r27 |
|
53c2: af 91 pop r26 |
|
53c4: 9f 91 pop r25 |
|
53c6: 8f 91 pop r24 |
|
53c8: 7f 91 pop r23 |
|
53ca: 6f 91 pop r22 |
|
53cc: 5f 91 pop r21 |
|
53ce: 4f 91 pop r20 |
|
53d0: 3f 91 pop r19 |
|
53d2: 2f 91 pop r18 |
|
53d4: 0f 90 pop r0 |
|
53d6: 0f be out 0x3f, r0 ; 63 |
|
53d8: 0f 90 pop r0 |
|
53da: 1f 90 pop r1 |
|
53dc: 18 95 reti |
|
|
|
000053de <__vector_16>: |
|
#if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) |
|
ISR(TIM0_OVF_vect) |
|
#else |
|
ISR(TIMER0_OVF_vect) |
|
#endif |
|
{ |
|
53de: 1f 92 push r1 |
|
53e0: 0f 92 push r0 |
|
53e2: 0f b6 in r0, 0x3f ; 63 |
|
53e4: 0f 92 push r0 |
|
53e6: 11 24 eor r1, r1 |
|
53e8: 2f 93 push r18 |
|
53ea: 3f 93 push r19 |
|
53ec: 8f 93 push r24 |
|
53ee: 9f 93 push r25 |
|
53f0: af 93 push r26 |
|
53f2: bf 93 push r27 |
|
// copy these to local variables so they can be stored in registers |
|
// (volatile variables must be read from memory on every access) |
|
unsigned long m = timer0_millis; |
|
53f4: 80 91 70 03 lds r24, 0x0370 |
|
53f8: 90 91 71 03 lds r25, 0x0371 |
|
53fc: a0 91 72 03 lds r26, 0x0372 |
|
5400: b0 91 73 03 lds r27, 0x0373 |
|
unsigned char f = timer0_fract; |
|
5404: 30 91 6f 03 lds r19, 0x036F |
|
|
|
m += MILLIS_INC; |
|
f += FRACT_INC; |
|
5408: 23 e0 ldi r18, 0x03 ; 3 |
|
540a: 23 0f add r18, r19 |
|
if (f >= FRACT_MAX) { |
|
540c: 2d 37 cpi r18, 0x7D ; 125 |
|
540e: 20 f4 brcc .+8 ; 0x5418 <__vector_16+0x3a> |
|
// copy these to local variables so they can be stored in registers |
|
// (volatile variables must be read from memory on every access) |
|
unsigned long m = timer0_millis; |
|
unsigned char f = timer0_fract; |
|
|
|
m += MILLIS_INC; |
|
5410: 01 96 adiw r24, 0x01 ; 1 |
|
5412: a1 1d adc r26, r1 |
|
5414: b1 1d adc r27, r1 |
|
5416: 05 c0 rjmp .+10 ; 0x5422 <__vector_16+0x44> |
|
f += FRACT_INC; |
|
if (f >= FRACT_MAX) { |
|
f -= FRACT_MAX; |
|
5418: 26 e8 ldi r18, 0x86 ; 134 |
|
541a: 23 0f add r18, r19 |
|
m += 1; |
|
541c: 02 96 adiw r24, 0x02 ; 2 |
|
541e: a1 1d adc r26, r1 |
|
5420: b1 1d adc r27, r1 |
|
} |
|
|
|
timer0_fract = f; |
|
5422: 20 93 6f 03 sts 0x036F, r18 |
|
timer0_millis = m; |
|
5426: 80 93 70 03 sts 0x0370, r24 |
|
542a: 90 93 71 03 sts 0x0371, r25 |
|
542e: a0 93 72 03 sts 0x0372, r26 |
|
5432: b0 93 73 03 sts 0x0373, r27 |
|
timer0_overflow_count++; |
|
5436: 80 91 74 03 lds r24, 0x0374 |
|
543a: 90 91 75 03 lds r25, 0x0375 |
|
543e: a0 91 76 03 lds r26, 0x0376 |
|
5442: b0 91 77 03 lds r27, 0x0377 |
|
5446: 01 96 adiw r24, 0x01 ; 1 |
|
5448: a1 1d adc r26, r1 |
|
544a: b1 1d adc r27, r1 |
|
544c: 80 93 74 03 sts 0x0374, r24 |
|
5450: 90 93 75 03 sts 0x0375, r25 |
|
5454: a0 93 76 03 sts 0x0376, r26 |
|
5458: b0 93 77 03 sts 0x0377, r27 |
|
} |
|
545c: bf 91 pop r27 |
|
545e: af 91 pop r26 |
|
5460: 9f 91 pop r25 |
|
5462: 8f 91 pop r24 |
|
5464: 3f 91 pop r19 |
|
5466: 2f 91 pop r18 |
|
5468: 0f 90 pop r0 |
|
546a: 0f be out 0x3f, r0 ; 63 |
|
546c: 0f 90 pop r0 |
|
546e: 1f 90 pop r1 |
|
5470: 18 95 reti |
|
|
|
00005472 <millis>: |
|
|
|
unsigned long millis() |
|
{ |
|
unsigned long m; |
|
uint8_t oldSREG = SREG; |
|
5472: 2f b7 in r18, 0x3f ; 63 |
|
|
|
// disable interrupts while we read timer0_millis or we might get an |
|
// inconsistent value (e.g. in the middle of a write to timer0_millis) |
|
cli(); |
|
5474: f8 94 cli |
|
m = timer0_millis; |
|
5476: 60 91 70 03 lds r22, 0x0370 |
|
547a: 70 91 71 03 lds r23, 0x0371 |
|
547e: 80 91 72 03 lds r24, 0x0372 |
|
5482: 90 91 73 03 lds r25, 0x0373 |
|
SREG = oldSREG; |
|
5486: 2f bf out 0x3f, r18 ; 63 |
|
|
|
return m; |
|
} |
|
5488: 08 95 ret |
|
|
|
0000548a <micros>: |
|
|
|
unsigned long micros() { |
|
unsigned long m; |
|
uint8_t oldSREG = SREG, t; |
|
548a: 3f b7 in r19, 0x3f ; 63 |
|
|
|
cli(); |
|
548c: f8 94 cli |
|
m = timer0_overflow_count; |
|
548e: 80 91 74 03 lds r24, 0x0374 |
|
5492: 90 91 75 03 lds r25, 0x0375 |
|
5496: a0 91 76 03 lds r26, 0x0376 |
|
549a: b0 91 77 03 lds r27, 0x0377 |
|
#if defined(TCNT0) |
|
t = TCNT0; |
|
549e: 26 b5 in r18, 0x26 ; 38 |
|
#error TIMER 0 not defined |
|
#endif |
|
|
|
|
|
#ifdef TIFR0 |
|
if ((TIFR0 & _BV(TOV0)) && (t < 255)) |
|
54a0: a8 9b sbis 0x15, 0 ; 21 |
|
54a2: 05 c0 rjmp .+10 ; 0x54ae <micros+0x24> |
|
54a4: 2f 3f cpi r18, 0xFF ; 255 |
|
54a6: 19 f0 breq .+6 ; 0x54ae <micros+0x24> |
|
m++; |
|
54a8: 01 96 adiw r24, 0x01 ; 1 |
|
54aa: a1 1d adc r26, r1 |
|
54ac: b1 1d adc r27, r1 |
|
#else |
|
if ((TIFR & _BV(TOV0)) && (t < 255)) |
|
m++; |
|
#endif |
|
|
|
SREG = oldSREG; |
|
54ae: 3f bf out 0x3f, r19 ; 63 |
|
|
|
return ((m << 8) + t) * (64 / clockCyclesPerMicrosecond()); |
|
54b0: 66 27 eor r22, r22 |
|
54b2: 78 2f mov r23, r24 |
|
54b4: 89 2f mov r24, r25 |
|
54b6: 9a 2f mov r25, r26 |
|
54b8: 62 0f add r22, r18 |
|
54ba: 71 1d adc r23, r1 |
|
54bc: 81 1d adc r24, r1 |
|
54be: 91 1d adc r25, r1 |
|
54c0: 42 e0 ldi r20, 0x02 ; 2 |
|
54c2: 66 0f add r22, r22 |
|
54c4: 77 1f adc r23, r23 |
|
54c6: 88 1f adc r24, r24 |
|
54c8: 99 1f adc r25, r25 |
|
54ca: 4a 95 dec r20 |
|
54cc: d1 f7 brne .-12 ; 0x54c2 <micros+0x38> |
|
} |
|
54ce: 08 95 ret |
|
|
|
000054d0 <delay>: |
|
|
|
void delay(unsigned long ms) |
|
{ |
|
54d0: cf 92 push r12 |
|
54d2: df 92 push r13 |
|
54d4: ef 92 push r14 |
|
54d6: ff 92 push r15 |
|
54d8: cf 93 push r28 |
|
54da: df 93 push r29 |
|
54dc: 6b 01 movw r12, r22 |
|
54de: 7c 01 movw r14, r24 |
|
uint16_t start = (uint16_t)micros(); |
|
54e0: 0e 94 45 2a call 0x548a ; 0x548a <micros> |
|
54e4: eb 01 movw r28, r22 |
|
|
|
while (ms > 0) { |
|
54e6: c1 14 cp r12, r1 |
|
54e8: d1 04 cpc r13, r1 |
|
54ea: e1 04 cpc r14, r1 |
|
54ec: f1 04 cpc r15, r1 |
|
54ee: 89 f0 breq .+34 ; 0x5512 <delay+0x42> |
|
yield(); |
|
54f0: 0e 94 74 29 call 0x52e8 ; 0x52e8 <yield> |
|
if (((uint16_t)micros() - start) >= 1000) { |
|
54f4: 0e 94 45 2a call 0x548a ; 0x548a <micros> |
|
54f8: 6c 1b sub r22, r28 |
|
54fa: 7d 0b sbc r23, r29 |
|
54fc: 68 3e cpi r22, 0xE8 ; 232 |
|
54fe: 73 40 sbci r23, 0x03 ; 3 |
|
5500: 90 f3 brcs .-28 ; 0x54e6 <delay+0x16> |
|
ms--; |
|
5502: 81 e0 ldi r24, 0x01 ; 1 |
|
5504: c8 1a sub r12, r24 |
|
5506: d1 08 sbc r13, r1 |
|
5508: e1 08 sbc r14, r1 |
|
550a: f1 08 sbc r15, r1 |
|
start += 1000; |
|
550c: c8 51 subi r28, 0x18 ; 24 |
|
550e: dc 4f sbci r29, 0xFC ; 252 |
|
5510: ea cf rjmp .-44 ; 0x54e6 <delay+0x16> |
|
} |
|
} |
|
} |
|
5512: df 91 pop r29 |
|
5514: cf 91 pop r28 |
|
5516: ff 90 pop r15 |
|
5518: ef 90 pop r14 |
|
551a: df 90 pop r13 |
|
551c: cf 90 pop r12 |
|
551e: 08 95 ret |
|
|
|
00005520 <init>: |
|
|
|
void init() |
|
{ |
|
// this needs to be called before setup() or some functions won't |
|
// work there |
|
sei(); |
|
5520: 78 94 sei |
|
|
|
// on the ATmega168, timer 0 is also used for fast hardware pwm |
|
// (using phase-correct PWM would mean that timer 0 overflowed half as often |
|
// resulting in different millis() behavior on the ATmega8 and ATmega168) |
|
#if defined(TCCR0A) && defined(WGM01) |
|
sbi(TCCR0A, WGM01); |
|
5522: 84 b5 in r24, 0x24 ; 36 |
|
5524: 82 60 ori r24, 0x02 ; 2 |
|
5526: 84 bd out 0x24, r24 ; 36 |
|
sbi(TCCR0A, WGM00); |
|
5528: 84 b5 in r24, 0x24 ; 36 |
|
552a: 81 60 ori r24, 0x01 ; 1 |
|
552c: 84 bd out 0x24, r24 ; 36 |
|
// this combination is for the standard atmega8 |
|
sbi(TCCR0, CS01); |
|
sbi(TCCR0, CS00); |
|
#elif defined(TCCR0B) && defined(CS01) && defined(CS00) |
|
// this combination is for the standard 168/328/1280/2560 |
|
sbi(TCCR0B, CS01); |
|
552e: 85 b5 in r24, 0x25 ; 37 |
|
5530: 82 60 ori r24, 0x02 ; 2 |
|
5532: 85 bd out 0x25, r24 ; 37 |
|
sbi(TCCR0B, CS00); |
|
5534: 85 b5 in r24, 0x25 ; 37 |
|
5536: 81 60 ori r24, 0x01 ; 1 |
|
5538: 85 bd out 0x25, r24 ; 37 |
|
|
|
// enable timer 0 overflow interrupt |
|
#if defined(TIMSK) && defined(TOIE0) |
|
sbi(TIMSK, TOIE0); |
|
#elif defined(TIMSK0) && defined(TOIE0) |
|
sbi(TIMSK0, TOIE0); |
|
553a: ee e6 ldi r30, 0x6E ; 110 |
|
553c: f0 e0 ldi r31, 0x00 ; 0 |
|
553e: 80 81 ld r24, Z |
|
5540: 81 60 ori r24, 0x01 ; 1 |
|
5542: 80 83 st Z, r24 |
|
// this is better for motors as it ensures an even waveform |
|
// note, however, that fast pwm mode can achieve a frequency of up |
|
// 8 MHz (with a 16 MHz clock) at 50% duty cycle |
|
|
|
#if defined(TCCR1B) && defined(CS11) && defined(CS10) |
|
TCCR1B = 0; |
|
5544: e1 e8 ldi r30, 0x81 ; 129 |
|
5546: f0 e0 ldi r31, 0x00 ; 0 |
|
5548: 10 82 st Z, r1 |
|
|
|
// set timer 1 prescale factor to 64 |
|
sbi(TCCR1B, CS11); |
|
554a: 80 81 ld r24, Z |
|
554c: 82 60 ori r24, 0x02 ; 2 |
|
554e: 80 83 st Z, r24 |
|
#if F_CPU >= 8000000L |
|
sbi(TCCR1B, CS10); |
|
5550: 80 81 ld r24, Z |
|
5552: 81 60 ori r24, 0x01 ; 1 |
|
5554: 80 83 st Z, r24 |
|
sbi(TCCR1, CS10); |
|
#endif |
|
#endif |
|
// put timer 1 in 8-bit phase correct pwm mode |
|
#if defined(TCCR1A) && defined(WGM10) |
|
sbi(TCCR1A, WGM10); |
|
5556: e0 e8 ldi r30, 0x80 ; 128 |
|
5558: f0 e0 ldi r31, 0x00 ; 0 |
|
555a: 80 81 ld r24, Z |
|
555c: 81 60 ori r24, 0x01 ; 1 |
|
555e: 80 83 st Z, r24 |
|
|
|
// set timer 2 prescale factor to 64 |
|
#if defined(TCCR2) && defined(CS22) |
|
sbi(TCCR2, CS22); |
|
#elif defined(TCCR2B) && defined(CS22) |
|
sbi(TCCR2B, CS22); |
|
5560: e1 eb ldi r30, 0xB1 ; 177 |
|
5562: f0 e0 ldi r31, 0x00 ; 0 |
|
5564: 80 81 ld r24, Z |
|
5566: 84 60 ori r24, 0x04 ; 4 |
|
5568: 80 83 st Z, r24 |
|
|
|
// configure timer 2 for phase correct pwm (8-bit) |
|
#if defined(TCCR2) && defined(WGM20) |
|
sbi(TCCR2, WGM20); |
|
#elif defined(TCCR2A) && defined(WGM20) |
|
sbi(TCCR2A, WGM20); |
|
556a: e0 eb ldi r30, 0xB0 ; 176 |
|
556c: f0 e0 ldi r31, 0x00 ; 0 |
|
556e: 80 81 ld r24, Z |
|
5570: 81 60 ori r24, 0x01 ; 1 |
|
5572: 80 83 st Z, r24 |
|
#if defined(ADCSRA) |
|
// set a2d prescale factor to 128 |
|
// 16 MHz / 128 = 125 KHz, inside the desired 50-200 KHz range. |
|
// XXX: this will not work properly for other clock speeds, and |
|
// this code should use F_CPU to determine the prescale factor. |
|
sbi(ADCSRA, ADPS2); |
|
5574: ea e7 ldi r30, 0x7A ; 122 |
|
5576: f0 e0 ldi r31, 0x00 ; 0 |
|
5578: 80 81 ld r24, Z |
|
557a: 84 60 ori r24, 0x04 ; 4 |
|
557c: 80 83 st Z, r24 |
|
sbi(ADCSRA, ADPS1); |
|
557e: 80 81 ld r24, Z |
|
5580: 82 60 ori r24, 0x02 ; 2 |
|
5582: 80 83 st Z, r24 |
|
sbi(ADCSRA, ADPS0); |
|
5584: 80 81 ld r24, Z |
|
5586: 81 60 ori r24, 0x01 ; 1 |
|
5588: 80 83 st Z, r24 |
|
|
|
// enable a2d conversions |
|
sbi(ADCSRA, ADEN); |
|
558a: 80 81 ld r24, Z |
|
558c: 80 68 ori r24, 0x80 ; 128 |
|
558e: 80 83 st Z, r24 |
|
// here so they can be used as normal digital i/o; they will be |
|
// reconnected in Serial.begin() |
|
#if defined(UCSRB) |
|
UCSRB = 0; |
|
#elif defined(UCSR0B) |
|
UCSR0B = 0; |
|
5590: 10 92 c1 00 sts 0x00C1, r1 |
|
5594: 08 95 ret |
|
|
|
00005596 <turnOffPWM>: |
|
// |
|
//static inline void turnOffPWM(uint8_t timer) __attribute__ ((always_inline)); |
|
//static inline void turnOffPWM(uint8_t timer) |
|
static void turnOffPWM(uint8_t timer) |
|
{ |
|
switch (timer) |
|
5596: 83 30 cpi r24, 0x03 ; 3 |
|
5598: 81 f0 breq .+32 ; 0x55ba <turnOffPWM+0x24> |
|
559a: 28 f4 brcc .+10 ; 0x55a6 <turnOffPWM+0x10> |
|
559c: 81 30 cpi r24, 0x01 ; 1 |
|
559e: 99 f0 breq .+38 ; 0x55c6 <turnOffPWM+0x30> |
|
55a0: 82 30 cpi r24, 0x02 ; 2 |
|
55a2: a1 f0 breq .+40 ; 0x55cc <turnOffPWM+0x36> |
|
55a4: 08 95 ret |
|
55a6: 87 30 cpi r24, 0x07 ; 7 |
|
55a8: a9 f0 breq .+42 ; 0x55d4 <turnOffPWM+0x3e> |
|
55aa: 88 30 cpi r24, 0x08 ; 8 |
|
55ac: b9 f0 breq .+46 ; 0x55dc <turnOffPWM+0x46> |
|
55ae: 84 30 cpi r24, 0x04 ; 4 |
|
55b0: d1 f4 brne .+52 ; 0x55e6 <turnOffPWM+0x50> |
|
{ |
|
#if defined(TCCR1A) && defined(COM1A1) |
|
case TIMER1A: cbi(TCCR1A, COM1A1); break; |
|
#endif |
|
#if defined(TCCR1A) && defined(COM1B1) |
|
case TIMER1B: cbi(TCCR1A, COM1B1); break; |
|
55b2: 80 91 80 00 lds r24, 0x0080 |
|
55b6: 8f 7d andi r24, 0xDF ; 223 |
|
55b8: 03 c0 rjmp .+6 ; 0x55c0 <turnOffPWM+0x2a> |
|
static void turnOffPWM(uint8_t timer) |
|
{ |
|
switch (timer) |
|
{ |
|
#if defined(TCCR1A) && defined(COM1A1) |
|
case TIMER1A: cbi(TCCR1A, COM1A1); break; |
|
55ba: 80 91 80 00 lds r24, 0x0080 |
|
55be: 8f 77 andi r24, 0x7F ; 127 |
|
#endif |
|
#if defined(TCCR1A) && defined(COM1B1) |
|
case TIMER1B: cbi(TCCR1A, COM1B1); break; |
|
55c0: 80 93 80 00 sts 0x0080, r24 |
|
55c4: 08 95 ret |
|
#if defined(TCCR2) && defined(COM21) |
|
case TIMER2: cbi(TCCR2, COM21); break; |
|
#endif |
|
|
|
#if defined(TCCR0A) && defined(COM0A1) |
|
case TIMER0A: cbi(TCCR0A, COM0A1); break; |
|
55c6: 84 b5 in r24, 0x24 ; 36 |
|
55c8: 8f 77 andi r24, 0x7F ; 127 |
|
55ca: 02 c0 rjmp .+4 ; 0x55d0 <turnOffPWM+0x3a> |
|
#endif |
|
|
|
#if defined(TIMER0B) && defined(COM0B1) |
|
case TIMER0B: cbi(TCCR0A, COM0B1); break; |
|
55cc: 84 b5 in r24, 0x24 ; 36 |
|
55ce: 8f 7d andi r24, 0xDF ; 223 |
|
55d0: 84 bd out 0x24, r24 ; 36 |
|
55d2: 08 95 ret |
|
#endif |
|
#if defined(TCCR2A) && defined(COM2A1) |
|
case TIMER2A: cbi(TCCR2A, COM2A1); break; |
|
55d4: 80 91 b0 00 lds r24, 0x00B0 |
|
55d8: 8f 77 andi r24, 0x7F ; 127 |
|
55da: 03 c0 rjmp .+6 ; 0x55e2 <turnOffPWM+0x4c> |
|
#endif |
|
#if defined(TCCR2A) && defined(COM2B1) |
|
case TIMER2B: cbi(TCCR2A, COM2B1); break; |
|
55dc: 80 91 b0 00 lds r24, 0x00B0 |
|
55e0: 8f 7d andi r24, 0xDF ; 223 |
|
55e2: 80 93 b0 00 sts 0x00B0, r24 |
|
55e6: 08 95 ret |
|
|
|
000055e8 <pinMode>: |
|
#define ARDUINO_MAIN |
|
#include "wiring_private.h" |
|
#include "pins_arduino.h" |
|
|
|
void pinMode(uint8_t pin, uint8_t mode) |
|
{ |
|
55e8: cf 93 push r28 |
|
55ea: df 93 push r29 |
|
uint8_t bit = digitalPinToBitMask(pin); |
|
55ec: 90 e0 ldi r25, 0x00 ; 0 |
|
55ee: fc 01 movw r30, r24 |
|
55f0: e6 54 subi r30, 0x46 ; 70 |
|
55f2: ff 4f sbci r31, 0xFF ; 255 |
|
55f4: 24 91 lpm r18, Z |
|
uint8_t port = digitalPinToPort(pin); |
|
55f6: fc 01 movw r30, r24 |
|
55f8: e2 53 subi r30, 0x32 ; 50 |
|
55fa: ff 4f sbci r31, 0xFF ; 255 |
|
55fc: 84 91 lpm r24, Z |
|
volatile uint8_t *reg, *out; |
|
|
|
if (port == NOT_A_PIN) return; |
|
55fe: 88 23 and r24, r24 |
|
5600: 49 f1 breq .+82 ; 0x5654 <pinMode+0x6c> |
|
|
|
// JWS: can I let the optimizer do this? |
|
reg = portModeRegister(port); |
|
5602: 90 e0 ldi r25, 0x00 ; 0 |
|
5604: 88 0f add r24, r24 |
|
5606: 99 1f adc r25, r25 |
|
5608: fc 01 movw r30, r24 |
|
560a: ea 50 subi r30, 0x0A ; 10 |
|
560c: ff 4f sbci r31, 0xFF ; 255 |
|
560e: a5 91 lpm r26, Z+ |
|
5610: b4 91 lpm r27, Z |
|
out = portOutputRegister(port); |
|
5612: 84 51 subi r24, 0x14 ; 20 |
|
5614: 9f 4f sbci r25, 0xFF ; 255 |
|
5616: fc 01 movw r30, r24 |
|
5618: c5 91 lpm r28, Z+ |
|
561a: d4 91 lpm r29, Z |
|
|
|
if (mode == INPUT) { |
|
uint8_t oldSREG = SREG; |
|
561c: 9f b7 in r25, 0x3f ; 63 |
|
|
|
// JWS: can I let the optimizer do this? |
|
reg = portModeRegister(port); |
|
out = portOutputRegister(port); |
|
|
|
if (mode == INPUT) { |
|
561e: 61 11 cpse r22, r1 |
|
5620: 08 c0 rjmp .+16 ; 0x5632 <pinMode+0x4a> |
|
uint8_t oldSREG = SREG; |
|
cli(); |
|
5622: f8 94 cli |
|
*reg &= ~bit; |
|
5624: 8c 91 ld r24, X |
|
5626: 20 95 com r18 |
|
5628: 82 23 and r24, r18 |
|
562a: 8c 93 st X, r24 |
|
*out &= ~bit; |
|
562c: 88 81 ld r24, Y |
|
562e: 82 23 and r24, r18 |
|
5630: 0a c0 rjmp .+20 ; 0x5646 <pinMode+0x5e> |
|
SREG = oldSREG; |
|
} else if (mode == INPUT_PULLUP) { |
|
5632: 62 30 cpi r22, 0x02 ; 2 |
|
5634: 51 f4 brne .+20 ; 0x564a <pinMode+0x62> |
|
uint8_t oldSREG = SREG; |
|
cli(); |
|
5636: f8 94 cli |
|
*reg &= ~bit; |
|
5638: 8c 91 ld r24, X |
|
563a: 32 2f mov r19, r18 |
|
563c: 30 95 com r19 |
|
563e: 83 23 and r24, r19 |
|
5640: 8c 93 st X, r24 |
|
*out |= bit; |
|
5642: 88 81 ld r24, Y |
|
5644: 82 2b or r24, r18 |
|
5646: 88 83 st Y, r24 |
|
5648: 04 c0 rjmp .+8 ; 0x5652 <pinMode+0x6a> |
|
SREG = oldSREG; |
|
} else { |
|
uint8_t oldSREG = SREG; |
|
cli(); |
|
564a: f8 94 cli |
|
*reg |= bit; |
|
564c: 8c 91 ld r24, X |
|
564e: 82 2b or r24, r18 |
|
5650: 8c 93 st X, r24 |
|
SREG = oldSREG; |
|
5652: 9f bf out 0x3f, r25 ; 63 |
|
} |
|
} |
|
5654: df 91 pop r29 |
|
5656: cf 91 pop r28 |
|
5658: 08 95 ret |
|
|
|
0000565a <digitalWrite>: |
|
#endif |
|
} |
|
} |
|
|
|
void digitalWrite(uint8_t pin, uint8_t val) |
|
{ |
|
565a: 0f 93 push r16 |
|
565c: 1f 93 push r17 |
|
565e: cf 93 push r28 |
|
5660: df 93 push r29 |
|
5662: 1f 92 push r1 |
|
5664: cd b7 in r28, 0x3d ; 61 |
|
5666: de b7 in r29, 0x3e ; 62 |
|
uint8_t timer = digitalPinToTimer(pin); |
|
5668: 28 2f mov r18, r24 |
|
566a: 30 e0 ldi r19, 0x00 ; 0 |
|
566c: f9 01 movw r30, r18 |
|
566e: ea 55 subi r30, 0x5A ; 90 |
|
5670: ff 4f sbci r31, 0xFF ; 255 |
|
5672: 84 91 lpm r24, Z |
|
uint8_t bit = digitalPinToBitMask(pin); |
|
5674: f9 01 movw r30, r18 |
|
5676: e6 54 subi r30, 0x46 ; 70 |
|
5678: ff 4f sbci r31, 0xFF ; 255 |
|
567a: 14 91 lpm r17, Z |
|
uint8_t port = digitalPinToPort(pin); |
|
567c: f9 01 movw r30, r18 |
|
567e: e2 53 subi r30, 0x32 ; 50 |
|
5680: ff 4f sbci r31, 0xFF ; 255 |
|
5682: 04 91 lpm r16, Z |
|
volatile uint8_t *out; |
|
|
|
if (port == NOT_A_PIN) return; |
|
5684: 00 23 and r16, r16 |
|
5686: c9 f0 breq .+50 ; 0x56ba <digitalWrite+0x60> |
|
|
|
// 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); |
|
5688: 88 23 and r24, r24 |
|
568a: 21 f0 breq .+8 ; 0x5694 <digitalWrite+0x3a> |
|
568c: 69 83 std Y+1, r22 ; 0x01 |
|
568e: 0e 94 cb 2a call 0x5596 ; 0x5596 <turnOffPWM> |
|
5692: 69 81 ldd r22, Y+1 ; 0x01 |
|
|
|
out = portOutputRegister(port); |
|
5694: e0 2f mov r30, r16 |
|
5696: f0 e0 ldi r31, 0x00 ; 0 |
|
5698: ee 0f add r30, r30 |
|
569a: ff 1f adc r31, r31 |
|
569c: e4 51 subi r30, 0x14 ; 20 |
|
569e: ff 4f sbci r31, 0xFF ; 255 |
|
56a0: a5 91 lpm r26, Z+ |
|
56a2: b4 91 lpm r27, Z |
|
|
|
uint8_t oldSREG = SREG; |
|
56a4: 9f b7 in r25, 0x3f ; 63 |
|
cli(); |
|
56a6: f8 94 cli |
|
|
|
if (val == LOW) { |
|
*out &= ~bit; |
|
56a8: 8c 91 ld r24, X |
|
out = portOutputRegister(port); |
|
|
|
uint8_t oldSREG = SREG; |
|
cli(); |
|
|
|
if (val == LOW) { |
|
56aa: 61 11 cpse r22, r1 |
|
56ac: 03 c0 rjmp .+6 ; 0x56b4 <digitalWrite+0x5a> |
|
*out &= ~bit; |
|
56ae: 10 95 com r17 |
|
56b0: 81 23 and r24, r17 |
|
56b2: 01 c0 rjmp .+2 ; 0x56b6 <digitalWrite+0x5c> |
|
} else { |
|
*out |= bit; |
|
56b4: 81 2b or r24, r17 |
|
56b6: 8c 93 st X, r24 |
|
} |
|
|
|
SREG = oldSREG; |
|
56b8: 9f bf out 0x3f, r25 ; 63 |
|
} |
|
56ba: 0f 90 pop r0 |
|
56bc: df 91 pop r29 |
|
56be: cf 91 pop r28 |
|
56c0: 1f 91 pop r17 |
|
56c2: 0f 91 pop r16 |
|
56c4: 08 95 ret |
|
|
|
000056c6 <digitalRead>: |
|
|
|
int digitalRead(uint8_t pin) |
|
{ |
|
56c6: cf 93 push r28 |
|
56c8: df 93 push r29 |
|
uint8_t timer = digitalPinToTimer(pin); |
|
56ca: 28 2f mov r18, r24 |
|
56cc: 30 e0 ldi r19, 0x00 ; 0 |
|
56ce: f9 01 movw r30, r18 |
|
56d0: ea 55 subi r30, 0x5A ; 90 |
|
56d2: ff 4f sbci r31, 0xFF ; 255 |
|
56d4: 84 91 lpm r24, Z |
|
uint8_t bit = digitalPinToBitMask(pin); |
|
56d6: f9 01 movw r30, r18 |
|
56d8: e6 54 subi r30, 0x46 ; 70 |
|
56da: ff 4f sbci r31, 0xFF ; 255 |
|
56dc: d4 91 lpm r29, Z |
|
uint8_t port = digitalPinToPort(pin); |
|
56de: f9 01 movw r30, r18 |
|
56e0: e2 53 subi r30, 0x32 ; 50 |
|
56e2: ff 4f sbci r31, 0xFF ; 255 |
|
56e4: c4 91 lpm r28, Z |
|
|
|
if (port == NOT_A_PIN) return LOW; |
|
56e6: cc 23 and r28, r28 |
|
56e8: 91 f0 breq .+36 ; 0x570e <digitalRead+0x48> |
|
|
|
// 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); |
|
56ea: 81 11 cpse r24, r1 |
|
56ec: 0e 94 cb 2a call 0x5596 ; 0x5596 <turnOffPWM> |
|
|
|
if (*portInputRegister(port) & bit) return HIGH; |
|
56f0: ec 2f mov r30, r28 |
|
56f2: f0 e0 ldi r31, 0x00 ; 0 |
|
56f4: ee 0f add r30, r30 |
|
56f6: ff 1f adc r31, r31 |
|
56f8: ee 51 subi r30, 0x1E ; 30 |
|
56fa: ff 4f sbci r31, 0xFF ; 255 |
|
56fc: a5 91 lpm r26, Z+ |
|
56fe: b4 91 lpm r27, Z |
|
5700: 2c 91 ld r18, X |
|
5702: 2d 23 and r18, r29 |
|
5704: 81 e0 ldi r24, 0x01 ; 1 |
|
5706: 90 e0 ldi r25, 0x00 ; 0 |
|
5708: 21 f4 brne .+8 ; 0x5712 <digitalRead+0x4c> |
|
570a: 80 e0 ldi r24, 0x00 ; 0 |
|
570c: 02 c0 rjmp .+4 ; 0x5712 <digitalRead+0x4c> |
|
{ |
|
uint8_t timer = digitalPinToTimer(pin); |
|
uint8_t bit = digitalPinToBitMask(pin); |
|
uint8_t port = digitalPinToPort(pin); |
|
|
|
if (port == NOT_A_PIN) return LOW; |
|
570e: 80 e0 ldi r24, 0x00 ; 0 |
|
5710: 90 e0 ldi r25, 0x00 ; 0 |
|
// before getting a digital reading. |
|
if (timer != NOT_ON_TIMER) turnOffPWM(timer); |
|
|
|
if (*portInputRegister(port) & bit) return HIGH; |
|
return LOW; |
|
} |
|
5712: df 91 pop r29 |
|
5714: cf 91 pop r28 |
|
5716: 08 95 ret |
|
|
|
00005718 <_Z14serialEventRunv>: |
|
#endif |
|
|
|
void serialEventRun(void) |
|
{ |
|
#if defined(HAVE_HWSERIAL0) |
|
if (Serial0_available && serialEvent && Serial0_available()) serialEvent(); |
|
5718: 80 e0 ldi r24, 0x00 ; 0 |
|
571a: 90 e0 ldi r25, 0x00 ; 0 |
|
571c: 89 2b or r24, r25 |
|
571e: 49 f0 breq .+18 ; 0x5732 <_Z14serialEventRunv+0x1a> |
|
5720: 80 e0 ldi r24, 0x00 ; 0 |
|
5722: 90 e0 ldi r25, 0x00 ; 0 |
|
5724: 89 2b or r24, r25 |
|
5726: 29 f0 breq .+10 ; 0x5732 <_Z14serialEventRunv+0x1a> |
|
5728: 0e 94 00 00 call 0 ; 0x0 <__vectors> |
|
572c: 81 11 cpse r24, r1 |
|
572e: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> |
|
5732: 08 95 ret |
|
|
|
00005734 <_ZNK9IPAddress7printToER5Print>: |
|
{ |
|
return memcmp(addr, _address.bytes, sizeof(_address.bytes)) == 0; |
|
} |
|
|
|
size_t IPAddress::printTo(Print& p) const |
|
{ |
|
5734: af 92 push r10 |
|
5736: bf 92 push r11 |
|
5738: cf 92 push r12 |
|
573a: df 92 push r13 |
|
573c: ef 92 push r14 |
|
573e: ff 92 push r15 |
|
5740: 0f 93 push r16 |
|
5742: 1f 93 push r17 |
|
5744: cf 93 push r28 |
|
5746: df 93 push r29 |
|
5748: 6c 01 movw r12, r24 |
|
574a: 7b 01 movw r14, r22 |
|
size_t n = 0; |
|
for (int i =0; i < 3; i++) |
|
574c: c0 e0 ldi r28, 0x00 ; 0 |
|
574e: d0 e0 ldi r29, 0x00 ; 0 |
|
return memcmp(addr, _address.bytes, sizeof(_address.bytes)) == 0; |
|
} |
|
|
|
size_t IPAddress::printTo(Print& p) const |
|
{ |
|
size_t n = 0; |
|
5750: 00 e0 ldi r16, 0x00 ; 0 |
|
5752: 10 e0 ldi r17, 0x00 ; 0 |
|
5754: f6 01 movw r30, r12 |
|
5756: ec 0f add r30, r28 |
|
5758: fd 1f adc r31, r29 |
|
for (int i =0; i < 3; i++) |
|
{ |
|
n += p.print(_address.bytes[i], DEC); |
|
575a: 4a e0 ldi r20, 0x0A ; 10 |
|
575c: 50 e0 ldi r21, 0x00 ; 0 |
|
575e: 62 81 ldd r22, Z+2 ; 0x02 |
|
5760: c7 01 movw r24, r14 |
|
5762: 0e 94 9b 2c call 0x5936 ; 0x5936 <_ZN5Print5printEhi> |
|
5766: 5c 01 movw r10, r24 |
|
n += p.print('.'); |
|
5768: 6e e2 ldi r22, 0x2E ; 46 |
|
576a: c7 01 movw r24, r14 |
|
576c: 0e 94 2e 2c call 0x585c ; 0x585c <_ZN5Print5printEc> |
|
size_t IPAddress::printTo(Print& p) const |
|
{ |
|
size_t n = 0; |
|
for (int i =0; i < 3; i++) |
|
{ |
|
n += p.print(_address.bytes[i], DEC); |
|
5770: 8a 0d add r24, r10 |
|
5772: 9b 1d adc r25, r11 |
|
n += p.print('.'); |
|
5774: 08 0f add r16, r24 |
|
5776: 19 1f adc r17, r25 |
|
} |
|
|
|
size_t IPAddress::printTo(Print& p) const |
|
{ |
|
size_t n = 0; |
|
for (int i =0; i < 3; i++) |
|
5778: 21 96 adiw r28, 0x01 ; 1 |
|
577a: c3 30 cpi r28, 0x03 ; 3 |
|
577c: d1 05 cpc r29, r1 |
|
577e: 51 f7 brne .-44 ; 0x5754 <_ZNK9IPAddress7printToER5Print+0x20> |
|
{ |
|
n += p.print(_address.bytes[i], DEC); |
|
n += p.print('.'); |
|
} |
|
n += p.print(_address.bytes[3], DEC); |
|
5780: 4a e0 ldi r20, 0x0A ; 10 |
|
5782: 50 e0 ldi r21, 0x00 ; 0 |
|
5784: f6 01 movw r30, r12 |
|
5786: 65 81 ldd r22, Z+5 ; 0x05 |
|
5788: c7 01 movw r24, r14 |
|
578a: 0e 94 9b 2c call 0x5936 ; 0x5936 <_ZN5Print5printEhi> |
|
return n; |
|
} |
|
578e: 80 0f add r24, r16 |
|
5790: 91 1f adc r25, r17 |
|
5792: df 91 pop r29 |
|
5794: cf 91 pop r28 |
|
5796: 1f 91 pop r17 |
|
5798: 0f 91 pop r16 |
|
579a: ff 90 pop r15 |
|
579c: ef 90 pop r14 |
|
579e: df 90 pop r13 |
|
57a0: cf 90 pop r12 |
|
57a2: bf 90 pop r11 |
|
57a4: af 90 pop r10 |
|
57a6: 08 95 ret |
|
|
|
000057a8 <_ZN9IPAddressC1Ev>: |
|
*/ |
|
|
|
#include <Arduino.h> |
|
#include <IPAddress.h> |
|
|
|
IPAddress::IPAddress() |
|
57a8: 2c e3 ldi r18, 0x3C ; 60 |
|
57aa: 32 e0 ldi r19, 0x02 ; 2 |
|
57ac: fc 01 movw r30, r24 |
|
57ae: 31 83 std Z+1, r19 ; 0x01 |
|
57b0: 20 83 st Z, r18 |
|
{ |
|
_address.dword = 0; |
|
57b2: 12 82 std Z+2, r1 ; 0x02 |
|
57b4: 13 82 std Z+3, r1 ; 0x03 |
|
57b6: 14 82 std Z+4, r1 ; 0x04 |
|
57b8: 15 82 std Z+5, r1 ; 0x05 |
|
57ba: 08 95 ret |
|
|
|
000057bc <_ZN9IPAddressC1Ehhhh>: |
|
} |
|
|
|
IPAddress::IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet) |
|
57bc: 0f 93 push r16 |
|
57be: fc 01 movw r30, r24 |
|
57c0: 8c e3 ldi r24, 0x3C ; 60 |
|
57c2: 92 e0 ldi r25, 0x02 ; 2 |
|
57c4: 91 83 std Z+1, r25 ; 0x01 |
|
57c6: 80 83 st Z, r24 |
|
{ |
|
_address.bytes[0] = first_octet; |
|
57c8: 62 83 std Z+2, r22 ; 0x02 |
|
_address.bytes[1] = second_octet; |
|
57ca: 43 83 std Z+3, r20 ; 0x03 |
|
_address.bytes[2] = third_octet; |
|
57cc: 24 83 std Z+4, r18 ; 0x04 |
|
_address.bytes[3] = fourth_octet; |
|
57ce: 05 83 std Z+5, r16 ; 0x05 |
|
} |
|
57d0: 0f 91 pop r16 |
|
57d2: 08 95 ret |
|
|
|
000057d4 <_ZN9IPAddressaSEPKh>: |
|
memcpy(_address.bytes, address, sizeof(_address.bytes)); |
|
} |
|
|
|
IPAddress& IPAddress::operator=(const uint8_t *address) |
|
{ |
|
memcpy(_address.bytes, address, sizeof(_address.bytes)); |
|
57d4: fb 01 movw r30, r22 |
|
57d6: 40 81 ld r20, Z |
|
57d8: 51 81 ldd r21, Z+1 ; 0x01 |
|
57da: 62 81 ldd r22, Z+2 ; 0x02 |
|
57dc: 73 81 ldd r23, Z+3 ; 0x03 |
|
57de: fc 01 movw r30, r24 |
|
57e0: 42 83 std Z+2, r20 ; 0x02 |
|
57e2: 53 83 std Z+3, r21 ; 0x03 |
|
57e4: 64 83 std Z+4, r22 ; 0x04 |
|
57e6: 75 83 std Z+5, r23 ; 0x05 |
|
return *this; |
|
} |
|
57e8: 08 95 ret |
|
|
|
000057ea <_GLOBAL__sub_I__ZN9IPAddressC2Ev>: |
|
IPAddress::IPAddress() |
|
{ |
|
_address.dword = 0; |
|
} |
|
|
|
IPAddress::IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet) |
|
57ea: 8c e3 ldi r24, 0x3C ; 60 |
|
57ec: 92 e0 ldi r25, 0x02 ; 2 |
|
57ee: 90 93 79 03 sts 0x0379, r25 |
|
57f2: 80 93 78 03 sts 0x0378, r24 |
|
{ |
|
_address.bytes[0] = first_octet; |
|
57f6: 10 92 7a 03 sts 0x037A, r1 |
|
_address.bytes[1] = second_octet; |
|
57fa: 10 92 7b 03 sts 0x037B, r1 |
|
_address.bytes[2] = third_octet; |
|
57fe: 10 92 7c 03 sts 0x037C, r1 |
|
_address.bytes[3] = fourth_octet; |
|
5802: 10 92 7d 03 sts 0x037D, r1 |
|
5806: 08 95 ret |
|
|
|
00005808 <initVariant>: |
|
int atexit(void (*func)()) { return 0; } |
|
|
|
// Weak empty variant initialization function. |
|
// May be redefined by variant files. |
|
void initVariant() __attribute__((weak)); |
|
void initVariant() { } |
|
5808: 08 95 ret |
|
|
|
0000580a <main>: |
|
|
|
int main(void) |
|
{ |
|
init(); |
|
580a: 0e 94 90 2a call 0x5520 ; 0x5520 <init> |
|
|
|
initVariant(); |
|
580e: 0e 94 04 2c call 0x5808 ; 0x5808 <initVariant> |
|
|
|
#if defined(USBCON) |
|
USBDevice.attach(); |
|
#endif |
|
|
|
setup(); |
|
5812: 0e 94 90 0d call 0x1b20 ; 0x1b20 <setup> |
|
|
|
for (;;) { |
|
loop(); |
|
if (serialEventRun) serialEventRun(); |
|
5816: cc e8 ldi r28, 0x8C ; 140 |
|
5818: db e2 ldi r29, 0x2B ; 43 |
|
#endif |
|
|
|
setup(); |
|
|
|
for (;;) { |
|
loop(); |
|
581a: 0e 94 7f 0a call 0x14fe ; 0x14fe <loop> |
|
if (serialEventRun) serialEventRun(); |
|
581e: 20 97 sbiw r28, 0x00 ; 0 |
|
5820: e1 f3 breq .-8 ; 0x581a <main+0x10> |
|
5822: 0e 94 8c 2b call 0x5718 ; 0x5718 <_Z14serialEventRunv> |
|
5826: f9 cf rjmp .-14 ; 0x581a <main+0x10> |
|
|
|
00005828 <_Znwj>: |
|
*/ |
|
|
|
#include <stdlib.h> |
|
|
|
void *operator new(size_t size) { |
|
return malloc(size); |
|
5828: 0c 94 82 2f jmp 0x5f04 ; 0x5f04 <malloc> |
|
|
|
0000582c <_ZdlPv>: |
|
void *operator new[](size_t size) { |
|
return malloc(size); |
|
} |
|
|
|
void operator delete(void * ptr) { |
|
free(ptr); |
|
582c: 0c 94 1a 30 jmp 0x6034 ; 0x6034 <free> |
|
|
|
00005830 <_ZN5Print5writeEPKc>: |
|
int getWriteError() { return write_error; } |
|
void clearWriteError() { setWriteError(0); } |
|
|
|
virtual size_t write(uint8_t) = 0; |
|
size_t write(const char *str) { |
|
if (str == NULL) return 0; |
|
5830: 61 15 cp r22, r1 |
|
5832: 71 05 cpc r23, r1 |
|
5834: 81 f0 breq .+32 ; 0x5856 <_ZN5Print5writeEPKc+0x26> |
|
return write((const uint8_t *)str, strlen(str)); |
|
5836: db 01 movw r26, r22 |
|
5838: 0d 90 ld r0, X+ |
|
583a: 00 20 and r0, r0 |
|
583c: e9 f7 brne .-6 ; 0x5838 <_ZN5Print5writeEPKc+0x8> |
|
583e: ad 01 movw r20, r26 |
|
5840: 41 50 subi r20, 0x01 ; 1 |
|
5842: 51 09 sbc r21, r1 |
|
5844: 46 1b sub r20, r22 |
|
5846: 57 0b sbc r21, r23 |
|
5848: dc 01 movw r26, r24 |
|
584a: ed 91 ld r30, X+ |
|
584c: fc 91 ld r31, X |
|
584e: 02 80 ldd r0, Z+2 ; 0x02 |
|
5850: f3 81 ldd r31, Z+3 ; 0x03 |
|
5852: e0 2d mov r30, r0 |
|
5854: 09 94 ijmp |
|
} |
|
5856: 80 e0 ldi r24, 0x00 ; 0 |
|
5858: 90 e0 ldi r25, 0x00 ; 0 |
|
585a: 08 95 ret |
|
|
|
0000585c <_ZN5Print5printEc>: |
|
return write(str); |
|
} |
|
|
|
size_t Print::print(char c) |
|
{ |
|
return write(c); |
|
585c: dc 01 movw r26, r24 |
|
585e: ed 91 ld r30, X+ |
|
5860: fc 91 ld r31, X |
|
5862: 01 90 ld r0, Z+ |
|
5864: f0 81 ld r31, Z |
|
5866: e0 2d mov r30, r0 |
|
5868: 09 94 ijmp |
|
|
|
0000586a <_ZN5Print11printNumberEmh>: |
|
return n; |
|
} |
|
|
|
// Private Methods ///////////////////////////////////////////////////////////// |
|
|
|
size_t Print::printNumber(unsigned long n, uint8_t base) { |
|
586a: 8f 92 push r8 |
|
586c: 9f 92 push r9 |
|
586e: af 92 push r10 |
|
5870: bf 92 push r11 |
|
5872: cf 92 push r12 |
|
5874: df 92 push r13 |
|
5876: ef 92 push r14 |
|
5878: ff 92 push r15 |
|
587a: 0f 93 push r16 |
|
587c: 1f 93 push r17 |
|
587e: cf 93 push r28 |
|
5880: df 93 push r29 |
|
5882: cd b7 in r28, 0x3d ; 61 |
|
5884: de b7 in r29, 0x3e ; 62 |
|
5886: a1 97 sbiw r28, 0x21 ; 33 |
|
5888: 0f b6 in r0, 0x3f ; 63 |
|
588a: f8 94 cli |
|
588c: de bf out 0x3e, r29 ; 62 |
|
588e: 0f be out 0x3f, r0 ; 63 |
|
5890: cd bf out 0x3d, r28 ; 61 |
|
5892: 7c 01 movw r14, r24 |
|
5894: c4 2e mov r12, r20 |
|
5896: e5 2f mov r30, r21 |
|
5898: cb 01 movw r24, r22 |
|
589a: d2 2e mov r13, r18 |
|
char buf[8 * sizeof(long) + 1]; // Assumes 8-bit chars plus zero byte. |
|
char *str = &buf[sizeof(buf) - 1]; |
|
|
|
*str = '\0'; |
|
589c: 19 a2 std Y+33, r1 ; 0x21 |
|
|
|
// prevent crash if called with base == 1 |
|
if (base < 2) base = 10; |
|
589e: 21 e0 ldi r18, 0x01 ; 1 |
|
58a0: 2d 15 cp r18, r13 |
|
58a2: 10 f0 brcs .+4 ; 0x58a8 <_ZN5Print11printNumberEmh+0x3e> |
|
58a4: 2a e0 ldi r18, 0x0A ; 10 |
|
58a6: d2 2e mov r13, r18 |
|
58a8: 8e 01 movw r16, r28 |
|
58aa: 0f 5d subi r16, 0xDF ; 223 |
|
58ac: 1f 4f sbci r17, 0xFF ; 255 |
|
|
|
do { |
|
unsigned long m = n; |
|
n /= base; |
|
58ae: 8d 2c mov r8, r13 |
|
58b0: 91 2c mov r9, r1 |
|
58b2: a1 2c mov r10, r1 |
|
58b4: b1 2c mov r11, r1 |
|
58b6: 6c 2d mov r22, r12 |
|
58b8: 7e 2f mov r23, r30 |
|
58ba: a5 01 movw r20, r10 |
|
58bc: 94 01 movw r18, r8 |
|
58be: 0e 94 40 2f call 0x5e80 ; 0x5e80 <__udivmodsi4> |
|
char c = m - base * n; |
|
58c2: 8c 2d mov r24, r12 |
|
58c4: d2 9e mul r13, r18 |
|
58c6: 80 19 sub r24, r0 |
|
58c8: 11 24 eor r1, r1 |
|
*--str = c < 10 ? c + '0' : c + 'A' - 10; |
|
58ca: 01 50 subi r16, 0x01 ; 1 |
|
58cc: 11 09 sbc r17, r1 |
|
58ce: 8a 30 cpi r24, 0x0A ; 10 |
|
58d0: 14 f4 brge .+4 ; 0x58d6 <_ZN5Print11printNumberEmh+0x6c> |
|
58d2: 80 5d subi r24, 0xD0 ; 208 |
|
58d4: 01 c0 rjmp .+2 ; 0x58d8 <_ZN5Print11printNumberEmh+0x6e> |
|
58d6: 89 5c subi r24, 0xC9 ; 201 |
|
58d8: f8 01 movw r30, r16 |
|
58da: 80 83 st Z, r24 |
|
*str = '\0'; |
|
|
|
// prevent crash if called with base == 1 |
|
if (base < 2) base = 10; |
|
|
|
do { |
|
58dc: 21 15 cp r18, r1 |
|
58de: 31 05 cpc r19, r1 |
|
58e0: 41 05 cpc r20, r1 |
|
58e2: 51 05 cpc r21, r1 |
|
58e4: 21 f0 breq .+8 ; 0x58ee <_ZN5Print11printNumberEmh+0x84> |
|
unsigned long m = n; |
|
n /= base; |
|
58e6: c2 2e mov r12, r18 |
|
58e8: e3 2f mov r30, r19 |
|
58ea: ca 01 movw r24, r20 |
|
58ec: e4 cf rjmp .-56 ; 0x58b6 <_ZN5Print11printNumberEmh+0x4c> |
|
char c = m - base * n; |
|
*--str = c < 10 ? c + '0' : c + 'A' - 10; |
|
} while(n); |
|
|
|
return write(str); |
|
58ee: b8 01 movw r22, r16 |
|
58f0: c7 01 movw r24, r14 |
|
58f2: 0e 94 18 2c call 0x5830 ; 0x5830 <_ZN5Print5writeEPKc> |
|
} |
|
58f6: a1 96 adiw r28, 0x21 ; 33 |
|
58f8: 0f b6 in r0, 0x3f ; 63 |
|
58fa: f8 94 cli |
|
58fc: de bf out 0x3e, r29 ; 62 |
|
58fe: 0f be out 0x3f, r0 ; 63 |
|
5900: cd bf out 0x3d, r28 ; 61 |
|
5902: df 91 pop r29 |
|
5904: cf 91 pop r28 |
|
5906: 1f 91 pop r17 |
|
5908: 0f 91 pop r16 |
|
590a: ff 90 pop r15 |
|
590c: ef 90 pop r14 |
|
590e: df 90 pop r13 |
|
5910: cf 90 pop r12 |
|
5912: bf 90 pop r11 |
|
5914: af 90 pop r10 |
|
5916: 9f 90 pop r9 |
|
5918: 8f 90 pop r8 |
|
591a: 08 95 ret |
|
|
|
0000591c <_ZN5Print5printEmi>: |
|
} |
|
} |
|
|
|
size_t Print::print(unsigned long n, int base) |
|
{ |
|
if (base == 0) return write(n); |
|
591c: 21 15 cp r18, r1 |
|
591e: 31 05 cpc r19, r1 |
|
5920: 41 f4 brne .+16 ; 0x5932 <_ZN5Print5printEmi+0x16> |
|
5922: dc 01 movw r26, r24 |
|
5924: ed 91 ld r30, X+ |
|
5926: fc 91 ld r31, X |
|
5928: 01 90 ld r0, Z+ |
|
592a: f0 81 ld r31, Z |
|
592c: e0 2d mov r30, r0 |
|
592e: 64 2f mov r22, r20 |
|
5930: 09 94 ijmp |
|
else return printNumber(n, base); |
|
5932: 0c 94 35 2c jmp 0x586a ; 0x586a <_ZN5Print11printNumberEmh> |
|
|
|
00005936 <_ZN5Print5printEhi>: |
|
{ |
|
return write(c); |
|
} |
|
|
|
size_t Print::print(unsigned char b, int base) |
|
{ |
|
5936: 9a 01 movw r18, r20 |
|
return print((unsigned long) b, base); |
|
5938: 46 2f mov r20, r22 |
|
593a: 50 e0 ldi r21, 0x00 ; 0 |
|
593c: 60 e0 ldi r22, 0x00 ; 0 |
|
593e: 70 e0 ldi r23, 0x00 ; 0 |
|
5940: 0c 94 8e 2c jmp 0x591c ; 0x591c <_ZN5Print5printEmi> |
|
|
|
00005944 <__subsf3>: |
|
5944: 50 58 subi r21, 0x80 ; 128 |
|
|
|
00005946 <__addsf3>: |
|
5946: bb 27 eor r27, r27 |
|
5948: aa 27 eor r26, r26 |
|
594a: 0e d0 rcall .+28 ; 0x5968 <__addsf3x> |
|
594c: 75 c1 rjmp .+746 ; 0x5c38 <__fp_round> |
|
594e: 66 d1 rcall .+716 ; 0x5c1c <__fp_pscA> |
|
5950: 30 f0 brcs .+12 ; 0x595e <__addsf3+0x18> |
|
5952: 6b d1 rcall .+726 ; 0x5c2a <__fp_pscB> |
|
5954: 20 f0 brcs .+8 ; 0x595e <__addsf3+0x18> |
|
5956: 31 f4 brne .+12 ; 0x5964 <__addsf3+0x1e> |
|
5958: 9f 3f cpi r25, 0xFF ; 255 |
|
595a: 11 f4 brne .+4 ; 0x5960 <__addsf3+0x1a> |
|
595c: 1e f4 brtc .+6 ; 0x5964 <__addsf3+0x1e> |
|
595e: 5b c1 rjmp .+694 ; 0x5c16 <__fp_nan> |
|
5960: 0e f4 brtc .+2 ; 0x5964 <__addsf3+0x1e> |
|
5962: e0 95 com r30 |
|
5964: e7 fb bst r30, 7 |
|
5966: 51 c1 rjmp .+674 ; 0x5c0a <__fp_inf> |
|
|
|
00005968 <__addsf3x>: |
|
5968: e9 2f mov r30, r25 |
|
596a: 77 d1 rcall .+750 ; 0x5c5a <__fp_split3> |
|
596c: 80 f3 brcs .-32 ; 0x594e <__addsf3+0x8> |
|
596e: ba 17 cp r27, r26 |
|
5970: 62 07 cpc r22, r18 |
|
5972: 73 07 cpc r23, r19 |
|
5974: 84 07 cpc r24, r20 |
|
5976: 95 07 cpc r25, r21 |
|
5978: 18 f0 brcs .+6 ; 0x5980 <__addsf3x+0x18> |
|
597a: 71 f4 brne .+28 ; 0x5998 <__addsf3x+0x30> |
|
597c: 9e f5 brtc .+102 ; 0x59e4 <__addsf3x+0x7c> |
|
597e: 8f c1 rjmp .+798 ; 0x5c9e <__fp_zero> |
|
5980: 0e f4 brtc .+2 ; 0x5984 <__addsf3x+0x1c> |
|
5982: e0 95 com r30 |
|
5984: 0b 2e mov r0, r27 |
|
5986: ba 2f mov r27, r26 |
|
5988: a0 2d mov r26, r0 |
|
598a: 0b 01 movw r0, r22 |
|
598c: b9 01 movw r22, r18 |
|
598e: 90 01 movw r18, r0 |
|
5990: 0c 01 movw r0, r24 |
|
5992: ca 01 movw r24, r20 |
|
5994: a0 01 movw r20, r0 |
|
5996: 11 24 eor r1, r1 |
|
5998: ff 27 eor r31, r31 |
|
599a: 59 1b sub r21, r25 |
|
599c: 99 f0 breq .+38 ; 0x59c4 <__addsf3x+0x5c> |
|
599e: 59 3f cpi r21, 0xF9 ; 249 |
|
59a0: 50 f4 brcc .+20 ; 0x59b6 <__addsf3x+0x4e> |
|
59a2: 50 3e cpi r21, 0xE0 ; 224 |
|
59a4: 68 f1 brcs .+90 ; 0x5a00 <__addsf3x+0x98> |
|
59a6: 1a 16 cp r1, r26 |
|
59a8: f0 40 sbci r31, 0x00 ; 0 |
|
59aa: a2 2f mov r26, r18 |
|
59ac: 23 2f mov r18, r19 |
|
59ae: 34 2f mov r19, r20 |
|
59b0: 44 27 eor r20, r20 |
|
59b2: 58 5f subi r21, 0xF8 ; 248 |
|
59b4: f3 cf rjmp .-26 ; 0x599c <__addsf3x+0x34> |
|
59b6: 46 95 lsr r20 |
|
59b8: 37 95 ror r19 |
|
59ba: 27 95 ror r18 |
|
59bc: a7 95 ror r26 |
|
59be: f0 40 sbci r31, 0x00 ; 0 |
|
59c0: 53 95 inc r21 |
|
59c2: c9 f7 brne .-14 ; 0x59b6 <__addsf3x+0x4e> |
|
59c4: 7e f4 brtc .+30 ; 0x59e4 <__addsf3x+0x7c> |
|
59c6: 1f 16 cp r1, r31 |
|
59c8: ba 0b sbc r27, r26 |
|
59ca: 62 0b sbc r22, r18 |
|
59cc: 73 0b sbc r23, r19 |
|
59ce: 84 0b sbc r24, r20 |
|
59d0: ba f0 brmi .+46 ; 0x5a00 <__addsf3x+0x98> |
|
59d2: 91 50 subi r25, 0x01 ; 1 |
|
59d4: a1 f0 breq .+40 ; 0x59fe <__addsf3x+0x96> |
|
59d6: ff 0f add r31, r31 |
|
59d8: bb 1f adc r27, r27 |
|
59da: 66 1f adc r22, r22 |
|
59dc: 77 1f adc r23, r23 |
|
59de: 88 1f adc r24, r24 |
|
59e0: c2 f7 brpl .-16 ; 0x59d2 <__addsf3x+0x6a> |
|
59e2: 0e c0 rjmp .+28 ; 0x5a00 <__addsf3x+0x98> |
|
59e4: ba 0f add r27, r26 |
|
59e6: 62 1f adc r22, r18 |
|
59e8: 73 1f adc r23, r19 |
|
59ea: 84 1f adc r24, r20 |
|
59ec: 48 f4 brcc .+18 ; 0x5a00 <__addsf3x+0x98> |
|
59ee: 87 95 ror r24 |
|
59f0: 77 95 ror r23 |
|
59f2: 67 95 ror r22 |
|
59f4: b7 95 ror r27 |
|
59f6: f7 95 ror r31 |
|
59f8: 9e 3f cpi r25, 0xFE ; 254 |
|
59fa: 08 f0 brcs .+2 ; 0x59fe <__addsf3x+0x96> |
|
59fc: b3 cf rjmp .-154 ; 0x5964 <__addsf3+0x1e> |
|
59fe: 93 95 inc r25 |
|
5a00: 88 0f add r24, r24 |
|
5a02: 08 f0 brcs .+2 ; 0x5a06 <__addsf3x+0x9e> |
|
5a04: 99 27 eor r25, r25 |
|
5a06: ee 0f add r30, r30 |
|
5a08: 97 95 ror r25 |
|
5a0a: 87 95 ror r24 |
|
5a0c: 08 95 ret |
|
|
|
00005a0e <__cmpsf2>: |
|
5a0e: d9 d0 rcall .+434 ; 0x5bc2 <__fp_cmp> |
|
5a10: 08 f4 brcc .+2 ; 0x5a14 <__cmpsf2+0x6> |
|
5a12: 81 e0 ldi r24, 0x01 ; 1 |
|
5a14: 08 95 ret |
|
|
|
00005a16 <__divsf3>: |
|
5a16: 0c d0 rcall .+24 ; 0x5a30 <__divsf3x> |
|
5a18: 0f c1 rjmp .+542 ; 0x5c38 <__fp_round> |
|
5a1a: 07 d1 rcall .+526 ; 0x5c2a <__fp_pscB> |
|
5a1c: 40 f0 brcs .+16 ; 0x5a2e <__divsf3+0x18> |
|
5a1e: fe d0 rcall .+508 ; 0x5c1c <__fp_pscA> |
|
5a20: 30 f0 brcs .+12 ; 0x5a2e <__divsf3+0x18> |
|
5a22: 21 f4 brne .+8 ; 0x5a2c <__divsf3+0x16> |
|
5a24: 5f 3f cpi r21, 0xFF ; 255 |
|
5a26: 19 f0 breq .+6 ; 0x5a2e <__divsf3+0x18> |
|
5a28: f0 c0 rjmp .+480 ; 0x5c0a <__fp_inf> |
|
5a2a: 51 11 cpse r21, r1 |
|
5a2c: 39 c1 rjmp .+626 ; 0x5ca0 <__fp_szero> |
|
5a2e: f3 c0 rjmp .+486 ; 0x5c16 <__fp_nan> |
|
|
|
00005a30 <__divsf3x>: |
|
5a30: 14 d1 rcall .+552 ; 0x5c5a <__fp_split3> |
|
5a32: 98 f3 brcs .-26 ; 0x5a1a <__divsf3+0x4> |
|
|
|
00005a34 <__divsf3_pse>: |
|
5a34: 99 23 and r25, r25 |
|
5a36: c9 f3 breq .-14 ; 0x5a2a <__divsf3+0x14> |
|
5a38: 55 23 and r21, r21 |
|
5a3a: b1 f3 breq .-20 ; 0x5a28 <__divsf3+0x12> |
|
5a3c: 95 1b sub r25, r21 |
|
5a3e: 55 0b sbc r21, r21 |
|
5a40: bb 27 eor r27, r27 |
|
5a42: aa 27 eor r26, r26 |
|
5a44: 62 17 cp r22, r18 |
|
5a46: 73 07 cpc r23, r19 |
|
5a48: 84 07 cpc r24, r20 |
|
5a4a: 38 f0 brcs .+14 ; 0x5a5a <__divsf3_pse+0x26> |
|
5a4c: 9f 5f subi r25, 0xFF ; 255 |
|
5a4e: 5f 4f sbci r21, 0xFF ; 255 |
|
5a50: 22 0f add r18, r18 |
|
5a52: 33 1f adc r19, r19 |
|
5a54: 44 1f adc r20, r20 |
|
5a56: aa 1f adc r26, r26 |
|
5a58: a9 f3 breq .-22 ; 0x5a44 <__divsf3_pse+0x10> |
|
5a5a: 33 d0 rcall .+102 ; 0x5ac2 <__divsf3_pse+0x8e> |
|
5a5c: 0e 2e mov r0, r30 |
|
5a5e: 3a f0 brmi .+14 ; 0x5a6e <__divsf3_pse+0x3a> |
|
5a60: e0 e8 ldi r30, 0x80 ; 128 |
|
5a62: 30 d0 rcall .+96 ; 0x5ac4 <__divsf3_pse+0x90> |
|
5a64: 91 50 subi r25, 0x01 ; 1 |
|
5a66: 50 40 sbci r21, 0x00 ; 0 |
|
5a68: e6 95 lsr r30 |
|
5a6a: 00 1c adc r0, r0 |
|
5a6c: ca f7 brpl .-14 ; 0x5a60 <__divsf3_pse+0x2c> |
|
5a6e: 29 d0 rcall .+82 ; 0x5ac2 <__divsf3_pse+0x8e> |
|
5a70: fe 2f mov r31, r30 |
|
5a72: 27 d0 rcall .+78 ; 0x5ac2 <__divsf3_pse+0x8e> |
|
5a74: 66 0f add r22, r22 |
|
5a76: 77 1f adc r23, r23 |
|
5a78: 88 1f adc r24, r24 |
|
5a7a: bb 1f adc r27, r27 |
|
5a7c: 26 17 cp r18, r22 |
|
5a7e: 37 07 cpc r19, r23 |
|
5a80: 48 07 cpc r20, r24 |
|
5a82: ab 07 cpc r26, r27 |
|
5a84: b0 e8 ldi r27, 0x80 ; 128 |
|
5a86: 09 f0 breq .+2 ; 0x5a8a <__divsf3_pse+0x56> |
|
5a88: bb 0b sbc r27, r27 |
|
5a8a: 80 2d mov r24, r0 |
|
5a8c: bf 01 movw r22, r30 |
|
5a8e: ff 27 eor r31, r31 |
|
5a90: 93 58 subi r25, 0x83 ; 131 |
|
5a92: 5f 4f sbci r21, 0xFF ; 255 |
|
5a94: 2a f0 brmi .+10 ; 0x5aa0 <__divsf3_pse+0x6c> |
|
5a96: 9e 3f cpi r25, 0xFE ; 254 |
|
5a98: 51 05 cpc r21, r1 |
|
5a9a: 68 f0 brcs .+26 ; 0x5ab6 <__divsf3_pse+0x82> |
|
5a9c: b6 c0 rjmp .+364 ; 0x5c0a <__fp_inf> |
|
5a9e: 00 c1 rjmp .+512 ; 0x5ca0 <__fp_szero> |
|
5aa0: 5f 3f cpi r21, 0xFF ; 255 |
|
5aa2: ec f3 brlt .-6 ; 0x5a9e <__divsf3_pse+0x6a> |
|
5aa4: 98 3e cpi r25, 0xE8 ; 232 |
|
5aa6: dc f3 brlt .-10 ; 0x5a9e <__divsf3_pse+0x6a> |
|
5aa8: 86 95 lsr r24 |
|
5aaa: 77 95 ror r23 |
|
5aac: 67 95 ror r22 |
|
5aae: b7 95 ror r27 |
|
5ab0: f7 95 ror r31 |
|
5ab2: 9f 5f subi r25, 0xFF ; 255 |
|
5ab4: c9 f7 brne .-14 ; 0x5aa8 <__divsf3_pse+0x74> |
|
5ab6: 88 0f add r24, r24 |
|
5ab8: 91 1d adc r25, r1 |
|
5aba: 96 95 lsr r25 |
|
5abc: 87 95 ror r24 |
|
5abe: 97 f9 bld r25, 7 |
|
5ac0: 08 95 ret |
|
5ac2: e1 e0 ldi r30, 0x01 ; 1 |
|
5ac4: 66 0f add r22, r22 |
|
5ac6: 77 1f adc r23, r23 |
|
5ac8: 88 1f adc r24, r24 |
|
5aca: bb 1f adc r27, r27 |
|
5acc: 62 17 cp r22, r18 |
|
5ace: 73 07 cpc r23, r19 |
|
5ad0: 84 07 cpc r24, r20 |
|
5ad2: ba 07 cpc r27, r26 |
|
5ad4: 20 f0 brcs .+8 ; 0x5ade <__divsf3_pse+0xaa> |
|
5ad6: 62 1b sub r22, r18 |
|
5ad8: 73 0b sbc r23, r19 |
|
5ada: 84 0b sbc r24, r20 |
|
5adc: ba 0b sbc r27, r26 |
|
5ade: ee 1f adc r30, r30 |
|
5ae0: 88 f7 brcc .-30 ; 0x5ac4 <__divsf3_pse+0x90> |
|
5ae2: e0 95 com r30 |
|
5ae4: 08 95 ret |
|
|
|
00005ae6 <__fixsfsi>: |
|
5ae6: 04 d0 rcall .+8 ; 0x5af0 <__fixunssfsi> |
|
5ae8: 68 94 set |
|
5aea: b1 11 cpse r27, r1 |
|
5aec: d9 c0 rjmp .+434 ; 0x5ca0 <__fp_szero> |
|
5aee: 08 95 ret |
|
|
|
00005af0 <__fixunssfsi>: |
|
5af0: bc d0 rcall .+376 ; 0x5c6a <__fp_splitA> |
|
5af2: 88 f0 brcs .+34 ; 0x5b16 <__fixunssfsi+0x26> |
|
5af4: 9f 57 subi r25, 0x7F ; 127 |
|
5af6: 90 f0 brcs .+36 ; 0x5b1c <__fixunssfsi+0x2c> |
|
5af8: b9 2f mov r27, r25 |
|
5afa: 99 27 eor r25, r25 |
|
5afc: b7 51 subi r27, 0x17 ; 23 |
|
5afe: a0 f0 brcs .+40 ; 0x5b28 <__fixunssfsi+0x38> |
|
5b00: d1 f0 breq .+52 ; 0x5b36 <__fixunssfsi+0x46> |
|
5b02: 66 0f add r22, r22 |
|
5b04: 77 1f adc r23, r23 |
|
5b06: 88 1f adc r24, r24 |
|
5b08: 99 1f adc r25, r25 |
|
5b0a: 1a f0 brmi .+6 ; 0x5b12 <__fixunssfsi+0x22> |
|
5b0c: ba 95 dec r27 |
|
5b0e: c9 f7 brne .-14 ; 0x5b02 <__fixunssfsi+0x12> |
|
5b10: 12 c0 rjmp .+36 ; 0x5b36 <__fixunssfsi+0x46> |
|
5b12: b1 30 cpi r27, 0x01 ; 1 |
|
5b14: 81 f0 breq .+32 ; 0x5b36 <__fixunssfsi+0x46> |
|
5b16: c3 d0 rcall .+390 ; 0x5c9e <__fp_zero> |
|
5b18: b1 e0 ldi r27, 0x01 ; 1 |
|
5b1a: 08 95 ret |
|
5b1c: c0 c0 rjmp .+384 ; 0x5c9e <__fp_zero> |
|
5b1e: 67 2f mov r22, r23 |
|
5b20: 78 2f mov r23, r24 |
|
5b22: 88 27 eor r24, r24 |
|
5b24: b8 5f subi r27, 0xF8 ; 248 |
|
5b26: 39 f0 breq .+14 ; 0x5b36 <__fixunssfsi+0x46> |
|
5b28: b9 3f cpi r27, 0xF9 ; 249 |
|
5b2a: cc f3 brlt .-14 ; 0x5b1e <__fixunssfsi+0x2e> |
|
5b2c: 86 95 lsr r24 |
|
5b2e: 77 95 ror r23 |
|
5b30: 67 95 ror r22 |
|
5b32: b3 95 inc r27 |
|
5b34: d9 f7 brne .-10 ; 0x5b2c <__fixunssfsi+0x3c> |
|
5b36: 3e f4 brtc .+14 ; 0x5b46 <__fixunssfsi+0x56> |
|
5b38: 90 95 com r25 |
|
5b3a: 80 95 com r24 |
|
5b3c: 70 95 com r23 |
|
5b3e: 61 95 neg r22 |
|
5b40: 7f 4f sbci r23, 0xFF ; 255 |
|
5b42: 8f 4f sbci r24, 0xFF ; 255 |
|
5b44: 9f 4f sbci r25, 0xFF ; 255 |
|
5b46: 08 95 ret |
|
|
|
00005b48 <__floatunsisf>: |
|
5b48: e8 94 clt |
|
5b4a: 09 c0 rjmp .+18 ; 0x5b5e <__floatsisf+0x12> |
|
|
|
00005b4c <__floatsisf>: |
|
5b4c: 97 fb bst r25, 7 |
|
5b4e: 3e f4 brtc .+14 ; 0x5b5e <__floatsisf+0x12> |
|
5b50: 90 95 com r25 |
|
5b52: 80 95 com r24 |
|
5b54: 70 95 com r23 |
|
5b56: 61 95 neg r22 |
|
5b58: 7f 4f sbci r23, 0xFF ; 255 |
|
5b5a: 8f 4f sbci r24, 0xFF ; 255 |
|
5b5c: 9f 4f sbci r25, 0xFF ; 255 |
|
5b5e: 99 23 and r25, r25 |
|
5b60: a9 f0 breq .+42 ; 0x5b8c <__floatsisf+0x40> |
|
5b62: f9 2f mov r31, r25 |
|
5b64: 96 e9 ldi r25, 0x96 ; 150 |
|
5b66: bb 27 eor r27, r27 |
|
5b68: 93 95 inc r25 |
|
5b6a: f6 95 lsr r31 |
|
5b6c: 87 95 ror r24 |
|
5b6e: 77 95 ror r23 |
|
5b70: 67 95 ror r22 |
|
5b72: b7 95 ror r27 |
|
5b74: f1 11 cpse r31, r1 |
|
5b76: f8 cf rjmp .-16 ; 0x5b68 <__floatsisf+0x1c> |
|
5b78: fa f4 brpl .+62 ; 0x5bb8 <__floatsisf+0x6c> |
|
5b7a: bb 0f add r27, r27 |
|
5b7c: 11 f4 brne .+4 ; 0x5b82 <__floatsisf+0x36> |
|
5b7e: 60 ff sbrs r22, 0 |
|
5b80: 1b c0 rjmp .+54 ; 0x5bb8 <__floatsisf+0x6c> |
|
5b82: 6f 5f subi r22, 0xFF ; 255 |
|
5b84: 7f 4f sbci r23, 0xFF ; 255 |
|
5b86: 8f 4f sbci r24, 0xFF ; 255 |
|
5b88: 9f 4f sbci r25, 0xFF ; 255 |
|
5b8a: 16 c0 rjmp .+44 ; 0x5bb8 <__floatsisf+0x6c> |
|
5b8c: 88 23 and r24, r24 |
|
5b8e: 11 f0 breq .+4 ; 0x5b94 <__floatsisf+0x48> |
|
5b90: 96 e9 ldi r25, 0x96 ; 150 |
|
5b92: 11 c0 rjmp .+34 ; 0x5bb6 <__floatsisf+0x6a> |
|
5b94: 77 23 and r23, r23 |
|
5b96: 21 f0 breq .+8 ; 0x5ba0 <__floatsisf+0x54> |
|
5b98: 9e e8 ldi r25, 0x8E ; 142 |
|
5b9a: 87 2f mov r24, r23 |
|
5b9c: 76 2f mov r23, r22 |
|
5b9e: 05 c0 rjmp .+10 ; 0x5baa <__floatsisf+0x5e> |
|
5ba0: 66 23 and r22, r22 |
|
5ba2: 71 f0 breq .+28 ; 0x5bc0 <__floatsisf+0x74> |
|
5ba4: 96 e8 ldi r25, 0x86 ; 134 |
|
5ba6: 86 2f mov r24, r22 |
|
5ba8: 70 e0 ldi r23, 0x00 ; 0 |
|
5baa: 60 e0 ldi r22, 0x00 ; 0 |
|
5bac: 2a f0 brmi .+10 ; 0x5bb8 <__floatsisf+0x6c> |
|
5bae: 9a 95 dec r25 |
|
5bb0: 66 0f add r22, r22 |
|
5bb2: 77 1f adc r23, r23 |
|
5bb4: 88 1f adc r24, r24 |
|
5bb6: da f7 brpl .-10 ; 0x5bae <__floatsisf+0x62> |
|
5bb8: 88 0f add r24, r24 |
|
5bba: 96 95 lsr r25 |
|
5bbc: 87 95 ror r24 |
|
5bbe: 97 f9 bld r25, 7 |
|
5bc0: 08 95 ret |
|
|
|
00005bc2 <__fp_cmp>: |
|
5bc2: 99 0f add r25, r25 |
|
5bc4: 00 08 sbc r0, r0 |
|
5bc6: 55 0f add r21, r21 |
|
5bc8: aa 0b sbc r26, r26 |
|
5bca: e0 e8 ldi r30, 0x80 ; 128 |
|
5bcc: fe ef ldi r31, 0xFE ; 254 |
|
5bce: 16 16 cp r1, r22 |
|
5bd0: 17 06 cpc r1, r23 |
|
5bd2: e8 07 cpc r30, r24 |
|
5bd4: f9 07 cpc r31, r25 |
|
5bd6: c0 f0 brcs .+48 ; 0x5c08 <__fp_cmp+0x46> |
|
5bd8: 12 16 cp r1, r18 |
|
5bda: 13 06 cpc r1, r19 |
|
5bdc: e4 07 cpc r30, r20 |
|
5bde: f5 07 cpc r31, r21 |
|
5be0: 98 f0 brcs .+38 ; 0x5c08 <__fp_cmp+0x46> |
|
5be2: 62 1b sub r22, r18 |
|
5be4: 73 0b sbc r23, r19 |
|
5be6: 84 0b sbc r24, r20 |
|
5be8: 95 0b sbc r25, r21 |
|
5bea: 39 f4 brne .+14 ; 0x5bfa <__fp_cmp+0x38> |
|
5bec: 0a 26 eor r0, r26 |
|
5bee: 61 f0 breq .+24 ; 0x5c08 <__fp_cmp+0x46> |
|
5bf0: 23 2b or r18, r19 |
|
5bf2: 24 2b or r18, r20 |
|
5bf4: 25 2b or r18, r21 |
|
5bf6: 21 f4 brne .+8 ; 0x5c00 <__fp_cmp+0x3e> |
|
5bf8: 08 95 ret |
|
5bfa: 0a 26 eor r0, r26 |
|
5bfc: 09 f4 brne .+2 ; 0x5c00 <__fp_cmp+0x3e> |
|
5bfe: a1 40 sbci r26, 0x01 ; 1 |
|
5c00: a6 95 lsr r26 |
|
5c02: 8f ef ldi r24, 0xFF ; 255 |
|
5c04: 81 1d adc r24, r1 |
|
5c06: 81 1d adc r24, r1 |
|
5c08: 08 95 ret |
|
|
|
00005c0a <__fp_inf>: |
|
5c0a: 97 f9 bld r25, 7 |
|
5c0c: 9f 67 ori r25, 0x7F ; 127 |
|
5c0e: 80 e8 ldi r24, 0x80 ; 128 |
|
5c10: 70 e0 ldi r23, 0x00 ; 0 |
|
5c12: 60 e0 ldi r22, 0x00 ; 0 |
|
5c14: 08 95 ret |
|
|
|
00005c16 <__fp_nan>: |
|
5c16: 9f ef ldi r25, 0xFF ; 255 |
|
5c18: 80 ec ldi r24, 0xC0 ; 192 |
|
5c1a: 08 95 ret |
|
|
|
00005c1c <__fp_pscA>: |
|
5c1c: 00 24 eor r0, r0 |
|
5c1e: 0a 94 dec r0 |
|
5c20: 16 16 cp r1, r22 |
|
5c22: 17 06 cpc r1, r23 |
|
5c24: 18 06 cpc r1, r24 |
|
5c26: 09 06 cpc r0, r25 |
|
5c28: 08 95 ret |
|
|
|
00005c2a <__fp_pscB>: |
|
5c2a: 00 24 eor r0, r0 |
|
5c2c: 0a 94 dec r0 |
|
5c2e: 12 16 cp r1, r18 |
|
5c30: 13 06 cpc r1, r19 |
|
5c32: 14 06 cpc r1, r20 |
|
5c34: 05 06 cpc r0, r21 |
|
5c36: 08 95 ret |
|
|
|
00005c38 <__fp_round>: |
|
5c38: 09 2e mov r0, r25 |
|
5c3a: 03 94 inc r0 |
|
5c3c: 00 0c add r0, r0 |
|
5c3e: 11 f4 brne .+4 ; 0x5c44 <__fp_round+0xc> |
|
5c40: 88 23 and r24, r24 |
|
5c42: 52 f0 brmi .+20 ; 0x5c58 <__fp_round+0x20> |
|
5c44: bb 0f add r27, r27 |
|
5c46: 40 f4 brcc .+16 ; 0x5c58 <__fp_round+0x20> |
|
5c48: bf 2b or r27, r31 |
|
5c4a: 11 f4 brne .+4 ; 0x5c50 <__fp_round+0x18> |
|
5c4c: 60 ff sbrs r22, 0 |
|
5c4e: 04 c0 rjmp .+8 ; 0x5c58 <__fp_round+0x20> |
|
5c50: 6f 5f subi r22, 0xFF ; 255 |
|
5c52: 7f 4f sbci r23, 0xFF ; 255 |
|
5c54: 8f 4f sbci r24, 0xFF ; 255 |
|
5c56: 9f 4f sbci r25, 0xFF ; 255 |
|
5c58: 08 95 ret |
|
|
|
00005c5a <__fp_split3>: |
|
5c5a: 57 fd sbrc r21, 7 |
|
5c5c: 90 58 subi r25, 0x80 ; 128 |
|
5c5e: 44 0f add r20, r20 |
|
5c60: 55 1f adc r21, r21 |
|
5c62: 59 f0 breq .+22 ; 0x5c7a <__fp_splitA+0x10> |
|
5c64: 5f 3f cpi r21, 0xFF ; 255 |
|
5c66: 71 f0 breq .+28 ; 0x5c84 <__fp_splitA+0x1a> |
|
5c68: 47 95 ror r20 |
|
|
|
00005c6a <__fp_splitA>: |
|
5c6a: 88 0f add r24, r24 |
|
5c6c: 97 fb bst r25, 7 |
|
5c6e: 99 1f adc r25, r25 |
|
5c70: 61 f0 breq .+24 ; 0x5c8a <__fp_splitA+0x20> |
|
5c72: 9f 3f cpi r25, 0xFF ; 255 |
|
5c74: 79 f0 breq .+30 ; 0x5c94 <__fp_splitA+0x2a> |
|
5c76: 87 95 ror r24 |
|
5c78: 08 95 ret |
|
5c7a: 12 16 cp r1, r18 |
|
5c7c: 13 06 cpc r1, r19 |
|
5c7e: 14 06 cpc r1, r20 |
|
5c80: 55 1f adc r21, r21 |
|
5c82: f2 cf rjmp .-28 ; 0x5c68 <__fp_split3+0xe> |
|
5c84: 46 95 lsr r20 |
|
5c86: f1 df rcall .-30 ; 0x5c6a <__fp_splitA> |
|
5c88: 08 c0 rjmp .+16 ; 0x5c9a <__fp_splitA+0x30> |
|
5c8a: 16 16 cp r1, r22 |
|
5c8c: 17 06 cpc r1, r23 |
|
5c8e: 18 06 cpc r1, r24 |
|
5c90: 99 1f adc r25, r25 |
|
5c92: f1 cf rjmp .-30 ; 0x5c76 <__fp_splitA+0xc> |
|
5c94: 86 95 lsr r24 |
|
5c96: 71 05 cpc r23, r1 |
|
5c98: 61 05 cpc r22, r1 |
|
5c9a: 08 94 sec |
|
5c9c: 08 95 ret |
|
|
|
00005c9e <__fp_zero>: |
|
5c9e: e8 94 clt |
|
|
|
00005ca0 <__fp_szero>: |
|
5ca0: bb 27 eor r27, r27 |
|
5ca2: 66 27 eor r22, r22 |
|
5ca4: 77 27 eor r23, r23 |
|
5ca6: cb 01 movw r24, r22 |
|
5ca8: 97 f9 bld r25, 7 |
|
5caa: 08 95 ret |
|
|
|
00005cac <__gesf2>: |
|
5cac: 8a df rcall .-236 ; 0x5bc2 <__fp_cmp> |
|
5cae: 08 f4 brcc .+2 ; 0x5cb2 <__gesf2+0x6> |
|
5cb0: 8f ef ldi r24, 0xFF ; 255 |
|
5cb2: 08 95 ret |
|
|
|
00005cb4 <__mulsf3>: |
|
5cb4: 0b d0 rcall .+22 ; 0x5ccc <__mulsf3x> |
|
5cb6: c0 cf rjmp .-128 ; 0x5c38 <__fp_round> |
|
5cb8: b1 df rcall .-158 ; 0x5c1c <__fp_pscA> |
|
5cba: 28 f0 brcs .+10 ; 0x5cc6 <__mulsf3+0x12> |
|
5cbc: b6 df rcall .-148 ; 0x5c2a <__fp_pscB> |
|
5cbe: 18 f0 brcs .+6 ; 0x5cc6 <__mulsf3+0x12> |
|
5cc0: 95 23 and r25, r21 |
|
5cc2: 09 f0 breq .+2 ; 0x5cc6 <__mulsf3+0x12> |
|
5cc4: a2 cf rjmp .-188 ; 0x5c0a <__fp_inf> |
|
5cc6: a7 cf rjmp .-178 ; 0x5c16 <__fp_nan> |
|
5cc8: 11 24 eor r1, r1 |
|
5cca: ea cf rjmp .-44 ; 0x5ca0 <__fp_szero> |
|
|
|
00005ccc <__mulsf3x>: |
|
5ccc: c6 df rcall .-116 ; 0x5c5a <__fp_split3> |
|
5cce: a0 f3 brcs .-24 ; 0x5cb8 <__mulsf3+0x4> |
|
|
|
00005cd0 <__mulsf3_pse>: |
|
5cd0: 95 9f mul r25, r21 |
|
5cd2: d1 f3 breq .-12 ; 0x5cc8 <__mulsf3+0x14> |
|
5cd4: 95 0f add r25, r21 |
|
5cd6: 50 e0 ldi r21, 0x00 ; 0 |
|
5cd8: 55 1f adc r21, r21 |
|
5cda: 62 9f mul r22, r18 |
|
5cdc: f0 01 movw r30, r0 |
|
5cde: 72 9f mul r23, r18 |
|
5ce0: bb 27 eor r27, r27 |
|
5ce2: f0 0d add r31, r0 |
|
5ce4: b1 1d adc r27, r1 |
|
5ce6: 63 9f mul r22, r19 |
|
5ce8: aa 27 eor r26, r26 |
|
5cea: f0 0d add r31, r0 |
|
5cec: b1 1d adc r27, r1 |
|
5cee: aa 1f adc r26, r26 |
|
5cf0: 64 9f mul r22, r20 |
|
5cf2: 66 27 eor r22, r22 |
|
5cf4: b0 0d add r27, r0 |
|
5cf6: a1 1d adc r26, r1 |
|
5cf8: 66 1f adc r22, r22 |
|
5cfa: 82 9f mul r24, r18 |
|
5cfc: 22 27 eor r18, r18 |
|
5cfe: b0 0d add r27, r0 |
|
5d00: a1 1d adc r26, r1 |
|
5d02: 62 1f adc r22, r18 |
|
5d04: 73 9f mul r23, r19 |
|
5d06: b0 0d add r27, r0 |
|
5d08: a1 1d adc r26, r1 |
|
5d0a: 62 1f adc r22, r18 |
|
5d0c: 83 9f mul r24, r19 |
|
5d0e: a0 0d add r26, r0 |
|
5d10: 61 1d adc r22, r1 |
|
5d12: 22 1f adc r18, r18 |
|
5d14: 74 9f mul r23, r20 |
|
5d16: 33 27 eor r19, r19 |
|
5d18: a0 0d add r26, r0 |
|
5d1a: 61 1d adc r22, r1 |
|
5d1c: 23 1f adc r18, r19 |
|
5d1e: 84 9f mul r24, r20 |
|
5d20: 60 0d add r22, r0 |
|
5d22: 21 1d adc r18, r1 |
|
5d24: 82 2f mov r24, r18 |
|
5d26: 76 2f mov r23, r22 |
|
5d28: 6a 2f mov r22, r26 |
|
5d2a: 11 24 eor r1, r1 |
|
5d2c: 9f 57 subi r25, 0x7F ; 127 |
|
5d2e: 50 40 sbci r21, 0x00 ; 0 |
|
5d30: 8a f0 brmi .+34 ; 0x5d54 <__mulsf3_pse+0x84> |
|
5d32: e1 f0 breq .+56 ; 0x5d6c <__mulsf3_pse+0x9c> |
|
5d34: 88 23 and r24, r24 |
|
5d36: 4a f0 brmi .+18 ; 0x5d4a <__mulsf3_pse+0x7a> |
|
5d38: ee 0f add r30, r30 |
|
5d3a: ff 1f adc r31, r31 |
|
5d3c: bb 1f adc r27, r27 |
|
5d3e: 66 1f adc r22, r22 |
|
5d40: 77 1f adc r23, r23 |
|
5d42: 88 1f adc r24, r24 |
|
5d44: 91 50 subi r25, 0x01 ; 1 |
|
5d46: 50 40 sbci r21, 0x00 ; 0 |
|
5d48: a9 f7 brne .-22 ; 0x5d34 <__mulsf3_pse+0x64> |
|
5d4a: 9e 3f cpi r25, 0xFE ; 254 |
|
5d4c: 51 05 cpc r21, r1 |
|
5d4e: 70 f0 brcs .+28 ; 0x5d6c <__mulsf3_pse+0x9c> |
|
5d50: 5c cf rjmp .-328 ; 0x5c0a <__fp_inf> |
|
5d52: a6 cf rjmp .-180 ; 0x5ca0 <__fp_szero> |
|
5d54: 5f 3f cpi r21, 0xFF ; 255 |
|
5d56: ec f3 brlt .-6 ; 0x5d52 <__mulsf3_pse+0x82> |
|
5d58: 98 3e cpi r25, 0xE8 ; 232 |
|
5d5a: dc f3 brlt .-10 ; 0x5d52 <__mulsf3_pse+0x82> |
|
5d5c: 86 95 lsr r24 |
|
5d5e: 77 95 ror r23 |
|
5d60: 67 95 ror r22 |
|
5d62: b7 95 ror r27 |
|
5d64: f7 95 ror r31 |
|
5d66: e7 95 ror r30 |
|
5d68: 9f 5f subi r25, 0xFF ; 255 |
|
5d6a: c1 f7 brne .-16 ; 0x5d5c <__mulsf3_pse+0x8c> |
|
5d6c: fe 2b or r31, r30 |
|
5d6e: 88 0f add r24, r24 |
|
5d70: 91 1d adc r25, r1 |
|
5d72: 96 95 lsr r25 |
|
5d74: 87 95 ror r24 |
|
5d76: 97 f9 bld r25, 7 |
|
5d78: 08 95 ret |
|
|
|
00005d7a <sin>: |
|
5d7a: 9f 93 push r25 |
|
5d7c: 05 d0 rcall .+10 ; 0x5d88 <__fp_rempio2> |
|
5d7e: 0f 90 pop r0 |
|
5d80: 07 fc sbrc r0, 7 |
|
5d82: ee 5f subi r30, 0xFE ; 254 |
|
5d84: 28 c0 rjmp .+80 ; 0x5dd6 <__fp_sinus> |
|
5d86: 47 cf rjmp .-370 ; 0x5c16 <__fp_nan> |
|
|
|
00005d88 <__fp_rempio2>: |
|
5d88: 70 df rcall .-288 ; 0x5c6a <__fp_splitA> |
|
5d8a: e8 f3 brcs .-6 ; 0x5d86 <sin+0xc> |
|
5d8c: e8 94 clt |
|
5d8e: e0 e0 ldi r30, 0x00 ; 0 |
|
5d90: bb 27 eor r27, r27 |
|
5d92: 9f 57 subi r25, 0x7F ; 127 |
|
5d94: f0 f0 brcs .+60 ; 0x5dd2 <__fp_rempio2+0x4a> |
|
5d96: 2a ed ldi r18, 0xDA ; 218 |
|
5d98: 3f e0 ldi r19, 0x0F ; 15 |
|
5d9a: 49 ec ldi r20, 0xC9 ; 201 |
|
5d9c: 06 c0 rjmp .+12 ; 0x5daa <__fp_rempio2+0x22> |
|
5d9e: ee 0f add r30, r30 |
|
5da0: bb 0f add r27, r27 |
|
5da2: 66 1f adc r22, r22 |
|
5da4: 77 1f adc r23, r23 |
|
5da6: 88 1f adc r24, r24 |
|
5da8: 28 f0 brcs .+10 ; 0x5db4 <__fp_rempio2+0x2c> |
|
5daa: b2 3a cpi r27, 0xA2 ; 162 |
|
5dac: 62 07 cpc r22, r18 |
|
5dae: 73 07 cpc r23, r19 |
|
5db0: 84 07 cpc r24, r20 |
|
5db2: 28 f0 brcs .+10 ; 0x5dbe <__fp_rempio2+0x36> |
|
5db4: b2 5a subi r27, 0xA2 ; 162 |
|
5db6: 62 0b sbc r22, r18 |
|
5db8: 73 0b sbc r23, r19 |
|
5dba: 84 0b sbc r24, r20 |
|
5dbc: e3 95 inc r30 |
|
5dbe: 9a 95 dec r25 |
|
5dc0: 72 f7 brpl .-36 ; 0x5d9e <__fp_rempio2+0x16> |
|
5dc2: 80 38 cpi r24, 0x80 ; 128 |
|
5dc4: 30 f4 brcc .+12 ; 0x5dd2 <__fp_rempio2+0x4a> |
|
5dc6: 9a 95 dec r25 |
|
5dc8: bb 0f add r27, r27 |
|
5dca: 66 1f adc r22, r22 |
|
5dcc: 77 1f adc r23, r23 |
|
5dce: 88 1f adc r24, r24 |
|
5dd0: d2 f7 brpl .-12 ; 0x5dc6 <__fp_rempio2+0x3e> |
|
5dd2: 90 48 sbci r25, 0x80 ; 128 |
|
5dd4: 13 c0 rjmp .+38 ; 0x5dfc <__fp_mpack_finite> |
|
|
|
00005dd6 <__fp_sinus>: |
|
5dd6: ef 93 push r30 |
|
5dd8: e0 ff sbrs r30, 0 |
|
5dda: 06 c0 rjmp .+12 ; 0x5de8 <__fp_sinus+0x12> |
|
5ddc: a2 ea ldi r26, 0xA2 ; 162 |
|
5dde: 2a ed ldi r18, 0xDA ; 218 |
|
5de0: 3f e0 ldi r19, 0x0F ; 15 |
|
5de2: 49 ec ldi r20, 0xC9 ; 201 |
|
5de4: 5f eb ldi r21, 0xBF ; 191 |
|
5de6: c0 dd rcall .-1152 ; 0x5968 <__addsf3x> |
|
5de8: 27 df rcall .-434 ; 0x5c38 <__fp_round> |
|
5dea: 0f 90 pop r0 |
|
5dec: 03 94 inc r0 |
|
5dee: 01 fc sbrc r0, 1 |
|
5df0: 90 58 subi r25, 0x80 ; 128 |
|
5df2: e8 e8 ldi r30, 0x88 ; 136 |
|
5df4: f0 e0 ldi r31, 0x00 ; 0 |
|
5df6: 0e c0 rjmp .+28 ; 0x5e14 <__fp_powsodd> |
|
|
|
00005df8 <__fp_mpack>: |
|
5df8: 9f 3f cpi r25, 0xFF ; 255 |
|
5dfa: 31 f0 breq .+12 ; 0x5e08 <__fp_mpack_finite+0xc> |
|
|
|
00005dfc <__fp_mpack_finite>: |
|
5dfc: 91 50 subi r25, 0x01 ; 1 |
|
5dfe: 20 f4 brcc .+8 ; 0x5e08 <__fp_mpack_finite+0xc> |
|
5e00: 87 95 ror r24 |
|
5e02: 77 95 ror r23 |
|
5e04: 67 95 ror r22 |
|
5e06: b7 95 ror r27 |
|
5e08: 88 0f add r24, r24 |
|
5e0a: 91 1d adc r25, r1 |
|
5e0c: 96 95 lsr r25 |
|
5e0e: 87 95 ror r24 |
|
5e10: 97 f9 bld r25, 7 |
|
5e12: 08 95 ret |
|
|
|
00005e14 <__fp_powsodd>: |
|
5e14: 9f 93 push r25 |
|
5e16: 8f 93 push r24 |
|
5e18: 7f 93 push r23 |
|
5e1a: 6f 93 push r22 |
|
5e1c: ff 93 push r31 |
|
5e1e: ef 93 push r30 |
|
5e20: 9b 01 movw r18, r22 |
|
5e22: ac 01 movw r20, r24 |
|
5e24: 47 df rcall .-370 ; 0x5cb4 <__mulsf3> |
|
5e26: ef 91 pop r30 |
|
5e28: ff 91 pop r31 |
|
5e2a: 05 d0 rcall .+10 ; 0x5e36 <__fp_powser> |
|
5e2c: 2f 91 pop r18 |
|
5e2e: 3f 91 pop r19 |
|
5e30: 4f 91 pop r20 |
|
5e32: 5f 91 pop r21 |
|
5e34: 3f cf rjmp .-386 ; 0x5cb4 <__mulsf3> |
|
|
|
00005e36 <__fp_powser>: |
|
5e36: df 93 push r29 |
|
5e38: cf 93 push r28 |
|
5e3a: 1f 93 push r17 |
|
5e3c: 0f 93 push r16 |
|
5e3e: ff 92 push r15 |
|
5e40: ef 92 push r14 |
|
5e42: df 92 push r13 |
|
5e44: 7b 01 movw r14, r22 |
|
5e46: 8c 01 movw r16, r24 |
|
5e48: 68 94 set |
|
5e4a: 05 c0 rjmp .+10 ; 0x5e56 <__fp_powser+0x20> |
|
5e4c: da 2e mov r13, r26 |
|
5e4e: ef 01 movw r28, r30 |
|
5e50: 3d df rcall .-390 ; 0x5ccc <__mulsf3x> |
|
5e52: fe 01 movw r30, r28 |
|
5e54: e8 94 clt |
|
5e56: a5 91 lpm r26, Z+ |
|
5e58: 25 91 lpm r18, Z+ |
|
5e5a: 35 91 lpm r19, Z+ |
|
5e5c: 45 91 lpm r20, Z+ |
|
5e5e: 55 91 lpm r21, Z+ |
|
5e60: ae f3 brts .-22 ; 0x5e4c <__fp_powser+0x16> |
|
5e62: ef 01 movw r28, r30 |
|
5e64: 81 dd rcall .-1278 ; 0x5968 <__addsf3x> |
|
5e66: fe 01 movw r30, r28 |
|
5e68: 97 01 movw r18, r14 |
|
5e6a: a8 01 movw r20, r16 |
|
5e6c: da 94 dec r13 |
|
5e6e: 79 f7 brne .-34 ; 0x5e4e <__fp_powser+0x18> |
|
5e70: df 90 pop r13 |
|
5e72: ef 90 pop r14 |
|
5e74: ff 90 pop r15 |
|
5e76: 0f 91 pop r16 |
|
5e78: 1f 91 pop r17 |
|
5e7a: cf 91 pop r28 |
|
5e7c: df 91 pop r29 |
|
5e7e: 08 95 ret |
|
|
|
00005e80 <__udivmodsi4>: |
|
5e80: a1 e2 ldi r26, 0x21 ; 33 |
|
5e82: 1a 2e mov r1, r26 |
|
5e84: aa 1b sub r26, r26 |
|
5e86: bb 1b sub r27, r27 |
|
5e88: fd 01 movw r30, r26 |
|
5e8a: 0d c0 rjmp .+26 ; 0x5ea6 <__udivmodsi4_ep> |
|
|
|
00005e8c <__udivmodsi4_loop>: |
|
5e8c: aa 1f adc r26, r26 |
|
5e8e: bb 1f adc r27, r27 |
|
5e90: ee 1f adc r30, r30 |
|
5e92: ff 1f adc r31, r31 |
|
5e94: a2 17 cp r26, r18 |
|
5e96: b3 07 cpc r27, r19 |
|
5e98: e4 07 cpc r30, r20 |
|
5e9a: f5 07 cpc r31, r21 |
|
5e9c: 20 f0 brcs .+8 ; 0x5ea6 <__udivmodsi4_ep> |
|
5e9e: a2 1b sub r26, r18 |
|
5ea0: b3 0b sbc r27, r19 |
|
5ea2: e4 0b sbc r30, r20 |
|
5ea4: f5 0b sbc r31, r21 |
|
|
|
00005ea6 <__udivmodsi4_ep>: |
|
5ea6: 66 1f adc r22, r22 |
|
5ea8: 77 1f adc r23, r23 |
|
5eaa: 88 1f adc r24, r24 |
|
5eac: 99 1f adc r25, r25 |
|
5eae: 1a 94 dec r1 |
|
5eb0: 69 f7 brne .-38 ; 0x5e8c <__udivmodsi4_loop> |
|
5eb2: 60 95 com r22 |
|
5eb4: 70 95 com r23 |
|
5eb6: 80 95 com r24 |
|
5eb8: 90 95 com r25 |
|
5eba: 9b 01 movw r18, r22 |
|
5ebc: ac 01 movw r20, r24 |
|
5ebe: bd 01 movw r22, r26 |
|
5ec0: cf 01 movw r24, r30 |
|
5ec2: 08 95 ret |
|
|
|
00005ec4 <__tablejump2__>: |
|
5ec4: ee 0f add r30, r30 |
|
5ec6: ff 1f adc r31, r31 |
|
|
|
00005ec8 <__tablejump__>: |
|
5ec8: 05 90 lpm r0, Z+ |
|
5eca: f4 91 lpm r31, Z |
|
5ecc: e0 2d mov r30, r0 |
|
5ece: 09 94 ijmp |
|
|
|
00005ed0 <__muluhisi3>: |
|
5ed0: 0e 94 73 2f call 0x5ee6 ; 0x5ee6 <__umulhisi3> |
|
5ed4: a5 9f mul r26, r21 |
|
5ed6: 90 0d add r25, r0 |
|
5ed8: b4 9f mul r27, r20 |
|
5eda: 90 0d add r25, r0 |
|
5edc: a4 9f mul r26, r20 |
|
5ede: 80 0d add r24, r0 |
|
5ee0: 91 1d adc r25, r1 |
|
5ee2: 11 24 eor r1, r1 |
|
5ee4: 08 95 ret |
|
|
|
00005ee6 <__umulhisi3>: |
|
5ee6: a2 9f mul r26, r18 |
|
5ee8: b0 01 movw r22, r0 |
|
5eea: b3 9f mul r27, r19 |
|
5eec: c0 01 movw r24, r0 |
|
5eee: a3 9f mul r26, r19 |
|
5ef0: 70 0d add r23, r0 |
|
5ef2: 81 1d adc r24, r1 |
|
5ef4: 11 24 eor r1, r1 |
|
5ef6: 91 1d adc r25, r1 |
|
5ef8: b2 9f mul r27, r18 |
|
5efa: 70 0d add r23, r0 |
|
5efc: 81 1d adc r24, r1 |
|
5efe: 11 24 eor r1, r1 |
|
5f00: 91 1d adc r25, r1 |
|
5f02: 08 95 ret |
|
|
|
00005f04 <malloc>: |
|
5f04: cf 93 push r28 |
|
5f06: df 93 push r29 |
|
5f08: 82 30 cpi r24, 0x02 ; 2 |
|
5f0a: 91 05 cpc r25, r1 |
|
5f0c: 10 f4 brcc .+4 ; 0x5f12 <malloc+0xe> |
|
5f0e: 82 e0 ldi r24, 0x02 ; 2 |
|
5f10: 90 e0 ldi r25, 0x00 ; 0 |
|
5f12: e0 91 80 03 lds r30, 0x0380 |
|
5f16: f0 91 81 03 lds r31, 0x0381 |
|
5f1a: 20 e0 ldi r18, 0x00 ; 0 |
|
5f1c: 30 e0 ldi r19, 0x00 ; 0 |
|
5f1e: a0 e0 ldi r26, 0x00 ; 0 |
|
5f20: b0 e0 ldi r27, 0x00 ; 0 |
|
5f22: 30 97 sbiw r30, 0x00 ; 0 |
|
5f24: 39 f1 breq .+78 ; 0x5f74 <malloc+0x70> |
|
5f26: 40 81 ld r20, Z |
|
5f28: 51 81 ldd r21, Z+1 ; 0x01 |
|
5f2a: 48 17 cp r20, r24 |
|
5f2c: 59 07 cpc r21, r25 |
|
5f2e: b8 f0 brcs .+46 ; 0x5f5e <malloc+0x5a> |
|
5f30: 48 17 cp r20, r24 |
|
5f32: 59 07 cpc r21, r25 |
|
5f34: 71 f4 brne .+28 ; 0x5f52 <malloc+0x4e> |
|
5f36: 82 81 ldd r24, Z+2 ; 0x02 |
|
5f38: 93 81 ldd r25, Z+3 ; 0x03 |
|
5f3a: 10 97 sbiw r26, 0x00 ; 0 |
|
5f3c: 29 f0 breq .+10 ; 0x5f48 <malloc+0x44> |
|
5f3e: 13 96 adiw r26, 0x03 ; 3 |
|
5f40: 9c 93 st X, r25 |
|
5f42: 8e 93 st -X, r24 |
|
5f44: 12 97 sbiw r26, 0x02 ; 2 |
|
5f46: 2c c0 rjmp .+88 ; 0x5fa0 <malloc+0x9c> |
|
5f48: 90 93 81 03 sts 0x0381, r25 |
|
5f4c: 80 93 80 03 sts 0x0380, r24 |
|
5f50: 27 c0 rjmp .+78 ; 0x5fa0 <malloc+0x9c> |
|
5f52: 21 15 cp r18, r1 |
|
5f54: 31 05 cpc r19, r1 |
|
5f56: 31 f0 breq .+12 ; 0x5f64 <malloc+0x60> |
|
5f58: 42 17 cp r20, r18 |
|
5f5a: 53 07 cpc r21, r19 |
|
5f5c: 18 f0 brcs .+6 ; 0x5f64 <malloc+0x60> |
|
5f5e: a9 01 movw r20, r18 |
|
5f60: db 01 movw r26, r22 |
|
5f62: 01 c0 rjmp .+2 ; 0x5f66 <malloc+0x62> |
|
5f64: ef 01 movw r28, r30 |
|
5f66: 9a 01 movw r18, r20 |
|
5f68: bd 01 movw r22, r26 |
|
5f6a: df 01 movw r26, r30 |
|
5f6c: 02 80 ldd r0, Z+2 ; 0x02 |
|
5f6e: f3 81 ldd r31, Z+3 ; 0x03 |
|
5f70: e0 2d mov r30, r0 |
|
5f72: d7 cf rjmp .-82 ; 0x5f22 <malloc+0x1e> |
|
5f74: 21 15 cp r18, r1 |
|
5f76: 31 05 cpc r19, r1 |
|
5f78: f9 f0 breq .+62 ; 0x5fb8 <malloc+0xb4> |
|
5f7a: 28 1b sub r18, r24 |
|
5f7c: 39 0b sbc r19, r25 |
|
5f7e: 24 30 cpi r18, 0x04 ; 4 |
|
5f80: 31 05 cpc r19, r1 |
|
5f82: 80 f4 brcc .+32 ; 0x5fa4 <malloc+0xa0> |
|
5f84: 8a 81 ldd r24, Y+2 ; 0x02 |
|
5f86: 9b 81 ldd r25, Y+3 ; 0x03 |
|
5f88: 61 15 cp r22, r1 |
|
5f8a: 71 05 cpc r23, r1 |
|
5f8c: 21 f0 breq .+8 ; 0x5f96 <malloc+0x92> |
|
5f8e: fb 01 movw r30, r22 |
|
5f90: 93 83 std Z+3, r25 ; 0x03 |
|
5f92: 82 83 std Z+2, r24 ; 0x02 |
|
5f94: 04 c0 rjmp .+8 ; 0x5f9e <malloc+0x9a> |
|
5f96: 90 93 81 03 sts 0x0381, r25 |
|
5f9a: 80 93 80 03 sts 0x0380, r24 |
|
5f9e: fe 01 movw r30, r28 |
|
5fa0: 32 96 adiw r30, 0x02 ; 2 |
|
5fa2: 44 c0 rjmp .+136 ; 0x602c <malloc+0x128> |
|
5fa4: fe 01 movw r30, r28 |
|
5fa6: e2 0f add r30, r18 |
|
5fa8: f3 1f adc r31, r19 |
|
5faa: 81 93 st Z+, r24 |
|
5fac: 91 93 st Z+, r25 |
|
5fae: 22 50 subi r18, 0x02 ; 2 |
|
5fb0: 31 09 sbc r19, r1 |
|
5fb2: 39 83 std Y+1, r19 ; 0x01 |
|
5fb4: 28 83 st Y, r18 |
|
5fb6: 3a c0 rjmp .+116 ; 0x602c <malloc+0x128> |
|
5fb8: 20 91 7e 03 lds r18, 0x037E |
|
5fbc: 30 91 7f 03 lds r19, 0x037F |
|
5fc0: 23 2b or r18, r19 |
|
5fc2: 41 f4 brne .+16 ; 0x5fd4 <malloc+0xd0> |
|
5fc4: 20 91 02 01 lds r18, 0x0102 |
|
5fc8: 30 91 03 01 lds r19, 0x0103 |
|
5fcc: 30 93 7f 03 sts 0x037F, r19 |
|
5fd0: 20 93 7e 03 sts 0x037E, r18 |
|
5fd4: 20 91 00 01 lds r18, 0x0100 |
|
5fd8: 30 91 01 01 lds r19, 0x0101 |
|
5fdc: 21 15 cp r18, r1 |
|
5fde: 31 05 cpc r19, r1 |
|
5fe0: 41 f4 brne .+16 ; 0x5ff2 <malloc+0xee> |
|
5fe2: 2d b7 in r18, 0x3d ; 61 |
|
5fe4: 3e b7 in r19, 0x3e ; 62 |
|
5fe6: 40 91 04 01 lds r20, 0x0104 |
|
5fea: 50 91 05 01 lds r21, 0x0105 |
|
5fee: 24 1b sub r18, r20 |
|
5ff0: 35 0b sbc r19, r21 |
|
5ff2: e0 91 7e 03 lds r30, 0x037E |
|
5ff6: f0 91 7f 03 lds r31, 0x037F |
|
5ffa: e2 17 cp r30, r18 |
|
5ffc: f3 07 cpc r31, r19 |
|
5ffe: a0 f4 brcc .+40 ; 0x6028 <malloc+0x124> |
|
6000: 2e 1b sub r18, r30 |
|
6002: 3f 0b sbc r19, r31 |
|
6004: 28 17 cp r18, r24 |
|
6006: 39 07 cpc r19, r25 |
|
6008: 78 f0 brcs .+30 ; 0x6028 <malloc+0x124> |
|
600a: ac 01 movw r20, r24 |
|
600c: 4e 5f subi r20, 0xFE ; 254 |
|
600e: 5f 4f sbci r21, 0xFF ; 255 |
|
6010: 24 17 cp r18, r20 |
|
6012: 35 07 cpc r19, r21 |
|
6014: 48 f0 brcs .+18 ; 0x6028 <malloc+0x124> |
|
6016: 4e 0f add r20, r30 |
|
6018: 5f 1f adc r21, r31 |
|
601a: 50 93 7f 03 sts 0x037F, r21 |
|
601e: 40 93 7e 03 sts 0x037E, r20 |
|
6022: 81 93 st Z+, r24 |
|
6024: 91 93 st Z+, r25 |
|
6026: 02 c0 rjmp .+4 ; 0x602c <malloc+0x128> |
|
6028: e0 e0 ldi r30, 0x00 ; 0 |
|
602a: f0 e0 ldi r31, 0x00 ; 0 |
|
602c: cf 01 movw r24, r30 |
|
602e: df 91 pop r29 |
|
6030: cf 91 pop r28 |
|
6032: 08 95 ret |
|
|
|
00006034 <free>: |
|
6034: cf 93 push r28 |
|
6036: df 93 push r29 |
|
6038: 00 97 sbiw r24, 0x00 ; 0 |
|
603a: 09 f4 brne .+2 ; 0x603e <free+0xa> |
|
603c: 87 c0 rjmp .+270 ; 0x614c <free+0x118> |
|
603e: fc 01 movw r30, r24 |
|
6040: 32 97 sbiw r30, 0x02 ; 2 |
|
6042: 13 82 std Z+3, r1 ; 0x03 |
|
6044: 12 82 std Z+2, r1 ; 0x02 |
|
6046: c0 91 80 03 lds r28, 0x0380 |
|
604a: d0 91 81 03 lds r29, 0x0381 |
|
604e: 20 97 sbiw r28, 0x00 ; 0 |
|
6050: 81 f4 brne .+32 ; 0x6072 <free+0x3e> |
|
6052: 20 81 ld r18, Z |
|
6054: 31 81 ldd r19, Z+1 ; 0x01 |
|
6056: 28 0f add r18, r24 |
|
6058: 39 1f adc r19, r25 |
|
605a: 80 91 7e 03 lds r24, 0x037E |
|
605e: 90 91 7f 03 lds r25, 0x037F |
|
6062: 82 17 cp r24, r18 |
|
6064: 93 07 cpc r25, r19 |
|
6066: 79 f5 brne .+94 ; 0x60c6 <free+0x92> |
|
6068: f0 93 7f 03 sts 0x037F, r31 |
|
606c: e0 93 7e 03 sts 0x037E, r30 |
|
6070: 6d c0 rjmp .+218 ; 0x614c <free+0x118> |
|
6072: de 01 movw r26, r28 |
|
6074: 20 e0 ldi r18, 0x00 ; 0 |
|
6076: 30 e0 ldi r19, 0x00 ; 0 |
|
6078: ae 17 cp r26, r30 |
|
607a: bf 07 cpc r27, r31 |
|
607c: 50 f4 brcc .+20 ; 0x6092 <free+0x5e> |
|
607e: 12 96 adiw r26, 0x02 ; 2 |
|
6080: 4d 91 ld r20, X+ |
|
6082: 5c 91 ld r21, X |
|
6084: 13 97 sbiw r26, 0x03 ; 3 |
|
6086: 9d 01 movw r18, r26 |
|
6088: 41 15 cp r20, r1 |
|
608a: 51 05 cpc r21, r1 |
|
608c: 09 f1 breq .+66 ; 0x60d0 <free+0x9c> |
|
608e: da 01 movw r26, r20 |
|
6090: f3 cf rjmp .-26 ; 0x6078 <free+0x44> |
|
6092: b3 83 std Z+3, r27 ; 0x03 |
|
6094: a2 83 std Z+2, r26 ; 0x02 |
|
6096: 40 81 ld r20, Z |
|
6098: 51 81 ldd r21, Z+1 ; 0x01 |
|
609a: 84 0f add r24, r20 |
|
609c: 95 1f adc r25, r21 |
|
609e: 8a 17 cp r24, r26 |
|
60a0: 9b 07 cpc r25, r27 |
|
60a2: 71 f4 brne .+28 ; 0x60c0 <free+0x8c> |
|
60a4: 8d 91 ld r24, X+ |
|
60a6: 9c 91 ld r25, X |
|
60a8: 11 97 sbiw r26, 0x01 ; 1 |
|
60aa: 84 0f add r24, r20 |
|
60ac: 95 1f adc r25, r21 |
|
60ae: 02 96 adiw r24, 0x02 ; 2 |
|
60b0: 91 83 std Z+1, r25 ; 0x01 |
|
60b2: 80 83 st Z, r24 |
|
60b4: 12 96 adiw r26, 0x02 ; 2 |
|
60b6: 8d 91 ld r24, X+ |
|
60b8: 9c 91 ld r25, X |
|
60ba: 13 97 sbiw r26, 0x03 ; 3 |
|
60bc: 93 83 std Z+3, r25 ; 0x03 |
|
60be: 82 83 std Z+2, r24 ; 0x02 |
|
60c0: 21 15 cp r18, r1 |
|
60c2: 31 05 cpc r19, r1 |
|
60c4: 29 f4 brne .+10 ; 0x60d0 <free+0x9c> |
|
60c6: f0 93 81 03 sts 0x0381, r31 |
|
60ca: e0 93 80 03 sts 0x0380, r30 |
|
60ce: 3e c0 rjmp .+124 ; 0x614c <free+0x118> |
|
60d0: d9 01 movw r26, r18 |
|
60d2: 13 96 adiw r26, 0x03 ; 3 |
|
60d4: fc 93 st X, r31 |
|
60d6: ee 93 st -X, r30 |
|
60d8: 12 97 sbiw r26, 0x02 ; 2 |
|
60da: 4d 91 ld r20, X+ |
|
60dc: 5d 91 ld r21, X+ |
|
60de: a4 0f add r26, r20 |
|
60e0: b5 1f adc r27, r21 |
|
60e2: ea 17 cp r30, r26 |
|
60e4: fb 07 cpc r31, r27 |
|
60e6: 79 f4 brne .+30 ; 0x6106 <free+0xd2> |
|
60e8: 80 81 ld r24, Z |
|
60ea: 91 81 ldd r25, Z+1 ; 0x01 |
|
60ec: 84 0f add r24, r20 |
|
60ee: 95 1f adc r25, r21 |
|
60f0: 02 96 adiw r24, 0x02 ; 2 |
|
60f2: d9 01 movw r26, r18 |
|
60f4: 11 96 adiw r26, 0x01 ; 1 |
|
60f6: 9c 93 st X, r25 |
|
60f8: 8e 93 st -X, r24 |
|
60fa: 82 81 ldd r24, Z+2 ; 0x02 |
|
60fc: 93 81 ldd r25, Z+3 ; 0x03 |
|
60fe: 13 96 adiw r26, 0x03 ; 3 |
|
6100: 9c 93 st X, r25 |
|
6102: 8e 93 st -X, r24 |
|
6104: 12 97 sbiw r26, 0x02 ; 2 |
|
6106: e0 e0 ldi r30, 0x00 ; 0 |
|
6108: f0 e0 ldi r31, 0x00 ; 0 |
|
610a: 8a 81 ldd r24, Y+2 ; 0x02 |
|
610c: 9b 81 ldd r25, Y+3 ; 0x03 |
|
610e: 00 97 sbiw r24, 0x00 ; 0 |
|
6110: 19 f0 breq .+6 ; 0x6118 <free+0xe4> |
|
6112: fe 01 movw r30, r28 |
|
6114: ec 01 movw r28, r24 |
|
6116: f9 cf rjmp .-14 ; 0x610a <free+0xd6> |
|
6118: ce 01 movw r24, r28 |
|
611a: 02 96 adiw r24, 0x02 ; 2 |
|
611c: 28 81 ld r18, Y |
|
611e: 39 81 ldd r19, Y+1 ; 0x01 |
|
6120: 82 0f add r24, r18 |
|
6122: 93 1f adc r25, r19 |
|
6124: 20 91 7e 03 lds r18, 0x037E |
|
6128: 30 91 7f 03 lds r19, 0x037F |
|
612c: 28 17 cp r18, r24 |
|
612e: 39 07 cpc r19, r25 |
|
6130: 69 f4 brne .+26 ; 0x614c <free+0x118> |
|
6132: 30 97 sbiw r30, 0x00 ; 0 |
|
6134: 29 f4 brne .+10 ; 0x6140 <free+0x10c> |
|
6136: 10 92 81 03 sts 0x0381, r1 |
|
613a: 10 92 80 03 sts 0x0380, r1 |
|
613e: 02 c0 rjmp .+4 ; 0x6144 <free+0x110> |
|
6140: 13 82 std Z+3, r1 ; 0x03 |
|
6142: 12 82 std Z+2, r1 ; 0x02 |
|
6144: d0 93 7f 03 sts 0x037F, r29 |
|
6148: c0 93 7e 03 sts 0x037E, r28 |
|
614c: df 91 pop r29 |
|
614e: cf 91 pop r28 |
|
6150: 08 95 ret |
|
|
|
00006152 <realloc>: |
|
6152: a0 e0 ldi r26, 0x00 ; 0 |
|
6154: b0 e0 ldi r27, 0x00 ; 0 |
|
6156: ef ea ldi r30, 0xAF ; 175 |
|
6158: f0 e3 ldi r31, 0x30 ; 48 |
|
615a: 0c 94 b4 31 jmp 0x6368 ; 0x6368 <__prologue_saves__+0x8> |
|
615e: ec 01 movw r28, r24 |
|
6160: cb 01 movw r24, r22 |
|
6162: 20 97 sbiw r28, 0x00 ; 0 |
|
6164: 19 f4 brne .+6 ; 0x616c <realloc+0x1a> |
|
6166: 0e 94 82 2f call 0x5f04 ; 0x5f04 <malloc> |
|
616a: b8 c0 rjmp .+368 ; 0x62dc <realloc+0x18a> |
|
616c: fe 01 movw r30, r28 |
|
616e: e6 0f add r30, r22 |
|
6170: f7 1f adc r31, r23 |
|
6172: 9e 01 movw r18, r28 |
|
6174: 22 50 subi r18, 0x02 ; 2 |
|
6176: 31 09 sbc r19, r1 |
|
6178: e2 17 cp r30, r18 |
|
617a: f3 07 cpc r31, r19 |
|
617c: 08 f4 brcc .+2 ; 0x6180 <realloc+0x2e> |
|
617e: ac c0 rjmp .+344 ; 0x62d8 <realloc+0x186> |
|
6180: d9 01 movw r26, r18 |
|
6182: 0d 91 ld r16, X+ |
|
6184: 1c 91 ld r17, X |
|
6186: 11 97 sbiw r26, 0x01 ; 1 |
|
6188: 06 17 cp r16, r22 |
|
618a: 17 07 cpc r17, r23 |
|
618c: b8 f0 brcs .+46 ; 0x61bc <realloc+0x6a> |
|
618e: 05 30 cpi r16, 0x05 ; 5 |
|
6190: 11 05 cpc r17, r1 |
|
6192: 08 f4 brcc .+2 ; 0x6196 <realloc+0x44> |
|
6194: 9f c0 rjmp .+318 ; 0x62d4 <realloc+0x182> |
|
6196: a8 01 movw r20, r16 |
|
6198: 44 50 subi r20, 0x04 ; 4 |
|
619a: 51 09 sbc r21, r1 |
|
619c: 46 17 cp r20, r22 |
|
619e: 57 07 cpc r21, r23 |
|
61a0: 08 f4 brcc .+2 ; 0x61a4 <realloc+0x52> |
|
61a2: 98 c0 rjmp .+304 ; 0x62d4 <realloc+0x182> |
|
61a4: 02 50 subi r16, 0x02 ; 2 |
|
61a6: 11 09 sbc r17, r1 |
|
61a8: 06 1b sub r16, r22 |
|
61aa: 17 0b sbc r17, r23 |
|
61ac: 01 93 st Z+, r16 |
|
61ae: 11 93 st Z+, r17 |
|
61b0: 6d 93 st X+, r22 |
|
61b2: 7c 93 st X, r23 |
|
61b4: cf 01 movw r24, r30 |
|
61b6: 0e 94 1a 30 call 0x6034 ; 0x6034 <free> |
|
61ba: 8c c0 rjmp .+280 ; 0x62d4 <realloc+0x182> |
|
61bc: 5b 01 movw r10, r22 |
|
61be: a0 1a sub r10, r16 |
|
61c0: b1 0a sbc r11, r17 |
|
61c2: 4e 01 movw r8, r28 |
|
61c4: 80 0e add r8, r16 |
|
61c6: 91 1e adc r9, r17 |
|
61c8: a0 91 80 03 lds r26, 0x0380 |
|
61cc: b0 91 81 03 lds r27, 0x0381 |
|
61d0: 61 2c mov r6, r1 |
|
61d2: 71 2c mov r7, r1 |
|
61d4: 60 e0 ldi r22, 0x00 ; 0 |
|
61d6: 70 e0 ldi r23, 0x00 ; 0 |
|
61d8: 10 97 sbiw r26, 0x00 ; 0 |
|
61da: 09 f4 brne .+2 ; 0x61de <realloc+0x8c> |
|
61dc: 49 c0 rjmp .+146 ; 0x6270 <realloc+0x11e> |
|
61de: a8 15 cp r26, r8 |
|
61e0: b9 05 cpc r27, r9 |
|
61e2: c9 f5 brne .+114 ; 0x6256 <realloc+0x104> |
|
61e4: ed 90 ld r14, X+ |
|
61e6: fc 90 ld r15, X |
|
61e8: 11 97 sbiw r26, 0x01 ; 1 |
|
61ea: 67 01 movw r12, r14 |
|
61ec: 42 e0 ldi r20, 0x02 ; 2 |
|
61ee: c4 0e add r12, r20 |
|
61f0: d1 1c adc r13, r1 |
|
61f2: ca 14 cp r12, r10 |
|
61f4: db 04 cpc r13, r11 |
|
61f6: 78 f1 brcs .+94 ; 0x6256 <realloc+0x104> |
|
61f8: 47 01 movw r8, r14 |
|
61fa: 8a 18 sub r8, r10 |
|
61fc: 9b 08 sbc r9, r11 |
|
61fe: 64 01 movw r12, r8 |
|
6200: 42 e0 ldi r20, 0x02 ; 2 |
|
6202: c4 0e add r12, r20 |
|
6204: d1 1c adc r13, r1 |
|
6206: 12 96 adiw r26, 0x02 ; 2 |
|
6208: bc 90 ld r11, X |
|
620a: 12 97 sbiw r26, 0x02 ; 2 |
|
620c: 13 96 adiw r26, 0x03 ; 3 |
|
620e: ac 91 ld r26, X |
|
6210: b5 e0 ldi r27, 0x05 ; 5 |
|
6212: cb 16 cp r12, r27 |
|
6214: d1 04 cpc r13, r1 |
|
6216: 40 f0 brcs .+16 ; 0x6228 <realloc+0xd6> |
|
6218: b2 82 std Z+2, r11 ; 0x02 |
|
621a: a3 83 std Z+3, r26 ; 0x03 |
|
621c: 91 82 std Z+1, r9 ; 0x01 |
|
621e: 80 82 st Z, r8 |
|
6220: d9 01 movw r26, r18 |
|
6222: 8d 93 st X+, r24 |
|
6224: 9c 93 st X, r25 |
|
6226: 09 c0 rjmp .+18 ; 0x623a <realloc+0xe8> |
|
6228: 0e 5f subi r16, 0xFE ; 254 |
|
622a: 1f 4f sbci r17, 0xFF ; 255 |
|
622c: 0e 0d add r16, r14 |
|
622e: 1f 1d adc r17, r15 |
|
6230: f9 01 movw r30, r18 |
|
6232: 11 83 std Z+1, r17 ; 0x01 |
|
6234: 00 83 st Z, r16 |
|
6236: eb 2d mov r30, r11 |
|
6238: fa 2f mov r31, r26 |
|
623a: 61 15 cp r22, r1 |
|
623c: 71 05 cpc r23, r1 |
|
623e: 31 f0 breq .+12 ; 0x624c <realloc+0xfa> |
|
6240: db 01 movw r26, r22 |
|
6242: 13 96 adiw r26, 0x03 ; 3 |
|
6244: fc 93 st X, r31 |
|
6246: ee 93 st -X, r30 |
|
6248: 12 97 sbiw r26, 0x02 ; 2 |
|
624a: 44 c0 rjmp .+136 ; 0x62d4 <realloc+0x182> |
|
624c: f0 93 81 03 sts 0x0381, r31 |
|
6250: e0 93 80 03 sts 0x0380, r30 |
|
6254: 3f c0 rjmp .+126 ; 0x62d4 <realloc+0x182> |
|
6256: 6d 91 ld r22, X+ |
|
6258: 7c 91 ld r23, X |
|
625a: 11 97 sbiw r26, 0x01 ; 1 |
|
625c: 66 16 cp r6, r22 |
|
625e: 77 06 cpc r7, r23 |
|
6260: 08 f4 brcc .+2 ; 0x6264 <realloc+0x112> |
|
6262: 3b 01 movw r6, r22 |
|
6264: bd 01 movw r22, r26 |
|
6266: 12 96 adiw r26, 0x02 ; 2 |
|
6268: 0d 90 ld r0, X+ |
|
626a: bc 91 ld r27, X |
|
626c: a0 2d mov r26, r0 |
|
626e: b4 cf rjmp .-152 ; 0x61d8 <realloc+0x86> |
|
6270: 60 91 7e 03 lds r22, 0x037E |
|
6274: 70 91 7f 03 lds r23, 0x037F |
|
6278: 68 15 cp r22, r8 |
|
627a: 79 05 cpc r23, r9 |
|
627c: e9 f4 brne .+58 ; 0x62b8 <realloc+0x166> |
|
627e: 68 16 cp r6, r24 |
|
6280: 79 06 cpc r7, r25 |
|
6282: d0 f4 brcc .+52 ; 0x62b8 <realloc+0x166> |
|
6284: 40 91 00 01 lds r20, 0x0100 |
|
6288: 50 91 01 01 lds r21, 0x0101 |
|
628c: 41 15 cp r20, r1 |
|
628e: 51 05 cpc r21, r1 |
|
6290: 41 f4 brne .+16 ; 0x62a2 <realloc+0x150> |
|
6292: 4d b7 in r20, 0x3d ; 61 |
|
6294: 5e b7 in r21, 0x3e ; 62 |
|
6296: 60 91 04 01 lds r22, 0x0104 |
|
629a: 70 91 05 01 lds r23, 0x0105 |
|
629e: 46 1b sub r20, r22 |
|
62a0: 57 0b sbc r21, r23 |
|
62a2: e4 17 cp r30, r20 |
|
62a4: f5 07 cpc r31, r21 |
|
62a6: c0 f4 brcc .+48 ; 0x62d8 <realloc+0x186> |
|
62a8: f0 93 7f 03 sts 0x037F, r31 |
|
62ac: e0 93 7e 03 sts 0x037E, r30 |
|
62b0: f9 01 movw r30, r18 |
|
62b2: 91 83 std Z+1, r25 ; 0x01 |
|
62b4: 80 83 st Z, r24 |
|
62b6: 0e c0 rjmp .+28 ; 0x62d4 <realloc+0x182> |
|
62b8: 0e 94 82 2f call 0x5f04 ; 0x5f04 <malloc> |
|
62bc: 7c 01 movw r14, r24 |
|
62be: 00 97 sbiw r24, 0x00 ; 0 |
|
62c0: 59 f0 breq .+22 ; 0x62d8 <realloc+0x186> |
|
62c2: a8 01 movw r20, r16 |
|
62c4: be 01 movw r22, r28 |
|
62c6: 0e 94 73 31 call 0x62e6 ; 0x62e6 <memcpy> |
|
62ca: ce 01 movw r24, r28 |
|
62cc: 0e 94 1a 30 call 0x6034 ; 0x6034 <free> |
|
62d0: c7 01 movw r24, r14 |
|
62d2: 04 c0 rjmp .+8 ; 0x62dc <realloc+0x18a> |
|
62d4: ce 01 movw r24, r28 |
|
62d6: 02 c0 rjmp .+4 ; 0x62dc <realloc+0x18a> |
|
62d8: 80 e0 ldi r24, 0x00 ; 0 |
|
62da: 90 e0 ldi r25, 0x00 ; 0 |
|
62dc: cd b7 in r28, 0x3d ; 61 |
|
62de: de b7 in r29, 0x3e ; 62 |
|
62e0: ee e0 ldi r30, 0x0E ; 14 |
|
62e2: 0c 94 d0 31 jmp 0x63a0 ; 0x63a0 <__epilogue_restores__+0x8> |
|
|
|
000062e6 <memcpy>: |
|
62e6: fb 01 movw r30, r22 |
|
62e8: dc 01 movw r26, r24 |
|
62ea: 02 c0 rjmp .+4 ; 0x62f0 <memcpy+0xa> |
|
62ec: 01 90 ld r0, Z+ |
|
62ee: 0d 92 st X+, r0 |
|
62f0: 41 50 subi r20, 0x01 ; 1 |
|
62f2: 50 40 sbci r21, 0x00 ; 0 |
|
62f4: d8 f7 brcc .-10 ; 0x62ec <memcpy+0x6> |
|
62f6: 08 95 ret |
|
|
|
000062f8 <strcmp>: |
|
62f8: fb 01 movw r30, r22 |
|
62fa: dc 01 movw r26, r24 |
|
62fc: 8d 91 ld r24, X+ |
|
62fe: 01 90 ld r0, Z+ |
|
6300: 80 19 sub r24, r0 |
|
6302: 01 10 cpse r0, r1 |
|
6304: d9 f3 breq .-10 ; 0x62fc <strcmp+0x4> |
|
6306: 99 0b sbc r25, r25 |
|
6308: 08 95 ret |
|
|
|
0000630a <strcpy>: |
|
630a: fb 01 movw r30, r22 |
|
630c: dc 01 movw r26, r24 |
|
630e: 01 90 ld r0, Z+ |
|
6310: 0d 92 st X+, r0 |
|
6312: 00 20 and r0, r0 |
|
6314: e1 f7 brne .-8 ; 0x630e <strcpy+0x4> |
|
6316: 08 95 ret |
|
|
|
00006318 <strncmp>: |
|
6318: fb 01 movw r30, r22 |
|
631a: dc 01 movw r26, r24 |
|
631c: 41 50 subi r20, 0x01 ; 1 |
|
631e: 50 40 sbci r21, 0x00 ; 0 |
|
6320: 30 f0 brcs .+12 ; 0x632e <strncmp+0x16> |
|
6322: 8d 91 ld r24, X+ |
|
6324: 01 90 ld r0, Z+ |
|
6326: 80 19 sub r24, r0 |
|
6328: 19 f4 brne .+6 ; 0x6330 <strncmp+0x18> |
|
632a: 00 20 and r0, r0 |
|
632c: b9 f7 brne .-18 ; 0x631c <strncmp+0x4> |
|
632e: 88 1b sub r24, r24 |
|
6330: 99 0b sbc r25, r25 |
|
6332: 08 95 ret |
|
|
|
00006334 <__eerd_byte_m328p>: |
|
6334: f9 99 sbic 0x1f, 1 ; 31 |
|
6336: fe cf rjmp .-4 ; 0x6334 <__eerd_byte_m328p> |
|
6338: 92 bd out 0x22, r25 ; 34 |
|
633a: 81 bd out 0x21, r24 ; 33 |
|
633c: f8 9a sbi 0x1f, 0 ; 31 |
|
633e: 99 27 eor r25, r25 |
|
6340: 80 b5 in r24, 0x20 ; 32 |
|
6342: 08 95 ret |
|
|
|
00006344 <__eewr_byte_m328p>: |
|
6344: 26 2f mov r18, r22 |
|
|
|
00006346 <__eewr_r18_m328p>: |
|
6346: f9 99 sbic 0x1f, 1 ; 31 |
|
6348: fe cf rjmp .-4 ; 0x6346 <__eewr_r18_m328p> |
|
634a: 1f ba out 0x1f, r1 ; 31 |
|
634c: 92 bd out 0x22, r25 ; 34 |
|
634e: 81 bd out 0x21, r24 ; 33 |
|
6350: 20 bd out 0x20, r18 ; 32 |
|
6352: 0f b6 in r0, 0x3f ; 63 |
|
6354: f8 94 cli |
|
6356: fa 9a sbi 0x1f, 2 ; 31 |
|
6358: f9 9a sbi 0x1f, 1 ; 31 |
|
635a: 0f be out 0x3f, r0 ; 63 |
|
635c: 01 96 adiw r24, 0x01 ; 1 |
|
635e: 08 95 ret |
|
|
|
00006360 <__prologue_saves__>: |
|
6360: 2f 92 push r2 |
|
6362: 3f 92 push r3 |
|
6364: 4f 92 push r4 |
|
6366: 5f 92 push r5 |
|
6368: 6f 92 push r6 |
|
636a: 7f 92 push r7 |
|
636c: 8f 92 push r8 |
|
636e: 9f 92 push r9 |
|
6370: af 92 push r10 |
|
6372: bf 92 push r11 |
|
6374: cf 92 push r12 |
|
6376: df 92 push r13 |
|
6378: ef 92 push r14 |
|
637a: ff 92 push r15 |
|
637c: 0f 93 push r16 |
|
637e: 1f 93 push r17 |
|
6380: cf 93 push r28 |
|
6382: df 93 push r29 |
|
6384: cd b7 in r28, 0x3d ; 61 |
|
6386: de b7 in r29, 0x3e ; 62 |
|
6388: ca 1b sub r28, r26 |
|
638a: db 0b sbc r29, r27 |
|
638c: 0f b6 in r0, 0x3f ; 63 |
|
638e: f8 94 cli |
|
6390: de bf out 0x3e, r29 ; 62 |
|
6392: 0f be out 0x3f, r0 ; 63 |
|
6394: cd bf out 0x3d, r28 ; 61 |
|
6396: 09 94 ijmp |
|
|
|
00006398 <__epilogue_restores__>: |
|
6398: 2a 88 ldd r2, Y+18 ; 0x12 |
|
639a: 39 88 ldd r3, Y+17 ; 0x11 |
|
639c: 48 88 ldd r4, Y+16 ; 0x10 |
|
639e: 5f 84 ldd r5, Y+15 ; 0x0f |
|
63a0: 6e 84 ldd r6, Y+14 ; 0x0e |
|
63a2: 7d 84 ldd r7, Y+13 ; 0x0d |
|
63a4: 8c 84 ldd r8, Y+12 ; 0x0c |
|
63a6: 9b 84 ldd r9, Y+11 ; 0x0b |
|
63a8: aa 84 ldd r10, Y+10 ; 0x0a |
|
63aa: b9 84 ldd r11, Y+9 ; 0x09 |
|
63ac: c8 84 ldd r12, Y+8 ; 0x08 |
|
63ae: df 80 ldd r13, Y+7 ; 0x07 |
|
63b0: ee 80 ldd r14, Y+6 ; 0x06 |
|
63b2: fd 80 ldd r15, Y+5 ; 0x05 |
|
63b4: 0c 81 ldd r16, Y+4 ; 0x04 |
|
63b6: 1b 81 ldd r17, Y+3 ; 0x03 |
|
63b8: aa 81 ldd r26, Y+2 ; 0x02 |
|
63ba: b9 81 ldd r27, Y+1 ; 0x01 |
|
63bc: ce 0f add r28, r30 |
|
63be: d1 1d adc r29, r1 |
|
63c0: 0f b6 in r0, 0x3f ; 63 |
|
63c2: f8 94 cli |
|
63c4: de bf out 0x3e, r29 ; 62 |
|
63c6: 0f be out 0x3f, r0 ; 63 |
|
63c8: cd bf out 0x3d, r28 ; 61 |
|
63ca: ed 01 movw r28, r26 |
|
63cc: 08 95 ret |
|
|
|
000063ce <__do_global_dtors>: |
|
63ce: 11 e0 ldi r17, 0x01 ; 1 |
|
63d0: c4 e1 ldi r28, 0x14 ; 20 |
|
63d2: d1 e0 ldi r29, 0x01 ; 1 |
|
63d4: 04 c0 rjmp .+8 ; 0x63de <__do_global_dtors+0x10> |
|
63d6: fe 01 movw r30, r28 |
|
63d8: 0e 94 64 2f call 0x5ec8 ; 0x5ec8 <__tablejump__> |
|
63dc: 22 96 adiw r28, 0x02 ; 2 |
|
63de: c6 31 cpi r28, 0x16 ; 22 |
|
63e0: d1 07 cpc r29, r17 |
|
63e2: c9 f7 brne .-14 ; 0x63d6 <__do_global_dtors+0x8> |
|
63e4: f8 94 cli |
|
|
|
000063e6 <__stop_program>: |
|
63e6: ff cf rjmp .-2 ; 0x63e6 <__stop_program> |