2 serial_lcd_obj.elf: file format elf32-avr
5 Idx Name Size VMA LMA File off Algn
6 0 .text 00000636 00000000 00000000 00000094 2**1
7 CONTENTS, ALLOC, LOAD, READONLY, CODE
8 1 .data 0000000c 00800060 00000636 000006ca 2**0
9 CONTENTS, ALLOC, LOAD, DATA
10 2 .bss 00000048 0080006c 0080006c 000006d6 2**0
12 3 .stab 0000069c 00000000 00000000 000006d8 2**2
13 CONTENTS, READONLY, DEBUGGING
14 4 .stabstr 00000082 00000000 00000000 00000d74 2**0
15 CONTENTS, READONLY, DEBUGGING
16 5 .debug_aranges 00000020 00000000 00000000 00000df6 2**0
17 CONTENTS, READONLY, DEBUGGING
18 6 .debug_pubnames 000000bb 00000000 00000000 00000e16 2**0
19 CONTENTS, READONLY, DEBUGGING
20 7 .debug_info 00001272 00000000 00000000 00000ed1 2**0
21 CONTENTS, READONLY, DEBUGGING
22 8 .debug_abbrev 000003db 00000000 00000000 00002143 2**0
23 CONTENTS, READONLY, DEBUGGING
24 9 .debug_line 00000767 00000000 00000000 0000251e 2**0
25 CONTENTS, READONLY, DEBUGGING
26 10 .debug_frame 00000080 00000000 00000000 00002c88 2**2
27 CONTENTS, READONLY, DEBUGGING
28 11 .debug_str 00000940 00000000 00000000 00002d08 2**0
29 CONTENTS, READONLY, DEBUGGING
30 12 .debug_loc 000001fd 00000000 00000000 00003648 2**0
31 CONTENTS, READONLY, DEBUGGING
32 13 .debug_ranges 00000078 00000000 00000000 00003845 2**0
33 CONTENTS, READONLY, DEBUGGING
35 Disassembly of section .text:
38 0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end>
39 2: 2a c0 rjmp .+84 ; 0x58 <__bad_interrupt>
40 4: 29 c0 rjmp .+82 ; 0x58 <__bad_interrupt>
41 6: 28 c0 rjmp .+80 ; 0x58 <__bad_interrupt>
42 8: 27 c0 rjmp .+78 ; 0x58 <__bad_interrupt>
43 a: 26 c0 rjmp .+76 ; 0x58 <__bad_interrupt>
44 c: 25 c0 rjmp .+74 ; 0x58 <__bad_interrupt>
45 e: 8b c2 rjmp .+1302 ; 0x526 <__vector_7>
46 10: 23 c0 rjmp .+70 ; 0x58 <__bad_interrupt>
47 12: 22 c0 rjmp .+68 ; 0x58 <__bad_interrupt>
48 14: 21 c0 rjmp .+66 ; 0x58 <__bad_interrupt>
49 16: 20 c0 rjmp .+64 ; 0x58 <__bad_interrupt>
50 18: 1f c0 rjmp .+62 ; 0x58 <__bad_interrupt>
51 1a: a9 c2 rjmp .+1362 ; 0x56e <__vector_13>
52 1c: 1d c0 rjmp .+58 ; 0x58 <__bad_interrupt>
53 1e: 1c c0 rjmp .+56 ; 0x58 <__bad_interrupt>
54 20: 1b c0 rjmp .+54 ; 0x58 <__bad_interrupt>
55 22: 1a c0 rjmp .+52 ; 0x58 <__bad_interrupt>
56 24: 19 c0 rjmp .+50 ; 0x58 <__bad_interrupt>
58 00000026 <__ctors_end>:
60 28: 1f be out 0x3f, r1 ; 63
61 2a: cf ed ldi r28, 0xDF ; 223
62 2c: cd bf out 0x3d, r28 ; 61
64 0000002e <__do_copy_data>:
65 2e: 10 e0 ldi r17, 0x00 ; 0
66 30: a0 e6 ldi r26, 0x60 ; 96
67 32: b0 e0 ldi r27, 0x00 ; 0
68 34: e6 e3 ldi r30, 0x36 ; 54
69 36: f6 e0 ldi r31, 0x06 ; 6
70 38: 02 c0 rjmp .+4 ; 0x3e <.do_copy_data_start>
72 0000003a <.do_copy_data_loop>:
76 0000003e <.do_copy_data_start>:
77 3e: ac 36 cpi r26, 0x6C ; 108
78 40: b1 07 cpc r27, r17
79 42: d9 f7 brne .-10 ; 0x3a <.do_copy_data_loop>
81 00000044 <__do_clear_bss>:
82 44: 10 e0 ldi r17, 0x00 ; 0
83 46: ac e6 ldi r26, 0x6C ; 108
84 48: b0 e0 ldi r27, 0x00 ; 0
85 4a: 01 c0 rjmp .+2 ; 0x4e <.do_clear_bss_start>
87 0000004c <.do_clear_bss_loop>:
90 0000004e <.do_clear_bss_start>:
91 4e: a4 3b cpi r26, 0xB4 ; 180
92 50: b1 07 cpc r27, r17
93 52: e1 f7 brne .-8 ; 0x4c <.do_clear_bss_loop>
94 54: 1e d1 rcall .+572 ; 0x292 <main>
95 56: ed c2 rjmp .+1498 ; 0x632 <_exit>
97 00000058 <__bad_interrupt>:
98 58: d3 cf rjmp .-90 ; 0x0 <__vectors>
100 0000005a <_ZN3Lcd8busyWaitEv>:
101 *m_ctrlPort |= (1<<m_ePin);
103 *m_ctrlPort &= ~(1<<m_ePin);
106 unsigned char Lcd::busyWait (void) {
107 5a: dc 01 movw r26, r24
108 unsigned char LCDStatus;
109 *m_dataDir = 0x00; // Set LCD data port to inputs
110 5c: 16 96 adiw r26, 0x06 ; 6
113 62: 17 97 sbiw r26, 0x07 ; 7
115 *m_ctrlPort |= (1<<m_rwPin);
118 6a: 11 97 sbiw r26, 0x01 ; 1
120 6e: 81 e0 ldi r24, 0x01 ; 1
121 70: 90 e0 ldi r25, 0x00 ; 0
122 72: 1b 96 adiw r26, 0x0b ; 11
124 76: 1b 97 sbiw r26, 0x0b ; 11
125 78: 02 c0 rjmp .+4 ; 0x7e <_ZN3Lcd8busyWaitEv+0x24>
126 7a: 88 0f add r24, r24
127 7c: 99 1f adc r25, r25
129 80: e2 f7 brpl .-8 ; 0x7a <_ZN3Lcd8busyWaitEv+0x20>
130 82: 28 2b or r18, r24
136 *m_ctrlPort |= (1<<m_ePin);
137 88: 61 e0 ldi r22, 0x01 ; 1
138 8a: 70 e0 ldi r23, 0x00 ; 0
139 WDTCSR &= ~(1<<WDCE);
143 INLINE_FUNC_DECLARE(static void reset(void)) {
146 *m_dataDir = 0x00; // Set LCD data port to inputs
147 *m_ctrlPort |= (1<<m_rwPin);
151 *m_ctrlPort |= (1<<m_ePin);
154 92: 11 97 sbiw r26, 0x01 ; 1
156 96: 41 e0 ldi r20, 0x01 ; 1
157 98: 50 e0 ldi r21, 0x00 ; 0
158 9a: cb 01 movw r24, r22
159 9c: 1c 96 adiw r26, 0x0c ; 12
161 a0: 1c 97 sbiw r26, 0x0c ; 12
162 a2: 02 c0 rjmp .+4 ; 0xa8 <_ZN3Lcd8busyWaitEv+0x4e>
163 a4: 88 0f add r24, r24
164 a6: 99 1f adc r25, r25
166 aa: e2 f7 brpl .-8 ; 0xa4 <_ZN3Lcd8busyWaitEv+0x4a>
167 ac: 28 2b or r18, r24
170 #define ENABLE_WAIT() __delay_cycles(4);
172 #elif defined(__GNUC__)
173 static __inline__ void _NOP1 (void) { __asm__ volatile ( "nop " "\n\t" ); }
174 static __inline__ void _NOP2 (void) { __asm__ volatile ( "rjmp 1f" "\n\t" "1:" "\n\t" ); }
175 b0: 00 c0 rjmp .+0 ; 0xb2 <_ZN3Lcd8busyWaitEv+0x58>
177 LCDStatus = *m_dataPinReg;
178 b2: 00 c0 rjmp .+0 ; 0xb4 <_ZN3Lcd8busyWaitEv+0x5a>
179 b4: 18 96 adiw r26, 0x08 ; 8
182 ba: 19 97 sbiw r26, 0x09 ; 9
184 *m_ctrlPort &= ~(1<<m_ePin);
187 c2: 11 97 sbiw r26, 0x01 ; 1
189 c6: cb 01 movw r24, r22
190 c8: 1c 96 adiw r26, 0x0c ; 12
192 cc: 1c 97 sbiw r26, 0x0c ; 12
193 ce: 02 c0 rjmp .+4 ; 0xd4 <_ZN3Lcd8busyWaitEv+0x7a>
194 d0: 88 0f add r24, r24
195 d2: 99 1f adc r25, r25
197 d6: e2 f7 brpl .-8 ; 0xd0 <_ZN3Lcd8busyWaitEv+0x76>
199 da: 82 23 and r24, r18
201 unsigned char Lcd::busyWait (void) {
202 unsigned char LCDStatus;
203 *m_dataDir = 0x00; // Set LCD data port to inputs
204 *m_ctrlPort |= (1<<m_rwPin);
207 de: 37 fd sbrc r19, 7
208 e0: d5 cf rjmp .-86 ; 0x8c <_ZN3Lcd8busyWaitEv+0x32>
209 *m_ctrlPort |= (1<<m_ePin);
211 LCDStatus = *m_dataPinReg;
212 *m_ctrlPort &= ~(1<<m_ePin);
213 } while (LCDStatus & (1<<LCD_BUSY));
214 *m_ctrlPort &= ~(1<<m_rwPin);
217 e6: 11 97 sbiw r26, 0x01 ; 1
219 ea: 1b 96 adiw r26, 0x0b ; 11
221 ee: 1b 97 sbiw r26, 0x0b ; 11
222 f0: 02 c0 rjmp .+4 ; 0xf6 <__stack+0x17>
223 f2: 44 0f add r20, r20
224 f4: 55 1f adc r21, r21
226 f8: e2 f7 brpl .-8 ; 0xf2 <__stack+0x13>
227 fa: 84 2f mov r24, r20
229 fe: 89 23 and r24, r25
231 *m_dataDir = 0xFF; // Set LCD data port to default output state
232 102: 16 96 adiw r26, 0x06 ; 6
233 104: ed 91 ld r30, X+
235 108: 17 97 sbiw r26, 0x07 ; 7
236 10a: 8f ef ldi r24, 0xFF ; 255
240 10e: 83 2f mov r24, r19
243 00000112 <_ZN3Lcd7putCharEh>:
244 *m_ctrlPort &= ~(1<<m_ePin);
246 *m_ctrlPort |= (1<<m_rsPin);
249 void Lcd::putChar (unsigned char c) {
255 11c: 7c 01 movw r14, r24
256 11e: d6 2e mov r13, r22
257 *m_ctrlPort &= ~(1<<m_rsPin);
258 120: dc 01 movw r26, r24
259 122: ed 91 ld r30, X+
261 126: 11 97 sbiw r26, 0x01 ; 1
263 12a: 01 e0 ldi r16, 0x01 ; 1
264 12c: 10 e0 ldi r17, 0x00 ; 0
265 12e: c8 01 movw r24, r16
266 130: 1a 96 adiw r26, 0x0a ; 10
268 134: 02 c0 rjmp .+4 ; 0x13a <_ZN3Lcd7putCharEh+0x28>
269 136: 88 0f add r24, r24
270 138: 99 1f adc r25, r25
272 13c: e2 f7 brpl .-8 ; 0x136 <_ZN3Lcd7putCharEh+0x24>
274 140: 82 23 and r24, r18
277 144: c7 01 movw r24, r14
278 146: 89 df rcall .-238 ; 0x5a <_ZN3Lcd8busyWaitEv>
279 *m_ctrlPort |= (1<<m_rsPin);
280 148: d7 01 movw r26, r14
281 14a: ed 91 ld r30, X+
283 14e: 11 97 sbiw r26, 0x01 ; 1
285 152: c8 01 movw r24, r16
286 154: 1a 96 adiw r26, 0x0a ; 10
288 158: 1a 97 sbiw r26, 0x0a ; 10
289 15a: 02 c0 rjmp .+4 ; 0x160 <_ZN3Lcd7putCharEh+0x4e>
290 15c: 88 0f add r24, r24
291 15e: 99 1f adc r25, r25
293 162: e2 f7 brpl .-8 ; 0x15c <_ZN3Lcd7putCharEh+0x4a>
294 164: 28 2b or r18, r24
297 168: 14 96 adiw r26, 0x04 ; 4
298 16a: ed 91 ld r30, X+
300 16e: 15 97 sbiw r26, 0x05 ; 5
304 *m_ctrlPort |= (1<<m_ePin);
305 174: ed 91 ld r30, X+
307 178: 11 97 sbiw r26, 0x01 ; 1
309 17c: c8 01 movw r24, r16
310 17e: 1c 96 adiw r26, 0x0c ; 12
312 182: 1c 97 sbiw r26, 0x0c ; 12
313 184: 02 c0 rjmp .+4 ; 0x18a <_ZN3Lcd7putCharEh+0x78>
314 186: 88 0f add r24, r24
315 188: 99 1f adc r25, r25
317 18c: e2 f7 brpl .-8 ; 0x186 <_ZN3Lcd7putCharEh+0x74>
318 18e: 28 2b or r18, r24
320 192: 00 c0 rjmp .+0 ; 0x194 <_ZN3Lcd7putCharEh+0x82>
322 *m_ctrlPort &= ~(1<<m_ePin);
323 194: 00 c0 rjmp .+0 ; 0x196 <_ZN3Lcd7putCharEh+0x84>
324 196: ed 91 ld r30, X+
326 19a: 11 97 sbiw r26, 0x01 ; 1
328 19e: 1c 96 adiw r26, 0x0c ; 12
330 1a2: 02 c0 rjmp .+4 ; 0x1a8 <_ZN3Lcd7putCharEh+0x96>
331 1a4: 00 0f add r16, r16
332 1a6: 11 1f adc r17, r17
334 1aa: e2 f7 brpl .-8 ; 0x1a4 <_ZN3Lcd7putCharEh+0x92>
336 1ae: 08 23 and r16, r24
346 000001be <_ZN3Lcd6putCmdEh>:
347 void putChar(unsigned char ch);
348 void putCmd(unsigned char ch);
352 void Lcd::putCmd (unsigned char Cmd) {
358 1c8: 8c 01 movw r16, r24
359 1ca: d6 2e mov r13, r22
360 *m_ctrlPort &= ~(1<<m_rsPin);
361 1cc: dc 01 movw r26, r24
362 1ce: ed 91 ld r30, X+
364 1d2: 11 97 sbiw r26, 0x01 ; 1
366 1d6: 81 e0 ldi r24, 0x01 ; 1
367 1d8: e8 2e mov r14, r24
368 1da: f1 2c mov r15, r1
369 1dc: c7 01 movw r24, r14
370 1de: 1a 96 adiw r26, 0x0a ; 10
372 1e2: 02 c0 rjmp .+4 ; 0x1e8 <_ZN3Lcd6putCmdEh+0x2a>
373 1e4: 88 0f add r24, r24
374 1e6: 99 1f adc r25, r25
376 1ea: e2 f7 brpl .-8 ; 0x1e4 <_ZN3Lcd6putCmdEh+0x26>
378 1ee: 82 23 and r24, r18
381 1f2: c8 01 movw r24, r16
382 1f4: 32 df rcall .-412 ; 0x5a <_ZN3Lcd8busyWaitEv>
384 1f6: d8 01 movw r26, r16
385 1f8: 14 96 adiw r26, 0x04 ; 4
386 1fa: ed 91 ld r30, X+
388 1fe: 15 97 sbiw r26, 0x05 ; 5
392 *m_ctrlPort |= (1<<m_ePin);
393 204: ed 91 ld r30, X+
395 208: 11 97 sbiw r26, 0x01 ; 1
397 20c: c7 01 movw r24, r14
398 20e: 1c 96 adiw r26, 0x0c ; 12
400 212: 1c 97 sbiw r26, 0x0c ; 12
401 214: 02 c0 rjmp .+4 ; 0x21a <_ZN3Lcd6putCmdEh+0x5c>
402 216: 88 0f add r24, r24
403 218: 99 1f adc r25, r25
405 21c: e2 f7 brpl .-8 ; 0x216 <_ZN3Lcd6putCmdEh+0x58>
406 21e: 28 2b or r18, r24
408 222: 00 c0 rjmp .+0 ; 0x224 <_ZN3Lcd6putCmdEh+0x66>
410 *m_ctrlPort &= ~(1<<m_ePin);
411 224: 00 c0 rjmp .+0 ; 0x226 <_ZN3Lcd6putCmdEh+0x68>
412 226: ed 91 ld r30, X+
414 22a: 11 97 sbiw r26, 0x01 ; 1
416 22e: c7 01 movw r24, r14
417 230: 1c 96 adiw r26, 0x0c ; 12
419 234: 1c 97 sbiw r26, 0x0c ; 12
420 236: 02 c0 rjmp .+4 ; 0x23c <_ZN3Lcd6putCmdEh+0x7e>
421 238: 88 0f add r24, r24
422 23a: 99 1f adc r25, r25
424 23e: e2 f7 brpl .-8 ; 0x238 <_ZN3Lcd6putCmdEh+0x7a>
426 242: 82 23 and r24, r18
430 *m_ctrlPort |= (1<<m_rsPin);
431 248: ed 91 ld r30, X+
433 24c: 11 97 sbiw r26, 0x01 ; 1
435 250: 1a 96 adiw r26, 0x0a ; 10
437 254: 02 c0 rjmp .+4 ; 0x25a <_ZN3Lcd6putCmdEh+0x9c>
438 256: ee 0c add r14, r14
439 258: ff 1c adc r15, r15
441 25c: e2 f7 brpl .-8 ; 0x256 <_ZN3Lcd6putCmdEh+0x98>
442 25e: 8e 29 or r24, r14
452 0000026e <_ZN4Uart10waitRxCharEv>:
455 unsigned char waitRxChar (void);
458 unsigned char Uart::waitRxChar (void) {
459 26e: fc 01 movw r30, r24
460 // waits for next RX character, then return it
463 tail = m_UartRxTail; // explicitly set order of volatile variable access
464 270: 91 a9 ldd r25, Z+49 ; 0x31
465 WDTCSR &= ~(1<<WDCE);
469 INLINE_FUNC_DECLARE(static void reset(void)) {
474 unsigned char Uart::waitRxChar (void) {
475 // waits for next RX character, then return it
478 274: 80 a9 ldd r24, Z+48 ; 0x30
479 276: 89 17 cp r24, r25
480 278: d9 f3 breq .-10 ; 0x270 <_ZN4Uart10waitRxCharEv+0x2>
481 // CTS inactive if byte fills buffer after we remove current byte
485 // increment tail position
486 if (tail == UART_RX_BUFFER_SIZE-1)
487 27a: 9f 32 cpi r25, 0x2F ; 47
488 27c: 11 f4 brne .+4 ; 0x282 <_ZN4Uart10waitRxCharEv+0x14>
490 27e: 11 aa std Z+49, r1 ; 0x31
491 280: 03 c0 rjmp .+6 ; 0x288 <_ZN4Uart10waitRxCharEv+0x1a>
494 282: 81 a9 ldd r24, Z+49 ; 0x31
495 284: 8f 5f subi r24, 0xFF ; 255
496 286: 81 ab std Z+49, r24 ; 0x31
498 CTS_PORT |= (1<<CTS_PIN); // Ensure CTS is active since just removed a byte
499 sei(); // Allow UART ISR to read character and change potentially change CTS
502 return m_UartRxBuf[m_UartRxTail];
503 288: 81 a9 ldd r24, Z+49 ; 0x31
504 28a: e8 0f add r30, r24
505 28c: f1 1d adc r31, r1
516 MCUSR = 0; // clear all reset flags
517 292: 14 be out 0x34, r1 ; 52
518 WDTCSR &= ~(1<<WDCE);
522 INLINE_FUNC_DECLARE(static void reset(void)) {
528 INLINE_FUNC_DECLARE(static void init(void)) {
530 WDTCSR |= (1<<WDCE)|(1<<WDE); // start timed sequence (keep old prescaler)
531 296: 81 b5 in r24, 0x21 ; 33
532 298: 88 61 ori r24, 0x18 ; 24
533 29a: 81 bd out 0x21, r24 ; 33
534 WDTCSR = (1<<WDE)|(1<<WDP3)|(1<<WDP0); // 1024K cycles, 8.0sec
535 29c: 89 e2 ldi r24, 0x29 ; 41
536 29e: 81 bd out 0x21, r24 ; 33
541 INLINE_FUNC_DECLARE(static void initIdleMode(void)) {
542 MCUCR &= ~((1<<SM1)|(1<<SM0)); // use idle sleep mode
543 2a0: 85 b7 in r24, 0x35 ; 53
544 2a2: 8f 7a andi r24, 0xAF ; 175
545 2a4: 85 bf out 0x35, r24 ; 53
546 static const unsigned char UART_PARITY_EVEN = 1;
547 static const unsigned char UART_PARITY_ODD = 2;
549 INLINE_FUNC_DECLARE(void init(void)) {
550 // Default initialization is 8-bit, parity none
552 2a6: 1a b8 out 0x0a, r1 ; 10
554 2a8: 1b b8 out 0x0b, r1 ; 11
555 UCSRC = (1<<UCSZ1) | (1<<UCSZ0); // 8 bit data
556 2aa: 76 e0 ldi r23, 0x06 ; 6
557 2ac: 73 b9 out 0x03, r23 ; 3
559 // Init circular buffer pointers
561 2ae: 10 92 b2 00 sts 0x00B2, r1
563 2b2: 10 92 b3 00 sts 0x00B3, r1
566 INLINE_FUNC_DECLARE(static unsigned char GetBaudDivisor());
567 static inline unsigned char GetBaudDivisor() {
568 // Set LCD_control BAUD_J2:BAUD_J1 to inputs
569 BAUD_DIR &= ~((1<<BAUD_J2) | (1<<BAUD_J1));
570 2b6: 87 b3 in r24, 0x17 ; 23
571 2b8: 83 7f andi r24, 0xF3 ; 243
572 2ba: 87 bb out 0x17, r24 ; 23
573 // Set BAUD_J2:BAUD_J1 PULL-UPS active
574 BAUD_PORT |= (1<<BAUD_J2) | (1<<BAUD_J1);
575 2bc: 42 e3 ldi r20, 0x32 ; 50
576 2be: 50 e0 ldi r21, 0x00 ; 0
577 2c0: 82 b3 in r24, 0x12 ; 18
578 2c2: 8c 60 ori r24, 0x0C ; 12
579 2c4: 82 bb out 0x12, r24 ; 18
581 // Get BAUD rate jumper settings
582 unsigned char BaudSelectJumpersValue = BAUD_PIN_REG;
583 2c6: e0 b3 in r30, 0x10 ; 16
584 BaudSelectJumpersValue &= (1<<BAUD_J2) | (1<<BAUD_J1);
585 // BAUD_J2 = PD.3, BAUD_J1 = PD.2
586 // This is two bits too far to the left and the array index will
587 // increment by 4, instead of 1.
588 // Shift BAUD_J2 & BAUD_J1 right by two bit positions for proper array indexing
589 BaudSelectJumpersValue = (BaudSelectJumpersValue >> BAUD_J1);
590 2c8: ec 70 andi r30, 0x0C ; 12
592 return PGM_READ_BYTE (&BaudLookupTable[BaudSelectJumpersValue]);
595 2ce: f0 e0 ldi r31, 0x00 ; 0
596 2d0: e8 59 subi r30, 0x98 ; 152
597 2d2: ff 4f sbci r31, 0xFF ; 255
598 2d4: e4 91 lpm r30, Z+
599 CTS_DIR |= (1<<CTS_PIN); // CTS is active low
603 INLINE_FUNC_DECLARE(void setBaudDivisor(unsigned int baud_divisor)) {
604 UBRRL = baud_divisor & 0xFF;
605 2d6: e9 b9 out 0x09, r30 ; 9
606 UBRRH = baud_divisor >> 8;
607 2d8: 12 b8 out 0x02, r1 ; 2
610 INLINE_FUNC_DECLARE(void rxEnable(void)) {
612 2da: 54 9a sbi 0x0a, 4 ; 10
615 INLINE_FUNC_DECLARE(void rxInterruptEnable(void)) {
617 2dc: 57 9a sbi 0x0a, 7 ; 10
620 INLINE_FUNC_DECLARE(void init(volatile unsigned char* port,
621 volatile unsigned char* dir,
622 unsigned char pin)) {
624 2de: 50 93 7e 00 sts 0x007E, r21
625 2e2: 40 93 7d 00 sts 0x007D, r20
627 2e6: 21 e3 ldi r18, 0x31 ; 49
628 2e8: 30 e0 ldi r19, 0x00 ; 0
629 2ea: 30 93 80 00 sts 0x0080, r19
630 2ee: 20 93 7f 00 sts 0x007F, r18
632 2f2: 91 e0 ldi r25, 0x01 ; 1
633 2f4: 90 93 81 00 sts 0x0081, r25
635 // setup PWM to run at 1.25ms per interrupt.
636 // This allows 8 levels of brightness at minimum of 100Hz flicker rate.
637 TCCR0A = (1<<WGM01); // CTC mode
638 2f8: 82 e0 ldi r24, 0x02 ; 2
639 2fa: 80 bf out 0x30, r24 ; 48
640 TCCR0B = 0; // timer off
641 2fc: 13 be out 0x33, r1 ; 51
642 OCR0A = 72; // 1.25ms with CLK/256 prescaler @ 14.7456MHz
643 2fe: 88 e4 ldi r24, 0x48 ; 72
644 300: 86 bf out 0x36, r24 ; 54
645 TIMSK = (1<<OCIE0A); // Turn on timer0 COMPA intr (all other timer intr off)
646 302: 99 bf out 0x39, r25 ; 57
647 *m_LedPort &= ~(1<<m_LedPin); // Ensure LED is off during initialization
648 304: 91 98 cbi 0x12, 1 ; 18
649 *m_LedDir |= (1<<m_LedPin); // Ensure LED is output port
650 306: 89 9a sbi 0x11, 1 ; 17
651 m_BIT_led_on = 0; // note that LED is off
652 308: 10 92 7c 00 sts 0x007C, r1
653 m_ledPwmPattern = 0xFF; // maximum brightness
654 30c: 6f ef ldi r22, 0xFF ; 255
655 30e: 60 93 7b 00 sts 0x007B, r22
656 volatile unsigned char* dataDir,
657 volatile unsigned char* dataPinReg,
660 unsigned char ePin)) {
661 m_ctrlPort = ctrlPort;
662 312: 50 93 6d 00 sts 0x006D, r21
663 316: 40 93 6c 00 sts 0x006C, r20
665 31a: 30 93 6f 00 sts 0x006F, r19
666 31e: 20 93 6e 00 sts 0x006E, r18
667 m_dataPort = dataPort;
668 322: 88 e3 ldi r24, 0x38 ; 56
669 324: 90 e0 ldi r25, 0x00 ; 0
670 326: 90 93 71 00 sts 0x0071, r25
671 32a: 80 93 70 00 sts 0x0070, r24
673 32e: 87 e3 ldi r24, 0x37 ; 55
674 330: 90 e0 ldi r25, 0x00 ; 0
675 332: 90 93 73 00 sts 0x0073, r25
676 336: 80 93 72 00 sts 0x0072, r24
677 m_dataPinReg = dataPinReg;
678 33a: 86 e3 ldi r24, 0x36 ; 54
679 33c: 90 e0 ldi r25, 0x00 ; 0
680 33e: 90 93 75 00 sts 0x0075, r25
681 342: 80 93 74 00 sts 0x0074, r24
683 346: 85 e0 ldi r24, 0x05 ; 5
684 348: 80 93 76 00 sts 0x0076, r24
686 34c: 84 e0 ldi r24, 0x04 ; 4
687 34e: 80 93 77 00 sts 0x0077, r24
689 352: 70 93 78 00 sts 0x0078, r23
691 *m_ctrlPort &= ~((1<<m_rsPin)|(1<<m_rwPin)|(1<<m_ePin)); // set low
692 356: 82 b3 in r24, 0x12 ; 18
693 358: 8f 78 andi r24, 0x8F ; 143
694 35a: 82 bb out 0x12, r24 ; 18
695 *m_ctrlDir |= ((1<<m_rsPin)|(1<<m_rwPin)|(1<<m_ePin)); // set as output
696 35c: 81 b3 in r24, 0x11 ; 17
697 35e: 80 67 ori r24, 0x70 ; 112
698 360: 81 bb out 0x11, r24 ; 17
700 "1: sbiw %0,1" "\n\t"
705 362: 80 e0 ldi r24, 0x00 ; 0
706 364: 98 ed ldi r25, 0xD8 ; 216
707 366: 01 97 sbiw r24, 0x01 ; 1
708 368: f1 f7 brne .-4 ; 0x366 <main+0xd4>
712 *m_ctrlPort |= (1<<LCD_RS); // Set LCD_RS HIGH
713 36a: 95 9a sbi 0x12, 5 ; 18
715 // Initialize the AVR controller I/O
716 *m_dataDir = 0xFF; // Set LCD_DATA_OUT as all outputs
717 36c: 67 bb out 0x17, r22 ; 23
718 *m_dataPort = 0x00; // Set LCD_DATA_OUT to logic low
719 36e: 18 ba out 0x18, r1 ; 24
721 // Initialize the LCD controller
722 *m_ctrlPort &= ~(1<<LCD_RS);
723 370: 95 98 cbi 0x12, 5 ; 18
726 372: 8c e6 ldi r24, 0x6C ; 108
727 374: 90 e0 ldi r25, 0x00 ; 0
728 376: 60 e3 ldi r22, 0x30 ; 48
729 378: cc de rcall .-616 ; 0x112 <_ZN3Lcd7putCharEh>
730 37a: 8a e0 ldi r24, 0x0A ; 10
731 37c: 9b e3 ldi r25, 0x3B ; 59
732 37e: 01 97 sbiw r24, 0x01 ; 1
733 380: f1 f7 brne .-4 ; 0x37e <main+0xec>
734 Delay::millisec(4.1);
737 382: 8c e6 ldi r24, 0x6C ; 108
738 384: 90 e0 ldi r25, 0x00 ; 0
739 386: 60 e3 ldi r22, 0x30 ; 48
740 388: c4 de rcall .-632 ; 0x112 <_ZN3Lcd7putCharEh>
741 38a: 80 e7 ldi r24, 0x70 ; 112
742 38c: 91 e0 ldi r25, 0x01 ; 1
743 38e: 01 97 sbiw r24, 0x01 ; 1
744 390: f1 f7 brne .-4 ; 0x38e <main+0xfc>
745 Delay::microsec(100);
748 392: 8c e6 ldi r24, 0x6C ; 108
749 394: 90 e0 ldi r25, 0x00 ; 0
750 396: 60 e3 ldi r22, 0x30 ; 48
751 398: bc de rcall .-648 ; 0x112 <_ZN3Lcd7putCharEh>
752 *m_ctrlPort |= (1<<LCD_RS);
753 39a: e0 91 6c 00 lds r30, 0x006C
754 39e: f0 91 6d 00 lds r31, 0x006D
756 3a4: 80 62 ori r24, 0x20 ; 32
759 // The display will be out into 8 bit data mode here
760 putCmd (m_LINE_8x4); // Set 8 bit data, 4 display lines
761 3a8: 8c e6 ldi r24, 0x6C ; 108
762 3aa: 90 e0 ldi r25, 0x00 ; 0
763 3ac: 68 e3 ldi r22, 0x38 ; 56
764 3ae: 07 df rcall .-498 ; 0x1be <_ZN3Lcd6putCmdEh>
765 putCmd (m_PWR_ON); // Power up the display
766 3b0: 8c e6 ldi r24, 0x6C ; 108
767 3b2: 90 e0 ldi r25, 0x00 ; 0
768 3b4: 6c e0 ldi r22, 0x0C ; 12
769 3b6: 03 df rcall .-506 ; 0x1be <_ZN3Lcd6putCmdEh>
770 putCmd (m_CLR_DSP); // Power up the display
771 3b8: 8c e6 ldi r24, 0x6C ; 108
772 3ba: 90 e0 ldi r25, 0x00 ; 0
773 3bc: 61 e0 ldi r22, 0x01 ; 1
774 3be: ff de rcall .-514 ; 0x1be <_ZN3Lcd6putCmdEh>
775 gUart.rxInterruptEnable();
776 gLed.init(&LED_PORT, &LED_DIR, LED_PIN);
777 gLcd.init(&LCD_CONTROL_PORT, &LCD_CONTROL_DIR, &LCD_DATA_PORT,
778 &LCD_DATA_DIR, &LCD_DATA_PIN_REG, LCD_RS, LCD_RW, LCD_E);
783 INLINE_FUNC_DECLARE(void stop(void)) {
786 INLINE_FUNC_DECLARE(void start(void)) {
788 3c2: 14 e0 ldi r17, 0x04 ; 4
789 m_ledPwmCycling >>= 1;
793 INLINE_FUNC_DECLARE(void lampOn(void)) {
794 *m_LedPort |= (1<<m_LedPin);
795 3c4: c1 e0 ldi r28, 0x01 ; 1
796 3c6: d0 e0 ldi r29, 0x00 ; 0
801 INLINE_FUNC_DECLARE(void switchOn(void)) {
803 3c8: 01 e0 ldi r16, 0x01 ; 1
808 INLINE_FUNC_DECLARE(unsigned char charAvail(void)) {
809 unsigned char tail = m_UartRxTail; // explicitly set order of volatile access
810 3ca: 90 91 b3 00 lds r25, 0x00B3
811 return (tail != m_UartRxHead) ? 1 : 0;
812 3ce: 80 91 b2 00 lds r24, 0x00B2
813 3d2: 98 17 cp r25, r24
814 3d4: 09 f4 brne .+2 ; 0x3d8 <main+0x146>
815 3d6: 8a c0 rjmp .+276 ; 0x4ec <main+0x25a>
816 &LCD_DATA_DIR, &LCD_DATA_PIN_REG, LCD_RS, LCD_RW, LCD_E);
820 if (gUart.charAvail()) {
821 SerialCommandProcessor::processChar (gUart.waitRxChar());
822 3d8: 82 e8 ldi r24, 0x82 ; 130
823 3da: 90 e0 ldi r25, 0x00 ; 0
824 3dc: 48 df rcall .-368 ; 0x26e <_ZN4Uart10waitRxCharEv>
825 3de: 68 2f mov r22, r24
828 INLINE_FUNC_DECLARE(static void processChar(unsigned char ch)) {
829 // avoid use of switch statement as ImageCraft and GCC produce signifcantly
830 // more code for a switch statement than a sequence of if/else if
831 if (ch == m_LED_SW_OFF) {
832 3e0: 8d 3f cpi r24, 0xFD ; 253
833 3e2: a1 f4 brne .+40 ; 0x40c <main+0x17a>
834 INLINE_FUNC_DECLARE(void lampOn(void)) {
835 *m_LedPort |= (1<<m_LedPin);
838 INLINE_FUNC_DECLARE(void lampOff(void)) {
839 *m_LedPort &= ~(1<<m_LedPin);;
840 3e4: e0 91 7d 00 lds r30, 0x007D
841 3e8: f0 91 7e 00 lds r31, 0x007E
843 3ee: ce 01 movw r24, r28
844 3f0: 00 90 81 00 lds r0, 0x0081
845 3f4: 02 c0 rjmp .+4 ; 0x3fa <main+0x168>
846 3f6: 88 0f add r24, r24
847 3f8: 99 1f adc r25, r25
849 3fc: e2 f7 brpl .-8 ; 0x3f6 <main+0x164>
851 400: 82 23 and r24, r18
856 INLINE_FUNC_DECLARE(void switchOff(void)) {
859 404: 10 92 7c 00 sts 0x007C, r1
860 m_BIT_led_on = 0; // note that LED is off
861 m_ledPwmPattern = 0xFF; // maximum brightness
864 INLINE_FUNC_DECLARE(void stop(void)) {
866 408: 13 be out 0x33, r1 ; 51
867 40a: df cf rjmp .-66 ; 0x3ca <main+0x138>
868 INLINE_FUNC_DECLARE(static void processChar(unsigned char ch)) {
869 // avoid use of switch statement as ImageCraft and GCC produce signifcantly
870 // more code for a switch statement than a sequence of if/else if
871 if (ch == m_LED_SW_OFF) {
873 } else if (ch == m_LED_SW_ON) {
874 40c: 8c 3f cpi r24, 0xFC ; 252
875 40e: 41 f4 brne .+16 ; 0x420 <main+0x18e>
880 INLINE_FUNC_DECLARE(void switchOn(void)) {
882 410: 00 93 7c 00 sts 0x007C, r16
883 if (m_ledPwmPattern == 0xFF) { // maximum brightness, no need for PWM
884 414: 80 91 7b 00 lds r24, 0x007B
885 418: 8f 3f cpi r24, 0xFF ; 255
886 41a: 09 f0 breq .+2 ; 0x41e <main+0x18c>
887 41c: 57 c0 rjmp .+174 ; 0x4cc <main+0x23a>
888 41e: 40 c0 rjmp .+128 ; 0x4a0 <main+0x20e>
889 // more code for a switch statement than a sequence of if/else if
890 if (ch == m_LED_SW_OFF) {
892 } else if (ch == m_LED_SW_ON) {
894 } else if (ch == m_LED_SET_BRIGHTNESS) {
895 420: 8b 3f cpi r24, 0xFB ; 251
896 422: 09 f0 breq .+2 ; 0x426 <main+0x194>
897 424: 55 c0 rjmp .+170 ; 0x4d0 <main+0x23e>
898 // read next byte which will be brightness
899 gLed.setBrightness(gUart.waitRxChar());
900 426: 82 e8 ldi r24, 0x82 ; 130
901 428: 90 e0 ldi r25, 0x00 ; 0
902 42a: 21 df rcall .-446 ; 0x26e <_ZN4Uart10waitRxCharEv>
907 INLINE_FUNC_DECLARE(void setBrightness(unsigned char brightness)) {
908 if (brightness == 0) { // turn backlight off for 0 brightness
909 42c: 88 23 and r24, r24
910 42e: d1 f4 brne .+52 ; 0x464 <main+0x1d2>
912 430: 80 91 7c 00 lds r24, 0x007C
913 434: 88 23 and r24, r24
914 436: 49 f2 breq .-110 ; 0x3ca <main+0x138>
915 m_BIT_led_on = 0; // note that LED is off
916 m_ledPwmPattern = 0xFF; // maximum brightness
919 INLINE_FUNC_DECLARE(void stop(void)) {
921 438: 13 be out 0x33, r1 ; 51
923 INLINE_FUNC_DECLARE(void setBrightness(unsigned char brightness)) {
924 if (brightness == 0) { // turn backlight off for 0 brightness
928 43a: 10 92 7b 00 sts 0x007B, r1
930 43e: 10 92 7a 00 sts 0x007A, r1
931 INLINE_FUNC_DECLARE(void lampOn(void)) {
932 *m_LedPort |= (1<<m_LedPin);
935 INLINE_FUNC_DECLARE(void lampOff(void)) {
936 *m_LedPort &= ~(1<<m_LedPin);;
937 442: e0 91 7d 00 lds r30, 0x007D
938 446: f0 91 7e 00 lds r31, 0x007E
940 44c: ce 01 movw r24, r28
941 44e: 00 90 81 00 lds r0, 0x0081
942 452: 02 c0 rjmp .+4 ; 0x458 <main+0x1c6>
943 454: 88 0f add r24, r24
944 456: 99 1f adc r25, r25
946 45a: e2 f7 brpl .-8 ; 0x454 <main+0x1c2>
948 45e: 82 23 and r24, r18
950 462: b3 cf rjmp .-154 ; 0x3ca <main+0x138>
956 unsigned char ledPwmPos = (brightness * (m_LED_BRIGHTNESS_LEVELS-1) + 127) >> 8;
957 464: 90 e0 ldi r25, 0x00 ; 0
958 466: 67 e0 ldi r22, 0x07 ; 7
959 468: 70 e0 ldi r23, 0x00 ; 0
960 46a: d1 d0 rcall .+418 ; 0x60e <__mulhi3>
961 46c: 81 58 subi r24, 0x81 ; 129
962 46e: 9f 4f sbci r25, 0xFF ; 255
963 470: 89 2f mov r24, r25
964 472: 99 0f add r25, r25
965 474: 99 0b sbc r25, r25
966 476: 88 30 cpi r24, 0x08 ; 8
967 478: 08 f0 brcs .+2 ; 0x47c <main+0x1ea>
968 47a: 87 e0 ldi r24, 0x07 ; 7
969 INLINE_FUNC_DECLARE(void lampOff(void)) {
970 *m_LedPort &= ~(1<<m_LedPin);;
973 INLINE_FUNC_DECLARE(unsigned char pwmPattern(unsigned char pos)) {
974 return PGM_READ_BYTE (&m_ledPwmPatterns[pos]);
975 47c: e8 2f mov r30, r24
976 47e: f0 e0 ldi r31, 0x00 ; 0
977 480: e0 5a subi r30, 0xA0 ; 160
978 482: ff 4f sbci r31, 0xFF ; 255
979 484: e4 91 lpm r30, Z+
981 unsigned char ledPwmPos = (brightness * (m_LED_BRIGHTNESS_LEVELS-1) + 127) >> 8;
982 // Below is probably not required, but ensures we don't exceed array
983 if (ledPwmPos > m_LED_BRIGHTNESS_LEVELS - 1)
984 ledPwmPos = m_LED_BRIGHTNESS_LEVELS - 1;
985 m_ledPwmPattern = pwmPattern(ledPwmPos);
986 486: e0 93 7b 00 sts 0x007B, r30
988 48a: 10 92 79 00 sts 0x0079, r1
989 m_ledPwmCycling = m_ledPwmPattern;
990 48e: e0 93 7a 00 sts 0x007A, r30
991 if (ledPwmPos >= m_LED_BRIGHTNESS_LEVELS-1) { // maximum brightness
992 492: 87 30 cpi r24, 0x07 ; 7
993 494: b1 f4 brne .+44 ; 0x4c2 <main+0x230>
994 // don't need PWM to continuously on
996 496: 80 91 7c 00 lds r24, 0x007C
997 49a: 88 23 and r24, r24
998 49c: 09 f4 brne .+2 ; 0x4a0 <main+0x20e>
999 49e: 95 cf rjmp .-214 ; 0x3ca <main+0x138>
1000 m_BIT_led_on = 0; // note that LED is off
1001 m_ledPwmPattern = 0xFF; // maximum brightness
1004 INLINE_FUNC_DECLARE(void stop(void)) {
1006 4a0: 13 be out 0x33, r1 ; 51
1007 m_ledPwmCycling >>= 1;
1011 INLINE_FUNC_DECLARE(void lampOn(void)) {
1012 *m_LedPort |= (1<<m_LedPin);
1013 4a2: e0 91 7d 00 lds r30, 0x007D
1014 4a6: f0 91 7e 00 lds r31, 0x007E
1015 4aa: 20 81 ld r18, Z
1016 4ac: ce 01 movw r24, r28
1017 4ae: 00 90 81 00 lds r0, 0x0081
1018 4b2: 02 c0 rjmp .+4 ; 0x4b8 <main+0x226>
1019 4b4: 88 0f add r24, r24
1020 4b6: 99 1f adc r25, r25
1022 4ba: e2 f7 brpl .-8 ; 0x4b4 <main+0x222>
1023 4bc: 28 2b or r18, r24
1024 4be: 20 83 st Z, r18
1025 4c0: 84 cf rjmp .-248 ; 0x3ca <main+0x138>
1032 4c2: 80 91 7c 00 lds r24, 0x007C
1033 4c6: 88 23 and r24, r24
1034 4c8: 09 f4 brne .+2 ; 0x4cc <main+0x23a>
1035 4ca: 7f cf rjmp .-258 ; 0x3ca <main+0x138>
1037 INLINE_FUNC_DECLARE(void stop(void)) {
1040 INLINE_FUNC_DECLARE(void start(void)) {
1042 4cc: 13 bf out 0x33, r17 ; 51
1043 4ce: 7d cf rjmp .-262 ; 0x3ca <main+0x138>
1044 } else if (ch == m_LED_SW_ON) {
1046 } else if (ch == m_LED_SET_BRIGHTNESS) {
1047 // read next byte which will be brightness
1048 gLed.setBrightness(gUart.waitRxChar());
1049 } else if (ch == m_REG_MODE) {
1050 4d0: 8e 3f cpi r24, 0xFE ; 254
1051 4d2: 41 f4 brne .+16 ; 0x4e4 <main+0x252>
1052 gLcd.putCmd (gUart.waitRxChar()); // Send LCD command character
1053 4d4: 82 e8 ldi r24, 0x82 ; 130
1054 4d6: 90 e0 ldi r25, 0x00 ; 0
1055 4d8: ca de rcall .-620 ; 0x26e <_ZN4Uart10waitRxCharEv>
1056 4da: 68 2f mov r22, r24
1057 4dc: 8c e6 ldi r24, 0x6C ; 108
1058 4de: 90 e0 ldi r25, 0x00 ; 0
1059 4e0: 6e de rcall .-804 ; 0x1be <_ZN3Lcd6putCmdEh>
1060 4e2: 73 cf rjmp .-282 ; 0x3ca <main+0x138>
1062 gLcd.putChar (ch); // Send LCD data character
1063 4e4: 8c e6 ldi r24, 0x6C ; 108
1064 4e6: 90 e0 ldi r25, 0x00 ; 0
1065 4e8: 14 de rcall .-984 ; 0x112 <_ZN3Lcd7putCharEh>
1066 4ea: 6f cf rjmp .-290 ; 0x3ca <main+0x138>
1068 WDTCSR |= (1<<WDCE)|(1<<WDE); // start timed sequence (keep old prescaler)
1069 WDTCSR = (1<<WDE)|(1<<WDP3)|(1<<WDP0); // 1024K cycles, 8.0sec
1071 INLINE_FUNC_DECLARE(static void off(void)) {
1074 WDTCSR &= ~(1<<WDCE);
1078 INLINE_FUNC_DECLARE(static void reset(void)) {
1081 WDTCSR = (1<<WDE)|(1<<WDP3)|(1<<WDP0); // 1024K cycles, 8.0sec
1083 INLINE_FUNC_DECLARE(static void off(void)) {
1086 MCUSR &= ~(1<<WDRF); // clear any watchdog interrupt flags
1087 4f0: 84 b7 in r24, 0x34 ; 52
1088 4f2: 87 7f andi r24, 0xF7 ; 247
1089 4f4: 84 bf out 0x34, r24 ; 52
1090 WDTCSR |= (1<<WDCE)|(1<<WDE); // start timed sequence (keep old prescaler)
1091 4f6: 81 b5 in r24, 0x21 ; 33
1092 4f8: 88 61 ori r24, 0x18 ; 24
1093 4fa: 81 bd out 0x21, r24 ; 33
1094 WDTCSR &= ~(1<<WDE); // watchdog timer off
1095 4fc: 81 b5 in r24, 0x21 ; 33
1096 4fe: 87 7f andi r24, 0xF7 ; 247
1097 500: 81 bd out 0x21, r24 ; 33
1101 INLINE_FUNC_DECLARE(static void initIdleMode(void)) {
1102 MCUCR &= ~((1<<SM1)|(1<<SM0)); // use idle sleep mode
1104 INLINE_FUNC_DECLARE(static void enterSleep()) {
1106 504: 85 b7 in r24, 0x35 ; 53
1107 506: 80 62 ori r24, 0x20 ; 32
1108 508: 85 bf out 0x35, r24 ; 53
1112 50c: 85 b7 in r24, 0x35 ; 53
1113 50e: 8f 7d andi r24, 0xDF ; 223
1114 510: 85 bf out 0x35, r24 ; 53
1115 WDTCSR &= ~(1<<WDE); // watchdog timer off
1119 INLINE_FUNC_DECLARE(static void on(void)) {
1122 WDTCSR &= ~(1<<WDCE);
1126 INLINE_FUNC_DECLARE(static void reset(void)) {
1131 INLINE_FUNC_DECLARE(static void on(void)) {
1134 WDTCSR |= (1<<WDCE)|(1<<WDE); // start timed sequence (keep old prescaler)
1135 516: 81 b5 in r24, 0x21 ; 33
1136 518: 88 61 ori r24, 0x18 ; 24
1137 51a: 81 bd out 0x21, r24 ; 33
1138 WDTCSR &= ~(1<<WDCE);
1139 51c: 81 b5 in r24, 0x21 ; 33
1140 51e: 8f 7e andi r24, 0xEF ; 239
1141 520: 81 bd out 0x21, r24 ; 33
1144 524: 52 cf rjmp .-348 ; 0x3ca <main+0x138>
1146 00000526 <__vector_7>:
1152 ISR(USART_RX_vect) {
1155 52a: 0f b6 in r0, 0x3f ; 63
1157 52e: 11 24 eor r1, r1
1162 gUart.storeChar(UDR);
1163 538: 9c b1 in r25, 0x0c ; 12
1167 INLINE_FUNC_DECLARE(unsigned char storeChar(unsigned char rx)) {
1168 // Calculate next buffer position.
1169 unsigned char tmphead = m_UartRxHead;
1170 53a: e0 91 b2 00 lds r30, 0x00B2
1171 if (tmphead == UART_RX_BUFFER_SIZE-1)
1172 53e: ef 32 cpi r30, 0x2F ; 47
1173 540: 11 f4 brne .+4 ; 0x546 <__vector_7+0x20>
1174 542: e0 e0 ldi r30, 0x00 ; 0
1175 544: 01 c0 rjmp .+2 ; 0x548 <__vector_7+0x22>
1179 546: ef 5f subi r30, 0xFF ; 255
1181 // store in buffer if there is room
1182 if (tmphead != m_UartRxTail) {
1183 548: 80 91 b3 00 lds r24, 0x00B3
1184 54c: e8 17 cp r30, r24
1185 54e: 31 f0 breq .+12 ; 0x55c <__vector_7+0x36>
1186 m_UartRxHead = tmphead; // Store new index.
1187 550: e0 93 b2 00 sts 0x00B2, r30
1188 m_UartRxBuf[tmphead] = rx;
1189 554: f0 e0 ldi r31, 0x00 ; 0
1190 556: ee 57 subi r30, 0x7E ; 126
1191 558: ff 4f sbci r31, 0xFF ; 255
1192 55a: 90 83 st Z, r25
1196 ISR(USART_RX_vect) {
1197 gUart.storeChar(UDR);
1204 566: 0f be out 0x3f, r0 ; 63
1209 0000056e <__vector_13>:
1211 ISR(TIMER0_COMPA_vect) {
1214 572: 0f b6 in r0, 0x3f ; 63
1216 576: 11 24 eor r1, r1
1222 sei(); // Okay to allow USART interrupts while controlling LED PWM
1228 INLINE_FUNC_DECLARE(void cyclePwm(void)) {
1229 if (m_ledPwmCycling & 0x01) { // Set current LED state based on cycling variable
1230 584: 80 91 7a 00 lds r24, 0x007A
1231 588: 80 ff sbrs r24, 0
1232 58a: 11 c0 rjmp .+34 ; 0x5ae <__vector_13+0x40>
1233 m_ledPwmCycling >>= 1;
1237 INLINE_FUNC_DECLARE(void lampOn(void)) {
1238 *m_LedPort |= (1<<m_LedPin);
1239 58c: e0 91 7d 00 lds r30, 0x007D
1240 590: f0 91 7e 00 lds r31, 0x007E
1241 594: 20 81 ld r18, Z
1242 596: 81 e0 ldi r24, 0x01 ; 1
1243 598: 90 e0 ldi r25, 0x00 ; 0
1244 59a: 00 90 81 00 lds r0, 0x0081
1245 59e: 02 c0 rjmp .+4 ; 0x5a4 <__vector_13+0x36>
1246 5a0: 88 0f add r24, r24
1247 5a2: 99 1f adc r25, r25
1249 5a6: e2 f7 brpl .-8 ; 0x5a0 <__vector_13+0x32>
1250 5a8: 28 2b or r18, r24
1251 5aa: 20 83 st Z, r18
1252 5ac: 11 c0 rjmp .+34 ; 0x5d0 <__vector_13+0x62>
1255 INLINE_FUNC_DECLARE(void lampOff(void)) {
1256 *m_LedPort &= ~(1<<m_LedPin);;
1257 5ae: e0 91 7d 00 lds r30, 0x007D
1258 5b2: f0 91 7e 00 lds r31, 0x007E
1259 5b6: 20 81 ld r18, Z
1260 5b8: 81 e0 ldi r24, 0x01 ; 1
1261 5ba: 90 e0 ldi r25, 0x00 ; 0
1262 5bc: 00 90 81 00 lds r0, 0x0081
1263 5c0: 02 c0 rjmp .+4 ; 0x5c6 <__vector_13+0x58>
1264 5c2: 88 0f add r24, r24
1265 5c4: 99 1f adc r25, r25
1267 5c8: e2 f7 brpl .-8 ; 0x5c2 <__vector_13+0x54>
1269 5cc: 82 23 and r24, r18
1270 5ce: 80 83 st Z, r24
1275 // Update cycling variable for next interrupt
1276 if (m_ledPwmCount >= m_LED_BRIGHTNESS_LEVELS-1) {
1277 5d0: 80 91 79 00 lds r24, 0x0079
1278 5d4: 87 30 cpi r24, 0x07 ; 7
1279 5d6: 28 f0 brcs .+10 ; 0x5e2 <__vector_13+0x74>
1281 5d8: 10 92 79 00 sts 0x0079, r1
1282 m_ledPwmCycling = m_ledPwmPattern;
1283 5dc: 80 91 7b 00 lds r24, 0x007B
1284 5e0: 0a c0 rjmp .+20 ; 0x5f6 <__vector_13+0x88>
1287 5e2: 80 91 79 00 lds r24, 0x0079
1288 5e6: 8f 5f subi r24, 0xFF ; 255
1289 5e8: 80 93 79 00 sts 0x0079, r24
1290 m_ledPwmCycling >>= 1;
1291 5ec: 80 91 7a 00 lds r24, 0x007A
1292 5f0: 90 e0 ldi r25, 0x00 ; 0
1295 5f6: 80 93 7a 00 sts 0x007A, r24
1298 ISR(TIMER0_COMPA_vect) {
1299 sei(); // Okay to allow USART interrupts while controlling LED PWM
1308 606: 0f be out 0x3f, r0 ; 63
1313 0000060e <__mulhi3>:
1314 60e: 55 27 eor r21, r21
1315 610: 00 24 eor r0, r0
1317 00000612 <__mulhi3_loop>:
1318 612: 80 ff sbrs r24, 0
1319 614: 02 c0 rjmp .+4 ; 0x61a <__mulhi3_skip1>
1320 616: 06 0e add r0, r22
1321 618: 57 1f adc r21, r23
1323 0000061a <__mulhi3_skip1>:
1324 61a: 66 0f add r22, r22
1325 61c: 77 1f adc r23, r23
1326 61e: 61 15 cp r22, r1
1327 620: 71 05 cpc r23, r1
1328 622: 21 f0 breq .+8 ; 0x62c <__mulhi3_exit>
1331 628: 00 97 sbiw r24, 0x00 ; 0
1332 62a: 99 f7 brne .-26 ; 0x612 <__mulhi3_loop>
1334 0000062c <__mulhi3_exit>:
1335 62c: 95 2f mov r25, r21
1336 62e: 80 2d mov r24, r0
1342 00000634 <__stop_program>:
1343 634: ff cf rjmp .-2 ; 0x634 <__stop_program>