Zeitschaltung_V6.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .data 00000002 00800100 000005a6 0000063a 2**0 CONTENTS, ALLOC, LOAD, DATA 1 .text 000005a6 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .bss 00000005 00800102 00800102 0000063c 2**0 ALLOC 3 .stab 000006cc 00000000 00000000 0000063c 2**2 CONTENTS, READONLY, DEBUGGING 4 .stabstr 00000082 00000000 00000000 00000d08 2**0 CONTENTS, READONLY, DEBUGGING 5 .comment 0000002f 00000000 00000000 00000d8a 2**0 CONTENTS, READONLY 6 .debug_aranges 00000088 00000000 00000000 00000db9 2**0 CONTENTS, READONLY, DEBUGGING 7 .debug_info 00003671 00000000 00000000 00000e41 2**0 CONTENTS, READONLY, DEBUGGING 8 .debug_abbrev 000004ef 00000000 00000000 000044b2 2**0 CONTENTS, READONLY, DEBUGGING 9 .debug_line 00000515 00000000 00000000 000049a1 2**0 CONTENTS, READONLY, DEBUGGING 10 .debug_frame 00000174 00000000 00000000 00004eb8 2**2 CONTENTS, READONLY, DEBUGGING 11 .debug_str 00001ba0 00000000 00000000 0000502c 2**0 CONTENTS, READONLY, DEBUGGING 12 .debug_loc 000005d9 00000000 00000000 00006bcc 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_ranges 00000120 00000000 00000000 000071a5 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: 0: 0c 94 35 00 jmp 0x6a ; 0x6a <__ctors_end> 4: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 8: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 10: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 14: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 18: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 1c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 20: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 24: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 28: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 2c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 30: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 34: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 38: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 3c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 40: 0c 94 84 00 jmp 0x108 ; 0x108 <__vector_16> 44: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 48: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 4c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 50: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 54: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 58: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 5c: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 60: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 64: 0c 94 5d 00 jmp 0xba ; 0xba <__bad_interrupt> 00000068 <__ctors_start>: 68: 70 02 muls r23, r16 0000006a <__ctors_end>: 6a: 11 24 eor r1, r1 6c: 1f be out 0x3f, r1 ; 63 6e: cf ef ldi r28, 0xFF ; 255 70: d4 e0 ldi r29, 0x04 ; 4 72: de bf out 0x3e, r29 ; 62 74: cd bf out 0x3d, r28 ; 61 00000076 <__do_copy_data>: 76: 11 e0 ldi r17, 0x01 ; 1 78: a0 e0 ldi r26, 0x00 ; 0 7a: b1 e0 ldi r27, 0x01 ; 1 7c: e6 ea ldi r30, 0xA6 ; 166 7e: f5 e0 ldi r31, 0x05 ; 5 80: 02 c0 rjmp .+4 ; 0x86 <__do_copy_data+0x10> 82: 05 90 lpm r0, Z+ 84: 0d 92 st X+, r0 86: a2 30 cpi r26, 0x02 ; 2 88: b1 07 cpc r27, r17 8a: d9 f7 brne .-10 ; 0x82 <__do_copy_data+0xc> 0000008c <__do_clear_bss>: 8c: 21 e0 ldi r18, 0x01 ; 1 8e: a2 e0 ldi r26, 0x02 ; 2 90: b1 e0 ldi r27, 0x01 ; 1 92: 01 c0 rjmp .+2 ; 0x96 <.do_clear_bss_start> 00000094 <.do_clear_bss_loop>: 94: 1d 92 st X+, r1 00000096 <.do_clear_bss_start>: 96: a7 30 cpi r26, 0x07 ; 7 98: b2 07 cpc r27, r18 9a: e1 f7 brne .-8 ; 0x94 <.do_clear_bss_loop> 0000009c <__do_global_ctors>: 9c: 10 e0 ldi r17, 0x00 ; 0 9e: ca e6 ldi r28, 0x6A ; 106 a0: d0 e0 ldi r29, 0x00 ; 0 a2: 04 c0 rjmp .+8 ; 0xac <__do_global_ctors+0x10> a4: 22 97 sbiw r28, 0x02 ; 2 a6: fe 01 movw r30, r28 a8: 0e 94 cd 02 call 0x59a ; 0x59a <__tablejump__> ac: c8 36 cpi r28, 0x68 ; 104 ae: d1 07 cpc r29, r17 b0: c9 f7 brne .-14 ; 0xa4 <__do_global_ctors+0x8> b2: 0e 94 6a 02 call 0x4d4 ; 0x4d4
b6: 0c 94 d1 02 jmp 0x5a2 ; 0x5a2 <_exit> 000000ba <__bad_interrupt>: ba: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> 000000be <_ZN6avrlib3pinINS_5portbELh1EE6outputEb.part.2>: static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } be: 21 9a sbi 0x04, 1 ; 4 c0: 08 95 ret 000000c2 <_ZN3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EE9send_softEh.isra.30>: } void init_spi() { SPCR = (1< namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } cc: 40 9a sbi 0x08, 0 ; 8 ce: 01 c0 rjmp .+2 ; 0xd2 <_ZN3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EE9send_softEh.isra.30+0x10> d0: 40 98 cbi 0x08, 0 ; 8 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } d2: 38 9a sbi 0x07, 0 ; 7 mosi::make_high(); } else { mosi::make_low(); } datain <<= 1; d4: 88 0f add r24, r24 if(miso::read()) { d6: 33 99 sbic 0x06, 3 ; 6 datain |= 1; d8: 81 60 ori r24, 0x01 ; 1 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } da: 41 9a sbi 0x08, 1 ; 8 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } dc: 39 9a sbi 0x07, 1 ; 7 } sck::make_high(); data<<=1; de: 22 0f add r18, r18 #else //round up by default __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); #endif __builtin_avr_delay_cycles(__ticks_dc); e0: 00 c0 rjmp .+0 ; 0xe2 <_ZN3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EE9send_softEh.isra.30+0x20> e2: 00 00 nop namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } e4: 41 98 cbi 0x08, 1 ; 8 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } e6: 39 9a sbi 0x07, 1 ; 7 e8: 91 50 subi r25, 0x01 ; 1 SPCR = (1< data<<=1; _delay_us(0.3); sck::make_low(); } return datain; } ec: 08 95 ret 000000ee <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11>: public: Led() { init(); } void color(uint8_t mask) { (mask & (1<<0)) ? green::make_high() : green::make_low(); ee: 80 ff sbrs r24, 0 f0: 02 c0 rjmp .+4 ; 0xf6 <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11+0x8> namespace avrlib { struct portd { static uint8_t port() { return PORTD; } static void port(uint8_t v) { PORTD = v; } f2: 5e 9a sbi 0x0b, 6 ; 11 f4: 01 c0 rjmp .+2 ; 0xf8 <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11+0xa> f6: 5e 98 cbi 0x0b, 6 ; 11 static uint8_t pin() { return PIND; } static void pin(uint8_t v) { PIND = v; } static uint8_t dir() { return DDRD; } static void dir(uint8_t v) { DDRD = v; } f8: 56 9a sbi 0x0a, 6 ; 10 (mask & (1<<1)) ? red::make_high() : red::make_low(); fa: 81 ff sbrs r24, 1 fc: 02 c0 rjmp .+4 ; 0x102 <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11+0x14> namespace avrlib { struct portd { static uint8_t port() { return PORTD; } static void port(uint8_t v) { PORTD = v; } fe: 5f 9a sbi 0x0b, 7 ; 11 100: 01 c0 rjmp .+2 ; 0x104 <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11+0x16> 102: 5f 98 cbi 0x0b, 7 ; 11 static uint8_t pin() { return PIND; } static void pin(uint8_t v) { PIND = v; } static uint8_t dir() { return DDRD; } static void dir(uint8_t v) { DDRD = v; } 104: 57 9a sbi 0x0a, 7 ; 10 106: 08 95 ret 00000108 <__vector_16>: { recive(); } } ISR(TIMER0_OVF_vect) { 108: 1f 92 push r1 10a: 0f 92 push r0 10c: 0f b6 in r0, 0x3f ; 63 10e: 0f 92 push r0 110: 11 24 eor r1, r1 112: 2f 93 push r18 114: 3f 93 push r19 116: 4f 93 push r20 118: 5f 93 push r21 11a: 6f 93 push r22 11c: 7f 93 push r23 11e: 8f 93 push r24 120: 9f 93 push r25 122: af 93 push r26 124: bf 93 push r27 126: ef 93 push r30 128: ff 93 push r31 if(status == SLEEP) { 12a: 80 91 00 01 lds r24, 0x0100 12e: 90 91 01 01 lds r25, 0x0101 132: 02 97 sbiw r24, 0x02 ; 2 134: 11 f4 brne .+4 ; 0x13a <__vector_16+0x32> l.color(l.GREEN); 136: 81 e0 ldi r24, 0x01 ; 1 138: 0f c0 rjmp .+30 ; 0x158 <__vector_16+0x50> } else if(status == ACTIVE) { 13a: 80 91 00 01 lds r24, 0x0100 13e: 90 91 01 01 lds r25, 0x0101 142: 03 97 sbiw r24, 0x03 ; 3 144: 11 f4 brne .+4 ; 0x14a <__vector_16+0x42> l.color(l.RED); 146: 82 e0 ldi r24, 0x02 ; 2 148: 07 c0 rjmp .+14 ; 0x158 <__vector_16+0x50> } else if(status == RUN) { 14a: 80 91 00 01 lds r24, 0x0100 14e: 90 91 01 01 lds r25, 0x0101 152: 06 97 sbiw r24, 0x06 ; 6 154: 19 f4 brne .+6 ; 0x15c <__vector_16+0x54> l.color(l.YELLOW); 156: 83 e0 ldi r24, 0x03 ; 3 158: 0e 94 77 00 call 0xee ; 0xee <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11> } void off() { servo_act::make_low(); } void timer() { TCNT0 = 0x64; // Reinitialize Timer 0 value 15c: 84 e6 ldi r24, 0x64 ; 100 15e: 86 bd out 0x26, r24 ; 38 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } 160: 2a 9a sbi 0x05, 2 ; 5 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } 162: 22 9a sbi 0x04, 2 ; 4 164: 8f ef ldi r24, 0xFF ; 255 166: 94 e0 ldi r25, 0x04 ; 4 168: 01 97 sbiw r24, 0x01 ; 1 16a: f1 f7 brne .-4 ; 0x168 <__vector_16+0x60> 16c: 00 c0 rjmp .+0 ; 0x16e <__vector_16+0x66> 16e: 00 00 nop servo_io::make_high(); _delay_us(s_left); for(uint16_t i = 0; i < servopos; i++) { 170: 80 e0 ldi r24, 0x00 ; 0 172: 90 e0 ldi r25, 0x00 ; 0 174: 05 c0 rjmp .+10 ; 0x180 <__vector_16+0x78> 176: 25 e1 ldi r18, 0x15 ; 21 178: 2a 95 dec r18 17a: f1 f7 brne .-4 ; 0x178 <__vector_16+0x70> 17c: 00 00 nop 17e: 01 96 adiw r24, 0x01 ; 1 180: 20 91 05 01 lds r18, 0x0105 184: 30 e0 ldi r19, 0x00 ; 0 186: 82 17 cp r24, r18 188: 93 07 cpc r25, r19 18a: a8 f3 brcs .-22 ; 0x176 <__vector_16+0x6e> namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } 18c: 2a 98 cbi 0x05, 2 ; 5 static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } 18e: 22 9a sbi 0x04, 2 ; 4 } se.timer(); 190: ff 91 pop r31 192: ef 91 pop r30 194: bf 91 pop r27 196: af 91 pop r26 198: 9f 91 pop r25 19a: 8f 91 pop r24 19c: 7f 91 pop r23 19e: 6f 91 pop r22 1a0: 5f 91 pop r21 1a2: 4f 91 pop r20 1a4: 3f 91 pop r19 1a6: 2f 91 pop r18 1a8: 0f 90 pop r0 1aa: 0f be out 0x3f, r0 ; 63 1ac: 0f 90 pop r0 1ae: 1f 90 pop r1 1b0: 18 95 reti 000001b2 <_ZN6avrlib3pinINS_5portcELh4EE8make_lowEv>: namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } 1b2: 44 98 cbi 0x08, 4 ; 8 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } 1b4: 3c 9a sbi 0x07, 4 ; 7 1b6: 08 95 ret 000001b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25>: public: Spi() { this->init(); } void CSOn() { cs::make_low(); 1b8: 0e 94 d9 00 call 0x1b2 ; 0x1b2 <_ZN6avrlib3pinINS_5portcELh4EE8make_lowEv> } void rf12_ready(void) { s.CSOn(); while(s.has_data()); // wait until FIFO ready 1bc: 33 9b sbis 0x06, 3 ; 6 1be: fe cf rjmp .-4 ; 0x1bc <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25+0x4> } 1c0: 08 95 ret 000001c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32>: this->send(0x8208); // TX off _delay_ms(100); } private: Spi s; uint16_t send(uint16_t wert) { 1c2: ef 92 push r14 1c4: ff 92 push r15 1c6: 1f 93 push r17 1c8: cf 93 push r28 1ca: df 93 push r29 1cc: 1f 92 push r1 1ce: cd b7 in r28, 0x3d ; 61 1d0: de b7 in r29, 0x3e ; 62 1d2: 18 2f mov r17, r24 1d4: 99 83 std Y+1, r25 ; 0x01 1d6: 0e 94 d9 00 call 0x1b2 ; 0x1b2 <_ZN6avrlib3pinINS_5portcELh4EE8make_lowEv> } uint8_t send(uint8_t data) { if(mode == 0) { return this->send_hard(data); } return this->send_soft(data); 1da: 89 81 ldd r24, Y+1 ; 0x01 1dc: 0e 94 61 00 call 0xc2 ; 0xc2 <_ZN3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EE9send_softEh.isra.30> s.CSOn(); uint16_t werti = s.send((uint8_t)(wert >> 8)) << 8; 1e0: f8 2e mov r15, r24 1e2: e1 2c mov r14, r1 1e4: 81 2f mov r24, r17 1e6: 0e 94 61 00 call 0xc2 ; 0xc2 <_ZN3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EE9send_softEh.isra.30> namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } 1ea: 44 9a sbi 0x08, 4 ; 8 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } 1ec: 3c 9a sbi 0x07, 4 ; 7 werti |= s.send((uint8_t)wert); 1ee: 97 01 movw r18, r14 1f0: 28 2b or r18, r24 1f2: c9 01 movw r24, r18 s.CSOff(); return werti; } 1f4: 0f 90 pop r0 1f6: df 91 pop r29 1f8: cf 91 pop r28 1fa: 1f 91 pop r17 1fc: ff 90 pop r15 1fe: ef 90 pop r14 200: 08 95 ret 00000202 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE17rf12_beginasyncrxEv.isra.39>: s.CSOn(); while(s.has_data()); // wait until FIFO ready } void rf12_beginasyncrx() { this->send(0x82C8); // RX on 202: 88 ec ldi r24, 0xC8 ; 200 204: 92 e8 ldi r25, 0x82 ; 130 206: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->send(0xCA81); // set FIFO mode 20a: 81 e8 ldi r24, 0x81 ; 129 20c: 9a ec ldi r25, 0xCA ; 202 20e: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->send(0xCA83); // enable FIFO 212: 83 e8 ldi r24, 0x83 ; 131 214: 9a ec ldi r25, 0xCA ; 202 216: 0c 94 e1 00 jmp 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> 0000021a <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh>: *data++=this->send(0xB000); } this->send(0x8208); // RX off } void rf12_txpacket(uint8_t addr, uint8_t from, uint8_t data) { 21a: cf 93 push r28 21c: df 93 push r29 21e: 00 d0 rcall .+0 ; 0x220 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh+0x6> 220: 1f 92 push r1 222: cd b7 in r28, 0x3d ; 61 224: de b7 in r29, 0x3e ; 62 this->send(0x8238); // TX on 226: 88 e3 ldi r24, 0x38 ; 56 228: 92 e8 ldi r25, 0x82 ; 130 22a: 2b 83 std Y+3, r18 ; 0x03 22c: 4a 83 std Y+2, r20 ; 0x02 22e: 69 83 std Y+1, r22 ; 0x01 230: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 234: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB8AA); 238: 8a ea ldi r24, 0xAA ; 170 23a: 98 eb ldi r25, 0xB8 ; 184 23c: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 240: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB8AA); 244: 8a ea ldi r24, 0xAA ; 170 246: 98 eb ldi r25, 0xB8 ; 184 248: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 24c: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB8AA); 250: 8a ea ldi r24, 0xAA ; 170 252: 98 eb ldi r25, 0xB8 ; 184 254: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 258: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB82D); 25c: 8d e2 ldi r24, 0x2D ; 45 25e: 98 eb ldi r25, 0xB8 ; 184 260: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 264: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB8D4); 268: 84 ed ldi r24, 0xD4 ; 212 26a: 98 eb ldi r25, 0xB8 ; 184 26c: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 270: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB800|addr); 274: 69 81 ldd r22, Y+1 ; 0x01 276: 86 2f mov r24, r22 278: 90 e0 ldi r25, 0x00 ; 0 27a: 98 6b ori r25, 0xB8 ; 184 27c: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 280: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB800|from); 284: 4a 81 ldd r20, Y+2 ; 0x02 286: 84 2f mov r24, r20 288: 90 e0 ldi r25, 0x00 ; 0 28a: 98 6b ori r25, 0xB8 ; 184 28c: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 290: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB800|data); 294: 2b 81 ldd r18, Y+3 ; 0x03 296: 82 2f mov r24, r18 298: 90 e0 ldi r25, 0x00 ; 0 29a: 98 6b ori r25, 0xB8 ; 184 29c: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 2a0: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0xB800); 2a4: 80 e0 ldi r24, 0x00 ; 0 2a6: 98 eb ldi r25, 0xB8 ; 184 2a8: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> rf12_ready(); 2ac: 0e 94 dc 00 call 0x1b8 ; 0x1b8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE10rf12_readyEv.isra.25> this->send(0x8208); // TX off 2b0: 88 e0 ldi r24, 0x08 ; 8 2b2: 92 e8 ldi r25, 0x82 ; 130 2b4: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> #else //round up by default __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); #endif __builtin_avr_delay_cycles(__ticks_dc); 2b8: 2f ef ldi r18, 0xFF ; 255 2ba: 80 e7 ldi r24, 0x70 ; 112 2bc: 92 e0 ldi r25, 0x02 ; 2 2be: 21 50 subi r18, 0x01 ; 1 2c0: 80 40 sbci r24, 0x00 ; 0 2c2: 90 40 sbci r25, 0x00 ; 0 2c4: e1 f7 brne .-8 ; 0x2be <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh+0xa4> 2c6: 00 c0 rjmp .+0 ; 0x2c8 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh+0xae> 2c8: 00 00 nop _delay_ms(100); } 2ca: 0f 90 pop r0 2cc: 0f 90 pop r0 2ce: 0f 90 pop r0 2d0: df 91 pop r29 2d2: cf 91 pop r28 2d4: 08 95 ret 000002d6 <_Z4turnv>: volatile int status = SLEEP; void turn() { if(status == RUN) 2d6: 80 91 00 01 lds r24, 0x0100 2da: 90 91 01 01 lds r25, 0x0101 2de: 06 97 sbiw r24, 0x06 ; 6 2e0: 09 f4 brne .+2 ; 0x2e4 <_Z4turnv+0xe> 2e2: 42 c0 rjmp .+132 ; 0x368 <_Z4turnv+0x92> return; status = RUN; 2e4: 86 e0 ldi r24, 0x06 ; 6 2e6: 90 e0 ldi r25, 0x00 ; 0 2e8: 90 93 01 01 sts 0x0101, r25 2ec: 80 93 00 01 sts 0x0100, r24 namespace avrlib { struct portb { static uint8_t port() { return PORTB; } static void port(uint8_t v) { PORTB = v; } 2f0: 29 9a sbi 0x05, 1 ; 5 2f2: 0e 94 5f 00 call 0xbe ; 0xbe <_ZN6avrlib3pinINS_5portbELh1EE6outputEb.part.2> public: Servo() { init(); } void turn(uint16_t mask) { this->servopos = mask; 2f6: 10 92 05 01 sts 0x0105, r1 2fa: 2f ef ldi r18, 0xFF ; 255 2fc: 89 ef ldi r24, 0xF9 ; 249 2fe: 90 e0 ldi r25, 0x00 ; 0 300: 21 50 subi r18, 0x01 ; 1 302: 80 40 sbci r24, 0x00 ; 0 304: 90 40 sbci r25, 0x00 ; 0 306: e1 f7 brne .-8 ; 0x300 <_Z4turnv+0x2a> 308: 00 c0 rjmp .+0 ; 0x30a <_Z4turnv+0x34> 30a: 00 00 nop se.on(); se.turn(se.LEFT); _delay_ms(10+DEVICE); r.rf12_txpacket(MASTER, DEVICE, status); //r.txpacket(MASTER, DEVICE, status); 30c: 20 91 00 01 lds r18, 0x0100 310: 30 91 01 01 lds r19, 0x0101 314: 4e e1 ldi r20, 0x1E ; 30 316: 61 e0 ldi r22, 0x01 ; 1 318: 82 e0 ldi r24, 0x02 ; 2 31a: 91 e0 ldi r25, 0x01 ; 1 31c: 0e 94 0d 01 call 0x21a ; 0x21a <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh> 320: 2f ef ldi r18, 0xFF ; 255 322: 83 ec ldi r24, 0xC3 ; 195 324: 99 e0 ldi r25, 0x09 ; 9 326: 21 50 subi r18, 0x01 ; 1 328: 80 40 sbci r24, 0x00 ; 0 32a: 90 40 sbci r25, 0x00 ; 0 32c: e1 f7 brne .-8 ; 0x326 <_Z4turnv+0x50> 32e: 00 c0 rjmp .+0 ; 0x330 <_Z4turnv+0x5a> 330: 00 00 nop 332: 89 e6 ldi r24, 0x69 ; 105 334: 80 93 05 01 sts 0x0105, r24 338: 2f ef ldi r18, 0xFF ; 255 33a: 82 e5 ldi r24, 0x52 ; 82 33c: 97 e0 ldi r25, 0x07 ; 7 33e: 21 50 subi r18, 0x01 ; 1 340: 80 40 sbci r24, 0x00 ; 0 342: 90 40 sbci r25, 0x00 ; 0 344: e1 f7 brne .-8 ; 0x33e <_Z4turnv+0x68> 346: 00 c0 rjmp .+0 ; 0x348 <_Z4turnv+0x72> 348: 00 00 nop 34a: 82 ed ldi r24, 0xD2 ; 210 34c: 80 93 05 01 sts 0x0105, r24 350: 2f ef ldi r18, 0xFF ; 255 352: 86 e1 ldi r24, 0x16 ; 22 354: 91 e1 ldi r25, 0x11 ; 17 356: 21 50 subi r18, 0x01 ; 1 358: 80 40 sbci r24, 0x00 ; 0 35a: 90 40 sbci r25, 0x00 ; 0 35c: e1 f7 brne .-8 ; 0x356 <_Z4turnv+0x80> 35e: 00 c0 rjmp .+0 ; 0x360 <_Z4turnv+0x8a> 360: 00 00 nop 362: 29 98 cbi 0x05, 1 ; 5 364: 0c 94 5f 00 jmp 0xbe ; 0xbe <_ZN6avrlib3pinINS_5portbELh1EE6outputEb.part.2> 368: 08 95 ret 0000036a <_Z4pollv>: se.off(); } void poll() { if(status == ACTIVE) { 36a: 80 91 00 01 lds r24, 0x0100 36e: 90 91 01 01 lds r25, 0x0101 372: 03 97 sbiw r24, 0x03 ; 3 374: 51 f4 brne .+20 ; 0x38a <_Z4pollv+0x20> if(mc.is_pressed()) { 376: 4a 99 sbic 0x09, 2 ; 9 378: 08 c0 rjmp .+16 ; 0x38a <_Z4pollv+0x20> uint8_t rf12_rxbyte() { return this->send(0xB000); } void rf12_endasyncrx() { this->send(0x8208); // RX off 37a: 88 e0 ldi r24, 0x08 ; 8 37c: 92 e8 ldi r25, 0x82 ; 130 37e: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> r.rf12_endasyncrx(); //r.endasyncrx(); turn(); 382: 0e 94 6b 01 call 0x2d6 ; 0x2d6 <_Z4turnv> r.rf12_beginasyncrx(); //r.beginasyncrx(); 386: 0e 94 01 01 call 0x202 ; 0x202 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE17rf12_beginasyncrxEv.isra.39> } } if(status == SLEEP) { 38a: 80 91 00 01 lds r24, 0x0100 38e: 90 91 01 01 lds r25, 0x0101 392: 02 97 sbiw r24, 0x02 ; 2 394: 79 f4 brne .+30 ; 0x3b4 <_Z4pollv+0x4a> if(mc.is_pressed()) { 396: 4a 99 sbic 0x09, 2 ; 9 398: 0d c0 rjmp .+26 ; 0x3b4 <_Z4pollv+0x4a> 39a: 88 e0 ldi r24, 0x08 ; 8 39c: 92 e8 ldi r25, 0x82 ; 130 39e: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> r.rf12_endasyncrx(); //r.endasyncrx(); r.rf12_txpacket(MASTER, DEVICE, DEDECT); //r.txpacket(MASTER, DEVICE, DEDECT); 3a2: 28 e0 ldi r18, 0x08 ; 8 3a4: 4e e1 ldi r20, 0x1E ; 30 3a6: 61 e0 ldi r22, 0x01 ; 1 3a8: 82 e0 ldi r24, 0x02 ; 2 3aa: 91 e0 ldi r25, 0x01 ; 1 3ac: 0e 94 0d 01 call 0x21a ; 0x21a <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh> r.rf12_beginasyncrx(); //r.beginasyncrx(); 3b0: 0e 94 01 01 call 0x202 ; 0x202 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE17rf12_beginasyncrxEv.isra.39> } } if(st.is_pressed()) { 3b4: 4b 99 sbic 0x09, 3 ; 9 3b6: 21 c0 rjmp .+66 ; 0x3fa <_Z4pollv+0x90> if(status == SLEEP) { 3b8: 80 91 00 01 lds r24, 0x0100 3bc: 90 91 01 01 lds r25, 0x0101 3c0: 02 97 sbiw r24, 0x02 ; 2 3c2: d9 f4 brne .+54 ; 0x3fa <_Z4pollv+0x90> l.color(l.YELLOW); 3c4: 83 e0 ldi r24, 0x03 ; 3 3c6: 0e 94 77 00 call 0xee ; 0xee <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11> status = RUN; 3ca: 86 e0 ldi r24, 0x06 ; 6 3cc: 90 e0 ldi r25, 0x00 ; 0 3ce: 90 93 01 01 sts 0x0101, r25 3d2: 80 93 00 01 sts 0x0100, r24 3d6: 2f ef ldi r18, 0xFF ; 255 3d8: 81 e1 ldi r24, 0x11 ; 17 3da: 9a e7 ldi r25, 0x7A ; 122 3dc: 21 50 subi r18, 0x01 ; 1 3de: 80 40 sbci r24, 0x00 ; 0 3e0: 90 40 sbci r25, 0x00 ; 0 3e2: e1 f7 brne .-8 ; 0x3dc <_Z4pollv+0x72> 3e4: 00 c0 rjmp .+0 ; 0x3e6 <_Z4pollv+0x7c> 3e6: 00 00 nop _delay_ms(5000); status = ACTIVE; 3e8: 83 e0 ldi r24, 0x03 ; 3 3ea: 90 e0 ldi r25, 0x00 ; 0 3ec: 90 93 01 01 sts 0x0101, r25 3f0: 80 93 00 01 sts 0x0100, r24 l.color(l.BLACK); 3f4: 80 e0 ldi r24, 0x00 ; 0 3f6: 0c 94 77 00 jmp 0xee ; 0xee <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11> 3fa: 08 95 ret 000003fc <_Z6recivev>: rf12_beginasyncrx(); //r.beginasyncrx(); } l.color(l.GREEN); }*/ void recive() { 3fc: cf 93 push r28 r.rf12_beginasyncrx(); 3fe: 0e 94 01 01 call 0x202 ; 0x202 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE17rf12_beginasyncrxEv.isra.39> while(r.rf12_hasdata()) { 402: 02 c0 rjmp .+4 ; 0x408 <_Z6recivev+0xc> poll(); 404: 0e 94 b5 01 call 0x36a ; 0x36a <_Z4pollv> public: Spi() { this->init(); } void CSOn() { cs::make_low(); 408: 0e 94 d9 00 call 0x1b2 ; 0x1b2 <_ZN6avrlib3pinINS_5portcELh4EE8make_lowEv> l.color(l.GREEN); }*/ void recive() { r.rf12_beginasyncrx(); while(r.rf12_hasdata()) { 40c: 33 9b sbis 0x06, 3 ; 6 40e: fa cf rjmp .-12 ; 0x404 <_Z6recivev+0x8> s.CSOn(); return s.has_data(); } uint8_t rf12_rxbyte() { return this->send(0xB000); 410: 80 e0 ldi r24, 0x00 ; 0 412: 90 eb ldi r25, 0xB0 ; 176 414: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> poll(); } uint8_t addr = r.rf12_rxbyte(); if(addr == ALL || addr == DEVICE || addr == GROUP) { 418: 88 23 and r24, r24 41a: 41 f0 breq .+16 ; 0x42c <_Z6recivev+0x30> 41c: 8e 31 cpi r24, 0x1E ; 30 41e: 31 f0 breq .+12 ; 0x42c <_Z6recivev+0x30> 420: 80 3f cpi r24, 0xF0 ; 240 422: 09 f0 breq .+2 ; 0x426 <_Z6recivev+0x2a> 424: 55 c0 rjmp .+170 ; 0x4d0 <_Z6recivev+0xd4> 426: 02 c0 rjmp .+4 ; 0x42c <_Z6recivev+0x30> while(r.rf12_hasdata()) { poll(); 428: 0e 94 b5 01 call 0x36a ; 0x36a <_Z4pollv> 42c: 0e 94 d9 00 call 0x1b2 ; 0x1b2 <_ZN6avrlib3pinINS_5portcELh4EE8make_lowEv> while(r.rf12_hasdata()) { poll(); } uint8_t addr = r.rf12_rxbyte(); if(addr == ALL || addr == DEVICE || addr == GROUP) { while(r.rf12_hasdata()) { 430: 33 9b sbis 0x06, 3 ; 6 432: fa cf rjmp .-12 ; 0x428 <_Z6recivev+0x2c> 434: 80 e0 ldi r24, 0x00 ; 0 436: 90 eb ldi r25, 0xB0 ; 176 438: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> 43c: c8 2f mov r28, r24 poll(); } uint8_t from = r.rf12_rxbyte(); while(r.rf12_hasdata()) { 43e: 02 c0 rjmp .+4 ; 0x444 <_Z6recivev+0x48> poll(); 440: 0e 94 b5 01 call 0x36a ; 0x36a <_Z4pollv> 444: 0e 94 d9 00 call 0x1b2 ; 0x1b2 <_ZN6avrlib3pinINS_5portcELh4EE8make_lowEv> if(addr == ALL || addr == DEVICE || addr == GROUP) { while(r.rf12_hasdata()) { poll(); } uint8_t from = r.rf12_rxbyte(); while(r.rf12_hasdata()) { 448: 33 9b sbis 0x06, 3 ; 6 44a: fa cf rjmp .-12 ; 0x440 <_Z6recivev+0x44> poll(); } if(from == MASTER) { 44c: c1 30 cpi r28, 0x01 ; 1 44e: 09 f0 breq .+2 ; 0x452 <_Z6recivev+0x56> 450: 3f c0 rjmp .+126 ; 0x4d0 <_Z6recivev+0xd4> 452: 80 e0 ldi r24, 0x00 ; 0 454: 90 eb ldi r25, 0xB0 ; 176 456: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> uint8_t data = r.rf12_rxbyte(); switch(data) { 45a: 84 30 cpi r24, 0x04 ; 4 45c: 49 f0 breq .+18 ; 0x470 <_Z6recivev+0x74> 45e: 18 f4 brcc .+6 ; 0x466 <_Z6recivev+0x6a> 460: 81 30 cpi r24, 0x01 ; 1 462: c9 f4 brne .+50 ; 0x496 <_Z6recivev+0x9a> 464: 1d c0 rjmp .+58 ; 0x4a0 <_Z6recivev+0xa4> 466: 85 30 cpi r24, 0x05 ; 5 468: 31 f0 breq .+12 ; 0x476 <_Z6recivev+0x7a> 46a: 87 30 cpi r24, 0x07 ; 7 46c: a1 f4 brne .+40 ; 0x496 <_Z6recivev+0x9a> 46e: 0a c0 rjmp .+20 ; 0x484 <_Z6recivev+0x88> case PING: { break; } case SETSLEEP: { status = SLEEP; 470: 82 e0 ldi r24, 0x02 ; 2 472: 90 e0 ldi r25, 0x00 ; 0 474: 02 c0 rjmp .+4 ; 0x47a <_Z6recivev+0x7e> break; } case SETACTIVE: { status = ACTIVE; 476: 83 e0 ldi r24, 0x03 ; 3 478: 90 e0 ldi r25, 0x00 ; 0 47a: 90 93 01 01 sts 0x0101, r25 47e: 80 93 00 01 sts 0x0100, r24 break; 482: 0e c0 rjmp .+28 ; 0x4a0 <_Z6recivev+0xa4> } void rf12_endasyncrx() { this->send(0x8208); // RX off 484: 88 e0 ldi r24, 0x08 ; 8 486: 92 e8 ldi r25, 0x82 ; 130 488: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> } case SETRUN: { r.rf12_endasyncrx(); turn(); 48c: 0e 94 6b 01 call 0x2d6 ; 0x2d6 <_Z4turnv> _delay_ms(10+DEVICE); r.rf12_txpacket(MASTER, DEVICE, status); return; } } } 490: cf 91 pop r28 break; } case SETRUN: { r.rf12_endasyncrx(); turn(); r.rf12_beginasyncrx(); 492: 0c 94 01 01 jmp 0x202 ; 0x202 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE17rf12_beginasyncrxEv.isra.39> 496: 88 e0 ldi r24, 0x08 ; 8 498: 92 e8 ldi r25, 0x82 ; 130 _delay_ms(10+DEVICE); r.rf12_txpacket(MASTER, DEVICE, status); return; } } } 49a: cf 91 pop r28 49c: 0c 94 e1 00 jmp 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> 4a0: 88 e0 ldi r24, 0x08 ; 8 4a2: 92 e8 ldi r25, 0x82 ; 130 4a4: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> 4a8: 2f ef ldi r18, 0xFF ; 255 4aa: 89 ef ldi r24, 0xF9 ; 249 4ac: 90 e0 ldi r25, 0x00 ; 0 4ae: 21 50 subi r18, 0x01 ; 1 4b0: 80 40 sbci r24, 0x00 ; 0 4b2: 90 40 sbci r25, 0x00 ; 0 4b4: e1 f7 brne .-8 ; 0x4ae <_Z6recivev+0xb2> 4b6: 00 c0 rjmp .+0 ; 0x4b8 <_Z6recivev+0xbc> 4b8: 00 00 nop return; } } r.rf12_endasyncrx(); _delay_ms(10+DEVICE); r.rf12_txpacket(MASTER, DEVICE, status); 4ba: 20 91 00 01 lds r18, 0x0100 4be: 30 91 01 01 lds r19, 0x0101 4c2: 4e e1 ldi r20, 0x1E ; 30 4c4: 61 e0 ldi r22, 0x01 ; 1 4c6: 82 e0 ldi r24, 0x02 ; 2 4c8: 91 e0 ldi r25, 0x01 ; 1 return; } } } 4ca: cf 91 pop r28 return; } } r.rf12_endasyncrx(); _delay_ms(10+DEVICE); r.rf12_txpacket(MASTER, DEVICE, status); 4cc: 0c 94 0d 01 jmp 0x21a ; 0x21a <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE13rf12_txpacketEhhh> return; } } } 4d0: cf 91 pop r28 4d2: 08 95 ret 000004d4
: int main(void) { l.color(l.RED); 4d4: 82 e0 ldi r24, 0x02 ; 2 4d6: 0e 94 77 00 call 0xee ; 0xee <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11> while(1) { recive(); 4da: 0e 94 fe 01 call 0x3fc ; 0x3fc <_Z6recivev> 4de: fd cf rjmp .-6 ; 0x4da 000004e0 <_GLOBAL__sub_I_l>: 4e0: 57 9a sbi 0x0a, 7 ; 10 4e2: 56 9a sbi 0x0a, 6 ; 10 static const uint8_t YELLOW = 3; private: void init() { red::make_output(); green::make_output(); color(BLACK); 4e4: 80 e0 ldi r24, 0x00 ; 0 4e6: 0e 94 77 00 call 0xee ; 0xee <_ZN3LedIN6avrlib5portdELi7ELi6EE5colorEh.isra.11> static const uint16_t MIDDLE = s_middle; static const uint16_t RIGHT = s_right; private: uint8_t servopos; void init() { this->servopos = 0; 4ea: 10 92 05 01 sts 0x0105, r1 4ee: 0e 94 5f 00 call 0xbe ; 0xbe <_ZN6avrlib3pinINS_5portbELh1EE6outputEb.part.2> 4f2: 29 98 cbi 0x05, 1 ; 5 4f4: 0e 94 5f 00 call 0xbe ; 0xbe <_ZN6avrlib3pinINS_5portbELh1EE6outputEb.part.2> static uint8_t pin() { return PINB; } static void pin(uint8_t v) { PINB = v; } static uint8_t dir() { return DDRB; } static void dir(uint8_t v) { DDRB = v; } 4f8: 22 9a sbi 0x04, 2 ; 4 // Clock value: 7,813 kHz // Mode: Normal top=0xFF // OC0A output: Disconnected // OC0B output: Disconnected // Timer Period: 19,968 ms TCCR0A=(0<servopos = 0; servo_act::make_output(); servo_act::make_low(); servo_io::make_output(); this->init_timer(); sei(); 50e: 78 94 sei 510: 53 98 cbi 0x0a, 3 ; 10 namespace avrlib { struct portd { static uint8_t port() { return PORTD; } static void port(uint8_t v) { PORTD = v; } 512: 5b 98 cbi 0x0b, 3 ; 11 514: 5b 9a sbi 0x0b, 3 ; 11 static uint8_t pin() { return PIND; } static void pin(uint8_t v) { PIND = v; } static uint8_t dir() { return DDRD; } static void dir(uint8_t v) { DDRD = v; } 516: 52 98 cbi 0x0a, 2 ; 10 namespace avrlib { struct portd { static uint8_t port() { return PORTD; } static void port(uint8_t v) { PORTD = v; } 518: 5a 98 cbi 0x0b, 2 ; 11 51a: 5a 9a sbi 0x0b, 2 ; 11 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } 51c: 40 98 cbi 0x08, 0 ; 8 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } 51e: 38 9a sbi 0x07, 0 ; 7 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } 520: 41 98 cbi 0x08, 1 ; 8 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } 522: 39 9a sbi 0x07, 1 ; 7 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } 524: 44 9a sbi 0x08, 4 ; 8 static uint8_t pin() { return PINC; } static void pin(uint8_t v) { PINC = v; } static uint8_t dir() { return DDRC; } static void dir(uint8_t v) { DDRC = v; } 526: 3c 9a sbi 0x07, 4 ; 7 528: 3b 98 cbi 0x07, 3 ; 7 namespace avrlib { struct portc { static uint8_t port() { return PORTC; } static void port(uint8_t v) { PORTC = v; } 52a: 43 98 cbi 0x08, 3 ; 8 52c: 2f ef ldi r18, 0xFF ; 255 52e: 80 e7 ldi r24, 0x70 ; 112 530: 92 e0 ldi r25, 0x02 ; 2 532: 21 50 subi r18, 0x01 ; 1 534: 80 40 sbci r24, 0x00 ; 0 536: 90 40 sbci r25, 0x00 ; 0 538: e1 f7 brne .-8 ; 0x532 <__stack+0x33> 53a: 00 c0 rjmp .+0 ; 0x53c <__stack+0x3d> 53c: 00 00 nop return werti; } void init(void) { _delay_ms(100); this->send(0xC0E0); // AVR CLK: 10MHz 53e: 80 ee ldi r24, 0xE0 ; 224 540: 90 ec ldi r25, 0xC0 ; 192 542: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->send(0x80D7); // Enable FIFO 546: 87 ed ldi r24, 0xD7 ; 215 548: 90 e8 ldi r25, 0x80 ; 128 54a: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->send(0xC2AB); // Data Filter: internal 54e: 8b ea ldi r24, 0xAB ; 171 550: 92 ec ldi r25, 0xC2 ; 194 552: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->send(0xCA81); // Set FIFO mode 556: 81 e8 ldi r24, 0x81 ; 129 558: 9a ec ldi r25, 0xCA ; 202 55a: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->send(0xE000); // disable wakeuptimer 55e: 80 e0 ldi r24, 0x00 ; 0 560: 90 ee ldi r25, 0xE0 ; 224 562: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->send(0xC800); // disable low duty cycle 566: 80 e0 ldi r24, 0x00 ; 0 568: 98 ec ldi r25, 0xC8 ; 200 56a: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->send(0xC4F7); // AFC settings: autotuning: -10kHz...+7,5kHz 56e: 87 ef ldi r24, 0xF7 ; 247 570: 94 ec ldi r25, 0xC4 ; 196 572: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> if( freq < 96 ) { // 430,2400MHz this->send( 0xA000 | 96 ); } else if( freq > 3903 ) { // 439,7575MHz this->send( 0xA000 | 3903 ); } this->send( 0xA000 | freq ); 576: 80 e2 ldi r24, 0x20 ; 32 578: 96 ea ldi r25, 0xA6 ; 166 57a: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> this->setbandwidth(); // 400kHz Bandbreite, 0dB Verstärkung, DRSSI threshold: -61dBm this->setbaud(); // 19200 baud this->setpower(); // 1mW Ausgangsleistung, 120kHz Frequenzshift } void setbandwidth() { this->send( 0x9400 | ( ( bandwidth & 7 ) << 5 ) | ( ( gain & 3 ) << 3 ) | ( drssi & 7 ) ); 57e: 87 e2 ldi r24, 0x27 ; 39 580: 94 e9 ldi r25, 0x94 ; 148 582: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> return; } if (baud < 5400) { // Baudrate= 344827,58621/(R+1)/(1+CS*7) this->send(0xC680 | ( ( 43104 / baud ) - 1 ) ); } else { this->send(0xC600 | ( ( 344828UL / baud ) - 1 ) ); 586: 82 e2 ldi r24, 0x22 ; 34 588: 96 ec ldi r25, 0xC6 ; 198 58a: 0e 94 e1 00 call 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> } } void setpower() { this->send( 0x9800 | ( power & 7 ) | ( ( mod & 15 ) << 4 ) ); 58e: 80 e6 ldi r24, 0x60 ; 96 590: 98 e9 ldi r25, 0x98 ; 152 592: 0c 94 e1 00 jmp 0x1c2 ; 0x1c2 <_ZN4Rf12I3SpiIN6avrlib5portcELi4ELi3ELi0ELi1ELi1EELh1ELh0ELh7ELj1568ELj9600ELh0ELh6EE4sendEj.isra.32> 00000596 <__tablejump2__>: 596: ee 0f add r30, r30 598: ff 1f adc r31, r31 0000059a <__tablejump__>: 59a: 05 90 lpm r0, Z+ 59c: f4 91 lpm r31, Z 59e: e0 2d mov r30, r0 5a0: 09 94 ijmp 000005a2 <_exit>: 5a2: f8 94 cli 000005a4 <__stop_program>: 5a4: ff cf rjmp .-2 ; 0x5a4 <__stop_program>