
USB10.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .data         00000026  00800100  00001830  000018a4  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  1 .text         00001830  00000000  00000000  00000074  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .bss          00000141  00800126  00001856  000018ca  2**0
                  ALLOC
  3 .debug_aranges 00000368  00000000  00000000  000018ca  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_pubnames 0000094b  00000000  00000000  00001c32  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_info   000036ca  00000000  00000000  0000257d  2**0
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_abbrev 00001349  00000000  00000000  00005c47  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_line   00003203  00000000  00000000  00006f90  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_frame  00000510  00000000  00000000  0000a194  2**2
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_str    000015d5  00000000  00000000  0000a6a4  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_loc    000013a0  00000000  00000000  0000bc79  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_ranges 000003d0  00000000  00000000  0000d019  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:
	/* Scheduling - routine never returns, so put this last in the main function */
	Scheduler_Start();
}

void testReset(void)
{
       0:	89 c0       	rjmp	.+274    	; 0x114 <__ctors_end>

/*
 * This function will place a repeated start condition onto the bus
 */
void I2C_RepeatedStart(void)
{
       2:	00 00       	nop

volatile SchedulerDelayCounter_t Scheduler_TickCounter;
volatile uint8_t                 Scheduler_TotalTasks;

bool Scheduler_HasDelayElapsed(const uint16_t Delay, SchedulerDelayCounter_t* const DelayCounter)
{
       4:	a3 c0       	rjmp	.+326    	; 0x14c <__bad_interrupt>
	
	Endpoint_AllocateMemory();
}

void Endpoint_ClearEndpoints(void)
{
       6:	00 00       	nop
       8:	a1 c0       	rjmp	.+322    	; 0x14c <__bad_interrupt>
       a:	00 00       	nop
       c:	9f c0       	rjmp	.+318    	; 0x14c <__bad_interrupt>
       e:	00 00       	nop
      10:	9d c0       	rjmp	.+314    	; 0x14c <__bad_interrupt>
      12:	00 00       	nop
      14:	9b c0       	rjmp	.+310    	; 0x14c <__bad_interrupt>
      16:	00 00       	nop
      18:	99 c0       	rjmp	.+306    	; 0x14c <__bad_interrupt>
      1a:	00 00       	nop
      1c:	97 c0       	rjmp	.+302    	; 0x14c <__bad_interrupt>
      1e:	00 00       	nop
      20:	95 c0       	rjmp	.+298    	; 0x14c <__bad_interrupt>
      22:	00 00       	nop
      24:	93 c0       	rjmp	.+294    	; 0x14c <__bad_interrupt>
      26:	00 00       	nop
      28:	91 c0       	rjmp	.+290    	; 0x14c <__bad_interrupt>
      2a:	00 00       	nop
      2c:	0c 94 39 0b 	jmp	0x1672	; 0x1672 <__vector_11>
      30:	8d c0       	rjmp	.+282    	; 0x14c <__bad_interrupt>
      32:	00 00       	nop
      34:	8b c0       	rjmp	.+278    	; 0x14c <__bad_interrupt>
      36:	00 00       	nop
      38:	89 c0       	rjmp	.+274    	; 0x14c <__bad_interrupt>
      3a:	00 00       	nop
      3c:	87 c0       	rjmp	.+270    	; 0x14c <__bad_interrupt>
      3e:	00 00       	nop
      40:	85 c0       	rjmp	.+266    	; 0x14c <__bad_interrupt>
      42:	00 00       	nop
      44:	83 c0       	rjmp	.+262    	; 0x14c <__bad_interrupt>
      46:	00 00       	nop
      48:	81 c0       	rjmp	.+258    	; 0x14c <__bad_interrupt>
      4a:	00 00       	nop
      4c:	7f c0       	rjmp	.+254    	; 0x14c <__bad_interrupt>
      4e:	00 00       	nop
      50:	7d c0       	rjmp	.+250    	; 0x14c <__bad_interrupt>
      52:	00 00       	nop
      54:	7b c0       	rjmp	.+246    	; 0x14c <__bad_interrupt>
      56:	00 00       	nop
      58:	79 c0       	rjmp	.+242    	; 0x14c <__bad_interrupt>
      5a:	00 00       	nop
      5c:	5d c1       	rjmp	.+698    	; 0x318 <__vector_23>
      5e:	00 00       	nop
      60:	75 c0       	rjmp	.+234    	; 0x14c <__bad_interrupt>
      62:	00 00       	nop
      64:	ac c0       	rjmp	.+344    	; 0x1be <__vector_25>
      66:	00 00       	nop
      68:	71 c0       	rjmp	.+226    	; 0x14c <__bad_interrupt>
      6a:	00 00       	nop
      6c:	6f c0       	rjmp	.+222    	; 0x14c <__bad_interrupt>
      6e:	00 00       	nop
      70:	6d c0       	rjmp	.+218    	; 0x14c <__bad_interrupt>
      72:	00 00       	nop

00000074 <DeviceDescriptor>:
      74:	12 01 10 01 02 00 00 08 eb 03 4b 20 00 00 01 02     ..........K ....
      84:	00 01                                               ..

00000086 <ConfigurationDescriptor>:
      86:	09 02 43 00 02 01 00 c0 32 09 04 00 00 01 02 02     ..C.....2.......
      96:	01 00 05 24 00 01 10 05 24 01 03 01 04 24 02 06     ...$....$....$..
      a6:	05 24 06 00 01 07 05 82 03 08 00 ff 09 04 01 00     .$..............
      b6:	02 0a 00 00 00 07 05 04 02 10 00 00 07 05 83 02     ................
      c6:	10 00 00                                            ...

000000c9 <LanguageString>:
      c9:	04 03 09 04                                         ....

000000cd <ManufacturerString>:
      cd:	18 03 44 00 65 00 61 00 6e 00 20 00 43 00 61 00     ..D.e.a.n. .C.a.
      dd:	6d 00 65 00 72 00 61 00 00 00                       m.e.r.a...

000000e7 <ProductString>:
      e7:	2a 03 4d 00 79 00 55 00 53 00 42 00 20 00 55 00     *.M.y.U.S.B. .U.
      f7:	53 00 42 00 2d 00 52 00 53 00 32 00 33 00 32 00     S.B.-.R.S.2.3.2.
     107:	20 00 44 00 65 00 6d 00 6f 00 00 00 00               .D.e.m.o....

00000114 <__ctors_end>:
     114:	11 24       	eor	r1, r1
     116:	1f be       	out	0x3f, r1	; 63
     118:	cf ef       	ldi	r28, 0xFF	; 255
     11a:	d2 e0       	ldi	r29, 0x02	; 2
     11c:	de bf       	out	0x3e, r29	; 62
     11e:	cd bf       	out	0x3d, r28	; 61

00000120 <__do_copy_data>:
     120:	11 e0       	ldi	r17, 0x01	; 1
     122:	a0 e0       	ldi	r26, 0x00	; 0
     124:	b1 e0       	ldi	r27, 0x01	; 1
     126:	e0 e3       	ldi	r30, 0x30	; 48
     128:	f8 e1       	ldi	r31, 0x18	; 24
     12a:	02 c0       	rjmp	.+4      	; 0x130 <.do_copy_data_start>

0000012c <.do_copy_data_loop>:
     12c:	05 90       	lpm	r0, Z+
     12e:	0d 92       	st	X+, r0

00000130 <.do_copy_data_start>:
     130:	a6 32       	cpi	r26, 0x26	; 38
     132:	b1 07       	cpc	r27, r17
     134:	d9 f7       	brne	.-10     	; 0x12c <.do_copy_data_loop>

00000136 <__do_clear_bss>:
     136:	12 e0       	ldi	r17, 0x02	; 2
     138:	a6 e2       	ldi	r26, 0x26	; 38
     13a:	b1 e0       	ldi	r27, 0x01	; 1
     13c:	01 c0       	rjmp	.+2      	; 0x140 <.do_clear_bss_start>

0000013e <.do_clear_bss_loop>:
     13e:	1d 92       	st	X+, r1

00000140 <.do_clear_bss_start>:
     140:	a7 36       	cpi	r26, 0x67	; 103
     142:	b1 07       	cpc	r27, r17
     144:	e1 f7       	brne	.-8      	; 0x13e <.do_clear_bss_loop>
     146:	d1 d3       	rcall	.+1954   	; 0x8ea <main>
     148:	0c 94 16 0c 	jmp	0x182c	; 0x182c <_exit>

0000014c <__bad_interrupt>:
     14c:	59 cf       	rjmp	.-334    	; 0x0 <__vectors>

0000014e <ReconfigureUSART>:
		Buffer_StoreElementOnTop(&Tx_Buffer, UDR1);
	}
}

void ReconfigureUSART(void)
{
     14e:	80 91 11 01 	lds	r24, 0x0111
     152:	81 30       	cpi	r24, 0x01	; 1
     154:	11 f4       	brne	.+4      	; 0x15a <ReconfigureUSART+0xc>
     156:	90 e3       	ldi	r25, 0x30	; 48
     158:	05 c0       	rjmp	.+10     	; 0x164 <ReconfigureUSART+0x16>
	uint8_t ConfigMask = 0;

	/* Determine parity - non odd/even parity mode defaults to no parity */
	if (LineCoding.ParityType == Parity_Odd)
	  ConfigMask = ((1 << UPM11) | (1 << UPM10));
	else if (LineCoding.ParityType == Parity_Even)
     15a:	82 30       	cpi	r24, 0x02	; 2
     15c:	11 f4       	brne	.+4      	; 0x162 <ReconfigureUSART+0x14>
     15e:	90 e2       	ldi	r25, 0x20	; 32
     160:	01 c0       	rjmp	.+2      	; 0x164 <ReconfigureUSART+0x16>
     162:	90 e0       	ldi	r25, 0x00	; 0
	  ConfigMask = (1 << UPM11);

	/* Determine stop bits - 1.5 stop bits is set as 1 stop bit due to hardware limitations */
	if (LineCoding.CharFormat == TwoStopBits)
     164:	80 91 10 01 	lds	r24, 0x0110
     168:	82 30       	cpi	r24, 0x02	; 2
     16a:	09 f4       	brne	.+2      	; 0x16e <ReconfigureUSART+0x20>
	  ConfigMask |= (1 << USBS1);
     16c:	98 60       	ori	r25, 0x08	; 8

	/* Determine data size - 5, 6, 7, or 8 bits are supported */
	if (LineCoding.DataBits == 6)
     16e:	80 91 12 01 	lds	r24, 0x0112
     172:	86 30       	cpi	r24, 0x06	; 6
     174:	11 f4       	brne	.+4      	; 0x17a <ReconfigureUSART+0x2c>
	  ConfigMask |= (1 << UCSZ10);
     176:	92 60       	ori	r25, 0x02	; 2
     178:	07 c0       	rjmp	.+14     	; 0x188 <ReconfigureUSART+0x3a>
	else if (LineCoding.DataBits == 7)
     17a:	87 30       	cpi	r24, 0x07	; 7
     17c:	11 f4       	brne	.+4      	; 0x182 <ReconfigureUSART+0x34>
	  ConfigMask |= (1 << UCSZ11);
     17e:	94 60       	ori	r25, 0x04	; 4
     180:	03 c0       	rjmp	.+6      	; 0x188 <ReconfigureUSART+0x3a>
	else if (LineCoding.DataBits == 8)
     182:	88 30       	cpi	r24, 0x08	; 8
     184:	09 f4       	brne	.+2      	; 0x188 <ReconfigureUSART+0x3a>
	  ConfigMask |= ((1 << UCSZ11) | (1 << UCSZ10));
     186:	96 60       	ori	r25, 0x06	; 6

	/* Enable double speed, gives better error percentages at 8MHz */
	UCSR1A = (1 << U2X1);
     188:	82 e0       	ldi	r24, 0x02	; 2
     18a:	80 93 c8 00 	sts	0x00C8, r24

	/* Enable transmit and receive modules and interrupts */
	UCSR1B = ((1 << TXCIE1) | (1 << RXCIE1) | (1 << TXEN1) | (1 << RXEN1));//| (1 << UDRIE1)
     18e:	88 ed       	ldi	r24, 0xD8	; 216
     190:	80 93 c9 00 	sts	0x00C9, r24

	/* Set the USART mode to the mask generated by the Line Coding options */
	UCSR1C = ConfigMask;
     194:	90 93 ca 00 	sts	0x00CA, r25

	/* Set the USART baud rate register to the desired baud rate value */
	UBRR1  = MY_SERIAL_2X_UBBRVAL((uint16_t)LineCoding.BaudRateBPS);
     198:	20 91 0c 01 	lds	r18, 0x010C
     19c:	30 91 0d 01 	lds	r19, 0x010D
     1a0:	40 e0       	ldi	r20, 0x00	; 0
     1a2:	50 e0       	ldi	r21, 0x00	; 0
     1a4:	60 e4       	ldi	r22, 0x40	; 64
     1a6:	72 e4       	ldi	r23, 0x42	; 66
     1a8:	8f e0       	ldi	r24, 0x0F	; 15
     1aa:	90 e0       	ldi	r25, 0x00	; 0
     1ac:	0e 94 f4 0b 	call	0x17e8	; 0x17e8 <__udivmodsi4>
     1b0:	21 50       	subi	r18, 0x01	; 1
     1b2:	30 40       	sbci	r19, 0x00	; 0
     1b4:	30 93 cd 00 	sts	0x00CD, r19
     1b8:	20 93 cc 00 	sts	0x00CC, r18
}
     1bc:	08 95       	ret

000001be <__vector_25>:
	;//	Serial_TxByte(Buffer_GetElement(&Rx_Buffer));
	}
}

ISR(USART1_TX_vect)
{
     1be:	1f 92       	push	r1
     1c0:	0f 92       	push	r0
     1c2:	0f b6       	in	r0, 0x3f	; 63
     1c4:	0f 92       	push	r0
     1c6:	11 24       	eor	r1, r1
     1c8:	2f 93       	push	r18
     1ca:	3f 93       	push	r19
     1cc:	4f 93       	push	r20
     1ce:	5f 93       	push	r21
     1d0:	6f 93       	push	r22
     1d2:	7f 93       	push	r23
     1d4:	8f 93       	push	r24
     1d6:	9f 93       	push	r25
     1d8:	af 93       	push	r26
     1da:	bf 93       	push	r27
     1dc:	ef 93       	push	r30
     1de:	ff 93       	push	r31
	/* Send next character if avaliable */
	if (Rx_Buffer.Elements != 0 && mode == SERIAL)
     1e0:	80 91 5e 02 	lds	r24, 0x025E
     1e4:	88 23       	and	r24, r24
     1e6:	51 f0       	breq	.+20     	; 0x1fc <__vector_25+0x3e>
     1e8:	80 91 2c 01 	lds	r24, 0x012C
     1ec:	81 30       	cpi	r24, 0x01	; 1
     1ee:	31 f4       	brne	.+12     	; 0x1fc <__vector_25+0x3e>
	{
		UDR1 = Buffer_GetElementFromBottom(&Rx_Buffer);
     1f0:	8a ed       	ldi	r24, 0xDA	; 218
     1f2:	91 e0       	ldi	r25, 0x01	; 1
     1f4:	65 d4       	rcall	.+2250   	; 0xac0 <Buffer_GetElementFromBottom>
     1f6:	80 93 ce 00 	sts	0x00CE, r24
     1fa:	02 c0       	rjmp	.+4      	; 0x200 <__vector_25+0x42>
	}
	else
	{
		Transmitting = false;
     1fc:	10 92 26 01 	sts	0x0126, r1
	}
	  
}
     200:	ff 91       	pop	r31
     202:	ef 91       	pop	r30
     204:	bf 91       	pop	r27
     206:	af 91       	pop	r26
     208:	9f 91       	pop	r25
     20a:	8f 91       	pop	r24
     20c:	7f 91       	pop	r23
     20e:	6f 91       	pop	r22
     210:	5f 91       	pop	r21
     212:	4f 91       	pop	r20
     214:	3f 91       	pop	r19
     216:	2f 91       	pop	r18
     218:	0f 90       	pop	r0
     21a:	0f be       	out	0x3f, r0	; 63
     21c:	0f 90       	pop	r0
     21e:	1f 90       	pop	r1
     220:	18 95       	reti

00000222 <RemoveWhiteSpace>:
	return number;

}

void RemoveWhiteSpace(void)
{
     222:	8a ed       	ldi	r24, 0xDA	; 218
     224:	91 e0       	ldi	r25, 0x01	; 1
     226:	4c d4       	rcall	.+2200   	; 0xac0 <Buffer_GetElementFromBottom>
     228:	68 2f       	mov	r22, r24
	uint8_t temp;

	temp = Buffer_GetElementFromBottom(&Rx_Buffer);
	//remove white space
	while(temp == ' ' || temp == '\t' || temp == ',')
     22a:	80 32       	cpi	r24, 0x20	; 32
     22c:	d1 f3       	breq	.-12     	; 0x222 <RemoveWhiteSpace>
     22e:	89 30       	cpi	r24, 0x09	; 9
     230:	c1 f3       	breq	.-16     	; 0x222 <RemoveWhiteSpace>
     232:	8c 32       	cpi	r24, 0x2C	; 44
     234:	b1 f3       	breq	.-20     	; 0x222 <RemoveWhiteSpace>
	{
		temp = Buffer_GetElementFromBottom(&Rx_Buffer);
	}
	Buffer_StoreElementOnBottom(&Rx_Buffer, temp);
     236:	8a ed       	ldi	r24, 0xDA	; 218
     238:	91 e0       	ldi	r25, 0x01	; 1
}
     23a:	72 c4       	rjmp	.+2276   	; 0xb20 <Buffer_StoreElementOnBottom>

0000023c <GetHexNumber>:
	UBRR1  = MY_SERIAL_2X_UBBRVAL((uint16_t)LineCoding.BaudRateBPS);
}


uint8_t GetHexNumber(void)
{
     23c:	1f 93       	push	r17
	uint8_t temp, number;

	temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     23e:	8a ed       	ldi	r24, 0xDA	; 218
     240:	91 e0       	ldi	r25, 0x01	; 1
     242:	3e d4       	rcall	.+2172   	; 0xac0 <Buffer_GetElementFromBottom>
     244:	68 2f       	mov	r22, r24

	if(temp >= 'a' && temp <= 'f')
     246:	81 56       	subi	r24, 0x61	; 97
     248:	86 30       	cpi	r24, 0x06	; 6
     24a:	18 f4       	brcc	.+6      	; 0x252 <GetHexNumber+0x16>
	{
		number = temp -'a' + 0xA;
     24c:	16 2f       	mov	r17, r22
     24e:	17 55       	subi	r17, 0x57	; 87
     250:	10 c0       	rjmp	.+32     	; 0x272 <GetHexNumber+0x36>
	}
	else if(temp >= 'A' && temp <= 'F')
     252:	86 2f       	mov	r24, r22
     254:	81 54       	subi	r24, 0x41	; 65
     256:	86 30       	cpi	r24, 0x06	; 6
     258:	18 f4       	brcc	.+6      	; 0x260 <GetHexNumber+0x24>
	{
		number = temp -'A' + 0xA;
     25a:	16 2f       	mov	r17, r22
     25c:	17 53       	subi	r17, 0x37	; 55
     25e:	09 c0       	rjmp	.+18     	; 0x272 <GetHexNumber+0x36>
	}
	else if(temp >= '0' && temp <= '9')
     260:	16 2f       	mov	r17, r22
     262:	10 53       	subi	r17, 0x30	; 48
     264:	1a 30       	cpi	r17, 0x0A	; 10
     266:	28 f0       	brcs	.+10     	; 0x272 <GetHexNumber+0x36>
	{
		number = temp -'0';
	}
	else
	{
		Buffer_StoreElementOnBottom(&Rx_Buffer, temp);//if not a valid character return it to the buffer
     268:	8a ed       	ldi	r24, 0xDA	; 218
     26a:	91 e0       	ldi	r25, 0x01	; 1
     26c:	59 d4       	rcall	.+2226   	; 0xb20 <Buffer_StoreElementOnBottom>
     26e:	10 e0       	ldi	r17, 0x00	; 0
     270:	1b c0       	rjmp	.+54     	; 0x2a8 <GetHexNumber+0x6c>
		return 0;
	}

	temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     272:	8a ed       	ldi	r24, 0xDA	; 218
     274:	91 e0       	ldi	r25, 0x01	; 1
     276:	24 d4       	rcall	.+2120   	; 0xac0 <Buffer_GetElementFromBottom>
     278:	68 2f       	mov	r22, r24


	number <<=4;//scale the number up 4 bits
     27a:	12 95       	swap	r17
     27c:	10 7f       	andi	r17, 0xF0	; 240

	if(temp >= 'a' && temp <= 'f')
     27e:	81 56       	subi	r24, 0x61	; 97
     280:	86 30       	cpi	r24, 0x06	; 6
     282:	10 f4       	brcc	.+4      	; 0x288 <GetHexNumber+0x4c>
	{
		number += temp -'a' + 0xA;
     284:	67 55       	subi	r22, 0x57	; 87
     286:	05 c0       	rjmp	.+10     	; 0x292 <GetHexNumber+0x56>
	}
	else if(temp >= 'A' && temp <= 'F')
     288:	86 2f       	mov	r24, r22
     28a:	81 54       	subi	r24, 0x41	; 65
     28c:	86 30       	cpi	r24, 0x06	; 6
     28e:	18 f4       	brcc	.+6      	; 0x296 <GetHexNumber+0x5a>
	{
		number += temp -'A' + 0xA;
     290:	67 53       	subi	r22, 0x37	; 55
     292:	16 0f       	add	r17, r22
     294:	09 c0       	rjmp	.+18     	; 0x2a8 <GetHexNumber+0x6c>
	}
	else if(temp >= '0' && temp <= '9')
     296:	86 2f       	mov	r24, r22
     298:	80 53       	subi	r24, 0x30	; 48
     29a:	8a 30       	cpi	r24, 0x0A	; 10
     29c:	10 f4       	brcc	.+4      	; 0x2a2 <GetHexNumber+0x66>
	{
		number += temp -'0';
     29e:	18 0f       	add	r17, r24
     2a0:	03 c0       	rjmp	.+6      	; 0x2a8 <GetHexNumber+0x6c>
	}
	else
	{
		Buffer_StoreElementOnBottom(&Rx_Buffer, temp);//if the character is no good to us, return it back to the buffer
     2a2:	8a ed       	ldi	r24, 0xDA	; 218
     2a4:	91 e0       	ldi	r25, 0x01	; 1
     2a6:	3c d4       	rcall	.+2168   	; 0xb20 <Buffer_StoreElementOnBottom>
	}


	return number;

}
     2a8:	81 2f       	mov	r24, r17
     2aa:	1f 91       	pop	r17
     2ac:	08 95       	ret

000002ae <ParseNumber>:


uint8_t ParseNumber(void)
{
     2ae:	1f 93       	push	r17
	uint8_t temp, number = 0;

	
	RemoveWhiteSpace();
     2b0:	b8 df       	rcall	.-144    	; 0x222 <RemoveWhiteSpace>

	temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     2b2:	8a ed       	ldi	r24, 0xDA	; 218
     2b4:	91 e0       	ldi	r25, 0x01	; 1
     2b6:	04 d4       	rcall	.+2056   	; 0xac0 <Buffer_GetElementFromBottom>
     2b8:	28 2f       	mov	r18, r24

	if(temp == '\\')
     2ba:	8c 35       	cpi	r24, 0x5C	; 92
     2bc:	81 f4       	brne	.+32     	; 0x2de <ParseNumber+0x30>
	{
		temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     2be:	8a ed       	ldi	r24, 0xDA	; 218
     2c0:	91 e0       	ldi	r25, 0x01	; 1
     2c2:	fe d3       	rcall	.+2044   	; 0xac0 <Buffer_GetElementFromBottom>
     2c4:	68 2f       	mov	r22, r24
		if(temp == 'x' || temp == 'X')
     2c6:	88 37       	cpi	r24, 0x78	; 120
     2c8:	11 f0       	breq	.+4      	; 0x2ce <ParseNumber+0x20>
     2ca:	88 35       	cpi	r24, 0x58	; 88
     2cc:	19 f4       	brne	.+6      	; 0x2d4 <ParseNumber+0x26>
		{
			number = GetHexNumber();
     2ce:	b6 df       	rcall	.-148    	; 0x23c <GetHexNumber>
     2d0:	18 2f       	mov	r17, r24
     2d2:	1f c0       	rjmp	.+62     	; 0x312 <__stack+0x13>
		}
		else
		{
			Buffer_StoreElementOnBottom(&Rx_Buffer, temp);//if not a valid character return it to the buffer
     2d4:	8a ed       	ldi	r24, 0xDA	; 218
     2d6:	91 e0       	ldi	r25, 0x01	; 1
     2d8:	23 d4       	rcall	.+2118   	; 0xb20 <Buffer_StoreElementOnBottom>
     2da:	10 e0       	ldi	r17, 0x00	; 0
     2dc:	1a c0       	rjmp	.+52     	; 0x312 <__stack+0x13>
			return 0;
		}	
	}
	else if(temp >= '0' && temp <= '9' )
     2de:	80 53       	subi	r24, 0x30	; 48
     2e0:	8a 30       	cpi	r24, 0x0A	; 10
     2e2:	10 f0       	brcs	.+4      	; 0x2e8 <ParseNumber+0x3a>
     2e4:	12 2f       	mov	r17, r18
     2e6:	15 c0       	rjmp	.+42     	; 0x312 <__stack+0x13>
     2e8:	10 e0       	ldi	r17, 0x00	; 0
	{
		do
		{
			number *= 10;
     2ea:	81 2f       	mov	r24, r17
     2ec:	90 e0       	ldi	r25, 0x00	; 0
     2ee:	6a e0       	ldi	r22, 0x0A	; 10
     2f0:	70 e0       	ldi	r23, 0x00	; 0
     2f2:	0e 94 ce 0b 	call	0x179c	; 0x179c <__mulhi3>
			number += temp - '0';
     2f6:	12 2f       	mov	r17, r18
     2f8:	10 53       	subi	r17, 0x30	; 48
     2fa:	18 0f       	add	r17, r24
			temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     2fc:	8a ed       	ldi	r24, 0xDA	; 218
     2fe:	91 e0       	ldi	r25, 0x01	; 1
     300:	df d3       	rcall	.+1982   	; 0xac0 <Buffer_GetElementFromBottom>
     302:	28 2f       	mov	r18, r24
		} while (temp >= '0' && temp <= '9' );
     304:	80 53       	subi	r24, 0x30	; 48
     306:	8a 30       	cpi	r24, 0x0A	; 10
     308:	80 f3       	brcs	.-32     	; 0x2ea <ParseNumber+0x3c>

		Buffer_StoreElementOnBottom(&Rx_Buffer, temp);//if not a valid character return it to the buffer
     30a:	62 2f       	mov	r22, r18
     30c:	8a ed       	ldi	r24, 0xDA	; 218
     30e:	91 e0       	ldi	r25, 0x01	; 1
     310:	07 d4       	rcall	.+2062   	; 0xb20 <Buffer_StoreElementOnBottom>
	}
	

	return number;

}
     312:	81 2f       	mov	r24, r17
     314:	1f 91       	pop	r17
     316:	08 95       	ret

00000318 <__vector_23>:

//	  UCSR1A = (1<<UDRE1);
//}

ISR(USART1_RX_vect)
{
     318:	1f 92       	push	r1
     31a:	0f 92       	push	r0
     31c:	0f b6       	in	r0, 0x3f	; 63
     31e:	0f 92       	push	r0
     320:	11 24       	eor	r1, r1
     322:	2f 93       	push	r18
     324:	3f 93       	push	r19
     326:	4f 93       	push	r20
     328:	5f 93       	push	r21
     32a:	6f 93       	push	r22
     32c:	7f 93       	push	r23
     32e:	8f 93       	push	r24
     330:	9f 93       	push	r25
     332:	af 93       	push	r26
     334:	bf 93       	push	r27
     336:	ef 93       	push	r30
     338:	ff 93       	push	r31
	if(mode == SERIAL)
     33a:	80 91 2c 01 	lds	r24, 0x012C
     33e:	81 30       	cpi	r24, 0x01	; 1
     340:	29 f4       	brne	.+10     	; 0x34c <__vector_23+0x34>
	{
		/* Character recieved, store it into the buffer */
		Buffer_StoreElementOnTop(&Tx_Buffer, UDR1);
     342:	60 91 ce 00 	lds	r22, 0x00CE
     346:	85 e5       	ldi	r24, 0x55	; 85
     348:	91 e0       	ldi	r25, 0x01	; 1
     34a:	56 d3       	rcall	.+1708   	; 0x9f8 <Buffer_StoreElementOnTop>
	}
}
     34c:	ff 91       	pop	r31
     34e:	ef 91       	pop	r30
     350:	bf 91       	pop	r27
     352:	af 91       	pop	r26
     354:	9f 91       	pop	r25
     356:	8f 91       	pop	r24
     358:	7f 91       	pop	r23
     35a:	6f 91       	pop	r22
     35c:	5f 91       	pop	r21
     35e:	4f 91       	pop	r20
     360:	3f 91       	pop	r19
     362:	2f 91       	pop	r18
     364:	0f 90       	pop	r0
     366:	0f be       	out	0x3f, r0	; 63
     368:	0f 90       	pop	r0
     36a:	1f 90       	pop	r1
     36c:	18 95       	reti

0000036e <Command_Task>:
}



TASK(Command_Task)
{
     36e:	9f 92       	push	r9
     370:	af 92       	push	r10
     372:	bf 92       	push	r11
     374:	cf 92       	push	r12
     376:	df 92       	push	r13
     378:	ef 92       	push	r14
     37a:	ff 92       	push	r15
     37c:	0f 93       	push	r16
     37e:	1f 93       	push	r17
     380:	df 93       	push	r29
     382:	cf 93       	push	r28
     384:	cd b7       	in	r28, 0x3d	; 61
     386:	de b7       	in	r29, 0x3e	; 62
     388:	64 97       	sbiw	r28, 0x14	; 20
     38a:	0f b6       	in	r0, 0x3f	; 63
     38c:	f8 94       	cli
     38e:	de bf       	out	0x3e, r29	; 62
     390:	0f be       	out	0x3f, r0	; 63
     392:	cd bf       	out	0x3d, r28	; 61
	uint8_t i, address = 0, lenght = 0, axis, oldValue;
	uint8_t temp[20];


			
	inputBufferTail = 0;
     394:	10 92 29 01 	sts	0x0129, r1
	RemoveWhiteSpace();
     398:	44 df       	rcall	.-376    	; 0x222 <RemoveWhiteSpace>


	switch (Buffer_GetElementFromBottom(&Rx_Buffer))
     39a:	8a ed       	ldi	r24, 0xDA	; 218
     39c:	91 e0       	ldi	r25, 0x01	; 1
     39e:	90 d3       	rcall	.+1824   	; 0xac0 <Buffer_GetElementFromBottom>
     3a0:	83 35       	cpi	r24, 0x53	; 83
     3a2:	09 f4       	brne	.+2      	; 0x3a6 <Command_Task+0x38>
     3a4:	d8 c0       	rjmp	.+432    	; 0x556 <Command_Task+0x1e8>
     3a6:	84 35       	cpi	r24, 0x54	; 84
     3a8:	98 f4       	brcc	.+38     	; 0x3d0 <Command_Task+0x62>
     3aa:	8c 34       	cpi	r24, 0x4C	; 76
     3ac:	09 f4       	brne	.+2      	; 0x3b0 <Command_Task+0x42>
     3ae:	e3 c0       	rjmp	.+454    	; 0x576 <Command_Task+0x208>
     3b0:	8d 34       	cpi	r24, 0x4D	; 77
     3b2:	38 f4       	brcc	.+14     	; 0x3c2 <Command_Task+0x54>
     3b4:	88 23       	and	r24, r24
     3b6:	09 f4       	brne	.+2      	; 0x3ba <Command_Task+0x4c>
     3b8:	21 c1       	rjmp	.+578    	; 0x5fc <Command_Task+0x28e>
     3ba:	83 34       	cpi	r24, 0x43	; 67
     3bc:	09 f0       	breq	.+2      	; 0x3c0 <Command_Task+0x52>
     3be:	12 c1       	rjmp	.+548    	; 0x5e4 <Command_Task+0x276>
     3c0:	19 c0       	rjmp	.+50     	; 0x3f4 <Command_Task+0x86>
     3c2:	8d 34       	cpi	r24, 0x4D	; 77
     3c4:	09 f4       	brne	.+2      	; 0x3c8 <Command_Task+0x5a>
     3c6:	95 c0       	rjmp	.+298    	; 0x4f2 <Command_Task+0x184>
     3c8:	80 35       	cpi	r24, 0x50	; 80
     3ca:	09 f0       	breq	.+2      	; 0x3ce <Command_Task+0x60>
     3cc:	0b c1       	rjmp	.+534    	; 0x5e4 <Command_Task+0x276>
     3ce:	cd c0       	rjmp	.+410    	; 0x56a <Command_Task+0x1fc>
     3d0:	8d 36       	cpi	r24, 0x6D	; 109
     3d2:	09 f4       	brne	.+2      	; 0x3d6 <Command_Task+0x68>
     3d4:	8e c0       	rjmp	.+284    	; 0x4f2 <Command_Task+0x184>
     3d6:	8e 36       	cpi	r24, 0x6E	; 110
     3d8:	30 f4       	brcc	.+12     	; 0x3e6 <Command_Task+0x78>
     3da:	83 36       	cpi	r24, 0x63	; 99
     3dc:	59 f0       	breq	.+22     	; 0x3f4 <Command_Task+0x86>
     3de:	8c 36       	cpi	r24, 0x6C	; 108
     3e0:	09 f0       	breq	.+2      	; 0x3e4 <Command_Task+0x76>
     3e2:	00 c1       	rjmp	.+512    	; 0x5e4 <Command_Task+0x276>
     3e4:	c8 c0       	rjmp	.+400    	; 0x576 <Command_Task+0x208>
     3e6:	80 37       	cpi	r24, 0x70	; 112
     3e8:	09 f4       	brne	.+2      	; 0x3ec <Command_Task+0x7e>
     3ea:	bf c0       	rjmp	.+382    	; 0x56a <Command_Task+0x1fc>
     3ec:	83 37       	cpi	r24, 0x73	; 115
     3ee:	09 f0       	breq	.+2      	; 0x3f2 <Command_Task+0x84>
     3f0:	f9 c0       	rjmp	.+498    	; 0x5e4 <Command_Task+0x276>
     3f2:	b1 c0       	rjmp	.+354    	; 0x556 <Command_Task+0x1e8>
	{
		case 'c':
		case 'C':
					
			RemoveWhiteSpace();
     3f4:	16 df       	rcall	.-468    	; 0x222 <RemoveWhiteSpace>

			address = ParseNumber();
     3f6:	5b df       	rcall	.-330    	; 0x2ae <ParseNumber>
     3f8:	98 2e       	mov	r9, r24
			RemoveWhiteSpace();
     3fa:	13 df       	rcall	.-474    	; 0x222 <RemoveWhiteSpace>

			oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     3fc:	8a ed       	ldi	r24, 0xDA	; 218
     3fe:	91 e0       	ldi	r25, 0x01	; 1
     400:	5f d3       	rcall	.+1726   	; 0xac0 <Buffer_GetElementFromBottom>

			if(oldValue == 'w' || oldValue == 'W')
     402:	87 37       	cpi	r24, 0x77	; 119
     404:	19 f0       	breq	.+6      	; 0x40c <Command_Task+0x9e>
     406:	87 35       	cpi	r24, 0x57	; 87
     408:	09 f0       	breq	.+2      	; 0x40c <Command_Task+0x9e>
     40a:	49 c0       	rjmp	.+146    	; 0x49e <Command_Task+0x130>
			{
						
				lenght = ParseNumber();
     40c:	50 df       	rcall	.-352    	; 0x2ae <ParseNumber>
     40e:	e8 2e       	mov	r14, r24

				oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     410:	8a ed       	ldi	r24, 0xDA	; 218
     412:	91 e0       	ldi	r25, 0x01	; 1
     414:	55 d3       	rcall	.+1706   	; 0xac0 <Buffer_GetElementFromBottom>
     416:	68 2f       	mov	r22, r24
				if(oldValue != ' ' && oldValue != ',')
     418:	80 32       	cpi	r24, 0x20	; 32
     41a:	29 f0       	breq	.+10     	; 0x426 <Command_Task+0xb8>
     41c:	8c 32       	cpi	r24, 0x2C	; 44
     41e:	19 f0       	breq	.+6      	; 0x426 <Command_Task+0xb8>
				{
					Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
     420:	8a ed       	ldi	r24, 0xDA	; 218
     422:	91 e0       	ldi	r25, 0x01	; 1
     424:	7d d3       	rcall	.+1786   	; 0xb20 <Buffer_StoreElementOnBottom>
     426:	ff 24       	eor	r15, r15
     428:	5e 01       	movw	r10, r28
     42a:	08 94       	sec
     42c:	a1 1c       	adc	r10, r1
     42e:	b1 1c       	adc	r11, r1
						{
							temp[i] = GetHexNumber();
						}
						else
						{
							if(i < lenght-1)//will we even get a chance to send it.  If so write it
     430:	ce 2c       	mov	r12, r14
     432:	dd 24       	eor	r13, r13
     434:	08 94       	sec
     436:	c1 08       	sbc	r12, r1
     438:	d1 08       	sbc	r13, r1
     43a:	26 c0       	rjmp	.+76     	; 0x488 <Command_Task+0x11a>
					Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
				}
						
				for (i = 0; i < lenght; i++)
				{
					temp[i] = Buffer_GetElementFromBottom(&Rx_Buffer);
     43c:	0f 2d       	mov	r16, r15
     43e:	10 e0       	ldi	r17, 0x00	; 0
     440:	8a ed       	ldi	r24, 0xDA	; 218
     442:	91 e0       	ldi	r25, 0x01	; 1
     444:	3d d3       	rcall	.+1658   	; 0xac0 <Buffer_GetElementFromBottom>
     446:	f5 01       	movw	r30, r10
     448:	e0 0f       	add	r30, r16
     44a:	f1 1f       	adc	r31, r17
     44c:	80 83       	st	Z, r24
					if(temp[i] == '\\')
     44e:	8c 35       	cpi	r24, 0x5C	; 92
     450:	d1 f4       	brne	.+52     	; 0x486 <Command_Task+0x118>
					{	
						oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     452:	8a ed       	ldi	r24, 0xDA	; 218
     454:	91 e0       	ldi	r25, 0x01	; 1
     456:	34 d3       	rcall	.+1640   	; 0xac0 <Buffer_GetElementFromBottom>
     458:	68 2f       	mov	r22, r24

						if(oldValue == 'x' || oldValue == 'X')
     45a:	88 37       	cpi	r24, 0x78	; 120
     45c:	11 f0       	breq	.+4      	; 0x462 <Command_Task+0xf4>
     45e:	88 35       	cpi	r24, 0x58	; 88
     460:	31 f4       	brne	.+12     	; 0x46e <Command_Task+0x100>
						{
							temp[i] = GetHexNumber();
     462:	ec de       	rcall	.-552    	; 0x23c <GetHexNumber>
     464:	0a 0d       	add	r16, r10
     466:	1b 1d       	adc	r17, r11
     468:	f8 01       	movw	r30, r16
     46a:	80 83       	st	Z, r24
     46c:	0c c0       	rjmp	.+24     	; 0x486 <Command_Task+0x118>
						}
						else
						{
							if(i < lenght-1)//will we even get a chance to send it.  If so write it
     46e:	0c 15       	cp	r16, r12
     470:	1d 05       	cpc	r17, r13
     472:	34 f4       	brge	.+12     	; 0x480 <Command_Task+0x112>
							{
								temp[++i] = oldValue;
     474:	f3 94       	inc	r15
     476:	f5 01       	movw	r30, r10
     478:	ef 0d       	add	r30, r15
     47a:	f1 1d       	adc	r31, r1
     47c:	80 83       	st	Z, r24
     47e:	03 c0       	rjmp	.+6      	; 0x486 <Command_Task+0x118>
							}
							else//put the data back.  This is not needed though as we will dump the data latter
							{
								Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
     480:	8a ed       	ldi	r24, 0xDA	; 218
     482:	91 e0       	ldi	r25, 0x01	; 1
     484:	4d d3       	rcall	.+1690   	; 0xb20 <Buffer_StoreElementOnBottom>
				if(oldValue != ' ' && oldValue != ',')
				{
					Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
				}
						
				for (i = 0; i < lenght; i++)
     486:	f3 94       	inc	r15
     488:	fe 14       	cp	r15, r14
     48a:	c0 f2       	brcs	.-80     	; 0x43c <Command_Task+0xce>
							} 
						}	
					}
				}

				if(I2C_Write(address, temp, lenght) != lenght)
     48c:	4e 2d       	mov	r20, r14
     48e:	50 e0       	ldi	r21, 0x00	; 0
     490:	b5 01       	movw	r22, r10
     492:	89 2d       	mov	r24, r9
     494:	64 d4       	rcall	.+2248   	; 0xd5e <I2C_Write>
     496:	8e 15       	cp	r24, r14
     498:	09 f4       	brne	.+2      	; 0x49c <Command_Task+0x12e>
     49a:	b0 c0       	rjmp	.+352    	; 0x5fc <Command_Task+0x28e>
     49c:	20 c0       	rjmp	.+64     	; 0x4de <Command_Task+0x170>
					Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
					Buffer_StoreElementOnTop(&Tx_Buffer, '-');
				}					
						 
			}
			else if(oldValue == 'r' || oldValue == 'R')
     49e:	82 37       	cpi	r24, 0x72	; 114
     4a0:	19 f0       	breq	.+6      	; 0x4a8 <Command_Task+0x13a>
     4a2:	82 35       	cpi	r24, 0x52	; 82
     4a4:	09 f0       	breq	.+2      	; 0x4a8 <Command_Task+0x13a>
     4a6:	aa c0       	rjmp	.+340    	; 0x5fc <Command_Task+0x28e>
			{
				lenght = ParseNumber();
     4a8:	02 df       	rcall	.-508    	; 0x2ae <ParseNumber>
     4aa:	18 2f       	mov	r17, r24

				if(I2C_Read(address, temp, lenght) == lenght)
     4ac:	48 2f       	mov	r20, r24
     4ae:	50 e0       	ldi	r21, 0x00	; 0
     4b0:	7e 01       	movw	r14, r28
     4b2:	08 94       	sec
     4b4:	e1 1c       	adc	r14, r1
     4b6:	f1 1c       	adc	r15, r1
     4b8:	b7 01       	movw	r22, r14
     4ba:	89 2d       	mov	r24, r9
     4bc:	c2 d4       	rcall	.+2436   	; 0xe42 <I2C_Read>
     4be:	d8 2e       	mov	r13, r24
     4c0:	81 17       	cp	r24, r17
     4c2:	69 f4       	brne	.+26     	; 0x4de <Command_Task+0x170>
     4c4:	87 01       	movw	r16, r14
     4c6:	06 c0       	rjmp	.+12     	; 0x4d4 <Command_Task+0x166>
				{
					for (i = 0; i < lenght; i++)
					{
						Buffer_StoreElementOnTop(&Tx_Buffer, temp[i]);
     4c8:	f8 01       	movw	r30, r16
     4ca:	61 91       	ld	r22, Z+
     4cc:	8f 01       	movw	r16, r30
     4ce:	85 e5       	ldi	r24, 0x55	; 85
     4d0:	91 e0       	ldi	r25, 0x01	; 1
     4d2:	92 d2       	rcall	.+1316   	; 0x9f8 <Buffer_StoreElementOnTop>
			{
				lenght = ParseNumber();

				if(I2C_Read(address, temp, lenght) == lenght)
				{
					for (i = 0; i < lenght; i++)
     4d4:	80 2f       	mov	r24, r16
     4d6:	8e 19       	sub	r24, r14
     4d8:	8d 15       	cp	r24, r13
     4da:	b0 f3       	brcs	.-20     	; 0x4c8 <Command_Task+0x15a>
     4dc:	8f c0       	rjmp	.+286    	; 0x5fc <Command_Task+0x28e>
						Buffer_StoreElementOnTop(&Tx_Buffer, temp[i]);
					}
				}
				else
				{
					Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     4de:	6d e0       	ldi	r22, 0x0D	; 13
     4e0:	85 e5       	ldi	r24, 0x55	; 85
     4e2:	91 e0       	ldi	r25, 0x01	; 1
     4e4:	89 d2       	rcall	.+1298   	; 0x9f8 <Buffer_StoreElementOnTop>
					Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     4e6:	6a e0       	ldi	r22, 0x0A	; 10
     4e8:	85 e5       	ldi	r24, 0x55	; 85
     4ea:	91 e0       	ldi	r25, 0x01	; 1
     4ec:	85 d2       	rcall	.+1290   	; 0x9f8 <Buffer_StoreElementOnTop>
					Buffer_StoreElementOnTop(&Tx_Buffer, '-');
     4ee:	6d e2       	ldi	r22, 0x2D	; 45
     4f0:	82 c0       	rjmp	.+260    	; 0x5f6 <Command_Task+0x288>
			break;
		
		case 'm':
		case 'M':
					
			RemoveWhiteSpace();
     4f2:	97 de       	rcall	.-722    	; 0x222 <RemoveWhiteSpace>

			switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     4f4:	8a ed       	ldi	r24, 0xDA	; 218
     4f6:	91 e0       	ldi	r25, 0x01	; 1
     4f8:	e3 d2       	rcall	.+1478   	; 0xac0 <Buffer_GetElementFromBottom>
     4fa:	8a 35       	cpi	r24, 0x5A	; 90
     4fc:	49 f0       	breq	.+18     	; 0x510 <Command_Task+0x1a2>
     4fe:	8b 35       	cpi	r24, 0x5B	; 91
     500:	18 f4       	brcc	.+6      	; 0x508 <Command_Task+0x19a>
     502:	89 35       	cpi	r24, 0x59	; 89
     504:	49 f4       	brne	.+18     	; 0x518 <Command_Task+0x1aa>
     506:	06 c0       	rjmp	.+12     	; 0x514 <Command_Task+0x1a6>
     508:	89 37       	cpi	r24, 0x79	; 121
     50a:	21 f0       	breq	.+8      	; 0x514 <Command_Task+0x1a6>
     50c:	8a 37       	cpi	r24, 0x7A	; 122
     50e:	21 f4       	brne	.+8      	; 0x518 <Command_Task+0x1aa>
     510:	02 e0       	ldi	r16, 0x02	; 2
     512:	03 c0       	rjmp	.+6      	; 0x51a <Command_Task+0x1ac>
     514:	01 e0       	ldi	r16, 0x01	; 1
     516:	01 c0       	rjmp	.+2      	; 0x51a <Command_Task+0x1ac>
     518:	00 e0       	ldi	r16, 0x00	; 0
					axis = X_AXIS;
					break;
				
			}

			RemoveWhiteSpace();
     51a:	83 de       	rcall	.-762    	; 0x222 <RemoveWhiteSpace>

			lenght = ParseNumber();
     51c:	c8 de       	rcall	.-624    	; 0x2ae <ParseNumber>
     51e:	f8 2e       	mov	r15, r24

			oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     520:	8a ed       	ldi	r24, 0xDA	; 218
     522:	91 e0       	ldi	r25, 0x01	; 1
     524:	cd d2       	rcall	.+1434   	; 0xac0 <Buffer_GetElementFromBottom>
     526:	68 2f       	mov	r22, r24

			if(oldValue != ' ' && oldValue != ',')//allow for 1 peice of white space
     528:	80 32       	cpi	r24, 0x20	; 32
     52a:	29 f0       	breq	.+10     	; 0x536 <Command_Task+0x1c8>
     52c:	8c 32       	cpi	r24, 0x2C	; 44
     52e:	19 f0       	breq	.+6      	; 0x536 <Command_Task+0x1c8>
			{
				Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
     530:	8a ed       	ldi	r24, 0xDA	; 218
     532:	91 e0       	ldi	r25, 0x01	; 1
     534:	f5 d2       	rcall	.+1514   	; 0xb20 <Buffer_StoreElementOnBottom>
     536:	10 e0       	ldi	r17, 0x00	; 0
     538:	06 c0       	rjmp	.+12     	; 0x546 <Command_Task+0x1d8>
			}
						
			for (i = 0; i < lenght && Rx_Buffer.Elements != 0; i++)
			{
				SendByte(Buffer_GetElementFromBottom(&Rx_Buffer),axis);
     53a:	8a ed       	ldi	r24, 0xDA	; 218
     53c:	91 e0       	ldi	r25, 0x01	; 1
     53e:	c0 d2       	rcall	.+1408   	; 0xac0 <Buffer_GetElementFromBottom>
     540:	60 2f       	mov	r22, r16
     542:	07 d5       	rcall	.+2574   	; 0xf52 <SendByte>
			if(oldValue != ' ' && oldValue != ',')//allow for 1 peice of white space
			{
				Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
			}
						
			for (i = 0; i < lenght && Rx_Buffer.Elements != 0; i++)
     544:	1f 5f       	subi	r17, 0xFF	; 255
     546:	1f 15       	cp	r17, r15
     548:	08 f0       	brcs	.+2      	; 0x54c <Command_Task+0x1de>
     54a:	58 c0       	rjmp	.+176    	; 0x5fc <Command_Task+0x28e>
     54c:	80 91 5e 02 	lds	r24, 0x025E
     550:	88 23       	and	r24, r24
     552:	99 f7       	brne	.-26     	; 0x53a <Command_Task+0x1cc>
     554:	53 c0       	rjmp	.+166    	; 0x5fc <Command_Task+0x28e>

			break;

		case 's'://enter serial mode
		case 'S':
			mode = SERIAL;
     556:	81 e0       	ldi	r24, 0x01	; 1
     558:	80 93 2c 01 	sts	0x012C, r24
			Buffer_Initialize(&Rx_Buffer);//dump any unused data
     55c:	8a ed       	ldi	r24, 0xDA	; 218
     55e:	91 e0       	ldi	r25, 0x01	; 1
     560:	37 d2       	rcall	.+1134   	; 0x9d0 <Buffer_Initialize>
			Buffer_Initialize(&Tx_Buffer);//dump any unused data
     562:	85 e5       	ldi	r24, 0x55	; 85
     564:	91 e0       	ldi	r25, 0x01	; 1
     566:	34 d2       	rcall	.+1128   	; 0x9d0 <Buffer_Initialize>
     568:	49 c0       	rjmp	.+146    	; 0x5fc <Command_Task+0x28e>
		case 0://empty command
			break;

		case 'p'://start the bootloader
		case 'P':
			(*bootloader)();//will not return
     56a:	e0 91 13 01 	lds	r30, 0x0113
     56e:	f0 91 14 01 	lds	r31, 0x0114
     572:	09 95       	icall
     574:	43 c0       	rjmp	.+134    	; 0x5fc <Command_Task+0x28e>
			break;

		case 'l':
		case 'L':

			RemoveWhiteSpace();
     576:	55 de       	rcall	.-854    	; 0x222 <RemoveWhiteSpace>

			switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     578:	8a ed       	ldi	r24, 0xDA	; 218
     57a:	91 e0       	ldi	r25, 0x01	; 1
     57c:	a1 d2       	rcall	.+1346   	; 0xac0 <Buffer_GetElementFromBottom>
     57e:	82 35       	cpi	r24, 0x52	; 82
     580:	f1 f0       	breq	.+60     	; 0x5be <Command_Task+0x250>
     582:	83 35       	cpi	r24, 0x53	; 83
     584:	20 f4       	brcc	.+8      	; 0x58e <Command_Task+0x220>
     586:	87 34       	cpi	r24, 0x47	; 71
     588:	09 f0       	breq	.+2      	; 0x58c <Command_Task+0x21e>
     58a:	38 c0       	rjmp	.+112    	; 0x5fc <Command_Task+0x28e>
     58c:	05 c0       	rjmp	.+10     	; 0x598 <Command_Task+0x22a>
     58e:	87 36       	cpi	r24, 0x67	; 103
     590:	19 f0       	breq	.+6      	; 0x598 <Command_Task+0x22a>
     592:	82 37       	cpi	r24, 0x72	; 114
     594:	99 f5       	brne	.+102    	; 0x5fc <Command_Task+0x28e>
     596:	13 c0       	rjmp	.+38     	; 0x5be <Command_Task+0x250>
			{
				case 'g':
				case 'G':
						
					RemoveWhiteSpace();
     598:	44 de       	rcall	.-888    	; 0x222 <RemoveWhiteSpace>

					switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     59a:	8a ed       	ldi	r24, 0xDA	; 218
     59c:	91 e0       	ldi	r25, 0x01	; 1
     59e:	90 d2       	rcall	.+1312   	; 0xac0 <Buffer_GetElementFromBottom>
     5a0:	8f 34       	cpi	r24, 0x4F	; 79
     5a2:	49 f0       	breq	.+18     	; 0x5b6 <Command_Task+0x248>
     5a4:	80 35       	cpi	r24, 0x50	; 80
     5a6:	18 f4       	brcc	.+6      	; 0x5ae <Command_Task+0x240>
     5a8:	86 34       	cpi	r24, 0x46	; 70
     5aa:	41 f5       	brne	.+80     	; 0x5fc <Command_Task+0x28e>
     5ac:	06 c0       	rjmp	.+12     	; 0x5ba <Command_Task+0x24c>
     5ae:	86 36       	cpi	r24, 0x66	; 102
     5b0:	21 f0       	breq	.+8      	; 0x5ba <Command_Task+0x24c>
     5b2:	8f 36       	cpi	r24, 0x6F	; 111
     5b4:	19 f5       	brne	.+70     	; 0x5fc <Command_Task+0x28e>
					{
						case 'o':
						case 'O':
							greenLedOn();
     5b6:	2d 98       	cbi	0x05, 5	; 5
     5b8:	21 c0       	rjmp	.+66     	; 0x5fc <Command_Task+0x28e>
							break;

						case 'f':
						case 'F':
							greenLedOff();				
     5ba:	2d 9a       	sbi	0x05, 5	; 5
     5bc:	1f c0       	rjmp	.+62     	; 0x5fc <Command_Task+0x28e>
					break;

				case 'r':
				case 'R':

					RemoveWhiteSpace();
     5be:	31 de       	rcall	.-926    	; 0x222 <RemoveWhiteSpace>

					switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     5c0:	8a ed       	ldi	r24, 0xDA	; 218
     5c2:	91 e0       	ldi	r25, 0x01	; 1
     5c4:	7d d2       	rcall	.+1274   	; 0xac0 <Buffer_GetElementFromBottom>
     5c6:	8f 34       	cpi	r24, 0x4F	; 79
     5c8:	49 f0       	breq	.+18     	; 0x5dc <Command_Task+0x26e>
     5ca:	80 35       	cpi	r24, 0x50	; 80
     5cc:	18 f4       	brcc	.+6      	; 0x5d4 <Command_Task+0x266>
     5ce:	86 34       	cpi	r24, 0x46	; 70
     5d0:	a9 f4       	brne	.+42     	; 0x5fc <Command_Task+0x28e>
     5d2:	06 c0       	rjmp	.+12     	; 0x5e0 <Command_Task+0x272>
     5d4:	86 36       	cpi	r24, 0x66	; 102
     5d6:	21 f0       	breq	.+8      	; 0x5e0 <Command_Task+0x272>
     5d8:	8f 36       	cpi	r24, 0x6F	; 111
     5da:	81 f4       	brne	.+32     	; 0x5fc <Command_Task+0x28e>
					{
						case 'o':
						case 'O':
							redLedOn();
     5dc:	42 98       	cbi	0x08, 2	; 8
     5de:	0e c0       	rjmp	.+28     	; 0x5fc <Command_Task+0x28e>
							break;

						case 'f':
						case 'F':
							redLedOff();				
     5e0:	42 9a       	sbi	0x08, 2	; 8
     5e2:	0c c0       	rjmp	.+24     	; 0x5fc <Command_Task+0x28e>
			}

			break;

		default:
			Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     5e4:	6d e0       	ldi	r22, 0x0D	; 13
     5e6:	85 e5       	ldi	r24, 0x55	; 85
     5e8:	91 e0       	ldi	r25, 0x01	; 1
     5ea:	06 d2       	rcall	.+1036   	; 0x9f8 <Buffer_StoreElementOnTop>
			Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     5ec:	6a e0       	ldi	r22, 0x0A	; 10
     5ee:	85 e5       	ldi	r24, 0x55	; 85
     5f0:	91 e0       	ldi	r25, 0x01	; 1
     5f2:	02 d2       	rcall	.+1028   	; 0x9f8 <Buffer_StoreElementOnTop>
			Buffer_StoreElementOnTop(&Tx_Buffer, '?');			
     5f4:	6f e3       	ldi	r22, 0x3F	; 63
     5f6:	85 e5       	ldi	r24, 0x55	; 85
     5f8:	91 e0       	ldi	r25, 0x01	; 1
     5fa:	fe d1       	rcall	.+1020   	; 0x9f8 <Buffer_StoreElementOnTop>

	}
	
	if(mode != SERIAL)
     5fc:	80 91 2c 01 	lds	r24, 0x012C
     600:	81 30       	cpi	r24, 0x01	; 1
     602:	79 f0       	breq	.+30     	; 0x622 <Command_Task+0x2b4>
	{
		Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     604:	6d e0       	ldi	r22, 0x0D	; 13
     606:	85 e5       	ldi	r24, 0x55	; 85
     608:	91 e0       	ldi	r25, 0x01	; 1
     60a:	f6 d1       	rcall	.+1004   	; 0x9f8 <Buffer_StoreElementOnTop>
		Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     60c:	6a e0       	ldi	r22, 0x0A	; 10
     60e:	85 e5       	ldi	r24, 0x55	; 85
     610:	91 e0       	ldi	r25, 0x01	; 1
     612:	f2 d1       	rcall	.+996    	; 0x9f8 <Buffer_StoreElementOnTop>
		Buffer_StoreElementOnTop(&Tx_Buffer, '#');
     614:	63 e2       	ldi	r22, 0x23	; 35
     616:	85 e5       	ldi	r24, 0x55	; 85
     618:	91 e0       	ldi	r25, 0x01	; 1
     61a:	ee d1       	rcall	.+988    	; 0x9f8 <Buffer_StoreElementOnTop>
					
		Buffer_Initialize(&Rx_Buffer);//dump any unused data
     61c:	8a ed       	ldi	r24, 0xDA	; 218
     61e:	91 e0       	ldi	r25, 0x01	; 1
     620:	d7 d1       	rcall	.+942    	; 0x9d0 <Buffer_Initialize>
	}

	Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
     622:	61 e0       	ldi	r22, 0x01	; 1
     624:	87 e3       	ldi	r24, 0x37	; 55
     626:	93 e0       	ldi	r25, 0x03	; 3
     628:	22 d5       	rcall	.+2628   	; 0x106e <Scheduler_SetTaskMode>

	Scheduler_SetTaskMode(Command_Task, TASK_STOP);
     62a:	60 e0       	ldi	r22, 0x00	; 0
     62c:	87 eb       	ldi	r24, 0xB7	; 183
     62e:	91 e0       	ldi	r25, 0x01	; 1
     630:	1e d5       	rcall	.+2620   	; 0x106e <Scheduler_SetTaskMode>

}
     632:	64 96       	adiw	r28, 0x14	; 20
     634:	0f b6       	in	r0, 0x3f	; 63
     636:	f8 94       	cli
     638:	de bf       	out	0x3e, r29	; 62
     63a:	0f be       	out	0x3f, r0	; 63
     63c:	cd bf       	out	0x3d, r28	; 61
     63e:	cf 91       	pop	r28
     640:	df 91       	pop	r29
     642:	1f 91       	pop	r17
     644:	0f 91       	pop	r16
     646:	ff 90       	pop	r15
     648:	ef 90       	pop	r14
     64a:	df 90       	pop	r13
     64c:	cf 90       	pop	r12
     64e:	bf 90       	pop	r11
     650:	af 90       	pop	r10
     652:	9f 90       	pop	r9
     654:	08 95       	ret

00000656 <Event_USB_Disconnect>:
	Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);

}

EVENT_HANDLER(USB_Disconnect)
{
     656:	60 e0       	ldi	r22, 0x00	; 0
     658:	87 e3       	ldi	r24, 0x37	; 55
     65a:	93 e0       	ldi	r25, 0x03	; 3
     65c:	08 d5       	rcall	.+2576   	; 0x106e <Scheduler_SetTaskMode>
	/* Stop running CDC and USB management tasks */
	Scheduler_SetTaskMode(CDC_Task, TASK_STOP);
	Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
     65e:	60 e0       	ldi	r22, 0x00	; 0
     660:	80 e2       	ldi	r24, 0x20	; 32
     662:	9b e0       	ldi	r25, 0x0B	; 11

}
     664:	04 c5       	rjmp	.+2568   	; 0x106e <Scheduler_SetTaskMode>

00000666 <Event_USB_Connect>:


}

EVENT_HANDLER(USB_Connect)
{
     666:	61 e0       	ldi	r22, 0x01	; 1
     668:	80 e2       	ldi	r24, 0x20	; 32
     66a:	9b e0       	ldi	r25, 0x0B	; 11
	/* Start USB management task */
	Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);

}
     66c:	00 c5       	rjmp	.+2560   	; 0x106e <Scheduler_SetTaskMode>

0000066e <CDC_Task>:
			break;
	}
}

TASK(CDC_Task)
{
     66e:	0f 93       	push	r16
     670:	1f 93       	push	r17
	uint8_t temp;
	
	if (USB_IsConnected)
     672:	80 91 66 02 	lds	r24, 0x0266
     676:	88 23       	and	r24, r24
     678:	09 f4       	brne	.+2      	; 0x67c <CDC_Task+0xe>
     67a:	de c0       	rjmp	.+444    	; 0x838 <CDC_Task+0x1ca>
	{
		/* Select the Serial Rx Endpoint */
		Endpoint_SelectEndpoint(CDC_RX_EPNUM);
     67c:	84 e0       	ldi	r24, 0x04	; 4
     67e:	80 93 e9 00 	sts	0x00E9, r24

		if (Endpoint_ReadWriteAllowed())
     682:	80 91 e8 00 	lds	r24, 0x00E8
     686:	85 fd       	sbrc	r24, 5
     688:	8e c0       	rjmp	.+284    	; 0x7a6 <CDC_Task+0x138>
     68a:	98 c0       	rjmp	.+304    	; 0x7bc <CDC_Task+0x14e>
		{
			/* Read the recieved data endpoint into the transmission buffer */
			while (Endpoint_BytesInEndpoint())
			{
				if(mode == COMMAND)
     68c:	90 91 2c 01 	lds	r25, 0x012C
     690:	99 23       	and	r25, r25
     692:	71 f5       	brne	.+92     	; 0x6f0 <CDC_Task+0x82>
		/* Inline Functions: */
			/** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints. */
			static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint8_t Endpoint_Read_Byte(void)
			{
				return UEDATX;
     694:	10 91 f1 00 	lds	r17, 0x00F1
				{
					temp =  Endpoint_Read_Byte();

					Buffer_StoreElementOnTop(&Tx_Buffer, temp);//echo the character back
     698:	61 2f       	mov	r22, r17
     69a:	85 e5       	ldi	r24, 0x55	; 85
     69c:	91 e0       	ldi	r25, 0x01	; 1
     69e:	ac d1       	rcall	.+856    	; 0x9f8 <Buffer_StoreElementOnTop>
					Buffer_StoreElementOnTop(&Rx_Buffer, temp);//save it to our buffer
     6a0:	61 2f       	mov	r22, r17
     6a2:	8a ed       	ldi	r24, 0xDA	; 218
     6a4:	91 e0       	ldi	r25, 0x01	; 1
     6a6:	a8 d1       	rcall	.+848    	; 0x9f8 <Buffer_StoreElementOnTop>

					if(temp == '\b')
     6a8:	18 30       	cpi	r17, 0x08	; 8
     6aa:	79 f4       	brne	.+30     	; 0x6ca <CDC_Task+0x5c>
					{
						Buffer_StoreElementOnTop(&Tx_Buffer, ' ');//clear the mistake
     6ac:	60 e2       	ldi	r22, 0x20	; 32
     6ae:	85 e5       	ldi	r24, 0x55	; 85
     6b0:	91 e0       	ldi	r25, 0x01	; 1
     6b2:	a2 d1       	rcall	.+836    	; 0x9f8 <Buffer_StoreElementOnTop>
						Buffer_StoreElementOnTop(&Tx_Buffer, '\b');
     6b4:	68 e0       	ldi	r22, 0x08	; 8
     6b6:	85 e5       	ldi	r24, 0x55	; 85
     6b8:	91 e0       	ldi	r25, 0x01	; 1
     6ba:	9e d1       	rcall	.+828    	; 0x9f8 <Buffer_StoreElementOnTop>
					
						Buffer_GetElementFromTop(&Rx_Buffer);//remove the \b and the character sent from our buffer
     6bc:	8a ed       	ldi	r24, 0xDA	; 218
     6be:	91 e0       	ldi	r25, 0x01	; 1
     6c0:	d2 d1       	rcall	.+932    	; 0xa66 <Buffer_GetElementFromTop>
						Buffer_GetElementFromTop(&Rx_Buffer);
     6c2:	8a ed       	ldi	r24, 0xDA	; 218
     6c4:	91 e0       	ldi	r25, 0x01	; 1
     6c6:	cf d1       	rcall	.+926    	; 0xa66 <Buffer_GetElementFromTop>
     6c8:	6f c0       	rjmp	.+222    	; 0x7a8 <CDC_Task+0x13a>
					}
					else if(temp == '\r')
     6ca:	1d 30       	cpi	r17, 0x0D	; 13
     6cc:	09 f0       	breq	.+2      	; 0x6d0 <CDC_Task+0x62>
     6ce:	6c c0       	rjmp	.+216    	; 0x7a8 <CDC_Task+0x13a>
					{
						Buffer_StoreElementOnTop(&Tx_Buffer, '\n');//ensure \r\n is sent back
     6d0:	6a e0       	ldi	r22, 0x0A	; 10
     6d2:	85 e5       	ldi	r24, 0x55	; 85
     6d4:	91 e0       	ldi	r25, 0x01	; 1
     6d6:	90 d1       	rcall	.+800    	; 0x9f8 <Buffer_StoreElementOnTop>
						Buffer_GetElementFromTop(&Rx_Buffer);//remove the \r
     6d8:	8a ed       	ldi	r24, 0xDA	; 218
     6da:	91 e0       	ldi	r25, 0x01	; 1
     6dc:	c4 d1       	rcall	.+904    	; 0xa66 <Buffer_GetElementFromTop>

					
						Scheduler_SetTaskMode(CDC_Task, TASK_STOP);//stop it for a while
     6de:	60 e0       	ldi	r22, 0x00	; 0
     6e0:	87 e3       	ldi	r24, 0x37	; 55
     6e2:	93 e0       	ldi	r25, 0x03	; 3
     6e4:	c4 d4       	rcall	.+2440   	; 0x106e <Scheduler_SetTaskMode>


						Scheduler_SetTaskMode(Command_Task, TASK_RUN);//process the data
     6e6:	61 e0       	ldi	r22, 0x01	; 1
     6e8:	87 eb       	ldi	r24, 0xB7	; 183
     6ea:	91 e0       	ldi	r25, 0x01	; 1
     6ec:	c0 d4       	rcall	.+2432   	; 0x106e <Scheduler_SetTaskMode>
     6ee:	61 c0       	rjmp	.+194    	; 0x7b2 <CDC_Task+0x144>

						break;//don't care about any other data
					}
				}
				else if(mode == SERIAL)
     6f0:	91 30       	cpi	r25, 0x01	; 1
     6f2:	09 f0       	breq	.+2      	; 0x6f6 <CDC_Task+0x88>
     6f4:	59 c0       	rjmp	.+178    	; 0x7a8 <CDC_Task+0x13a>
     6f6:	10 91 f1 00 	lds	r17, 0x00F1
				{
					temp = Endpoint_Read_Byte();
					if(temp == '\\')
     6fa:	1c 35       	cpi	r17, 0x5C	; 92
     6fc:	79 f4       	brne	.+30     	; 0x71c <CDC_Task+0xae>
					{
						if (escapeCharReceived == true)
     6fe:	80 91 27 01 	lds	r24, 0x0127
     702:	88 23       	and	r24, r24
     704:	41 f0       	breq	.+16     	; 0x716 <CDC_Task+0xa8>
						{

							escapeCharReceived = false;
     706:	10 92 27 01 	sts	0x0127, r1
							Buffer_StoreElementOnTop(&Rx_Buffer, '\\');//pass on the old one
     70a:	6c e5       	ldi	r22, 0x5C	; 92
     70c:	8a ed       	ldi	r24, 0xDA	; 218
     70e:	91 e0       	ldi	r25, 0x01	; 1
     710:	73 d1       	rcall	.+742    	; 0x9f8 <Buffer_StoreElementOnTop>
							Buffer_StoreElementOnTop(&Rx_Buffer, temp);//pass on the new one
     712:	6c e5       	ldi	r22, 0x5C	; 92
     714:	44 c0       	rjmp	.+136    	; 0x79e <CDC_Task+0x130>
						}
						else
						{
							escapeCharReceived = true;
     716:	90 93 27 01 	sts	0x0127, r25
     71a:	46 c0       	rjmp	.+140    	; 0x7a8 <CDC_Task+0x13a>
						}
					}
					else if( escapeCharReceived == true)
     71c:	80 91 27 01 	lds	r24, 0x0127
     720:	88 23       	and	r24, r24
     722:	09 f4       	brne	.+2      	; 0x726 <CDC_Task+0xb8>
     724:	3b c0       	rjmp	.+118    	; 0x79c <CDC_Task+0x12e>
					{
					
						if(temp == 'c' || temp == 'C')
     726:	13 36       	cpi	r17, 0x63	; 99
     728:	11 f0       	breq	.+4      	; 0x72e <CDC_Task+0xc0>
     72a:	13 34       	cpi	r17, 0x43	; 67
     72c:	61 f5       	brne	.+88     	; 0x786 <CDC_Task+0x118>
						{
							/* Initiate the transmission of the buffer contents if USART idle */
							if (Transmitting == false && Rx_Buffer.Elements != 0)
     72e:	80 91 26 01 	lds	r24, 0x0126
     732:	88 23       	and	r24, r24
     734:	81 f4       	brne	.+32     	; 0x756 <CDC_Task+0xe8>
     736:	80 91 5e 02 	lds	r24, 0x025E
     73a:	88 23       	and	r24, r24
     73c:	61 f0       	breq	.+24     	; 0x756 <CDC_Task+0xe8>
							{
								Transmitting = true;
     73e:	00 93 26 01 	sts	0x0126, r16
								Serial_TxByte(Buffer_GetElementFromBottom(&Rx_Buffer));
     742:	8a ed       	ldi	r24, 0xDA	; 218
     744:	91 e0       	ldi	r25, 0x01	; 1
     746:	bc d1       	rcall	.+888    	; 0xac0 <Buffer_GetElementFromBottom>
     748:	98 2f       	mov	r25, r24
			 *
			 *  \param DataByte  Byte to transmit through the USART
			 */
			static inline void Serial_TxByte(const char DataByte)
			{
				while (!(UCSR1A & (1 << UDRE1)));
     74a:	80 91 c8 00 	lds	r24, 0x00C8
     74e:	85 ff       	sbrs	r24, 5
     750:	fc cf       	rjmp	.-8      	; 0x74a <CDC_Task+0xdc>
				UDR1 = DataByte;
     752:	90 93 ce 00 	sts	0x00CE, r25
							}
							while(Transmitting == true)//wait until we finish
     756:	80 91 26 01 	lds	r24, 0x0126
     75a:	88 23       	and	r24, r24
     75c:	e1 f7       	brne	.-8      	; 0x756 <CDC_Task+0xe8>
							{
								;
							}
							mode = COMMAND;
     75e:	10 92 2c 01 	sts	0x012C, r1
							Buffer_Initialize(&Rx_Buffer);//clear out all data
     762:	8a ed       	ldi	r24, 0xDA	; 218
     764:	91 e0       	ldi	r25, 0x01	; 1
     766:	34 d1       	rcall	.+616    	; 0x9d0 <Buffer_Initialize>
							Buffer_Initialize(&Tx_Buffer);
     768:	85 e5       	ldi	r24, 0x55	; 85
     76a:	91 e0       	ldi	r25, 0x01	; 1
     76c:	31 d1       	rcall	.+610    	; 0x9d0 <Buffer_Initialize>

							Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     76e:	6d e0       	ldi	r22, 0x0D	; 13
     770:	85 e5       	ldi	r24, 0x55	; 85
     772:	91 e0       	ldi	r25, 0x01	; 1
     774:	41 d1       	rcall	.+642    	; 0x9f8 <Buffer_StoreElementOnTop>
							Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     776:	6a e0       	ldi	r22, 0x0A	; 10
     778:	85 e5       	ldi	r24, 0x55	; 85
     77a:	91 e0       	ldi	r25, 0x01	; 1
     77c:	3d d1       	rcall	.+634    	; 0x9f8 <Buffer_StoreElementOnTop>
							Buffer_StoreElementOnTop(&Tx_Buffer, '#');
     77e:	63 e2       	ldi	r22, 0x23	; 35
     780:	85 e5       	ldi	r24, 0x55	; 85
     782:	91 e0       	ldi	r25, 0x01	; 1
     784:	07 c0       	rjmp	.+14     	; 0x794 <CDC_Task+0x126>

						}
						else
						{
							Buffer_StoreElementOnTop(&Rx_Buffer, '\\');//pass on all the data
     786:	6c e5       	ldi	r22, 0x5C	; 92
     788:	8a ed       	ldi	r24, 0xDA	; 218
     78a:	91 e0       	ldi	r25, 0x01	; 1
     78c:	35 d1       	rcall	.+618    	; 0x9f8 <Buffer_StoreElementOnTop>
							Buffer_StoreElementOnTop(&Rx_Buffer, temp);
     78e:	61 2f       	mov	r22, r17
     790:	8a ed       	ldi	r24, 0xDA	; 218
     792:	91 e0       	ldi	r25, 0x01	; 1
     794:	31 d1       	rcall	.+610    	; 0x9f8 <Buffer_StoreElementOnTop>
						}

						escapeCharReceived = false;
     796:	10 92 27 01 	sts	0x0127, r1
     79a:	06 c0       	rjmp	.+12     	; 0x7a8 <CDC_Task+0x13a>
					}
					else
					{
						Buffer_StoreElementOnTop(&Rx_Buffer, temp);
     79c:	61 2f       	mov	r22, r17
     79e:	8a ed       	ldi	r24, 0xDA	; 218
     7a0:	91 e0       	ldi	r25, 0x01	; 1
     7a2:	2a d1       	rcall	.+596    	; 0x9f8 <Buffer_StoreElementOnTop>
     7a4:	01 c0       	rjmp	.+2      	; 0x7a8 <CDC_Task+0x13a>
						if(temp == 'c' || temp == 'C')
						{
							/* Initiate the transmission of the buffer contents if USART idle */
							if (Transmitting == false && Rx_Buffer.Elements != 0)
							{
								Transmitting = true;
     7a6:	01 e0       	ldi	r16, 0x01	; 1
		Endpoint_SelectEndpoint(CDC_RX_EPNUM);

		if (Endpoint_ReadWriteAllowed())
		{
			/* Read the recieved data endpoint into the transmission buffer */
			while (Endpoint_BytesInEndpoint())
     7a8:	80 91 f2 00 	lds	r24, 0x00F2
     7ac:	88 23       	and	r24, r24
     7ae:	09 f0       	breq	.+2      	; 0x7b2 <CDC_Task+0x144>
     7b0:	6d cf       	rjmp	.-294    	; 0x68c <CDC_Task+0x1e>
					}	
				}
			}

			/* Clear the endpoint buffer */
			Endpoint_ClearCurrentBank();
     7b2:	80 91 e8 00 	lds	r24, 0x00E8
     7b6:	8f 77       	andi	r24, 0x7F	; 127
     7b8:	80 93 e8 00 	sts	0x00E8, r24
		}
		

		/* Select the Serial Tx Endpoint */
		Endpoint_SelectEndpoint(CDC_TX_EPNUM);
     7bc:	83 e0       	ldi	r24, 0x03	; 3
     7be:	80 93 e9 00 	sts	0x00E9, r24

		/* Initiate the transmission of the buffer contents if USART idle */
		if (Transmitting == false && mode == SERIAL && Rx_Buffer.Elements != 0)
     7c2:	80 91 26 01 	lds	r24, 0x0126
     7c6:	88 23       	and	r24, r24
     7c8:	a1 f4       	brne	.+40     	; 0x7f2 <CDC_Task+0x184>
     7ca:	90 91 2c 01 	lds	r25, 0x012C
     7ce:	91 30       	cpi	r25, 0x01	; 1
     7d0:	81 f4       	brne	.+32     	; 0x7f2 <CDC_Task+0x184>
     7d2:	80 91 5e 02 	lds	r24, 0x025E
     7d6:	88 23       	and	r24, r24
     7d8:	61 f0       	breq	.+24     	; 0x7f2 <CDC_Task+0x184>
		{
				Transmitting = true;
     7da:	90 93 26 01 	sts	0x0126, r25
				Serial_TxByte(Buffer_GetElementFromBottom(&Rx_Buffer));
     7de:	8a ed       	ldi	r24, 0xDA	; 218
     7e0:	91 e0       	ldi	r25, 0x01	; 1
     7e2:	6e d1       	rcall	.+732    	; 0xac0 <Buffer_GetElementFromBottom>
     7e4:	98 2f       	mov	r25, r24
			 *
			 *  \param DataByte  Byte to transmit through the USART
			 */
			static inline void Serial_TxByte(const char DataByte)
			{
				while (!(UCSR1A & (1 << UDRE1)));
     7e6:	80 91 c8 00 	lds	r24, 0x00C8
     7ea:	85 ff       	sbrs	r24, 5
     7ec:	fc cf       	rjmp	.-8      	; 0x7e6 <CDC_Task+0x178>
				UDR1 = DataByte;
     7ee:	90 93 ce 00 	sts	0x00CE, r25
		}


		/* Write the Data to the Endpoint */
		if(Tx_Buffer.Elements != 0)
     7f2:	80 91 d9 01 	lds	r24, 0x01D9
     7f6:	88 23       	and	r24, r24
     7f8:	f9 f0       	breq	.+62     	; 0x838 <CDC_Task+0x1ca>
		{

			do{
				/* Wait until Serial Tx Endpoint Ready for Read/Write */
				while (!(Endpoint_ReadWriteAllowed()));
     7fa:	80 91 e8 00 	lds	r24, 0x00E8
     7fe:	85 ff       	sbrs	r24, 5
     800:	fc cf       	rjmp	.-8      	; 0x7fa <CDC_Task+0x18c>

				Endpoint_Write_Byte(Buffer_GetElementFromBottom(&Tx_Buffer));
     802:	85 e5       	ldi	r24, 0x55	; 85
     804:	91 e0       	ldi	r25, 0x01	; 1
     806:	5c d1       	rcall	.+696    	; 0xac0 <Buffer_GetElementFromBottom>
			}

			/** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints. */
			static inline void Endpoint_Write_Byte(const uint8_t Byte)
			{
				UEDATX = Byte;
     808:	80 93 f1 00 	sts	0x00F1, r24

				/* Check if the endpoint is full */
				if (Endpoint_BytesInEndpoint() == CDC_TXRX_EPSIZE)
     80c:	80 91 f2 00 	lds	r24, 0x00F2
     810:	80 31       	cpi	r24, 0x10	; 16
     812:	49 f4       	brne	.+18     	; 0x826 <CDC_Task+0x1b8>
				{
					/* Send the data */
					Endpoint_ClearCurrentBank();
     814:	80 91 e8 00 	lds	r24, 0x00E8
     818:	8f 77       	andi	r24, 0x7F	; 127
     81a:	80 93 e8 00 	sts	0x00E8, r24

					/* Wait until Serial Tx Endpoint Ready for Read/Write */
					while (!(Endpoint_ReadWriteAllowed()));
     81e:	80 91 e8 00 	lds	r24, 0x00E8
     822:	85 ff       	sbrs	r24, 5
     824:	fc cf       	rjmp	.-8      	; 0x81e <CDC_Task+0x1b0>
				}
			}while (Tx_Buffer.Elements != 0);
     826:	80 91 d9 01 	lds	r24, 0x01D9
     82a:	88 23       	and	r24, r24
     82c:	31 f7       	brne	.-52     	; 0x7fa <CDC_Task+0x18c>

			/* Send the last packet of the transfer to the host */
			Endpoint_ClearCurrentBank();
     82e:	80 91 e8 00 	lds	r24, 0x00E8
     832:	8f 77       	andi	r24, 0x7F	; 127
     834:	80 93 e8 00 	sts	0x00E8, r24

		}
	}
}
     838:	1f 91       	pop	r17
     83a:	0f 91       	pop	r16
     83c:	08 95       	ret

0000083e <Event_USB_UnhandledControlPacket>:
	/* Start CDC task */
	Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
}

EVENT_HANDLER(USB_UnhandledControlPacket)
{
     83e:	81 32       	cpi	r24, 0x21	; 33
     840:	29 f0       	breq	.+10     	; 0x84c <Event_USB_UnhandledControlPacket+0xe>
     842:	82 32       	cpi	r24, 0x22	; 34
     844:	39 f1       	breq	.+78     	; 0x894 <Event_USB_UnhandledControlPacket+0x56>
     846:	80 32       	cpi	r24, 0x20	; 32
     848:	c9 f5       	brne	.+114    	; 0x8bc <Event_USB_UnhandledControlPacket+0x7e>
     84a:	12 c0       	rjmp	.+36     	; 0x870 <Event_USB_UnhandledControlPacket+0x32>

	/* Process CDC specific control requests */
	switch (bRequest)
	{
		case GET_LINE_CODING:
			if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
     84c:	61 3a       	cpi	r22, 0xA1	; 161
     84e:	b1 f5       	brne	.+108    	; 0x8bc <Event_USB_UnhandledControlPacket+0x7e>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
     850:	80 91 e8 00 	lds	r24, 0x00E8
     854:	87 7f       	andi	r24, 0xF7	; 247
     856:	80 93 e8 00 	sts	0x00E8, r24

				/* Write the line coding data to the control endpoint */
				Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(LineCoding));
     85a:	67 e0       	ldi	r22, 0x07	; 7
     85c:	70 e0       	ldi	r23, 0x00	; 0
     85e:	8c e0       	ldi	r24, 0x0C	; 12
     860:	91 e0       	ldi	r25, 0x01	; 1
     862:	b7 d4       	rcall	.+2414   	; 0x11d2 <Endpoint_Write_Control_Stream_LE>

				/* Send the line coding data to the host and clear the control endpoint */
				Endpoint_ClearSetupOUT();
     864:	80 91 e8 00 	lds	r24, 0x00E8
     868:	8b 7f       	andi	r24, 0xFB	; 251
     86a:	80 93 e8 00 	sts	0x00E8, r24
     86e:	08 95       	ret
			}

			break;
		case SET_LINE_CODING:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
     870:	61 32       	cpi	r22, 0x21	; 33
     872:	21 f5       	brne	.+72     	; 0x8bc <Event_USB_UnhandledControlPacket+0x7e>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
     874:	80 91 e8 00 	lds	r24, 0x00E8
     878:	87 7f       	andi	r24, 0xF7	; 247
     87a:	80 93 e8 00 	sts	0x00E8, r24

				/* Read the line coding data in from the host into the global struct */
				Endpoint_Read_Control_Stream_LE(LineCodingData, sizeof(LineCoding));
     87e:	67 e0       	ldi	r22, 0x07	; 7
     880:	70 e0       	ldi	r23, 0x00	; 0
     882:	8c e0       	ldi	r24, 0x0C	; 12
     884:	91 e0       	ldi	r25, 0x01	; 1
     886:	e9 d4       	rcall	.+2514   	; 0x125a <Endpoint_Read_Control_Stream_LE>

				/* Send the line coding data to the host and clear the control endpoint */
				Endpoint_ClearSetupIN();
     888:	80 91 e8 00 	lds	r24, 0x00E8
     88c:	8e 7f       	andi	r24, 0xFE	; 254
     88e:	80 93 e8 00 	sts	0x00E8, r24

				/* Reconfigure the USART with the new settings */
				ReconfigureUSART();
     892:	5d cc       	rjmp	.-1862   	; 0x14e <ReconfigureUSART>
			}

			break;
		case SET_CONTROL_LINE_STATE:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
     894:	61 32       	cpi	r22, 0x21	; 33
     896:	91 f4       	brne	.+36     	; 0x8bc <Event_USB_UnhandledControlPacket+0x7e>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
     898:	80 91 e8 00 	lds	r24, 0x00E8
     89c:	87 7f       	andi	r24, 0xF7	; 247
     89e:	80 93 e8 00 	sts	0x00E8, r24

				/* Send an empty packet to acknowedge the command (currently unused) */
				Endpoint_ClearSetupIN();
     8a2:	80 91 e8 00 	lds	r24, 0x00E8
     8a6:	8e 7f       	andi	r24, 0xFE	; 254
     8a8:	80 93 e8 00 	sts	0x00E8, r24
				if(mode == COMMAND)
     8ac:	80 91 2c 01 	lds	r24, 0x012C
     8b0:	88 23       	and	r24, r24
     8b2:	21 f4       	brne	.+8      	; 0x8bc <Event_USB_UnhandledControlPacket+0x7e>
				{
					Buffer_StoreElementOnTop(&Tx_Buffer, '#');//prompt character
     8b4:	63 e2       	ldi	r22, 0x23	; 35
     8b6:	85 e5       	ldi	r24, 0x55	; 85
     8b8:	91 e0       	ldi	r25, 0x01	; 1
     8ba:	9e c0       	rjmp	.+316    	; 0x9f8 <Buffer_StoreElementOnTop>
     8bc:	08 95       	ret

000008be <Event_USB_ConfigurationChanged>:
	Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);

}

EVENT_HANDLER(USB_ConfigurationChanged)
{
     8be:	20 e0       	ldi	r18, 0x00	; 0
     8c0:	41 ec       	ldi	r20, 0xC1	; 193
     8c2:	68 e0       	ldi	r22, 0x08	; 8
     8c4:	70 e0       	ldi	r23, 0x00	; 0
     8c6:	82 e0       	ldi	r24, 0x02	; 2
     8c8:	5d d4       	rcall	.+2234   	; 0x1184 <Endpoint_ConfigureEndpoint_P>
	/* Setup CDC Notification, Rx and Tx Endpoints */
	Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPNUM, EP_TYPE_INTERRUPT,
		                       ENDPOINT_DIR_IN, CDC_NOTIFICATION_EPSIZE,
	                           ENDPOINT_BANK_SINGLE);

	Endpoint_ConfigureEndpoint(CDC_TX_EPNUM, EP_TYPE_BULK,
     8ca:	24 e0       	ldi	r18, 0x04	; 4
     8cc:	41 e8       	ldi	r20, 0x81	; 129
     8ce:	60 e1       	ldi	r22, 0x10	; 16
     8d0:	70 e0       	ldi	r23, 0x00	; 0
     8d2:	83 e0       	ldi	r24, 0x03	; 3
     8d4:	57 d4       	rcall	.+2222   	; 0x1184 <Endpoint_ConfigureEndpoint_P>
		                       ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,
	                           ENDPOINT_BANK_DOUBLE);

	Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,
     8d6:	24 e0       	ldi	r18, 0x04	; 4
     8d8:	40 e8       	ldi	r20, 0x80	; 128
     8da:	60 e1       	ldi	r22, 0x10	; 16
     8dc:	70 e0       	ldi	r23, 0x00	; 0
     8de:	84 e0       	ldi	r24, 0x04	; 4
     8e0:	51 d4       	rcall	.+2210   	; 0x1184 <Endpoint_ConfigureEndpoint_P>
		                       ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,
	                           ENDPOINT_BANK_DOUBLE);


	/* Start CDC task */
	Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
     8e2:	61 e0       	ldi	r22, 0x01	; 1
     8e4:	87 e3       	ldi	r24, 0x37	; 55
     8e6:	93 e0       	ldi	r25, 0x03	; 3
}
     8e8:	c2 c3       	rjmp	.+1924   	; 0x106e <Scheduler_SetTaskMode>

000008ea <main>:


void (*bootloader) (void)=(void (*)(void))(0x1800);

int main(void)
{
     8ea:	1f 93       	push	r17
     8ec:	cf 93       	push	r28
     8ee:	df 93       	push	r29
	
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
     8f0:	84 b7       	in	r24, 0x34	; 52
     8f2:	87 7f       	andi	r24, 0xF7	; 247
     8f4:	84 bf       	out	0x34, r24	; 52
	wdt_disable();
     8f6:	88 e1       	ldi	r24, 0x18	; 24
     8f8:	0f b6       	in	r0, 0x3f	; 63
     8fa:	f8 94       	cli
     8fc:	80 93 60 00 	sts	0x0060, r24
     900:	10 92 60 00 	sts	0x0060, r1
     904:	0f be       	out	0x3f, r0	; 63
			 *  \param PrescalerMask   The mask of the new prescaler setting for CLKPR
			 */
			static inline void SetSystemClockPrescaler(uint8_t PrescalerMask)
			{
					uint8_t tmp = (1 << CLKPCE);
					__asm__ __volatile__ (
     906:	91 e0       	ldi	r25, 0x01	; 1
     908:	80 e8       	ldi	r24, 0x80	; 128
     90a:	0f b6       	in	r0, 0x3f	; 63
     90c:	f8 94       	cli
     90e:	80 93 61 00 	sts	0x0061, r24
     912:	90 93 61 00 	sts	0x0061, r25
     916:	0f be       	out	0x3f, r0	; 63

	/* Divide the 16Mhz crystal clock to 8Mhz to allow for 3.3V operation*/
	SetSystemClockPrescaler(1);

	I2C_Init();
     918:	2c d1       	rcall	.+600    	; 0xb72 <I2C_Init>
	StepDirLineCoding_Init();
     91a:	cb d2       	rcall	.+1430   	; 0xeb2 <StepDirLineCoding_Init>

	greenLedOff();//this may interfere with the above
     91c:	2d 9a       	sbi	0x05, 5	; 5
	redLedOff();
     91e:	42 9a       	sbi	0x08, 2	; 8

	DDRC |= (1<<2);
     920:	3a 9a       	sbi	0x07, 2	; 7
	DDRB |= (1<<5);
     922:	25 9a       	sbi	0x04, 5	; 4


	/* Ringbuffer Initialization */
	Buffer_Initialize(&Rx_Buffer);
     924:	8a ed       	ldi	r24, 0xDA	; 218
     926:	91 e0       	ldi	r25, 0x01	; 1
     928:	53 d0       	rcall	.+166    	; 0x9d0 <Buffer_Initialize>
	Buffer_Initialize(&Tx_Buffer);
     92a:	85 e5       	ldi	r24, 0x55	; 85
     92c:	91 e0       	ldi	r25, 0x01	; 1
     92e:	50 d0       	rcall	.+160    	; 0x9d0 <Buffer_Initialize>
			#define MAX_DELAYCTR_COUNT                0xFFFF

		/* Inline Functions: */
			static inline void Scheduler_InitScheduler(const uint8_t TotalTasks)
			{
				Scheduler_TotalTasks = TotalTasks;
     930:	13 e0       	ldi	r17, 0x03	; 3
     932:	10 93 5f 02 	sts	0x025F, r17

	/* Initialize Scheduler so that it can be used */
	Scheduler_Init();

	/* Initialize USB Subsystem */
	USB_Init();
     936:	1b d4       	rcall	.+2102   	; 0x116e <USB_Init>
     938:	10 93 5f 02 	sts	0x025F, r17
     93c:	c0 e0       	ldi	r28, 0x00	; 0
     93e:	d1 e0       	ldi	r29, 0x01	; 1
     940:	07 c0       	rjmp	.+14     	; 0x950 <main+0x66>
				{
					TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
					while (CurrTask != &Scheduler_TaskList[TotalTasks])
					{
						if (CurrTask->TaskStatus == TASK_RUN)
     942:	8a 81       	ldd	r24, Y+2	; 0x02
     944:	88 23       	and	r24, r24
     946:	19 f0       	breq	.+6      	; 0x94e <main+0x64>
						  CurrTask->Task();
     948:	e8 81       	ld	r30, Y
     94a:	f9 81       	ldd	r31, Y+1	; 0x01
     94c:	09 95       	icall

						CurrTask++;
     94e:	24 96       	adiw	r28, 0x04	; 4

				for (;;)
				{
					TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
					while (CurrTask != &Scheduler_TaskList[TotalTasks])
     950:	81 e0       	ldi	r24, 0x01	; 1
     952:	cc 30       	cpi	r28, 0x0C	; 12
     954:	d8 07       	cpc	r29, r24
     956:	a9 f7       	brne	.-22     	; 0x942 <main+0x58>
     958:	2c 97       	sbiw	r28, 0x0c	; 12
     95a:	fa cf       	rjmp	.-12     	; 0x950 <main+0x66>

0000095c <USB_GetDescriptor>:
	UnicodeString:          L"MyUSB USB-RS232 Demo"
};

bool USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex,
                       void** const DescriptorAddress, uint16_t* const DescriptorSize)
{
     95c:	cf 93       	push	r28
     95e:	df 93       	push	r29
     960:	da 01       	movw	r26, r20
     962:	e9 01       	movw	r28, r18
	void*    Address = NULL;
	uint16_t Size    = 0;

	switch (wValue >> 8)
     964:	29 2f       	mov	r18, r25
     966:	33 27       	eor	r19, r19
     968:	22 30       	cpi	r18, 0x02	; 2
     96a:	31 05       	cpc	r19, r1
     96c:	39 f0       	breq	.+14     	; 0x97c <USB_GetDescriptor+0x20>
     96e:	23 30       	cpi	r18, 0x03	; 3
     970:	31 05       	cpc	r19, r1
     972:	49 f0       	breq	.+18     	; 0x986 <USB_GetDescriptor+0x2a>
     974:	21 30       	cpi	r18, 0x01	; 1
     976:	31 05       	cpc	r19, r1
     978:	e9 f4       	brne	.+58     	; 0x9b4 <USB_GetDescriptor+0x58>
     97a:	20 c0       	rjmp	.+64     	; 0x9bc <USB_GetDescriptor+0x60>
     97c:	e6 e8       	ldi	r30, 0x86	; 134
     97e:	f0 e0       	ldi	r31, 0x00	; 0
     980:	83 e4       	ldi	r24, 0x43	; 67
     982:	90 e0       	ldi	r25, 0x00	; 0
     984:	1f c0       	rjmp	.+62     	; 0x9c4 <USB_GetDescriptor+0x68>
		case DTYPE_Configuration:
			Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
			Size    = sizeof(USB_Descriptor_Configuration_t);
			break;
		case DTYPE_String:
			switch (wValue & 0xFF)
     986:	90 70       	andi	r25, 0x00	; 0
     988:	81 30       	cpi	r24, 0x01	; 1
     98a:	91 05       	cpc	r25, r1
     98c:	51 f0       	breq	.+20     	; 0x9a2 <USB_GetDescriptor+0x46>
     98e:	81 30       	cpi	r24, 0x01	; 1
     990:	91 05       	cpc	r25, r1
     992:	18 f0       	brcs	.+6      	; 0x99a <USB_GetDescriptor+0x3e>
     994:	02 97       	sbiw	r24, 0x02	; 2
     996:	71 f4       	brne	.+28     	; 0x9b4 <USB_GetDescriptor+0x58>
     998:	08 c0       	rjmp	.+16     	; 0x9aa <USB_GetDescriptor+0x4e>
			{
				case 0x00:
					Address = DESCRIPTOR_ADDRESS(LanguageString);
					Size    = pgm_read_byte(&LanguageString.Header.Size);
     99a:	e9 ec       	ldi	r30, 0xC9	; 201
     99c:	f0 e0       	ldi	r31, 0x00	; 0
     99e:	84 91       	lpm	r24, Z+
     9a0:	07 c0       	rjmp	.+14     	; 0x9b0 <USB_GetDescriptor+0x54>
					break;
				case 0x01:
					Address = DESCRIPTOR_ADDRESS(ManufacturerString);
					Size    = pgm_read_byte(&ManufacturerString.Header.Size);
     9a2:	ed ec       	ldi	r30, 0xCD	; 205
     9a4:	f0 e0       	ldi	r31, 0x00	; 0
     9a6:	84 91       	lpm	r24, Z+
     9a8:	03 c0       	rjmp	.+6      	; 0x9b0 <USB_GetDescriptor+0x54>
					break;
				case 0x02:
					Address = DESCRIPTOR_ADDRESS(ProductString);
					Size    = pgm_read_byte(&ProductString.Header.Size);
     9aa:	e7 ee       	ldi	r30, 0xE7	; 231
     9ac:	f0 e0       	ldi	r31, 0x00	; 0
     9ae:	84 91       	lpm	r24, Z+
     9b0:	90 e0       	ldi	r25, 0x00	; 0
     9b2:	08 c0       	rjmp	.+16     	; 0x9c4 <USB_GetDescriptor+0x68>
     9b4:	80 e0       	ldi	r24, 0x00	; 0

		return true;
	}
		
	return false;
}
     9b6:	df 91       	pop	r29
     9b8:	cf 91       	pop	r28
     9ba:	08 95       	ret
					Address = DESCRIPTOR_ADDRESS(ManufacturerString);
					Size    = pgm_read_byte(&ManufacturerString.Header.Size);
					break;
				case 0x02:
					Address = DESCRIPTOR_ADDRESS(ProductString);
					Size    = pgm_read_byte(&ProductString.Header.Size);
     9bc:	e4 e7       	ldi	r30, 0x74	; 116
     9be:	f0 e0       	ldi	r31, 0x00	; 0
     9c0:	82 e1       	ldi	r24, 0x12	; 18
     9c2:	90 e0       	ldi	r25, 0x00	; 0
			break;
	}
	
	if (Address != NULL)
	{
		*DescriptorAddress = Address;
     9c4:	ed 93       	st	X+, r30
     9c6:	fc 93       	st	X, r31
		*DescriptorSize    = Size;
     9c8:	99 83       	std	Y+1, r25	; 0x01
     9ca:	88 83       	st	Y, r24
     9cc:	81 e0       	ldi	r24, 0x01	; 1
     9ce:	f3 cf       	rjmp	.-26     	; 0x9b6 <USB_GetDescriptor+0x5a>

000009d0 <Buffer_Initialize>:
*/

#include "RingBuff.h"

void Buffer_Initialize(RingBuff_t* Buffer)
{
     9d0:	fc 01       	movw	r30, r24
	BUFF_ATOMIC_BLOCK
     9d2:	8f b7       	in	r24, 0x3f	; 63
    return 1;
}

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     9d4:	f8 94       	cli
	{
		Buffer->TopPtr    = (RingBuff_Data_t*)&Buffer->Buffer;
     9d6:	df 01       	movw	r26, r30
     9d8:	a0 58       	subi	r26, 0x80	; 128
     9da:	bf 4f       	sbci	r27, 0xFF	; 255
     9dc:	11 96       	adiw	r26, 0x01	; 1
     9de:	fc 93       	st	X, r31
     9e0:	ee 93       	st	-X, r30
		Buffer->BottomPtr   = (RingBuff_Data_t*)&Buffer->Buffer;
     9e2:	df 01       	movw	r26, r30
     9e4:	ae 57       	subi	r26, 0x7E	; 126
     9e6:	bf 4f       	sbci	r27, 0xFF	; 255
     9e8:	11 96       	adiw	r26, 0x01	; 1
     9ea:	fc 93       	st	X, r31
     9ec:	ee 93       	st	-X, r30
		Buffer->Elements = 0;
     9ee:	ec 57       	subi	r30, 0x7C	; 124
     9f0:	ff 4f       	sbci	r31, 0xFF	; 255
     9f2:	10 82       	st	Z, r1
    (void)__s;
}

static __inline__ void __iRestore(const  uint8_t *__s)
{
    SREG = *__s;
     9f4:	8f bf       	out	0x3f, r24	; 63
    __asm__ volatile ("" ::: "memory");
     9f6:	08 95       	ret

000009f8 <Buffer_StoreElementOnTop>:
	}
}

void Buffer_StoreElementOnTop(RingBuff_t* Buffer, RingBuff_Data_t Data)
{
     9f8:	ac 01       	movw	r20, r24
	BUFF_ATOMIC_BLOCK
     9fa:	7f b7       	in	r23, 0x3f	; 63
    return 1;
}

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     9fc:	f8 94       	cli
	{
		if (Buffer->Elements == BUFF_LENGTH)//i.e. buffer is full.  So we will remove our oldest data
     9fe:	fc 01       	movw	r30, r24
     a00:	ec 57       	subi	r30, 0x7C	; 124
     a02:	ff 4f       	sbci	r31, 0xFF	; 255
     a04:	80 81       	ld	r24, Z
     a06:	80 38       	cpi	r24, 0x80	; 128
     a08:	99 f4       	brne	.+38     	; 0xa30 <Buffer_StoreElementOnTop+0x38>
		{
			Buffer->BottomPtr++;
     a0a:	fa 01       	movw	r30, r20
     a0c:	ee 57       	subi	r30, 0x7E	; 126
     a0e:	ff 4f       	sbci	r31, 0xFF	; 255
     a10:	80 81       	ld	r24, Z
     a12:	91 81       	ldd	r25, Z+1	; 0x01
     a14:	01 96       	adiw	r24, 0x01	; 1
     a16:	91 83       	std	Z+1, r25	; 0x01
     a18:	80 83       	st	Z, r24

			if (Buffer->BottomPtr == &Buffer->Buffer[BUFF_LENGTH])
     a1a:	20 81       	ld	r18, Z
     a1c:	31 81       	ldd	r19, Z+1	; 0x01
     a1e:	ca 01       	movw	r24, r20
     a20:	80 58       	subi	r24, 0x80	; 128
     a22:	9f 4f       	sbci	r25, 0xFF	; 255
     a24:	28 17       	cp	r18, r24
     a26:	39 07       	cpc	r19, r25
     a28:	31 f4       	brne	.+12     	; 0xa36 <Buffer_StoreElementOnTop+0x3e>
			{
				Buffer->BottomPtr = (RingBuff_Data_t*)&Buffer->Buffer;
     a2a:	51 83       	std	Z+1, r21	; 0x01
     a2c:	40 83       	st	Z, r20
     a2e:	03 c0       	rjmp	.+6      	; 0xa36 <Buffer_StoreElementOnTop+0x3e>
			}
		}
		else
		{
			Buffer->Elements++;
     a30:	80 81       	ld	r24, Z
     a32:	8f 5f       	subi	r24, 0xFF	; 255
     a34:	80 83       	st	Z, r24
		}


		*(Buffer->TopPtr) = Data;
     a36:	da 01       	movw	r26, r20
     a38:	a0 58       	subi	r26, 0x80	; 128
     a3a:	bf 4f       	sbci	r27, 0xFF	; 255
     a3c:	ed 91       	ld	r30, X+
     a3e:	fc 91       	ld	r31, X
     a40:	11 97       	sbiw	r26, 0x01	; 1
     a42:	60 83       	st	Z, r22
		Buffer->TopPtr++;
     a44:	8d 91       	ld	r24, X+
     a46:	9c 91       	ld	r25, X
     a48:	11 97       	sbiw	r26, 0x01	; 1
     a4a:	01 96       	adiw	r24, 0x01	; 1
     a4c:	11 96       	adiw	r26, 0x01	; 1
     a4e:	9c 93       	st	X, r25
     a50:	8e 93       	st	-X, r24

		if (Buffer->TopPtr == &Buffer->Buffer[BUFF_LENGTH])
     a52:	ed 91       	ld	r30, X+
     a54:	fc 91       	ld	r31, X
     a56:	11 97       	sbiw	r26, 0x01	; 1
     a58:	ea 17       	cp	r30, r26
     a5a:	fb 07       	cpc	r31, r27
     a5c:	11 f4       	brne	.+4      	; 0xa62 <Buffer_StoreElementOnTop+0x6a>
		{
			Buffer->TopPtr = (RingBuff_Data_t*)&Buffer->Buffer;
     a5e:	51 83       	std	Z+1, r21	; 0x01
     a60:	40 83       	st	Z, r20
    (void)__s;
}

static __inline__ void __iRestore(const  uint8_t *__s)
{
    SREG = *__s;
     a62:	7f bf       	out	0x3f, r23	; 63
    __asm__ volatile ("" ::: "memory");
     a64:	08 95       	ret

00000a66 <Buffer_GetElementFromTop>:
		}
	}
}

RingBuff_Data_t Buffer_GetElementFromTop(RingBuff_t* Buffer)
{
     a66:	dc 01       	movw	r26, r24
	RingBuff_Data_t BuffData;

	BUFF_ATOMIC_BLOCK
     a68:	2f b7       	in	r18, 0x3f	; 63
    return 1;
}

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     a6a:	f8 94       	cli
	{
		if (!(Buffer->Elements))
     a6c:	ac 57       	subi	r26, 0x7C	; 124
     a6e:	bf 4f       	sbci	r27, 0xFF	; 255
     a70:	8c 91       	ld	r24, X
     a72:	a4 58       	subi	r26, 0x84	; 132
     a74:	b0 40       	sbci	r27, 0x00	; 0
     a76:	88 23       	and	r24, r24
     a78:	11 f4       	brne	.+4      	; 0xa7e <Buffer_GetElementFromTop+0x18>
    (void)__s;
}

static __inline__ void __iRestore(const  uint8_t *__s)
{
    SREG = *__s;
     a7a:	2f bf       	out	0x3f, r18	; 63
    __asm__ volatile ("" ::: "memory");
     a7c:	08 95       	ret
		{
			return 0;
		}

		if(Buffer->TopPtr == (RingBuff_Data_t*)&Buffer->Buffer)//at index 0
     a7e:	fd 01       	movw	r30, r26
     a80:	e0 58       	subi	r30, 0x80	; 128
     a82:	ff 4f       	sbci	r31, 0xFF	; 255
     a84:	80 81       	ld	r24, Z
     a86:	91 81       	ldd	r25, Z+1	; 0x01
     a88:	8a 17       	cp	r24, r26
     a8a:	9b 07       	cpc	r25, r27
     a8c:	39 f4       	brne	.+14     	; 0xa9c <Buffer_GetElementFromTop+0x36>
		{
			Buffer->TopPtr = (RingBuff_Data_t*)&Buffer->Buffer[BUFF_LENGTH-1];//now at the top of the array
     a8e:	a1 58       	subi	r26, 0x81	; 129
     a90:	bf 4f       	sbci	r27, 0xFF	; 255
     a92:	b1 83       	std	Z+1, r27	; 0x01
     a94:	a0 83       	st	Z, r26
     a96:	af 57       	subi	r26, 0x7F	; 127
     a98:	b0 40       	sbci	r27, 0x00	; 0
     a9a:	05 c0       	rjmp	.+10     	; 0xaa6 <Buffer_GetElementFromTop+0x40>
		}
		else
		{
			Buffer->TopPtr--;
     a9c:	80 81       	ld	r24, Z
     a9e:	91 81       	ldd	r25, Z+1	; 0x01
     aa0:	01 97       	sbiw	r24, 0x01	; 1
     aa2:	91 83       	std	Z+1, r25	; 0x01
     aa4:	80 83       	st	Z, r24
		}

		Buffer->Elements--;
     aa6:	fd 01       	movw	r30, r26
     aa8:	ec 57       	subi	r30, 0x7C	; 124
     aaa:	ff 4f       	sbci	r31, 0xFF	; 255
     aac:	80 81       	ld	r24, Z
     aae:	81 50       	subi	r24, 0x01	; 1
     ab0:	80 83       	st	Z, r24

		BuffData = *(Buffer->TopPtr);
     ab2:	a0 58       	subi	r26, 0x80	; 128
     ab4:	bf 4f       	sbci	r27, 0xFF	; 255
     ab6:	ed 91       	ld	r30, X+
     ab8:	fc 91       	ld	r31, X
     aba:	80 81       	ld	r24, Z
    (void)__s;
}

static __inline__ void __iRestore(const  uint8_t *__s)
{
    SREG = *__s;
     abc:	2f bf       	out	0x3f, r18	; 63
    __asm__ volatile ("" ::: "memory");
     abe:	08 95       	ret

00000ac0 <Buffer_GetElementFromBottom>:
	return BuffData;
}

//if no elements return 0
RingBuff_Data_t Buffer_GetElementFromBottom(RingBuff_t* Buffer)
{
     ac0:	cf 93       	push	r28
     ac2:	df 93       	push	r29
     ac4:	ac 01       	movw	r20, r24
	RingBuff_Data_t BuffData;

	BUFF_ATOMIC_BLOCK
     ac6:	6f b7       	in	r22, 0x3f	; 63
    return 1;
}

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     ac8:	f8 94       	cli
	{
		if (!(Buffer->Elements))
     aca:	ec 01       	movw	r28, r24
     acc:	cc 57       	subi	r28, 0x7C	; 124
     ace:	df 4f       	sbci	r29, 0xFF	; 255
     ad0:	88 81       	ld	r24, Y
     ad2:	88 23       	and	r24, r24
     ad4:	19 f4       	brne	.+6      	; 0xadc <Buffer_GetElementFromBottom+0x1c>
    (void)__s;
}

static __inline__ void __iRestore(const  uint8_t *__s)
{
    SREG = *__s;
     ad6:	6f bf       	out	0x3f, r22	; 63
    __asm__ volatile ("" ::: "memory");
     ad8:	e0 e0       	ldi	r30, 0x00	; 0
     ada:	1e c0       	rjmp	.+60     	; 0xb18 <Buffer_GetElementFromBottom+0x58>
		  return 0;

		BuffData = *(Buffer->BottomPtr);
     adc:	da 01       	movw	r26, r20
     ade:	ae 57       	subi	r26, 0x7E	; 126
     ae0:	bf 4f       	sbci	r27, 0xFF	; 255
     ae2:	ed 91       	ld	r30, X+
     ae4:	fc 91       	ld	r31, X
     ae6:	11 97       	sbiw	r26, 0x01	; 1
     ae8:	e0 81       	ld	r30, Z

		Buffer->BottomPtr++;
     aea:	8d 91       	ld	r24, X+
     aec:	9c 91       	ld	r25, X
     aee:	11 97       	sbiw	r26, 0x01	; 1
     af0:	01 96       	adiw	r24, 0x01	; 1
     af2:	11 96       	adiw	r26, 0x01	; 1
     af4:	9c 93       	st	X, r25
     af6:	8e 93       	st	-X, r24
		Buffer->Elements--;
     af8:	88 81       	ld	r24, Y
     afa:	81 50       	subi	r24, 0x01	; 1
     afc:	88 83       	st	Y, r24

		if (Buffer->BottomPtr == &Buffer->Buffer[BUFF_LENGTH])
     afe:	2d 91       	ld	r18, X+
     b00:	3c 91       	ld	r19, X
     b02:	11 97       	sbiw	r26, 0x01	; 1
     b04:	ca 01       	movw	r24, r20
     b06:	80 58       	subi	r24, 0x80	; 128
     b08:	9f 4f       	sbci	r25, 0xFF	; 255
     b0a:	28 17       	cp	r18, r24
     b0c:	39 07       	cpc	r19, r25
     b0e:	19 f4       	brne	.+6      	; 0xb16 <Buffer_GetElementFromBottom+0x56>
		  Buffer->BottomPtr = (RingBuff_Data_t*)&Buffer->Buffer;
     b10:	11 96       	adiw	r26, 0x01	; 1
     b12:	5c 93       	st	X, r21
     b14:	4e 93       	st	-X, r20
    (void)__s;
}

static __inline__ void __iRestore(const  uint8_t *__s)
{
    SREG = *__s;
     b16:	6f bf       	out	0x3f, r22	; 63
    __asm__ volatile ("" ::: "memory");
     b18:	8e 2f       	mov	r24, r30
     b1a:	df 91       	pop	r29
     b1c:	cf 91       	pop	r28
     b1e:	08 95       	ret

00000b20 <Buffer_StoreElementOnBottom>:

	return BuffData;
}
//does not check to see if the buffer is full.
void Buffer_StoreElementOnBottom(RingBuff_t* Buffer, RingBuff_Data_t Data)
{
     b20:	dc 01       	movw	r26, r24
	BUFF_ATOMIC_BLOCK
     b22:	2f b7       	in	r18, 0x3f	; 63
    return 1;
}

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     b24:	f8 94       	cli
	{
		if(Buffer->Elements == BUFF_LENGTH)//i.e. buffer is full.  So we have no room
     b26:	ac 57       	subi	r26, 0x7C	; 124
     b28:	bf 4f       	sbci	r27, 0xFF	; 255
     b2a:	8c 91       	ld	r24, X
     b2c:	a4 58       	subi	r26, 0x84	; 132
     b2e:	b0 40       	sbci	r27, 0x00	; 0
     b30:	80 38       	cpi	r24, 0x80	; 128
     b32:	e9 f0       	breq	.+58     	; 0xb6e <Buffer_StoreElementOnBottom+0x4e>
		{
			return;
		}
		if(Buffer->BottomPtr == (RingBuff_Data_t*)&Buffer->Buffer)
     b34:	fd 01       	movw	r30, r26
     b36:	ee 57       	subi	r30, 0x7E	; 126
     b38:	ff 4f       	sbci	r31, 0xFF	; 255
     b3a:	80 81       	ld	r24, Z
     b3c:	91 81       	ldd	r25, Z+1	; 0x01
     b3e:	8a 17       	cp	r24, r26
     b40:	9b 07       	cpc	r25, r27
     b42:	39 f4       	brne	.+14     	; 0xb52 <Buffer_StoreElementOnBottom+0x32>
		{
			Buffer->BottomPtr = (RingBuff_Data_t*)&Buffer->Buffer[BUFF_LENGTH-1];
     b44:	a1 58       	subi	r26, 0x81	; 129
     b46:	bf 4f       	sbci	r27, 0xFF	; 255
     b48:	b1 83       	std	Z+1, r27	; 0x01
     b4a:	a0 83       	st	Z, r26
     b4c:	af 57       	subi	r26, 0x7F	; 127
     b4e:	b0 40       	sbci	r27, 0x00	; 0
     b50:	05 c0       	rjmp	.+10     	; 0xb5c <Buffer_StoreElementOnBottom+0x3c>
		}
		else
		{
			Buffer->BottomPtr--;
     b52:	80 81       	ld	r24, Z
     b54:	91 81       	ldd	r25, Z+1	; 0x01
     b56:	01 97       	sbiw	r24, 0x01	; 1
     b58:	91 83       	std	Z+1, r25	; 0x01
     b5a:	80 83       	st	Z, r24
		}

		*(Buffer->BottomPtr) = Data;
     b5c:	ae 57       	subi	r26, 0x7E	; 126
     b5e:	bf 4f       	sbci	r27, 0xFF	; 255
     b60:	ed 91       	ld	r30, X+
     b62:	fd 91       	ld	r31, X+
     b64:	60 83       	st	Z, r22
		Buffer->Elements++;
     b66:	fd 01       	movw	r30, r26
     b68:	80 81       	ld	r24, Z
     b6a:	8f 5f       	subi	r24, 0xFF	; 255
     b6c:	80 83       	st	Z, r24
    (void)__s;
}

static __inline__ void __iRestore(const  uint8_t *__s)
{
    SREG = *__s;
     b6e:	2f bf       	out	0x3f, r18	; 63
    __asm__ volatile ("" ::: "memory");
     b70:	08 95       	ret

00000b72 <I2C_Init>:

/*
 * This function will set up the I2C port pins to their correct values
 */ 
void I2C_Init(void)
{
     b72:	8b b1       	in	r24, 0x0b	; 11
     b74:	8f 79       	andi	r24, 0x9F	; 159
     b76:	8b b9       	out	0x0b, r24	; 11
	PORTD &= ~((1<<SCL) | (1<<SDA));
	
	Set_High(SDA);
     b78:	56 98       	cbi	0x0a, 6	; 10
	Set_High(SCL);//ensure that the I2C lines are released
     b7a:	55 98       	cbi	0x0a, 5	; 10
	

}
     b7c:	08 95       	ret

00000b7e <I2C_Get_ACK>:
 *
 * Returns:	ACK if we read an ACK (0) from the slave
 *			NACK if we read a NACK (1) from the slave
 */
uint8_t I2C_Get_ACK(void)
{
     b7e:	df 93       	push	r29
     b80:	cf 93       	push	r28
     b82:	0f 92       	push	r0
     b84:	cd b7       	in	r28, 0x3d	; 61
     b86:	de b7       	in	r29, 0x3e	; 62
	uint8_t value = ACK;	
	
	//  Set SCL high
	Set_High(SCL);
     b88:	55 98       	cbi	0x0a, 5	; 10
     b8a:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     b8c:	21 e0       	ldi	r18, 0x01	; 1
     b8e:	29 83       	std	Y+1, r18	; 0x01
     b90:	03 c0       	rjmp	.+6      	; 0xb98 <I2C_Get_ACK+0x1a>
     b92:	89 81       	ldd	r24, Y+1	; 0x01
     b94:	8f 5f       	subi	r24, 0xFF	; 255
     b96:	89 83       	std	Y+1, r24	; 0x01
     b98:	89 81       	ldd	r24, Y+1	; 0x01
     b9a:	8a 30       	cpi	r24, 0x0A	; 10
     b9c:	d0 f3       	brcs	.-12     	; 0xb92 <I2C_Get_ACK+0x14>
		{
		
				;
			
		}
		delay--;
     b9e:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     ba0:	b1 f7       	brne	.-20     	; 0xb8e <I2C_Get_ACK+0x10>
	//  Set SCL high
	Set_High(SCL);
	//  Delay
	Delay(I2C_PERIOD);

	if ( PIND & (1<<SDA) )//read in if we got an ACK (0) or a NACK (1)
     ba2:	99 b1       	in	r25, 0x09	; 9
		value = NACK;
	}
	
	
	// Set SCL Low
	Set_Low(SCL);
     ba4:	55 9a       	sbi	0x0a, 5	; 10
     ba6:	21 e0       	ldi	r18, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     ba8:	31 e0       	ldi	r19, 0x01	; 1
     baa:	39 83       	std	Y+1, r19	; 0x01
     bac:	03 c0       	rjmp	.+6      	; 0xbb4 <I2C_Get_ACK+0x36>
     bae:	89 81       	ldd	r24, Y+1	; 0x01
     bb0:	8f 5f       	subi	r24, 0xFF	; 255
     bb2:	89 83       	std	Y+1, r24	; 0x01
     bb4:	89 81       	ldd	r24, Y+1	; 0x01
     bb6:	8a 30       	cpi	r24, 0x0A	; 10
     bb8:	d0 f3       	brcs	.-12     	; 0xbae <I2C_Get_ACK+0x30>
		{
		
				;
			
		}
		delay--;
     bba:	21 50       	subi	r18, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     bbc:	b1 f7       	brne	.-20     	; 0xbaa <I2C_Get_ACK+0x2c>
     bbe:	89 2f       	mov	r24, r25
     bc0:	90 e0       	ldi	r25, 0x00	; 0
     bc2:	26 e0       	ldi	r18, 0x06	; 6
     bc4:	96 95       	lsr	r25
     bc6:	87 95       	ror	r24
     bc8:	2a 95       	dec	r18
     bca:	e1 f7       	brne	.-8      	; 0xbc4 <I2C_Get_ACK+0x46>
	
	Delay(I2C_PERIOD);	

	
	return value;
}
     bcc:	81 70       	andi	r24, 0x01	; 1
     bce:	0f 90       	pop	r0
     bd0:	cf 91       	pop	r28
     bd2:	df 91       	pop	r29
     bd4:	08 95       	ret

00000bd6 <I2C_Start>:
	
/*
 * This places a start condition onto the I2C lines
 */
void I2C_Start(void)
{
     bd6:	df 93       	push	r29
     bd8:	cf 93       	push	r28
     bda:	0f 92       	push	r0
     bdc:	cd b7       	in	r28, 0x3d	; 61
     bde:	de b7       	in	r29, 0x3e	; 62
	Set_Low(SDA);
     be0:	56 9a       	sbi	0x0a, 6	; 10
     be2:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     be4:	21 e0       	ldi	r18, 0x01	; 1
     be6:	29 83       	std	Y+1, r18	; 0x01
     be8:	03 c0       	rjmp	.+6      	; 0xbf0 <I2C_Start+0x1a>
     bea:	89 81       	ldd	r24, Y+1	; 0x01
     bec:	8f 5f       	subi	r24, 0xFF	; 255
     bee:	89 83       	std	Y+1, r24	; 0x01
     bf0:	89 81       	ldd	r24, Y+1	; 0x01
     bf2:	8a 30       	cpi	r24, 0x0A	; 10
     bf4:	d0 f3       	brcs	.-12     	; 0xbea <I2C_Start+0x14>
		{
		
				;
			
		}
		delay--;
     bf6:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     bf8:	b1 f7       	brne	.-20     	; 0xbe6 <I2C_Start+0x10>
 */
void I2C_Start(void)
{
	Set_Low(SDA);
	Delay(I2C_PERIOD);
	Set_Low(SCL);
     bfa:	55 9a       	sbi	0x0a, 5	; 10
     bfc:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     bfe:	21 e0       	ldi	r18, 0x01	; 1
     c00:	29 83       	std	Y+1, r18	; 0x01
     c02:	03 c0       	rjmp	.+6      	; 0xc0a <I2C_Start+0x34>
     c04:	89 81       	ldd	r24, Y+1	; 0x01
     c06:	8f 5f       	subi	r24, 0xFF	; 255
     c08:	89 83       	std	Y+1, r24	; 0x01
     c0a:	89 81       	ldd	r24, Y+1	; 0x01
     c0c:	8a 30       	cpi	r24, 0x0A	; 10
     c0e:	d0 f3       	brcs	.-12     	; 0xc04 <I2C_Start+0x2e>
		{
		
				;
			
		}
		delay--;
     c10:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     c12:	b1 f7       	brne	.-20     	; 0xc00 <I2C_Start+0x2a>
{
	Set_Low(SDA);
	Delay(I2C_PERIOD);
	Set_Low(SCL);
	Delay(I2C_PERIOD);
}
     c14:	0f 90       	pop	r0
     c16:	cf 91       	pop	r28
     c18:	df 91       	pop	r29
     c1a:	08 95       	ret

00000c1c <I2C_Stop>:

/*
 * This function places a stop condition onto the I2C bus
 */
void I2C_Stop(void)
{
     c1c:	df 93       	push	r29
     c1e:	cf 93       	push	r28
     c20:	0f 92       	push	r0
     c22:	cd b7       	in	r28, 0x3d	; 61
     c24:	de b7       	in	r29, 0x3e	; 62
	
	Set_Low(SDA);
     c26:	56 9a       	sbi	0x0a, 6	; 10
     c28:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     c2a:	21 e0       	ldi	r18, 0x01	; 1
     c2c:	29 83       	std	Y+1, r18	; 0x01
     c2e:	03 c0       	rjmp	.+6      	; 0xc36 <I2C_Stop+0x1a>
     c30:	89 81       	ldd	r24, Y+1	; 0x01
     c32:	8f 5f       	subi	r24, 0xFF	; 255
     c34:	89 83       	std	Y+1, r24	; 0x01
     c36:	89 81       	ldd	r24, Y+1	; 0x01
     c38:	8a 30       	cpi	r24, 0x0A	; 10
     c3a:	d0 f3       	brcs	.-12     	; 0xc30 <I2C_Stop+0x14>
		{
		
				;
			
		}
		delay--;
     c3c:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     c3e:	b1 f7       	brne	.-20     	; 0xc2c <I2C_Stop+0x10>
void I2C_Stop(void)
{
	
	Set_Low(SDA);
	Delay(I2C_PERIOD);
	Set_High(SCL);
     c40:	55 98       	cbi	0x0a, 5	; 10
	while( !(PIND & (1<<SCL)) );//wait for the Slave to allow us to move on
     c42:	4d 9b       	sbis	0x09, 5	; 9
     c44:	fe cf       	rjmp	.-4      	; 0xc42 <I2C_Stop+0x26>
     c46:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     c48:	21 e0       	ldi	r18, 0x01	; 1
     c4a:	29 83       	std	Y+1, r18	; 0x01
     c4c:	03 c0       	rjmp	.+6      	; 0xc54 <I2C_Stop+0x38>
     c4e:	89 81       	ldd	r24, Y+1	; 0x01
     c50:	8f 5f       	subi	r24, 0xFF	; 255
     c52:	89 83       	std	Y+1, r24	; 0x01
     c54:	89 81       	ldd	r24, Y+1	; 0x01
     c56:	8a 30       	cpi	r24, 0x0A	; 10
     c58:	d0 f3       	brcs	.-12     	; 0xc4e <I2C_Stop+0x32>
		{
		
				;
			
		}
		delay--;
     c5a:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     c5c:	b1 f7       	brne	.-20     	; 0xc4a <I2C_Stop+0x2e>
	Set_Low(SDA);
	Delay(I2C_PERIOD);
	Set_High(SCL);
	while( !(PIND & (1<<SCL)) );//wait for the Slave to allow us to move on
	Delay(I2C_PERIOD);
	Set_High(SDA);
     c5e:	56 98       	cbi	0x0a, 6	; 10
     c60:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     c62:	21 e0       	ldi	r18, 0x01	; 1
     c64:	29 83       	std	Y+1, r18	; 0x01
     c66:	03 c0       	rjmp	.+6      	; 0xc6e <I2C_Stop+0x52>
     c68:	89 81       	ldd	r24, Y+1	; 0x01
     c6a:	8f 5f       	subi	r24, 0xFF	; 255
     c6c:	89 83       	std	Y+1, r24	; 0x01
     c6e:	89 81       	ldd	r24, Y+1	; 0x01
     c70:	8a 30       	cpi	r24, 0x0A	; 10
     c72:	d0 f3       	brcs	.-12     	; 0xc68 <I2C_Stop+0x4c>
		{
		
				;
			
		}
		delay--;
     c74:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     c76:	b1 f7       	brne	.-20     	; 0xc64 <I2C_Stop+0x48>
	Set_High(SCL);
	while( !(PIND & (1<<SCL)) );//wait for the Slave to allow us to move on
	Delay(I2C_PERIOD);
	Set_High(SDA);
	Delay(I2C_PERIOD);
}
     c78:	0f 90       	pop	r0
     c7a:	cf 91       	pop	r28
     c7c:	df 91       	pop	r29
     c7e:	08 95       	ret

00000c80 <I2C_Pulse_SCL_After_ACK>:
 *
 * Returns:	0 if everything is ok
 *			1 if there was a timeout
 */
uint8_t I2C_Pulse_SCL_After_ACK(void)
{	
     c80:	df 93       	push	r29
     c82:	cf 93       	push	r28
     c84:	0f 92       	push	r0
     c86:	cd b7       	in	r28, 0x3d	; 61
     c88:	de b7       	in	r29, 0x3e	; 62
	//  Set SCL high
	Set_High(SCL);
     c8a:	55 98       	cbi	0x0a, 5	; 10
	
	while( !(PIND & (1<<SCL)) );//wait for the Slave to allow us to move on
     c8c:	4d 9b       	sbis	0x09, 5	; 9
     c8e:	fe cf       	rjmp	.-4      	; 0xc8c <I2C_Pulse_SCL_After_ACK+0xc>
     c90:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     c92:	21 e0       	ldi	r18, 0x01	; 1
     c94:	29 83       	std	Y+1, r18	; 0x01
     c96:	03 c0       	rjmp	.+6      	; 0xc9e <I2C_Pulse_SCL_After_ACK+0x1e>
     c98:	89 81       	ldd	r24, Y+1	; 0x01
     c9a:	8f 5f       	subi	r24, 0xFF	; 255
     c9c:	89 83       	std	Y+1, r24	; 0x01
     c9e:	89 81       	ldd	r24, Y+1	; 0x01
     ca0:	8a 30       	cpi	r24, 0x0A	; 10
     ca2:	d0 f3       	brcs	.-12     	; 0xc98 <I2C_Pulse_SCL_After_ACK+0x18>
		{
		
				;
			
		}
		delay--;
     ca4:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     ca6:	b1 f7       	brne	.-20     	; 0xc94 <I2C_Pulse_SCL_After_ACK+0x14>
	
	//  Delay
	Delay(I2C_PERIOD);
	
	// Set SCL Low
	Set_Low(SCL);
     ca8:	55 9a       	sbi	0x0a, 5	; 10
     caa:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     cac:	21 e0       	ldi	r18, 0x01	; 1
     cae:	29 83       	std	Y+1, r18	; 0x01
     cb0:	03 c0       	rjmp	.+6      	; 0xcb8 <I2C_Pulse_SCL_After_ACK+0x38>
     cb2:	89 81       	ldd	r24, Y+1	; 0x01
     cb4:	8f 5f       	subi	r24, 0xFF	; 255
     cb6:	89 83       	std	Y+1, r24	; 0x01
     cb8:	89 81       	ldd	r24, Y+1	; 0x01
     cba:	8a 30       	cpi	r24, 0x0A	; 10
     cbc:	d0 f3       	brcs	.-12     	; 0xcb2 <I2C_Pulse_SCL_After_ACK+0x32>
		{
		
				;
			
		}
		delay--;
     cbe:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     cc0:	b1 f7       	brne	.-20     	; 0xcae <I2C_Pulse_SCL_After_ACK+0x2e>
	Set_Low(SCL);
	
	Delay(I2C_PERIOD);

	return 0;
}
     cc2:	80 e0       	ldi	r24, 0x00	; 0
     cc4:	0f 90       	pop	r0
     cc6:	cf 91       	pop	r28
     cc8:	df 91       	pop	r29
     cca:	08 95       	ret

00000ccc <I2C_Pulse_SCL>:

/*
 * This function will pulse the SCL line so that the slave can read in/out its data
 */
void I2C_Pulse_SCL(void)
{	
     ccc:	df 93       	push	r29
     cce:	cf 93       	push	r28
     cd0:	0f 92       	push	r0
     cd2:	cd b7       	in	r28, 0x3d	; 61
     cd4:	de b7       	in	r29, 0x3e	; 62
	//  Set SCL high
	Set_High(SCL);
     cd6:	55 98       	cbi	0x0a, 5	; 10
     cd8:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     cda:	21 e0       	ldi	r18, 0x01	; 1
     cdc:	29 83       	std	Y+1, r18	; 0x01
     cde:	03 c0       	rjmp	.+6      	; 0xce6 <I2C_Pulse_SCL+0x1a>
     ce0:	89 81       	ldd	r24, Y+1	; 0x01
     ce2:	8f 5f       	subi	r24, 0xFF	; 255
     ce4:	89 83       	std	Y+1, r24	; 0x01
     ce6:	89 81       	ldd	r24, Y+1	; 0x01
     ce8:	8a 30       	cpi	r24, 0x0A	; 10
     cea:	d0 f3       	brcs	.-12     	; 0xce0 <I2C_Pulse_SCL+0x14>
		{
		
				;
			
		}
		delay--;
     cec:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     cee:	b1 f7       	brne	.-20     	; 0xcdc <I2C_Pulse_SCL+0x10>
	
	//  Delay
	Delay(I2C_PERIOD);
	
	// Set SCL Low
	Set_Low(SCL);
     cf0:	55 9a       	sbi	0x0a, 5	; 10
     cf2:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     cf4:	21 e0       	ldi	r18, 0x01	; 1
     cf6:	29 83       	std	Y+1, r18	; 0x01
     cf8:	03 c0       	rjmp	.+6      	; 0xd00 <I2C_Pulse_SCL+0x34>
     cfa:	89 81       	ldd	r24, Y+1	; 0x01
     cfc:	8f 5f       	subi	r24, 0xFF	; 255
     cfe:	89 83       	std	Y+1, r24	; 0x01
     d00:	89 81       	ldd	r24, Y+1	; 0x01
     d02:	8a 30       	cpi	r24, 0x0A	; 10
     d04:	d0 f3       	brcs	.-12     	; 0xcfa <I2C_Pulse_SCL+0x2e>
		{
		
				;
			
		}
		delay--;
     d06:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     d08:	b1 f7       	brne	.-20     	; 0xcf6 <I2C_Pulse_SCL+0x2a>
	
	// Set SCL Low
	Set_Low(SCL);
	
	Delay(I2C_PERIOD);
}
     d0a:	0f 90       	pop	r0
     d0c:	cf 91       	pop	r28
     d0e:	df 91       	pop	r29
     d10:	08 95       	ret

00000d12 <I2C_Send_NACK>:
	I2C_Pulse_SCL()	;
	Set_High(SDA);//release the line
}

void I2C_Send_NACK(void)
{
     d12:	56 98       	cbi	0x0a, 6	; 10
	Set_High(SDA);
	//may want a bit of a delay here?
	I2C_Pulse_SCL();
     d14:	db cf       	rjmp	.-74     	; 0xccc <I2C_Pulse_SCL>

00000d16 <I2C_Send_ACK>:

/*
 * This function will place an ACK on the bus for the slave to read
 */
void I2C_Send_ACK(void)
{
     d16:	56 9a       	sbi	0x0a, 6	; 10
	Set_Low(SDA);
	//may want a bit of a delay here?
	I2C_Pulse_SCL()	;
     d18:	d9 df       	rcall	.-78     	; 0xccc <I2C_Pulse_SCL>
	Set_High(SDA);//release the line
     d1a:	56 98       	cbi	0x0a, 6	; 10
}
     d1c:	08 95       	ret

00000d1e <I2C_Send_Byte>:
 *
 * Returns:	1 if there was a timeout
 *			0 otherwise
 */
uint8_t I2C_Send_Byte(uint8_t data)
{
     d1e:	0f 93       	push	r16
     d20:	1f 93       	push	r17
     d22:	18 2f       	mov	r17, r24
	uint8_t i;

	
	if( data & 0x80)
     d24:	87 ff       	sbrs	r24, 7
     d26:	02 c0       	rjmp	.+4      	; 0xd2c <I2C_Send_Byte+0xe>
	{
		Set_High(SDA);
     d28:	56 98       	cbi	0x0a, 6	; 10
     d2a:	01 c0       	rjmp	.+2      	; 0xd2e <I2C_Send_Byte+0x10>
	}
	else
	{
		Set_Low(SDA);
     d2c:	56 9a       	sbi	0x0a, 6	; 10
	}
		
	if(I2C_Pulse_SCL_After_ACK())//ensure that the slave is not holding the SCL line to force us to wait
     d2e:	a8 df       	rcall	.-176    	; 0xc80 <I2C_Pulse_SCL_After_ACK>
     d30:	88 23       	and	r24, r24
     d32:	11 f0       	breq	.+4      	; 0xd38 <I2C_Send_Byte+0x1a>
     d34:	81 e0       	ldi	r24, 0x01	; 1
     d36:	10 c0       	rjmp	.+32     	; 0xd58 <I2C_Send_Byte+0x3a>
	{
		return 1;
	}
	data <<= 1;//shift the next data bit up
     d38:	01 2f       	mov	r16, r17
     d3a:	00 0f       	add	r16, r16
     d3c:	11 e0       	ldi	r17, 0x01	; 1
	
	for(i = 1; i < 8; i++)//write out each data bit, MSB first
	{
		if( data & 0x80)
     d3e:	07 ff       	sbrs	r16, 7
     d40:	02 c0       	rjmp	.+4      	; 0xd46 <I2C_Send_Byte+0x28>
		{
			Set_High(SDA);
     d42:	56 98       	cbi	0x0a, 6	; 10
     d44:	01 c0       	rjmp	.+2      	; 0xd48 <I2C_Send_Byte+0x2a>
		}
		else
		{
			Set_Low(SDA);
     d46:	56 9a       	sbi	0x0a, 6	; 10
		}
		
		I2C_Pulse_SCL();//no checking to see if the slave is holding the SL line down
     d48:	c1 df       	rcall	.-126    	; 0xccc <I2C_Pulse_SCL>
	{
		return 1;
	}
	data <<= 1;//shift the next data bit up
	
	for(i = 1; i < 8; i++)//write out each data bit, MSB first
     d4a:	1f 5f       	subi	r17, 0xFF	; 255
     d4c:	18 30       	cpi	r17, 0x08	; 8
     d4e:	11 f0       	breq	.+4      	; 0xd54 <I2C_Send_Byte+0x36>
		{
			Set_Low(SDA);
		}
		
		I2C_Pulse_SCL();//no checking to see if the slave is holding the SL line down
		data <<= 1;//shift the next data bit up
     d50:	00 0f       	add	r16, r16
     d52:	f5 cf       	rjmp	.-22     	; 0xd3e <I2C_Send_Byte+0x20>
	}

	Set_High(SDA);//release line
     d54:	56 98       	cbi	0x0a, 6	; 10
     d56:	80 e0       	ldi	r24, 0x00	; 0

	return 0;

}
     d58:	1f 91       	pop	r17
     d5a:	0f 91       	pop	r16
     d5c:	08 95       	ret

00000d5e <I2C_Write>:
 * Returns:	0 if the device was not there or if we got a timeout.  A timeout
 *			can occur if the slave holds SCL low for to long after a ACK while
 *			it is processing the data.
 */
uint8_t I2C_Write(uint8_t address, uint8_t *data, uint16_t lenght)
{
     d5e:	cf 92       	push	r12
     d60:	df 92       	push	r13
     d62:	ef 92       	push	r14
     d64:	ff 92       	push	r15
     d66:	1f 93       	push	r17
     d68:	cf 93       	push	r28
     d6a:	df 93       	push	r29
     d6c:	18 2f       	mov	r17, r24
     d6e:	6b 01       	movw	r12, r22
     d70:	7a 01       	movw	r14, r20
	uint16_t i;

	I2C_Start();//place a start condition on the I2C lines
     d72:	31 df       	rcall	.-414    	; 0xbd6 <I2C_Start>

	//send our slaves address
	if(I2C_Send_Byte(address<<1))//shift the address to its correct location in the data byte.  A LSB of 0 indicates a write transfere
     d74:	81 2f       	mov	r24, r17
     d76:	88 0f       	add	r24, r24
     d78:	d2 df       	rcall	.-92     	; 0xd1e <I2C_Send_Byte>
     d7a:	88 23       	and	r24, r24
     d7c:	69 f4       	brne	.+26     	; 0xd98 <I2C_Write+0x3a>
	{
		I2C_Stop();//release the lines
		return 0;//there was a timeout
	}
	
	if (I2C_Get_ACK() == NACK)//If the slave does not ACK itself send a stop condition and return 0
     d7e:	ff de       	rcall	.-514    	; 0xb7e <I2C_Get_ACK>
     d80:	81 30       	cpi	r24, 0x01	; 1
     d82:	51 f0       	breq	.+20     	; 0xd98 <I2C_Write+0x3a>
     d84:	c0 e0       	ldi	r28, 0x00	; 0
     d86:	d0 e0       	ldi	r29, 0x00	; 0
     d88:	13 c0       	rjmp	.+38     	; 0xdb0 <I2C_Write+0x52>
	}
	
	//send the data
	for(i = 0; i < lenght; i++)
	{
		if( I2C_Send_Byte(data[i]) )
     d8a:	f6 01       	movw	r30, r12
     d8c:	ec 0f       	add	r30, r28
     d8e:	fd 1f       	adc	r31, r29
     d90:	80 81       	ld	r24, Z
     d92:	c5 df       	rcall	.-118    	; 0xd1e <I2C_Send_Byte>
     d94:	88 23       	and	r24, r24
     d96:	19 f0       	breq	.+6      	; 0xd9e <I2C_Write+0x40>
		{
			I2C_Stop();//release the lines
     d98:	41 df       	rcall	.-382    	; 0xc1c <I2C_Stop>
     d9a:	80 e0       	ldi	r24, 0x00	; 0
     d9c:	0e c0       	rjmp	.+28     	; 0xdba <I2C_Write+0x5c>
			return 0;//There was a timeout
		}
		if (I2C_Get_ACK() == NACK)//if the slave NACKed our data, send a STOP and return the number of bytes transmitted
     d9e:	ef de       	rcall	.-546    	; 0xb7e <I2C_Get_ACK>
     da0:	81 30       	cpi	r24, 0x01	; 1
     da2:	29 f4       	brne	.+10     	; 0xdae <I2C_Write+0x50>
		{
			I2C_Stop();//release the lines
     da4:	3b df       	rcall	.-394    	; 0xc1c <I2C_Stop>
			return i+1;
     da6:	9e 01       	movw	r18, r28
     da8:	2f 5f       	subi	r18, 0xFF	; 255
     daa:	82 2f       	mov	r24, r18
     dac:	06 c0       	rjmp	.+12     	; 0xdba <I2C_Write+0x5c>
		return 0;
		
	}
	
	//send the data
	for(i = 0; i < lenght; i++)
     dae:	21 96       	adiw	r28, 0x01	; 1
     db0:	ce 15       	cp	r28, r14
     db2:	df 05       	cpc	r29, r15
     db4:	50 f3       	brcs	.-44     	; 0xd8a <I2C_Write+0x2c>
			return i+1;
		
		}
	}

	I2C_Stop();//Transaction is over so place a stop condition on the bus
     db6:	32 df       	rcall	.-412    	; 0xc1c <I2C_Stop>

	return lenght;
     db8:	8e 2d       	mov	r24, r14

}
     dba:	df 91       	pop	r29
     dbc:	cf 91       	pop	r28
     dbe:	1f 91       	pop	r17
     dc0:	ff 90       	pop	r15
     dc2:	ef 90       	pop	r14
     dc4:	df 90       	pop	r13
     dc6:	cf 90       	pop	r12
     dc8:	08 95       	ret

00000dca <I2C_Receive_Byte>:
 * it is ready.  You can enable a timeout to ensure that the Master does not wait to long.
 *
 * Returns:	The 8 bit databyte read in
 */
uint8_t I2C_Receive_Byte(void)
{
     dca:	0f 93       	push	r16
     dcc:	1f 93       	push	r17
     dce:	df 93       	push	r29
     dd0:	cf 93       	push	r28
     dd2:	0f 92       	push	r0
     dd4:	cd b7       	in	r28, 0x3d	; 61
     dd6:	de b7       	in	r29, 0x3e	; 62
	uint8_t i;
	uint8_t received = 0x00;
	
	Set_High(SCL);
     dd8:	55 98       	cbi	0x0a, 5	; 10
	
	while( !(PIND & (1<<SCL)) );//wait for the Slave to allow us to move on
     dda:	4d 9b       	sbis	0x09, 5	; 9
     ddc:	fe cf       	rjmp	.-4      	; 0xdda <I2C_Receive_Byte+0x10>
     dde:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     de0:	21 e0       	ldi	r18, 0x01	; 1
     de2:	29 83       	std	Y+1, r18	; 0x01
     de4:	03 c0       	rjmp	.+6      	; 0xdec <I2C_Receive_Byte+0x22>
     de6:	89 81       	ldd	r24, Y+1	; 0x01
     de8:	8f 5f       	subi	r24, 0xFF	; 255
     dea:	89 83       	std	Y+1, r24	; 0x01
     dec:	89 81       	ldd	r24, Y+1	; 0x01
     dee:	8a 30       	cpi	r24, 0x0A	; 10
     df0:	d0 f3       	brcs	.-12     	; 0xde6 <I2C_Receive_Byte+0x1c>
		{
		
				;
			
		}
		delay--;
     df2:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     df4:	b1 f7       	brne	.-20     	; 0xde2 <I2C_Receive_Byte+0x18>
	*/

	//  Delay
	Delay(I2C_PERIOD);

	if(PIND & (1<<SDA))
     df6:	99 b1       	in	r25, 0x09	; 9
	{
		received |= 1;//append 1 to our databyte
	}
	// Set SCL Low
	Set_Low(SCL);
     df8:	55 9a       	sbi	0x0a, 5	; 10
     dfa:	21 e0       	ldi	r18, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     dfc:	31 e0       	ldi	r19, 0x01	; 1
     dfe:	39 83       	std	Y+1, r19	; 0x01
     e00:	03 c0       	rjmp	.+6      	; 0xe08 <I2C_Receive_Byte+0x3e>
     e02:	89 81       	ldd	r24, Y+1	; 0x01
     e04:	8f 5f       	subi	r24, 0xFF	; 255
     e06:	89 83       	std	Y+1, r24	; 0x01
     e08:	89 81       	ldd	r24, Y+1	; 0x01
     e0a:	8a 30       	cpi	r24, 0x0A	; 10
     e0c:	d0 f3       	brcs	.-12     	; 0xe02 <I2C_Receive_Byte+0x38>
		{
		
				;
			
		}
		delay--;
     e0e:	21 50       	subi	r18, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     e10:	b1 f7       	brne	.-20     	; 0xdfe <I2C_Receive_Byte+0x34>
     e12:	89 2f       	mov	r24, r25
     e14:	90 e0       	ldi	r25, 0x00	; 0
     e16:	36 e0       	ldi	r19, 0x06	; 6
     e18:	96 95       	lsr	r25
     e1a:	87 95       	ror	r24
     e1c:	3a 95       	dec	r19
     e1e:	e1 f7       	brne	.-8      	; 0xe18 <I2C_Receive_Byte+0x4e>
     e20:	18 2f       	mov	r17, r24
     e22:	11 70       	andi	r17, 0x01	; 1
     e24:	01 e0       	ldi	r16, 0x01	; 1
	
	
	//should really pulse the line high and then read.  Should work though as it
	for(i = 1; i < 8; i++)//write out each data bit, MSB first
	{
		received <<= 1;//shift the up
     e26:	11 0f       	add	r17, r17
		if(PIND & (1<<SDA))
     e28:	4e 99       	sbic	0x09, 6	; 9
		{
			received |= 1;//append 1 to our databyte
     e2a:	11 60       	ori	r17, 0x01	; 1
		}
		
		I2C_Pulse_SCL();//no checking to see if the slave is holding the SCL line down
     e2c:	4f df       	rcall	.-354    	; 0xccc <I2C_Pulse_SCL>
	Delay(I2C_PERIOD);

	
	
	//should really pulse the line high and then read.  Should work though as it
	for(i = 1; i < 8; i++)//write out each data bit, MSB first
     e2e:	0f 5f       	subi	r16, 0xFF	; 255
     e30:	08 30       	cpi	r16, 0x08	; 8
     e32:	c9 f7       	brne	.-14     	; 0xe26 <I2C_Receive_Byte+0x5c>
		I2C_Pulse_SCL();//no checking to see if the slave is holding the SCL line down
	}

	return received;

}
     e34:	81 2f       	mov	r24, r17
     e36:	0f 90       	pop	r0
     e38:	cf 91       	pop	r28
     e3a:	df 91       	pop	r29
     e3c:	1f 91       	pop	r17
     e3e:	0f 91       	pop	r16
     e40:	08 95       	ret

00000e42 <I2C_Read>:
 * Returns:	0 if the device was not there or if we got a timeout.  A timeout
 *			can occur if the slave holds SCL low for to long after a ACK while
 *			it is processing the data.
 */
uint8_t I2C_Read(uint8_t address, uint8_t *data, uint16_t lenght)
{
     e42:	cf 92       	push	r12
     e44:	df 92       	push	r13
     e46:	ef 92       	push	r14
     e48:	ff 92       	push	r15
     e4a:	0f 93       	push	r16
     e4c:	1f 93       	push	r17
     e4e:	cf 93       	push	r28
     e50:	df 93       	push	r29
     e52:	18 2f       	mov	r17, r24
     e54:	6b 01       	movw	r12, r22
     e56:	7a 01       	movw	r14, r20
	uint16_t i;

	I2C_Start();//place a start condition on the I2C lines
     e58:	be de       	rcall	.-644    	; 0xbd6 <I2C_Start>

	//send our slaves address
	if(I2C_Send_Byte((address<<1) | 1))//shift the address to its correct location in the data byte.  A LSB of 1 indicates a read transfere
     e5a:	11 0f       	add	r17, r17
     e5c:	81 2f       	mov	r24, r17
     e5e:	81 60       	ori	r24, 0x01	; 1
     e60:	5e df       	rcall	.-324    	; 0xd1e <I2C_Send_Byte>
     e62:	88 23       	and	r24, r24
     e64:	49 f4       	brne	.+18     	; 0xe78 <I2C_Read+0x36>
	{
		I2C_Stop();//release the lines
		return 0;//there was a timeout
	}
	
	if (I2C_Get_ACK() == NACK)//If the slave does not ACK itself send a stop condition and return 0
     e66:	8b de       	rcall	.-746    	; 0xb7e <I2C_Get_ACK>
     e68:	81 30       	cpi	r24, 0x01	; 1
     e6a:	31 f0       	breq	.+12     	; 0xe78 <I2C_Read+0x36>
     e6c:	c0 e0       	ldi	r28, 0x00	; 0
     e6e:	d0 e0       	ldi	r29, 0x00	; 0
	//read the data
	for(i = 0; i < lenght; i++)
	{
		data[i] = I2C_Receive_Byte();
	
		if (i < lenght-1)//if the slave NACKed our data, send a STOP and return the number of bytes transmitted
     e70:	87 01       	movw	r16, r14
     e72:	01 50       	subi	r16, 0x01	; 1
     e74:	10 40       	sbci	r17, 0x00	; 0
     e76:	0f c0       	rjmp	.+30     	; 0xe96 <I2C_Read+0x54>
		return 0;//there was a timeout
	}
	
	if (I2C_Get_ACK() == NACK)//If the slave does not ACK itself send a stop condition and return 0
	{
		I2C_Stop();//release the lines
     e78:	d1 de       	rcall	.-606    	; 0xc1c <I2C_Stop>
     e7a:	80 e0       	ldi	r24, 0x00	; 0
     e7c:	11 c0       	rjmp	.+34     	; 0xea0 <I2C_Read+0x5e>
	}
	
	//read the data
	for(i = 0; i < lenght; i++)
	{
		data[i] = I2C_Receive_Byte();
     e7e:	a5 df       	rcall	.-182    	; 0xdca <I2C_Receive_Byte>
     e80:	f6 01       	movw	r30, r12
     e82:	ec 0f       	add	r30, r28
     e84:	fd 1f       	adc	r31, r29
     e86:	80 83       	st	Z, r24
	
		if (i < lenght-1)//if the slave NACKed our data, send a STOP and return the number of bytes transmitted
     e88:	c0 17       	cp	r28, r16
     e8a:	d1 07       	cpc	r29, r17
     e8c:	10 f4       	brcc	.+4      	; 0xe92 <I2C_Read+0x50>
		{
			I2C_Send_ACK();	
     e8e:	43 df       	rcall	.-378    	; 0xd16 <I2C_Send_ACK>
     e90:	01 c0       	rjmp	.+2      	; 0xe94 <I2C_Read+0x52>
		}
		else
		{
			I2C_Send_NACK();//Nack the last byte
     e92:	3f df       	rcall	.-386    	; 0xd12 <I2C_Send_NACK>
		return 0;
		
	}
	
	//read the data
	for(i = 0; i < lenght; i++)
     e94:	21 96       	adiw	r28, 0x01	; 1
     e96:	ce 15       	cp	r28, r14
     e98:	df 05       	cpc	r29, r15
     e9a:	88 f3       	brcs	.-30     	; 0xe7e <I2C_Read+0x3c>
		{
			I2C_Send_NACK();//Nack the last byte
		}
	}

	I2C_Stop();//Transaction is over so place a stop condition on the bus
     e9c:	bf de       	rcall	.-642    	; 0xc1c <I2C_Stop>

	return lenght;
     e9e:	8e 2d       	mov	r24, r14

}
     ea0:	df 91       	pop	r29
     ea2:	cf 91       	pop	r28
     ea4:	1f 91       	pop	r17
     ea6:	0f 91       	pop	r16
     ea8:	ff 90       	pop	r15
     eaa:	ef 90       	pop	r14
     eac:	df 90       	pop	r13
     eae:	cf 90       	pop	r12
     eb0:	08 95       	ret

00000eb2 <StepDirLineCoding_Init>:

#define DelayUsec() asm volatile ("NOP" ::);asm volatile ("NOP" ::);asm volatile ("NOP" ::);asm volatile ("NOP" ::);asm volatile ("NOP" ::);asm volatile ("NOP" ::);asm volatile ("NOP" ::);asm volatile ("NOP" ::);


void StepDirLineCoding_Init(void)
{
     eb2:	85 b1       	in	r24, 0x05	; 5
     eb4:	80 7c       	andi	r24, 0xC0	; 192
     eb6:	85 b9       	out	0x05, r24	; 5
	//Assuming we want them low as default??
	PORTB &= ~( (1<<STEP_X) | (1<<DIR_X) | (1<<STEP_Y) | (1<<DIR_Y) | (1<<STEP_Z) | (1<<DIR_Z) );
	//If we want thenm high by default
	//PORTB |= ( (1<<STEP_X) | (1<<DIR_X) | (1<<STEP_Y) | (1<<DIR_Y) | (1<<STEP_Z) | (1<<DIR_Z) );
	DDRB |= ( (1<<STEP_X) | (1<<DIR_X) | (1<<STEP_Y) | (1<<DIR_Y) | (1<<STEP_Z) | (1<<DIR_Z) );
     eb8:	84 b1       	in	r24, 0x04	; 4
     eba:	8f 63       	ori	r24, 0x3F	; 63
     ebc:	84 b9       	out	0x04, r24	; 4

}
     ebe:	08 95       	ret

00000ec0 <StartCodition>:


void StartCodition(uint8_t step, uint8_t dir)
{
     ec0:	95 b1       	in	r25, 0x05	; 5
     ec2:	21 e0       	ldi	r18, 0x01	; 1
     ec4:	30 e0       	ldi	r19, 0x00	; 0
     ec6:	a9 01       	movw	r20, r18
     ec8:	02 c0       	rjmp	.+4      	; 0xece <StartCodition+0xe>
     eca:	44 0f       	add	r20, r20
     ecc:	55 1f       	adc	r21, r21
     ece:	6a 95       	dec	r22
     ed0:	e2 f7       	brpl	.-8      	; 0xeca <StartCodition+0xa>
     ed2:	ba 01       	movw	r22, r20
     ed4:	94 2b       	or	r25, r20
     ed6:	95 b9       	out	0x05, r25	; 5
	Set_High(dir);
	Set_High(step);
     ed8:	95 b1       	in	r25, 0x05	; 5
     eda:	02 c0       	rjmp	.+4      	; 0xee0 <StartCodition+0x20>
     edc:	22 0f       	add	r18, r18
     ede:	33 1f       	adc	r19, r19
     ee0:	8a 95       	dec	r24
     ee2:	e2 f7       	brpl	.-8      	; 0xedc <StartCodition+0x1c>
     ee4:	92 2b       	or	r25, r18
     ee6:	95 b9       	out	0x05, r25	; 5
	DelayUsec();
     ee8:	00 00       	nop
     eea:	00 00       	nop
     eec:	00 00       	nop
     eee:	00 00       	nop
     ef0:	00 00       	nop
     ef2:	00 00       	nop
     ef4:	00 00       	nop
     ef6:	00 00       	nop
	DelayUsec();
     ef8:	00 00       	nop
     efa:	00 00       	nop
     efc:	00 00       	nop
     efe:	00 00       	nop
     f00:	00 00       	nop
     f02:	00 00       	nop
     f04:	00 00       	nop
     f06:	00 00       	nop
	DelayUsec();
     f08:	00 00       	nop
     f0a:	00 00       	nop
     f0c:	00 00       	nop
     f0e:	00 00       	nop
     f10:	00 00       	nop
     f12:	00 00       	nop
     f14:	00 00       	nop
     f16:	00 00       	nop
	DelayUsec();
     f18:	00 00       	nop
     f1a:	00 00       	nop
     f1c:	00 00       	nop
     f1e:	00 00       	nop
     f20:	00 00       	nop
     f22:	00 00       	nop
     f24:	00 00       	nop
     f26:	00 00       	nop
	DelayUsec();
     f28:	00 00       	nop
     f2a:	00 00       	nop
     f2c:	00 00       	nop
     f2e:	00 00       	nop
     f30:	00 00       	nop
     f32:	00 00       	nop
     f34:	00 00       	nop
     f36:	00 00       	nop
	Set_Low(dir);
     f38:	85 b1       	in	r24, 0x05	; 5
     f3a:	60 95       	com	r22
     f3c:	68 23       	and	r22, r24
     f3e:	65 b9       	out	0x05, r22	; 5
	DelayUsec();
     f40:	00 00       	nop
     f42:	00 00       	nop
     f44:	00 00       	nop
     f46:	00 00       	nop
     f48:	00 00       	nop
     f4a:	00 00       	nop
     f4c:	00 00       	nop
     f4e:	00 00       	nop
}
     f50:	08 95       	ret

00000f52 <SendByte>:
// STEP raising edge.  DIR must be high before firing
// STEP.  If DIR goes low within 5 usec then the board 
// assumes this is a command function not a step
// function and decodes the data sent
void SendByte(uint8_t inchar,uint8_t axisselect)
{
     f52:	ff 92       	push	r15
     f54:	0f 93       	push	r16
     f56:	1f 93       	push	r17
     f58:	f8 2e       	mov	r15, r24
	uint8_t axisdir,axisstep;
	uint8_t i;
	
	switch(axisselect)
     f5a:	61 30       	cpi	r22, 0x01	; 1
     f5c:	29 f0       	breq	.+10     	; 0xf68 <SendByte+0x16>
     f5e:	62 30       	cpi	r22, 0x02	; 2
     f60:	31 f4       	brne	.+12     	; 0xf6e <SendByte+0x1c>
     f62:	02 e0       	ldi	r16, 0x02	; 2
     f64:	11 e0       	ldi	r17, 0x01	; 1
     f66:	05 c0       	rjmp	.+10     	; 0xf72 <SendByte+0x20>
     f68:	00 e0       	ldi	r16, 0x00	; 0
     f6a:	13 e0       	ldi	r17, 0x03	; 3
     f6c:	02 c0       	rjmp	.+4      	; 0xf72 <SendByte+0x20>
     f6e:	04 e0       	ldi	r16, 0x04	; 4
     f70:	15 e0       	ldi	r17, 0x05	; 5
			break;
	}		
	


	StartCodition(axisstep,axisdir);
     f72:	60 2f       	mov	r22, r16
     f74:	81 2f       	mov	r24, r17
     f76:	a4 df       	rcall	.-184    	; 0xec0 <StartCodition>
	
	for(i=0; i<8; i++)
	{
		Set_Low(axisstep);
     f78:	81 e0       	ldi	r24, 0x01	; 1
     f7a:	90 e0       	ldi	r25, 0x00	; 0
     f7c:	38 2f       	mov	r19, r24
     f7e:	01 c0       	rjmp	.+2      	; 0xf82 <SendByte+0x30>
     f80:	33 0f       	add	r19, r19
     f82:	1a 95       	dec	r17
     f84:	ea f7       	brpl	.-6      	; 0xf80 <SendByte+0x2e>
     f86:	93 2f       	mov	r25, r19
     f88:	90 95       	com	r25
		DelayUsec();
		DelayUsec();

		if(inchar&0x01)
		{
			Set_High(axisdir);
     f8a:	68 2f       	mov	r22, r24
     f8c:	01 c0       	rjmp	.+2      	; 0xf90 <SendByte+0x3e>
     f8e:	66 0f       	add	r22, r22
     f90:	0a 95       	dec	r16
     f92:	ea f7       	brpl	.-6      	; 0xf8e <SendByte+0x3c>
		}
		else
		{
			Set_Low(axisdir);
     f94:	46 2f       	mov	r20, r22
     f96:	40 95       	com	r20
     f98:	20 e0       	ldi	r18, 0x00	; 0

	StartCodition(axisstep,axisdir);
	
	for(i=0; i<8; i++)
	{
		Set_Low(axisstep);
     f9a:	85 b1       	in	r24, 0x05	; 5
     f9c:	89 23       	and	r24, r25
     f9e:	85 b9       	out	0x05, r24	; 5

		DelayUsec();//may be better to move this delay to after we modify 
     fa0:	00 00       	nop
     fa2:	00 00       	nop
     fa4:	00 00       	nop
     fa6:	00 00       	nop
     fa8:	00 00       	nop
     faa:	00 00       	nop
     fac:	00 00       	nop
     fae:	00 00       	nop
		DelayUsec();
     fb0:	00 00       	nop
     fb2:	00 00       	nop
     fb4:	00 00       	nop
     fb6:	00 00       	nop
     fb8:	00 00       	nop
     fba:	00 00       	nop
     fbc:	00 00       	nop
     fbe:	00 00       	nop
		DelayUsec();
     fc0:	00 00       	nop
     fc2:	00 00       	nop
     fc4:	00 00       	nop
     fc6:	00 00       	nop
     fc8:	00 00       	nop
     fca:	00 00       	nop
     fcc:	00 00       	nop
     fce:	00 00       	nop
		DelayUsec();
     fd0:	00 00       	nop
     fd2:	00 00       	nop
     fd4:	00 00       	nop
     fd6:	00 00       	nop
     fd8:	00 00       	nop
     fda:	00 00       	nop
     fdc:	00 00       	nop
     fde:	00 00       	nop
		DelayUsec();
     fe0:	00 00       	nop
     fe2:	00 00       	nop
     fe4:	00 00       	nop
     fe6:	00 00       	nop
     fe8:	00 00       	nop
     fea:	00 00       	nop
     fec:	00 00       	nop
     fee:	00 00       	nop

		if(inchar&0x01)
     ff0:	f0 fe       	sbrs	r15, 0
     ff2:	03 c0       	rjmp	.+6      	; 0xffa <SendByte+0xa8>
		{
			Set_High(axisdir);
     ff4:	85 b1       	in	r24, 0x05	; 5
     ff6:	86 2b       	or	r24, r22
     ff8:	02 c0       	rjmp	.+4      	; 0xffe <SendByte+0xac>
		}
		else
		{
			Set_Low(axisdir);
     ffa:	85 b1       	in	r24, 0x05	; 5
     ffc:	84 23       	and	r24, r20
     ffe:	85 b9       	out	0x05, r24	; 5
		}

		Set_High(axisstep);
    1000:	85 b1       	in	r24, 0x05	; 5
    1002:	83 2b       	or	r24, r19
    1004:	85 b9       	out	0x05, r24	; 5

		DelayUsec();
    1006:	00 00       	nop
    1008:	00 00       	nop
    100a:	00 00       	nop
    100c:	00 00       	nop
    100e:	00 00       	nop
    1010:	00 00       	nop
    1012:	00 00       	nop
    1014:	00 00       	nop
		DelayUsec();
    1016:	00 00       	nop
    1018:	00 00       	nop
    101a:	00 00       	nop
    101c:	00 00       	nop
    101e:	00 00       	nop
    1020:	00 00       	nop
    1022:	00 00       	nop
    1024:	00 00       	nop
		DelayUsec();
    1026:	00 00       	nop
    1028:	00 00       	nop
    102a:	00 00       	nop
    102c:	00 00       	nop
    102e:	00 00       	nop
    1030:	00 00       	nop
    1032:	00 00       	nop
    1034:	00 00       	nop
		DelayUsec();
    1036:	00 00       	nop
    1038:	00 00       	nop
    103a:	00 00       	nop
    103c:	00 00       	nop
    103e:	00 00       	nop
    1040:	00 00       	nop
    1042:	00 00       	nop
    1044:	00 00       	nop
		DelayUsec();
    1046:	00 00       	nop
    1048:	00 00       	nop
    104a:	00 00       	nop
    104c:	00 00       	nop
    104e:	00 00       	nop
    1050:	00 00       	nop
    1052:	00 00       	nop
    1054:	00 00       	nop
	


	StartCodition(axisstep,axisdir);
	
	for(i=0; i<8; i++)
    1056:	2f 5f       	subi	r18, 0xFF	; 255
    1058:	28 30       	cpi	r18, 0x08	; 8
    105a:	11 f0       	breq	.+4      	; 0x1060 <SendByte+0x10e>
		DelayUsec();
		DelayUsec();
		DelayUsec();
		DelayUsec();
		DelayUsec();
		inchar >>= 1;//shift the bits down
    105c:	f6 94       	lsr	r15
    105e:	9d cf       	rjmp	.-198    	; 0xf9a <SendByte+0x48>
	}

	Set_Low(axisstep);
    1060:	85 b1       	in	r24, 0x05	; 5
    1062:	98 23       	and	r25, r24
    1064:	95 b9       	out	0x05, r25	; 5
}
    1066:	1f 91       	pop	r17
    1068:	0f 91       	pop	r16
    106a:	ff 90       	pop	r15
    106c:	08 95       	ret

0000106e <Scheduler_SetTaskMode>:
	
	return false;
}

void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus)
{
    106e:	9c 01       	movw	r18, r24
    1070:	e0 e0       	ldi	r30, 0x00	; 0
    1072:	f1 e0       	ldi	r31, 0x01	; 1
    1074:	08 c0       	rjmp	.+16     	; 0x1086 <Scheduler_SetTaskMode+0x18>
	TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
	while (CurrTask != &Scheduler_TaskList[Scheduler_TotalTasks])
	{
		if (CurrTask->Task == Task)
    1076:	80 81       	ld	r24, Z
    1078:	91 81       	ldd	r25, Z+1	; 0x01
    107a:	82 17       	cp	r24, r18
    107c:	93 07       	cpc	r25, r19
    107e:	11 f4       	brne	.+4      	; 0x1084 <Scheduler_SetTaskMode+0x16>
		{
			CurrTask->TaskStatus = TaskStatus;
    1080:	62 83       	std	Z+2, r22	; 0x02
    1082:	08 95       	ret
			break;
		}
		
		CurrTask++;
    1084:	34 96       	adiw	r30, 0x04	; 4

void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus)
{
	TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
	while (CurrTask != &Scheduler_TaskList[Scheduler_TotalTasks])
    1086:	80 91 5f 02 	lds	r24, 0x025F
    108a:	90 e0       	ldi	r25, 0x00	; 0
    108c:	88 0f       	add	r24, r24
    108e:	99 1f       	adc	r25, r25
    1090:	88 0f       	add	r24, r24
    1092:	99 1f       	adc	r25, r25
    1094:	80 50       	subi	r24, 0x00	; 0
    1096:	9f 4f       	sbci	r25, 0xFF	; 255
    1098:	e8 17       	cp	r30, r24
    109a:	f9 07       	cpc	r31, r25
    109c:	61 f7       	brne	.-40     	; 0x1076 <Scheduler_SetTaskMode+0x8>
    109e:	08 95       	ret

000010a0 <USB_SetupInterface>:
	UHWCON &= ~(1 << UIDE);
	#endif
}

void USB_SetupInterface(void)
{
    10a0:	df 93       	push	r29
    10a2:	cf 93       	push	r28
    10a4:	00 d0       	rcall	.+0      	; 0x10a6 <USB_SetupInterface+0x6>
    10a6:	00 d0       	rcall	.+0      	; 0x10a8 <USB_SetupInterface+0x8>
    10a8:	cd b7       	in	r28, 0x3d	; 61
    10aa:	de b7       	in	r29, 0x3e	; 62
	USB_INT_DisableAllInterrupts();
    10ac:	dc d2       	rcall	.+1464   	; 0x1666 <USB_INT_DisableAllInterrupts>
	USB_INT_ClearAllInterrupts();
    10ae:	de d2       	rcall	.+1468   	; 0x166c <USB_INT_ClearAllInterrupts>

	USB_IsConnected         = false;
    10b0:	10 92 66 02 	sts	0x0266, r1
	#if defined(USB_CAN_BE_HOST)
	USB_HostState           = HOST_STATE_Unattached;
	#endif

	#if defined(USB_CAN_BE_DEVICE)
	USB_ConfigurationNumber  = 0;
    10b4:	10 92 64 02 	sts	0x0264, r1
	USB_RemoteWakeupEnabled  = false;
    10b8:	10 92 63 02 	sts	0x0263, r1
	USB_CurrentlySelfPowered = false;
    10bc:	10 92 62 02 	sts	0x0262, r1
	#if defined(USB_MODIFIED_FULL_CONTROLLER) && !defined(MANUAL_PLL_CONTROL)
	PLLFRQ = ((1 << PLLUSB) | (1 << PDIV3) | (1 << PDIV1));
	#endif
	
	#if !defined(MANUAL_PLL_CONTROL)
	USB_PLL_On();
    10c0:	84 e0       	ldi	r24, 0x04	; 4
    10c2:	89 bd       	out	0x29, r24	; 41
    10c4:	89 b5       	in	r24, 0x29	; 41
    10c6:	82 60       	ori	r24, 0x02	; 2
    10c8:	89 bd       	out	0x29, r24	; 41
	#endif

	while (!(USB_PLL_IsReady()));
    10ca:	09 b4       	in	r0, 0x29	; 41
    10cc:	00 fe       	sbrs	r0, 0
    10ce:	fd cf       	rjmp	.-6      	; 0x10ca <USB_SetupInterface+0x2a>
		
	USB_Interface_Reset();
    10d0:	80 91 d8 00 	lds	r24, 0x00D8
    10d4:	98 2f       	mov	r25, r24
    10d6:	9f 77       	andi	r25, 0x7F	; 127
    10d8:	90 93 d8 00 	sts	0x00D8, r25
    10dc:	80 68       	ori	r24, 0x80	; 128
    10de:	80 93 d8 00 	sts	0x00D8, r24
		USB_INT_Enable(USB_INT_VBUS);
		#endif
	#endif
		
	if (!(USB_Options & USB_OPT_REG_DISABLED))
	  USB_REG_On();
    10e2:	80 91 63 00 	lds	r24, 0x0063
    10e6:	8e 7f       	andi	r24, 0xFE	; 254
    10e8:	80 93 63 00 	sts	0x0063, r24
	
	USB_CLK_Unfreeze();
    10ec:	80 91 d8 00 	lds	r24, 0x00D8
    10f0:	8f 7d       	andi	r24, 0xDF	; 223
    10f2:	80 93 d8 00 	sts	0x00D8, r24
	
	#if defined(USB_CAN_BE_DEVICE)
	USB_Descriptor_Device_t* DeviceDescriptorPtr;
	uint16_t                 DeviceDescriptorSize;

	if (USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DeviceDescriptorPtr, &DeviceDescriptorSize) == true)
    10f6:	9e 01       	movw	r18, r28
    10f8:	2d 5f       	subi	r18, 0xFD	; 253
    10fa:	3f 4f       	sbci	r19, 0xFF	; 255
    10fc:	ae 01       	movw	r20, r28
    10fe:	4f 5f       	subi	r20, 0xFF	; 255
    1100:	5f 4f       	sbci	r21, 0xFF	; 255
    1102:	60 e0       	ldi	r22, 0x00	; 0
    1104:	80 e0       	ldi	r24, 0x00	; 0
    1106:	91 e0       	ldi	r25, 0x01	; 1
    1108:	29 dc       	rcall	.-1966   	; 0x95c <USB_GetDescriptor>
    110a:	88 23       	and	r24, r24
    110c:	31 f0       	breq	.+12     	; 0x111a <USB_SetupInterface+0x7a>
		#if defined(USE_RAM_DESCRIPTORS)
			USB_ControlEndpointSize = DeviceDescriptorPtr->Endpoint0Size;
		#elif defined(USE_EEPROM_DESCRIPTORS)
			USB_ControlEndpointSize = eeprom_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
		#else
			USB_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
    110e:	e9 81       	ldd	r30, Y+1	; 0x01
    1110:	fa 81       	ldd	r31, Y+2	; 0x02
    1112:	37 96       	adiw	r30, 0x07	; 7
    1114:	e4 91       	lpm	r30, Z+
    1116:	e0 93 25 01 	sts	0x0125, r30
		#endif
	}
	#endif

	USB_Attach();
    111a:	80 91 e0 00 	lds	r24, 0x00E0
    111e:	8e 7f       	andi	r24, 0xFE	; 254
    1120:	80 93 e0 00 	sts	0x00E0, r24
	
	#if defined(USB_DEVICE_ONLY)	
	USB_INT_Enable(USB_INT_SUSPEND);
    1124:	80 91 e2 00 	lds	r24, 0x00E2
    1128:	81 60       	ori	r24, 0x01	; 1
    112a:	80 93 e2 00 	sts	0x00E2, r24
	USB_INT_Enable(USB_INT_EORSTI);	
    112e:	80 91 e2 00 	lds	r24, 0x00E2
    1132:	88 60       	ori	r24, 0x08	; 8
    1134:	80 93 e2 00 	sts	0x00E2, r24
	#endif
	
	#if defined(USB_CAN_BE_BOTH)
	USB_InitTaskPointer();
	#endif
}
    1138:	0f 90       	pop	r0
    113a:	0f 90       	pop	r0
    113c:	0f 90       	pop	r0
    113e:	0f 90       	pop	r0
    1140:	cf 91       	pop	r28
    1142:	df 91       	pop	r29
    1144:	08 95       	ret

00001146 <USB_ShutDown>:
	
	sei();
}

void USB_ShutDown(void)
{
    1146:	80 91 66 02 	lds	r24, 0x0266
    114a:	88 23       	and	r24, r24
    114c:	09 f0       	breq	.+2      	; 0x1150 <USB_ShutDown+0xa>
	if (USB_IsConnected)
	  RAISE_EVENT(USB_Disconnect);
    114e:	83 da       	rcall	.-2810   	; 0x656 <Event_USB_Disconnect>

	USB_INT_DisableAllInterrupts();
    1150:	8a d2       	rcall	.+1300   	; 0x1666 <USB_INT_DisableAllInterrupts>
	USB_INT_ClearAllInterrupts();
    1152:	8c d2       	rcall	.+1304   	; 0x166c <USB_INT_ClearAllInterrupts>

	USB_IsConnected         = false;
    1154:	10 92 66 02 	sts	0x0266, r1
	USB_IsInitialized       = false;
    1158:	10 92 65 02 	sts	0x0265, r1
	#if defined(USB_CAN_BE_HOST)
	USB_HostState           = HOST_STATE_Unattached;
	#endif

	#if defined(USB_CAN_BE_DEVICE)
	USB_ConfigurationNumber = 0;
    115c:	10 92 64 02 	sts	0x0264, r1
	
	#if !defined(USE_STATIC_OPTIONS)
	USB_Options     = 0;
	#endif

	USB_Interface_Disable();
    1160:	80 91 d8 00 	lds	r24, 0x00D8
    1164:	8f 77       	andi	r24, 0x7F	; 127
    1166:	80 93 d8 00 	sts	0x00D8, r24
	USB_PLL_Off();
    116a:	19 bc       	out	0x29, r1	; 41
	#endif

	#if defined(USB_CAN_BE_BOTH)
	UHWCON &= ~(1 << UIDE);
	#endif
}
    116c:	08 95       	ret

0000116e <USB_Init>:
			   
               #if !defined(USE_STATIC_OPTIONS)
               const uint8_t Options
               #endif
               )
{
    116e:	80 91 65 02 	lds	r24, 0x0265
    1172:	88 23       	and	r24, r24
    1174:	09 f0       	breq	.+2      	; 0x1178 <USB_Init+0xa>
	if (USB_IsInitialized)
	  USB_ShutDown();
    1176:	e7 df       	rcall	.-50     	; 0x1146 <USB_ShutDown>
	#endif

	#if defined(USB_CAN_BE_BOTH)
	USB_InitTaskPointer();
	#else
	USB_IsInitialized = true;
    1178:	81 e0       	ldi	r24, 0x01	; 1
    117a:	80 93 65 02 	sts	0x0265, r24

	#if defined(USB_DEVICE_ONLY)
		#if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER)
		USB_INT_Enable(USB_INT_VBUS);
		#else
		USB_SetupInterface();
    117e:	90 df       	rcall	.-224    	; 0x10a0 <USB_SetupInterface>
	  USB_INT_Enable(USB_INT_VBUS);
	else
	  USB_SetupInterface();
	#endif
	
	sei();
    1180:	78 94       	sei
}
    1182:	08 95       	ret

00001184 <Endpoint_ConfigureEndpoint_P>:

void Endpoint_ConfigureEndpoint_P(const uint8_t  EndpointNum,
                                  const uint16_t EndpointSize,
                                  const uint8_t  UECFG0Xdata,
                                  const uint8_t  UECFG1Xdata)
{
    1184:	80 93 e9 00 	sts	0x00E9, r24
	Endpoint_SelectEndpoint(EndpointNum);
	Endpoint_EnableEndpoint();
    1188:	80 91 eb 00 	lds	r24, 0x00EB
    118c:	81 60       	ori	r24, 0x01	; 1
    118e:	80 93 eb 00 	sts	0x00EB, r24
	
	UECFG0X = UECFG0Xdata;
    1192:	40 93 ec 00 	sts	0x00EC, r20
	UECFG1X = ((UECFG1X & (1 << ALLOC)) | UECFG1Xdata | Endpoint_BytesToEPSizeMask(EndpointSize));
    1196:	90 91 ed 00 	lds	r25, 0x00ED
		/* Inline Functions: */
			static inline uint8_t Endpoint_BytesToEPSizeMask(uint16_t Bytes)
			                                                 ATTR_WARN_UNUSED_RESULT ATTR_CONST;
			static inline uint8_t Endpoint_BytesToEPSizeMask(uint16_t Bytes)
			{
				Bytes &= ENDPOINT_EPSIZE_MASK;
    119a:	77 70       	andi	r23, 0x07	; 7
			
				if (Bytes <= 8)
    119c:	69 30       	cpi	r22, 0x09	; 9
    119e:	71 05       	cpc	r23, r1
    11a0:	10 f4       	brcc	.+4      	; 0x11a6 <Endpoint_ConfigureEndpoint_P+0x22>
    11a2:	80 e0       	ldi	r24, 0x00	; 0
    11a4:	0b c0       	rjmp	.+22     	; 0x11bc <Endpoint_ConfigureEndpoint_P+0x38>
				  return (0 << EPSIZE0);
				else if (Bytes <= 16)
    11a6:	61 31       	cpi	r22, 0x11	; 17
    11a8:	71 05       	cpc	r23, r1
    11aa:	10 f4       	brcc	.+4      	; 0x11b0 <Endpoint_ConfigureEndpoint_P+0x2c>
    11ac:	80 e1       	ldi	r24, 0x10	; 16
    11ae:	06 c0       	rjmp	.+12     	; 0x11bc <Endpoint_ConfigureEndpoint_P+0x38>
				  return (1 << EPSIZE0);
				else if (Bytes <= 32)
    11b0:	61 32       	cpi	r22, 0x21	; 33
    11b2:	71 05       	cpc	r23, r1
    11b4:	10 f0       	brcs	.+4      	; 0x11ba <Endpoint_ConfigureEndpoint_P+0x36>
    11b6:	80 e3       	ldi	r24, 0x30	; 48
    11b8:	01 c0       	rjmp	.+2      	; 0x11bc <Endpoint_ConfigureEndpoint_P+0x38>
    11ba:	80 e2       	ldi	r24, 0x20	; 32
    11bc:	92 70       	andi	r25, 0x02	; 2
    11be:	92 2b       	or	r25, r18
    11c0:	89 2b       	or	r24, r25
    11c2:	80 93 ed 00 	sts	0x00ED, r24
	
	Endpoint_AllocateMemory();
    11c6:	80 91 ed 00 	lds	r24, 0x00ED
    11ca:	82 60       	ori	r24, 0x02	; 2
    11cc:	80 93 ed 00 	sts	0x00ED, r24
}
    11d0:	08 95       	ret

000011d2 <Endpoint_Write_Control_Stream_LE>:
	
	return ENDPOINT_RWSTREAM_ERROR_NoError;
}

uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer, uint16_t Length)
{
    11d2:	1f 93       	push	r17
    11d4:	9c 01       	movw	r18, r24
    11d6:	fb 01       	movw	r30, r22
	uint8_t* DataStream = (uint8_t*)Buffer;
	bool     SendZLP    = (!(Length % USB_ControlEndpointSize) || (Length == 0));
    11d8:	10 91 25 01 	lds	r17, 0x0125
    11dc:	cb 01       	movw	r24, r22
    11de:	61 2f       	mov	r22, r17
    11e0:	70 e0       	ldi	r23, 0x00	; 0
    11e2:	ee d2       	rcall	.+1500   	; 0x17c0 <__udivmodhi4>
    11e4:	89 2b       	or	r24, r25
    11e6:	21 f0       	breq	.+8      	; 0x11f0 <Endpoint_Write_Control_Stream_LE+0x1e>
    11e8:	40 e0       	ldi	r20, 0x00	; 0
    11ea:	50 e0       	ldi	r21, 0x00	; 0
    11ec:	30 97       	sbiw	r30, 0x00	; 0
    11ee:	11 f4       	brne	.+4      	; 0x11f4 <Endpoint_Write_Control_Stream_LE+0x22>
    11f0:	41 e0       	ldi	r20, 0x01	; 1
    11f2:	50 e0       	ldi	r21, 0x00	; 0
	return ENDPOINT_RWSTREAM_ERROR_NoError;
}

uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer, uint16_t Length)
{
	uint8_t* DataStream = (uint8_t*)Buffer;
    11f4:	d9 01       	movw	r26, r18
    11f6:	13 c0       	rjmp	.+38     	; 0x121e <Endpoint_Write_Control_Stream_LE+0x4c>
	bool     SendZLP    = (!(Length % USB_ControlEndpointSize) || (Length == 0));
	
	while (Length && !(Endpoint_IsSetupOUTReceived()))
	{
		while (!(Endpoint_IsSetupINReady()));
    11f8:	80 91 e8 00 	lds	r24, 0x00E8
    11fc:	80 ff       	sbrs	r24, 0
    11fe:	fc cf       	rjmp	.-8      	; 0x11f8 <Endpoint_Write_Control_Stream_LE+0x26>
    1200:	05 c0       	rjmp	.+10     	; 0x120c <Endpoint_Write_Control_Stream_LE+0x3a>
		
		while (Length && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
		{
			Endpoint_Write_Byte(*(DataStream++));
    1202:	8d 91       	ld	r24, X+
			}

			/** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints. */
			static inline void Endpoint_Write_Byte(const uint8_t Byte)
			{
				UEDATX = Byte;
    1204:	80 93 f1 00 	sts	0x00F1, r24
			
			Length--;
    1208:	31 97       	sbiw	r30, 0x01	; 1
	
	while (Length && !(Endpoint_IsSetupOUTReceived()))
	{
		while (!(Endpoint_IsSetupINReady()));
		
		while (Length && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
    120a:	21 f0       	breq	.+8      	; 0x1214 <Endpoint_Write_Control_Stream_LE+0x42>
    120c:	80 91 f2 00 	lds	r24, 0x00F2
    1210:	81 17       	cp	r24, r17
    1212:	b8 f3       	brcs	.-18     	; 0x1202 <Endpoint_Write_Control_Stream_LE+0x30>
			Endpoint_Write_Byte(*(DataStream++));
			
			Length--;
		}
		
		Endpoint_ClearSetupIN();
    1214:	80 91 e8 00 	lds	r24, 0x00E8
    1218:	8e 7f       	andi	r24, 0xFE	; 254
    121a:	80 93 e8 00 	sts	0x00E8, r24
uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer, uint16_t Length)
{
	uint8_t* DataStream = (uint8_t*)Buffer;
	bool     SendZLP    = (!(Length % USB_ControlEndpointSize) || (Length == 0));
	
	while (Length && !(Endpoint_IsSetupOUTReceived()))
    121e:	30 97       	sbiw	r30, 0x00	; 0
    1220:	21 f0       	breq	.+8      	; 0x122a <Endpoint_Write_Control_Stream_LE+0x58>
    1222:	80 91 e8 00 	lds	r24, 0x00E8
    1226:	82 ff       	sbrs	r24, 2
    1228:	e7 cf       	rjmp	.-50     	; 0x11f8 <Endpoint_Write_Control_Stream_LE+0x26>
		}
		
		Endpoint_ClearSetupIN();
	}
	
	if (Endpoint_IsSetupOUTReceived())
    122a:	80 91 e8 00 	lds	r24, 0x00E8
    122e:	82 ff       	sbrs	r24, 2
    1230:	02 c0       	rjmp	.+4      	; 0x1236 <Endpoint_Write_Control_Stream_LE+0x64>
    1232:	81 e0       	ldi	r24, 0x01	; 1
    1234:	10 c0       	rjmp	.+32     	; 0x1256 <Endpoint_Write_Control_Stream_LE+0x84>
	  return ENDPOINT_RWCSTREAM_ERROR_HostAborted;
	
	if (SendZLP)
    1236:	45 2b       	or	r20, r21
    1238:	49 f0       	breq	.+18     	; 0x124c <Endpoint_Write_Control_Stream_LE+0x7a>
	{
		while (!(Endpoint_IsSetupINReady()));
    123a:	80 91 e8 00 	lds	r24, 0x00E8
    123e:	80 ff       	sbrs	r24, 0
    1240:	fc cf       	rjmp	.-8      	; 0x123a <Endpoint_Write_Control_Stream_LE+0x68>
		Endpoint_ClearSetupIN();
    1242:	80 91 e8 00 	lds	r24, 0x00E8
    1246:	8e 7f       	andi	r24, 0xFE	; 254
    1248:	80 93 e8 00 	sts	0x00E8, r24
	}
	
	while (!(Endpoint_IsSetupOUTReceived()));
    124c:	80 91 e8 00 	lds	r24, 0x00E8
    1250:	82 ff       	sbrs	r24, 2
    1252:	fc cf       	rjmp	.-8      	; 0x124c <Endpoint_Write_Control_Stream_LE+0x7a>
    1254:	80 e0       	ldi	r24, 0x00	; 0

	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}
    1256:	1f 91       	pop	r17
    1258:	08 95       	ret

0000125a <Endpoint_Read_Control_Stream_LE>:

	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}

uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length)
{
    125a:	fc 01       	movw	r30, r24
    125c:	14 c0       	rjmp	.+40     	; 0x1286 <Endpoint_Read_Control_Stream_LE+0x2c>
	uint8_t* DataStream = (uint8_t*)Buffer;
	
	while (Length)
	{
		while (!(Endpoint_IsSetupOUTReceived()));
    125e:	80 91 e8 00 	lds	r24, 0x00E8
    1262:	82 ff       	sbrs	r24, 2
    1264:	fc cf       	rjmp	.-8      	; 0x125e <Endpoint_Read_Control_Stream_LE+0x4>
    1266:	06 c0       	rjmp	.+12     	; 0x1274 <Endpoint_Read_Control_Stream_LE+0x1a>
		/* Inline Functions: */
			/** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints. */
			static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint8_t Endpoint_Read_Byte(void)
			{
				return UEDATX;
    1268:	80 91 f1 00 	lds	r24, 0x00F1
		
		while (Length && Endpoint_BytesInEndpoint())
		{
			*(DataStream++) = Endpoint_Read_Byte();
    126c:	81 93       	st	Z+, r24
			
			Length--;
    126e:	61 50       	subi	r22, 0x01	; 1
    1270:	70 40       	sbci	r23, 0x00	; 0
	
	while (Length)
	{
		while (!(Endpoint_IsSetupOUTReceived()));
		
		while (Length && Endpoint_BytesInEndpoint())
    1272:	21 f0       	breq	.+8      	; 0x127c <Endpoint_Read_Control_Stream_LE+0x22>
    1274:	80 91 f2 00 	lds	r24, 0x00F2
    1278:	88 23       	and	r24, r24
    127a:	b1 f7       	brne	.-20     	; 0x1268 <Endpoint_Read_Control_Stream_LE+0xe>
			*(DataStream++) = Endpoint_Read_Byte();
			
			Length--;
		}
		
		Endpoint_ClearSetupOUT();
    127c:	80 91 e8 00 	lds	r24, 0x00E8
    1280:	8b 7f       	andi	r24, 0xFB	; 251
    1282:	80 93 e8 00 	sts	0x00E8, r24

uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length)
{
	uint8_t* DataStream = (uint8_t*)Buffer;
	
	while (Length)
    1286:	61 15       	cp	r22, r1
    1288:	71 05       	cpc	r23, r1
    128a:	49 f7       	brne	.-46     	; 0x125e <Endpoint_Read_Control_Stream_LE+0x4>
		}
		
		Endpoint_ClearSetupOUT();
	}
	
	while (!(Endpoint_IsSetupINReady()));
    128c:	80 91 e8 00 	lds	r24, 0x00E8
    1290:	80 ff       	sbrs	r24, 0
    1292:	fc cf       	rjmp	.-8      	; 0x128c <Endpoint_Read_Control_Stream_LE+0x32>
	
	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}
    1294:	80 e0       	ldi	r24, 0x00	; 0
    1296:	08 95       	ret

00001298 <USB_Device_ProcessControlPacket>:
uint8_t USB_ConfigurationNumber;
bool    USB_RemoteWakeupEnabled;
bool    USB_CurrentlySelfPowered;

void USB_Device_ProcessControlPacket(void)
{
    1298:	ff 92       	push	r15
    129a:	0f 93       	push	r16
    129c:	1f 93       	push	r17
    129e:	df 93       	push	r29
    12a0:	cf 93       	push	r28
    12a2:	cd b7       	in	r28, 0x3d	; 61
    12a4:	de b7       	in	r29, 0x3e	; 62
    12a6:	28 97       	sbiw	r28, 0x08	; 8
    12a8:	0f b6       	in	r0, 0x3f	; 63
    12aa:	f8 94       	cli
    12ac:	de bf       	out	0x3e, r29	; 62
    12ae:	0f be       	out	0x3f, r0	; 63
    12b0:	cd bf       	out	0x3d, r28	; 61
		/* Inline Functions: */
			/** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints. */
			static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint8_t Endpoint_Read_Byte(void)
			{
				return UEDATX;
    12b2:	60 91 f1 00 	lds	r22, 0x00F1
	uint8_t bmRequestType  = Endpoint_Read_Byte();
	uint8_t bRequest       = Endpoint_Read_Byte();
	bool    RequestHandled = false;
	
	switch (bRequest)
    12b6:	40 91 f1 00 	lds	r20, 0x00F1
    12ba:	45 30       	cpi	r20, 0x05	; 5
    12bc:	09 f4       	brne	.+2      	; 0x12c0 <USB_Device_ProcessControlPacket+0x28>
    12be:	cb c0       	rjmp	.+406    	; 0x1456 <USB_Device_ProcessControlPacket+0x1be>
    12c0:	46 30       	cpi	r20, 0x06	; 6
    12c2:	48 f4       	brcc	.+18     	; 0x12d6 <USB_Device_ProcessControlPacket+0x3e>
    12c4:	41 30       	cpi	r20, 0x01	; 1
    12c6:	09 f4       	brne	.+2      	; 0x12ca <USB_Device_ProcessControlPacket+0x32>
    12c8:	74 c0       	rjmp	.+232    	; 0x13b2 <USB_Device_ProcessControlPacket+0x11a>
    12ca:	41 30       	cpi	r20, 0x01	; 1
    12cc:	70 f0       	brcs	.+28     	; 0x12ea <USB_Device_ProcessControlPacket+0x52>
    12ce:	43 30       	cpi	r20, 0x03	; 3
    12d0:	09 f0       	breq	.+2      	; 0x12d4 <USB_Device_ProcessControlPacket+0x3c>
    12d2:	9a c1       	rjmp	.+820    	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
    12d4:	6e c0       	rjmp	.+220    	; 0x13b2 <USB_Device_ProcessControlPacket+0x11a>
    12d6:	48 30       	cpi	r20, 0x08	; 8
    12d8:	09 f4       	brne	.+2      	; 0x12dc <USB_Device_ProcessControlPacket+0x44>
    12da:	48 c1       	rjmp	.+656    	; 0x156c <USB_Device_ProcessControlPacket+0x2d4>
    12dc:	49 30       	cpi	r20, 0x09	; 9
    12de:	09 f4       	brne	.+2      	; 0x12e2 <USB_Device_ProcessControlPacket+0x4a>
    12e0:	60 c1       	rjmp	.+704    	; 0x15a2 <USB_Device_ProcessControlPacket+0x30a>
    12e2:	46 30       	cpi	r20, 0x06	; 6
    12e4:	09 f0       	breq	.+2      	; 0x12e8 <USB_Device_ProcessControlPacket+0x50>
    12e6:	90 c1       	rjmp	.+800    	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
    12e8:	d6 c0       	rjmp	.+428    	; 0x1496 <USB_Device_ProcessControlPacket+0x1fe>
	{
		case REQ_GetStatus:
			if (((bmRequestType & (CONTROL_REQTYPE_DIRECTION | CONTROL_REQTYPE_TYPE)) ==
    12ea:	26 2f       	mov	r18, r22
    12ec:	30 e0       	ldi	r19, 0x00	; 0
    12ee:	c9 01       	movw	r24, r18
    12f0:	80 7e       	andi	r24, 0xE0	; 224
    12f2:	90 70       	andi	r25, 0x00	; 0
    12f4:	80 38       	cpi	r24, 0x80	; 128
    12f6:	91 05       	cpc	r25, r1
    12f8:	09 f0       	breq	.+2      	; 0x12fc <USB_Device_ProcessControlPacket+0x64>
    12fa:	86 c1       	rjmp	.+780    	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
    12fc:	c9 01       	movw	r24, r18
    12fe:	8f 71       	andi	r24, 0x1F	; 31
    1300:	90 70       	andi	r25, 0x00	; 0
    1302:	83 30       	cpi	r24, 0x03	; 3
    1304:	91 05       	cpc	r25, r1
    1306:	09 f4       	brne	.+2      	; 0x130a <USB_Device_ProcessControlPacket+0x72>
    1308:	7f c1       	rjmp	.+766    	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
			/** Discards two bytes from the currently selected endpoint's bank, for OUT direction endpoints. */
			static inline void Endpoint_Discard_Word(void)
			{
				uint8_t Dummy;
				
				Dummy = UEDATX;
    130a:	20 91 f1 00 	lds	r18, 0x00F1
				Dummy = UEDATX;
    130e:	20 91 f1 00 	lds	r18, 0x00F1
			static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint16_t Endpoint_Read_Word_LE(void)
			{
				uint16_t Data;
				
				Data  = UEDATX;
    1312:	20 91 f1 00 	lds	r18, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    1316:	40 91 f1 00 	lds	r20, 0x00F1

	Endpoint_Discard_Word();

	uint16_t wIndex = Endpoint_Read_Word_LE();
	
	switch (bmRequestType & CONTROL_REQTYPE_RECIPIENT)
    131a:	81 30       	cpi	r24, 0x01	; 1
    131c:	91 05       	cpc	r25, r1
    131e:	31 f0       	breq	.+12     	; 0x132c <USB_Device_ProcessControlPacket+0x94>
    1320:	82 30       	cpi	r24, 0x02	; 2
    1322:	91 05       	cpc	r25, r1
    1324:	f9 f0       	breq	.+62     	; 0x1364 <USB_Device_ProcessControlPacket+0xcc>
    1326:	89 2b       	or	r24, r25
    1328:	21 f0       	breq	.+8      	; 0x1332 <USB_Device_ProcessControlPacket+0x9a>
    132a:	70 c1       	rjmp	.+736    	; 0x160c <USB_Device_ProcessControlPacket+0x374>
    132c:	20 e0       	ldi	r18, 0x00	; 0
    132e:	30 e0       	ldi	r19, 0x00	; 0
    1330:	2d c0       	rjmp	.+90     	; 0x138c <USB_Device_ProcessControlPacket+0xf4>
	{
		case REQREC_DEVICE:
			if (USB_GetDescriptor(((DTYPE_Configuration << 8) | USB_ConfigurationNumber), 0,
    1332:	80 91 64 02 	lds	r24, 0x0264
    1336:	90 e0       	ldi	r25, 0x00	; 0
    1338:	9e 01       	movw	r18, r28
    133a:	29 5f       	subi	r18, 0xF9	; 249
    133c:	3f 4f       	sbci	r19, 0xFF	; 255
    133e:	ae 01       	movw	r20, r28
    1340:	4f 5f       	subi	r20, 0xFF	; 255
    1342:	5f 4f       	sbci	r21, 0xFF	; 255
    1344:	60 e0       	ldi	r22, 0x00	; 0
    1346:	92 60       	ori	r25, 0x02	; 2
    1348:	09 db       	rcall	.-2542   	; 0x95c <USB_GetDescriptor>
    134a:	88 23       	and	r24, r24
    134c:	09 f4       	brne	.+2      	; 0x1350 <USB_Device_ProcessControlPacket+0xb8>
    134e:	5e c1       	rjmp	.+700    	; 0x160c <USB_Device_ProcessControlPacket+0x374>
#if defined(USE_RAM_DESCRIPTORS)
			ConfigAttributes = ConfigDescriptorPtr->ConfigAttributes;
#elif defined(USE_EEPROM_DESCRIPTORS)
			ConfigAttributes = eeprom_read_byte(&ConfigDescriptorPtr->ConfigAttributes);
#else
			ConfigAttributes = pgm_read_byte(&ConfigDescriptorPtr->ConfigAttributes);
    1350:	80 91 62 02 	lds	r24, 0x0262
    1354:	28 2f       	mov	r18, r24
    1356:	30 e0       	ldi	r19, 0x00	; 0
#endif

			if (USB_CurrentlySelfPowered)
			  CurrentStatus |= FEATURE_SELFPOWERED_ENABLED;
			
			if (USB_RemoteWakeupEnabled)
    1358:	80 91 63 02 	lds	r24, 0x0263
    135c:	88 23       	and	r24, r24
    135e:	b1 f0       	breq	.+44     	; 0x138c <USB_Device_ProcessControlPacket+0xf4>
			  CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED;
    1360:	22 60       	ori	r18, 0x02	; 2
    1362:	14 c0       	rjmp	.+40     	; 0x138c <USB_Device_ProcessControlPacket+0xf4>
		case REQREC_INTERFACE:
			// No bits set, all bits currently reserved
				
			break;
		case REQREC_ENDPOINT:
			Endpoint_SelectEndpoint(wIndex);
    1364:	94 2f       	mov	r25, r20
    1366:	80 e0       	ldi	r24, 0x00	; 0
    1368:	30 e0       	ldi	r19, 0x00	; 0
    136a:	82 2b       	or	r24, r18
    136c:	93 2b       	or	r25, r19
    136e:	80 93 e9 00 	sts	0x00E9, r24

			CurrentStatus = Endpoint_IsStalled();
    1372:	80 91 eb 00 	lds	r24, 0x00EB
    1376:	28 2f       	mov	r18, r24
    1378:	30 e0       	ldi	r19, 0x00	; 0
    137a:	85 e0       	ldi	r24, 0x05	; 5
    137c:	36 95       	lsr	r19
    137e:	27 95       	ror	r18
    1380:	8a 95       	dec	r24
    1382:	e1 f7       	brne	.-8      	; 0x137c <USB_Device_ProcessControlPacket+0xe4>
    1384:	21 70       	andi	r18, 0x01	; 1
    1386:	30 70       	andi	r19, 0x00	; 0

			Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);			  
    1388:	10 92 e9 00 	sts	0x00E9, r1
			break;
		default:
			return;
	}
	
	Endpoint_ClearSetupReceived();
    138c:	80 91 e8 00 	lds	r24, 0x00E8
    1390:	87 7f       	andi	r24, 0xF7	; 247
    1392:	80 93 e8 00 	sts	0x00E8, r24
			/** Writes two bytes to the currently selected endpoint's bank in little endian format, for IN
			 *  direction endpoints.
			 */
			static inline void Endpoint_Write_Word_LE(const uint16_t Word)
			{
				UEDATX = (Word & 0xFF);
    1396:	20 93 f1 00 	sts	0x00F1, r18
				UEDATX = (Word >> 8);
    139a:	30 93 f1 00 	sts	0x00F1, r19
	
	Endpoint_Write_Word_LE(CurrentStatus);

	Endpoint_ClearSetupIN();
    139e:	80 91 e8 00 	lds	r24, 0x00E8
    13a2:	8e 7f       	andi	r24, 0xFE	; 254
    13a4:	80 93 e8 00 	sts	0x00E8, r24
	
	while (!(Endpoint_IsSetupOUTReceived()));
    13a8:	80 91 e8 00 	lds	r24, 0x00E8
    13ac:	82 ff       	sbrs	r24, 2
    13ae:	fc cf       	rjmp	.-8      	; 0x13a8 <USB_Device_ProcessControlPacket+0x110>
    13b0:	f2 c0       	rjmp	.+484    	; 0x1596 <USB_Device_ProcessControlPacket+0x2fe>
			}

			break;
		case REQ_ClearFeature:
		case REQ_SetFeature:
			if (((bmRequestType & (CONTROL_REQTYPE_DIRECTION | CONTROL_REQTYPE_TYPE)) ==
    13b2:	26 2f       	mov	r18, r22
    13b4:	30 e0       	ldi	r19, 0x00	; 0
    13b6:	86 2f       	mov	r24, r22
    13b8:	80 7e       	andi	r24, 0xE0	; 224
    13ba:	09 f0       	breq	.+2      	; 0x13be <USB_Device_ProcessControlPacket+0x126>
    13bc:	25 c1       	rjmp	.+586    	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
    13be:	c9 01       	movw	r24, r18
    13c0:	8f 71       	andi	r24, 0x1F	; 31
    13c2:	90 70       	andi	r25, 0x00	; 0
    13c4:	83 30       	cpi	r24, 0x03	; 3
    13c6:	91 05       	cpc	r25, r1
    13c8:	09 f4       	brne	.+2      	; 0x13cc <USB_Device_ProcessControlPacket+0x134>
    13ca:	1e c1       	rjmp	.+572    	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
			static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint16_t Endpoint_Read_Word_LE(void)
			{
				uint16_t Data;
				
				Data  = UEDATX;
    13cc:	20 91 f1 00 	lds	r18, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    13d0:	50 91 f1 00 	lds	r21, 0x00F1
			static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint16_t Endpoint_Read_Word_LE(void)
			{
				uint16_t Data;
				
				Data  = UEDATX;
    13d4:	70 91 f1 00 	lds	r23, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    13d8:	60 91 f1 00 	lds	r22, 0x00F1
static void USB_Device_ClearSetFeature(const uint8_t bRequest, const uint8_t bmRequestType)
{
	uint16_t wValue = Endpoint_Read_Word_LE();
	uint16_t wIndex = Endpoint_Read_Word_LE();
	
	switch (bmRequestType & CONTROL_REQTYPE_RECIPIENT)
    13dc:	02 97       	sbiw	r24, 0x02	; 2
    13de:	09 f0       	breq	.+2      	; 0x13e2 <USB_Device_ProcessControlPacket+0x14a>
    13e0:	15 c1       	rjmp	.+554    	; 0x160c <USB_Device_ProcessControlPacket+0x374>
	{
		case REQREC_ENDPOINT:
			if (wValue == FEATURE_ENDPOINT_HALT)
    13e2:	95 2f       	mov	r25, r21
    13e4:	80 e0       	ldi	r24, 0x00	; 0
    13e6:	30 e0       	ldi	r19, 0x00	; 0
    13e8:	82 2b       	or	r24, r18
    13ea:	93 2b       	or	r25, r19
    13ec:	89 2b       	or	r24, r25
    13ee:	09 f0       	breq	.+2      	; 0x13f2 <USB_Device_ProcessControlPacket+0x15a>
    13f0:	0d c1       	rjmp	.+538    	; 0x160c <USB_Device_ProcessControlPacket+0x374>
			{
				uint8_t EndpointIndex = (wIndex & ENDPOINT_EPNUM_MASK);
    13f2:	80 e0       	ldi	r24, 0x00	; 0
    13f4:	27 2f       	mov	r18, r23
    13f6:	28 2b       	or	r18, r24
    13f8:	27 70       	andi	r18, 0x07	; 7
				
				if (EndpointIndex != ENDPOINT_CONTROLEP)
    13fa:	09 f4       	brne	.+2      	; 0x13fe <USB_Device_ProcessControlPacket+0x166>
    13fc:	07 c1       	rjmp	.+526    	; 0x160c <USB_Device_ProcessControlPacket+0x374>
				{
					Endpoint_SelectEndpoint(EndpointIndex);
    13fe:	20 93 e9 00 	sts	0x00E9, r18

					if (Endpoint_IsEnabled())
    1402:	80 91 eb 00 	lds	r24, 0x00EB
    1406:	80 ff       	sbrs	r24, 0
    1408:	1b c0       	rjmp	.+54     	; 0x1440 <USB_Device_ProcessControlPacket+0x1a8>
					{				
						if (bRequest == REQ_ClearFeature)
    140a:	41 30       	cpi	r20, 0x01	; 1
    140c:	a1 f4       	brne	.+40     	; 0x1436 <USB_Device_ProcessControlPacket+0x19e>
						{
							Endpoint_ClearStall();
    140e:	80 91 eb 00 	lds	r24, 0x00EB
    1412:	80 61       	ori	r24, 0x10	; 16
    1414:	80 93 eb 00 	sts	0x00EB, r24
							Endpoint_ResetFIFO(EndpointIndex);
    1418:	81 e0       	ldi	r24, 0x01	; 1
    141a:	90 e0       	ldi	r25, 0x00	; 0
    141c:	02 c0       	rjmp	.+4      	; 0x1422 <USB_Device_ProcessControlPacket+0x18a>
    141e:	88 0f       	add	r24, r24
    1420:	99 1f       	adc	r25, r25
    1422:	2a 95       	dec	r18
    1424:	e2 f7       	brpl	.-8      	; 0x141e <USB_Device_ProcessControlPacket+0x186>
    1426:	80 93 ea 00 	sts	0x00EA, r24
    142a:	10 92 ea 00 	sts	0x00EA, r1
							Endpoint_ResetDataToggle();
    142e:	80 91 eb 00 	lds	r24, 0x00EB
    1432:	88 60       	ori	r24, 0x08	; 8
    1434:	03 c0       	rjmp	.+6      	; 0x143c <USB_Device_ProcessControlPacket+0x1a4>
						}
						else
						{
							Endpoint_StallTransaction();						
    1436:	80 91 eb 00 	lds	r24, 0x00EB
    143a:	80 62       	ori	r24, 0x20	; 32
    143c:	80 93 eb 00 	sts	0x00EB, r24
						}
					}

					Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
    1440:	10 92 e9 00 	sts	0x00E9, r1
					Endpoint_ClearSetupReceived();
    1444:	80 91 e8 00 	lds	r24, 0x00E8
    1448:	87 7f       	andi	r24, 0xF7	; 247
    144a:	80 93 e8 00 	sts	0x00E8, r24
					Endpoint_ClearSetupIN();
    144e:	80 91 e8 00 	lds	r24, 0x00E8
    1452:	8e 7f       	andi	r24, 0xFE	; 254
    1454:	a3 c0       	rjmp	.+326    	; 0x159c <USB_Device_ProcessControlPacket+0x304>
				RequestHandled = true;
			}

			break;
		case REQ_SetAddress:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
    1456:	66 23       	and	r22, r22
    1458:	09 f0       	breq	.+2      	; 0x145c <USB_Device_ProcessControlPacket+0x1c4>
    145a:	d6 c0       	rjmp	.+428    	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
		/* Inline Functions: */
			/** Reads one byte from the currently selected endpoint's bank, for OUT direction endpoints. */
			static inline uint8_t Endpoint_Read_Byte(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint8_t Endpoint_Read_Byte(void)
			{
				return UEDATX;
    145c:	90 91 f1 00 	lds	r25, 0x00F1

static void USB_Device_SetAddress(void)
{
	uint8_t wValue_LSB = Endpoint_Read_Byte();

	UDADDR = ((UDADDR & (1 << ADDEN)) | (wValue_LSB & 0x7F));
    1460:	80 91 e3 00 	lds	r24, 0x00E3
    1464:	9f 77       	andi	r25, 0x7F	; 127
    1466:	80 78       	andi	r24, 0x80	; 128
    1468:	98 2b       	or	r25, r24
    146a:	90 93 e3 00 	sts	0x00E3, r25

	Endpoint_ClearSetupReceived();
    146e:	80 91 e8 00 	lds	r24, 0x00E8
    1472:	87 7f       	andi	r24, 0xF7	; 247
    1474:	80 93 e8 00 	sts	0x00E8, r24

	Endpoint_ClearSetupIN();
    1478:	80 91 e8 00 	lds	r24, 0x00E8
    147c:	8e 7f       	andi	r24, 0xFE	; 254
    147e:	80 93 e8 00 	sts	0x00E8, r24
	while (!(Endpoint_IsSetupINReady()));
    1482:	80 91 e8 00 	lds	r24, 0x00E8
    1486:	80 ff       	sbrs	r24, 0
    1488:	fc cf       	rjmp	.-8      	; 0x1482 <USB_Device_ProcessControlPacket+0x1ea>
	
	UDADDR |= (1 << ADDEN);
    148a:	80 91 e3 00 	lds	r24, 0x00E3
    148e:	80 68       	ori	r24, 0x80	; 128
    1490:	80 93 e3 00 	sts	0x00E3, r24
    1494:	bb c0       	rjmp	.+374    	; 0x160c <USB_Device_ProcessControlPacket+0x374>
			static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint16_t Endpoint_Read_Word_LE(void)
			{
				uint16_t Data;
				
				Data  = UEDATX;
    1496:	e0 91 f1 00 	lds	r30, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    149a:	30 91 f1 00 	lds	r19, 0x00F1
			static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint16_t Endpoint_Read_Word_LE(void)
			{
				uint16_t Data;
				
				Data  = UEDATX;
    149e:	80 91 f1 00 	lds	r24, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    14a2:	20 91 f1 00 	lds	r18, 0x00F1
			static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint16_t Endpoint_Read_Word_LE(void)
			{
				uint16_t Data;
				
				Data  = UEDATX;
    14a6:	00 91 f1 00 	lds	r16, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    14aa:	10 91 f1 00 	lds	r17, 0x00F1
	void*    DescriptorPointer;
	uint16_t DescriptorSize;
	
	bool     SendZLP;
	
	if (!(USB_GetDescriptor(wValue, wIndex, &DescriptorPointer, &DescriptorSize)))
    14ae:	72 2f       	mov	r23, r18
    14b0:	60 e0       	ldi	r22, 0x00	; 0
    14b2:	90 e0       	ldi	r25, 0x00	; 0
    14b4:	68 2b       	or	r22, r24
    14b6:	79 2b       	or	r23, r25
    14b8:	93 2f       	mov	r25, r19
    14ba:	80 e0       	ldi	r24, 0x00	; 0
    14bc:	f0 e0       	ldi	r31, 0x00	; 0
    14be:	9e 01       	movw	r18, r28
    14c0:	29 5f       	subi	r18, 0xF9	; 249
    14c2:	3f 4f       	sbci	r19, 0xFF	; 255
    14c4:	ae 01       	movw	r20, r28
    14c6:	4d 5f       	subi	r20, 0xFD	; 253
    14c8:	5f 4f       	sbci	r21, 0xFF	; 255
    14ca:	8e 2b       	or	r24, r30
    14cc:	9f 2b       	or	r25, r31
    14ce:	46 da       	rcall	.-2932   	; 0x95c <USB_GetDescriptor>
    14d0:	88 23       	and	r24, r24
    14d2:	09 f4       	brne	.+2      	; 0x14d6 <USB_Device_ProcessControlPacket+0x23e>
    14d4:	9b c0       	rjmp	.+310    	; 0x160c <USB_Device_ProcessControlPacket+0x374>
	  return;
	
	Endpoint_ClearSetupReceived();
    14d6:	80 91 e8 00 	lds	r24, 0x00E8
    14da:	87 7f       	andi	r24, 0xF7	; 247
    14dc:	80 93 e8 00 	sts	0x00E8, r24
    14e0:	91 2f       	mov	r25, r17
    14e2:	80 e0       	ldi	r24, 0x00	; 0
    14e4:	40 2f       	mov	r20, r16
    14e6:	50 e0       	ldi	r21, 0x00	; 0
    14e8:	2f 81       	ldd	r18, Y+7	; 0x07
    14ea:	38 85       	ldd	r19, Y+8	; 0x08
    14ec:	48 2b       	or	r20, r24
    14ee:	59 2b       	or	r21, r25
    14f0:	24 17       	cp	r18, r20
    14f2:	35 07       	cpc	r19, r21
    14f4:	08 f4       	brcc	.+2      	; 0x14f8 <USB_Device_ProcessControlPacket+0x260>
    14f6:	a9 01       	movw	r20, r18
	
	if (wLength > DescriptorSize)
	  wLength = DescriptorSize;
	  
	SendZLP = !(wLength % USB_ControlEndpointSize);
    14f8:	60 91 25 01 	lds	r22, 0x0125
    14fc:	ab 81       	ldd	r26, Y+3	; 0x03
    14fe:	bc 81       	ldd	r27, Y+4	; 0x04
    1500:	9a 01       	movw	r18, r20
    1502:	16 c0       	rjmp	.+44     	; 0x1530 <USB_Device_ProcessControlPacket+0x298>
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
	{
		while (!(Endpoint_IsSetupINReady()));
    1504:	80 91 e8 00 	lds	r24, 0x00E8
    1508:	80 ff       	sbrs	r24, 0
    150a:	fc cf       	rjmp	.-8      	; 0x1504 <USB_Device_ProcessControlPacket+0x26c>
    150c:	08 c0       	rjmp	.+16     	; 0x151e <USB_Device_ProcessControlPacket+0x286>
    150e:	fd 01       	movw	r30, r26
    1510:	11 96       	adiw	r26, 0x01	; 1
			#if defined(USE_RAM_DESCRIPTORS)
			Endpoint_Write_Byte(*((uint8_t*)DescriptorPointer++));
			#elif defined (USE_EEPROM_DESCRIPTORS)
			Endpoint_Write_Byte(eeprom_read_byte(DescriptorPointer++));			
			#else
			Endpoint_Write_Byte(pgm_read_byte(DescriptorPointer++));
    1512:	e4 91       	lpm	r30, Z+
			}

			/** Writes one byte from the currently selected endpoint's bank, for IN direction endpoints. */
			static inline void Endpoint_Write_Byte(const uint8_t Byte)
			{
				UEDATX = Byte;
    1514:	e0 93 f1 00 	sts	0x00F1, r30
			#endif
			
			wLength--;
    1518:	21 50       	subi	r18, 0x01	; 1
    151a:	30 40       	sbci	r19, 0x00	; 0
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
	{
		while (!(Endpoint_IsSetupINReady()));
		
		while (wLength && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
    151c:	21 f0       	breq	.+8      	; 0x1526 <USB_Device_ProcessControlPacket+0x28e>
    151e:	80 91 f2 00 	lds	r24, 0x00F2
    1522:	86 17       	cp	r24, r22
    1524:	a0 f3       	brcs	.-24     	; 0x150e <USB_Device_ProcessControlPacket+0x276>
			#endif
			
			wLength--;
		}
		
		Endpoint_ClearSetupIN();
    1526:	80 91 e8 00 	lds	r24, 0x00E8
    152a:	8e 7f       	andi	r24, 0xFE	; 254
    152c:	80 93 e8 00 	sts	0x00E8, r24
	if (wLength > DescriptorSize)
	  wLength = DescriptorSize;
	  
	SendZLP = !(wLength % USB_ControlEndpointSize);
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
    1530:	21 15       	cp	r18, r1
    1532:	31 05       	cpc	r19, r1
    1534:	21 f0       	breq	.+8      	; 0x153e <USB_Device_ProcessControlPacket+0x2a6>
    1536:	80 91 e8 00 	lds	r24, 0x00E8
    153a:	82 ff       	sbrs	r24, 2
    153c:	e3 cf       	rjmp	.-58     	; 0x1504 <USB_Device_ProcessControlPacket+0x26c>
		}
		
		Endpoint_ClearSetupIN();
	}
	
	if (Endpoint_IsSetupOUTReceived())
    153e:	80 91 e8 00 	lds	r24, 0x00E8
    1542:	82 fd       	sbrc	r24, 2
    1544:	28 c0       	rjmp	.+80     	; 0x1596 <USB_Device_ProcessControlPacket+0x2fe>
	{
		Endpoint_ClearSetupOUT();
		return;
	}
	
	if (SendZLP)
    1546:	ca 01       	movw	r24, r20
    1548:	70 e0       	ldi	r23, 0x00	; 0
    154a:	3a d1       	rcall	.+628    	; 0x17c0 <__udivmodhi4>
    154c:	89 2b       	or	r24, r25
    154e:	49 f4       	brne	.+18     	; 0x1562 <USB_Device_ProcessControlPacket+0x2ca>
	{
		while (!(Endpoint_IsSetupINReady()));
    1550:	80 91 e8 00 	lds	r24, 0x00E8
    1554:	80 ff       	sbrs	r24, 0
    1556:	fc cf       	rjmp	.-8      	; 0x1550 <USB_Device_ProcessControlPacket+0x2b8>
		Endpoint_ClearSetupIN();
    1558:	80 91 e8 00 	lds	r24, 0x00E8
    155c:	8e 7f       	andi	r24, 0xFE	; 254
    155e:	80 93 e8 00 	sts	0x00E8, r24
	}

	while (!(Endpoint_IsSetupOUTReceived()));
    1562:	80 91 e8 00 	lds	r24, 0x00E8
    1566:	82 ff       	sbrs	r24, 2
    1568:	fc cf       	rjmp	.-8      	; 0x1562 <USB_Device_ProcessControlPacket+0x2ca>
    156a:	15 c0       	rjmp	.+42     	; 0x1596 <USB_Device_ProcessControlPacket+0x2fe>
			USB_Device_GetDescriptor();
			RequestHandled = true;
			
			break;
		case REQ_GetConfiguration:
			if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE))
    156c:	60 38       	cpi	r22, 0x80	; 128
    156e:	09 f0       	breq	.+2      	; 0x1572 <USB_Device_ProcessControlPacket+0x2da>
    1570:	4b c0       	rjmp	.+150    	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
	RAISE_EVENT(USB_ConfigurationChanged);
}

void USB_Device_GetConfiguration(void)
{
	Endpoint_ClearSetupReceived();	
    1572:	80 91 e8 00 	lds	r24, 0x00E8
    1576:	87 7f       	andi	r24, 0xF7	; 247
    1578:	80 93 e8 00 	sts	0x00E8, r24

	Endpoint_Write_Byte(USB_ConfigurationNumber);
    157c:	80 91 64 02 	lds	r24, 0x0264
    1580:	80 93 f1 00 	sts	0x00F1, r24
	
	Endpoint_ClearSetupIN();
    1584:	80 91 e8 00 	lds	r24, 0x00E8
    1588:	8e 7f       	andi	r24, 0xFE	; 254
    158a:	80 93 e8 00 	sts	0x00E8, r24

	while (!(Endpoint_IsSetupOUTReceived()));
    158e:	80 91 e8 00 	lds	r24, 0x00E8
    1592:	82 ff       	sbrs	r24, 2
    1594:	fc cf       	rjmp	.-8      	; 0x158e <USB_Device_ProcessControlPacket+0x2f6>
	Endpoint_ClearSetupOUT();
    1596:	80 91 e8 00 	lds	r24, 0x00E8
    159a:	8b 7f       	andi	r24, 0xFB	; 251
    159c:	80 93 e8 00 	sts	0x00E8, r24
    15a0:	35 c0       	rjmp	.+106    	; 0x160c <USB_Device_ProcessControlPacket+0x374>
				RequestHandled = true;
			}

			break;
		case REQ_SetConfiguration:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
    15a2:	66 23       	and	r22, r22
    15a4:	89 f5       	brne	.+98     	; 0x1608 <USB_Device_ProcessControlPacket+0x370>
			static inline uint16_t Endpoint_Read_Word_LE(void) ATTR_WARN_UNUSED_RESULT;
			static inline uint16_t Endpoint_Read_Word_LE(void)
			{
				uint16_t Data;
				
				Data  = UEDATX;
    15a6:	00 91 f1 00 	lds	r16, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    15aa:	10 91 f1 00 	lds	r17, 0x00F1
}

static void USB_Device_SetConfiguration(void)
{
	uint16_t                 wValue               = Endpoint_Read_Word_LE();
	bool                     NotAlreadyConfigured = !(USB_ConfigurationNumber);
    15ae:	f0 90 64 02 	lds	r15, 0x0264
	USB_Descriptor_Device_t* DevDescriptorPtr;
	uint16_t                 DevDescriptorSize;

	if ((USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DevDescriptorPtr, &DevDescriptorSize) == false) ||
    15b2:	9e 01       	movw	r18, r28
    15b4:	29 5f       	subi	r18, 0xF9	; 249
    15b6:	3f 4f       	sbci	r19, 0xFF	; 255
    15b8:	ae 01       	movw	r20, r28
    15ba:	4b 5f       	subi	r20, 0xFB	; 251
    15bc:	5f 4f       	sbci	r21, 0xFF	; 255
    15be:	80 e0       	ldi	r24, 0x00	; 0
    15c0:	91 e0       	ldi	r25, 0x01	; 1
    15c2:	cc d9       	rcall	.-3176   	; 0x95c <USB_GetDescriptor>
    15c4:	88 23       	and	r24, r24
    15c6:	11 f1       	breq	.+68     	; 0x160c <USB_Device_ProcessControlPacket+0x374>
    15c8:	91 2f       	mov	r25, r17
    15ca:	80 e0       	ldi	r24, 0x00	; 0
    15cc:	20 2f       	mov	r18, r16
    15ce:	30 e0       	ldi	r19, 0x00	; 0
    15d0:	28 2b       	or	r18, r24
    15d2:	39 2b       	or	r19, r25
#if defined(USE_RAM_DESCRIPTORS)
	    (wValue > DevDescriptorPtr->NumberOfConfigurations))
#elif defined (USE_EEPROM_DESCRIPTORS)
	    (wValue > eeprom_read_byte(&DevDescriptorPtr->NumberOfConfigurations)))
#else
	    (wValue > pgm_read_byte(&DevDescriptorPtr->NumberOfConfigurations)))
    15d4:	ed 81       	ldd	r30, Y+5	; 0x05
    15d6:	fe 81       	ldd	r31, Y+6	; 0x06
    15d8:	71 96       	adiw	r30, 0x11	; 17
    15da:	e4 91       	lpm	r30, Z+
	uint16_t                 wValue               = Endpoint_Read_Word_LE();
	bool                     NotAlreadyConfigured = !(USB_ConfigurationNumber);
	USB_Descriptor_Device_t* DevDescriptorPtr;
	uint16_t                 DevDescriptorSize;

	if ((USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DevDescriptorPtr, &DevDescriptorSize) == false) ||
    15dc:	8e 2f       	mov	r24, r30
    15de:	90 e0       	ldi	r25, 0x00	; 0
    15e0:	82 17       	cp	r24, r18
    15e2:	93 07       	cpc	r25, r19
    15e4:	98 f0       	brcs	.+38     	; 0x160c <USB_Device_ProcessControlPacket+0x374>
#endif
	{
		return;
	}
	
	Endpoint_ClearSetupReceived();
    15e6:	80 91 e8 00 	lds	r24, 0x00E8
    15ea:	87 7f       	andi	r24, 0xF7	; 247
    15ec:	80 93 e8 00 	sts	0x00E8, r24

	USB_ConfigurationNumber = wValue;
    15f0:	20 93 64 02 	sts	0x0264, r18

	Endpoint_ClearSetupIN();
    15f4:	80 91 e8 00 	lds	r24, 0x00E8
    15f8:	8e 7f       	andi	r24, 0xFE	; 254
    15fa:	80 93 e8 00 	sts	0x00E8, r24

	if (NotAlreadyConfigured)
    15fe:	ff 20       	and	r15, r15
    1600:	09 f4       	brne	.+2      	; 0x1604 <USB_Device_ProcessControlPacket+0x36c>
	  RAISE_EVENT(USB_DeviceEnumerationComplete);
    1602:	cb d0       	rcall	.+406    	; 0x179a <Event_USB_DeviceEnumerationComplete>

	RAISE_EVENT(USB_ConfigurationChanged);
    1604:	5c d9       	rcall	.-3400   	; 0x8be <Event_USB_ConfigurationChanged>
    1606:	02 c0       	rjmp	.+4      	; 0x160c <USB_Device_ProcessControlPacket+0x374>

			break;
	}

	if (!(RequestHandled))
	  RAISE_EVENT(USB_UnhandledControlPacket, bRequest, bmRequestType);
    1608:	84 2f       	mov	r24, r20
    160a:	19 d9       	rcall	.-3534   	; 0x83e <Event_USB_UnhandledControlPacket>
	  
	if (Endpoint_IsSetupReceived())
    160c:	80 91 e8 00 	lds	r24, 0x00E8
    1610:	83 ff       	sbrs	r24, 3
    1612:	0a c0       	rjmp	.+20     	; 0x1628 <USB_Device_ProcessControlPacket+0x390>
	{
		Endpoint_StallTransaction();
    1614:	80 91 eb 00 	lds	r24, 0x00EB
    1618:	80 62       	ori	r24, 0x20	; 32
    161a:	80 93 eb 00 	sts	0x00EB, r24
		Endpoint_ClearSetupReceived();		
    161e:	80 91 e8 00 	lds	r24, 0x00E8
    1622:	87 7f       	andi	r24, 0xF7	; 247
    1624:	80 93 e8 00 	sts	0x00E8, r24
	}
}
    1628:	28 96       	adiw	r28, 0x08	; 8
    162a:	0f b6       	in	r0, 0x3f	; 63
    162c:	f8 94       	cli
    162e:	de bf       	out	0x3e, r29	; 62
    1630:	0f be       	out	0x3f, r0	; 63
    1632:	cd bf       	out	0x3d, r28	; 61
    1634:	cf 91       	pop	r28
    1636:	df 91       	pop	r29
    1638:	1f 91       	pop	r17
    163a:	0f 91       	pop	r16
    163c:	ff 90       	pop	r15
    163e:	08 95       	ret

00001640 <USB_USBTask>:
#if defined(USB_CAN_BE_HOST)
volatile uint8_t   USB_HostState;
#endif

TASK(USB_USBTask)
{
    1640:	1f 93       	push	r17
#endif

#if defined(USB_CAN_BE_DEVICE)
static void USB_DeviceTask(void)
{
	if (USB_IsConnected)
    1642:	80 91 66 02 	lds	r24, 0x0266
    1646:	88 23       	and	r24, r24
    1648:	61 f0       	breq	.+24     	; 0x1662 <USB_USBTask+0x22>
	{
		uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
    164a:	10 91 e9 00 	lds	r17, 0x00E9
	
		Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
    164e:	10 92 e9 00 	sts	0x00E9, r1

		if (Endpoint_IsSetupReceived())
    1652:	80 91 e8 00 	lds	r24, 0x00E8
    1656:	83 ff       	sbrs	r24, 3
    1658:	01 c0       	rjmp	.+2      	; 0x165c <USB_USBTask+0x1c>
		  USB_Device_ProcessControlPacket();
    165a:	1e de       	rcall	.-964    	; 0x1298 <USB_Device_ProcessControlPacket>
#if defined(USB_CAN_BE_DEVICE)
static void USB_DeviceTask(void)
{
	if (USB_IsConnected)
	{
		uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
    165c:	17 70       	andi	r17, 0x07	; 7
		Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);

		if (Endpoint_IsSetupReceived())
		  USB_Device_ProcessControlPacket();
		  
		Endpoint_SelectEndpoint(PrevEndpoint);
    165e:	10 93 e9 00 	sts	0x00E9, r17
		USB_DeviceTask();
	#else
		if (USB_IsInitialized)
		  (*USB_TaskPtr)();
	#endif
}
    1662:	1f 91       	pop	r17
    1664:	08 95       	ret

00001666 <USB_INT_DisableAllInterrupts>:

#include "../LowLevel/USBMode.h"
#include "USBInterrupt.h"

void USB_INT_DisableAllInterrupts(void)
{
    1666:	10 92 e2 00 	sts	0x00E2, r1
	#endif
	
	#if defined(USB_CAN_BE_DEVICE)
	UDIEN   = 0;
	#endif
}
    166a:	08 95       	ret

0000166c <USB_INT_ClearAllInterrupts>:

void USB_INT_ClearAllInterrupts(void)
{
    166c:	10 92 e1 00 	sts	0x00E1, r1
	#endif
	
	#if defined(USB_CAN_BE_DEVICE)
	UDINT   = 0;
	#endif
}
    1670:	08 95       	ret

00001672 <__vector_11>:

ISR(USB_GEN_vect)
{
    1672:	1f 92       	push	r1
    1674:	0f 92       	push	r0
    1676:	0f b6       	in	r0, 0x3f	; 63
    1678:	0f 92       	push	r0
    167a:	11 24       	eor	r1, r1
    167c:	2f 93       	push	r18
    167e:	3f 93       	push	r19
    1680:	4f 93       	push	r20
    1682:	5f 93       	push	r21
    1684:	6f 93       	push	r22
    1686:	7f 93       	push	r23
    1688:	8f 93       	push	r24
    168a:	9f 93       	push	r25
    168c:	af 93       	push	r26
    168e:	bf 93       	push	r27
    1690:	ef 93       	push	r30
    1692:	ff 93       	push	r31
			USB_IsConnected = false;
		}
	}
	#endif

	if (USB_INT_HasOccurred(USB_INT_SUSPEND) && USB_INT_IsEnabled(USB_INT_SUSPEND))
    1694:	80 91 e1 00 	lds	r24, 0x00E1
    1698:	80 ff       	sbrs	r24, 0
    169a:	1e c0       	rjmp	.+60     	; 0x16d8 <__vector_11+0x66>
    169c:	80 91 e2 00 	lds	r24, 0x00E2
    16a0:	80 ff       	sbrs	r24, 0
    16a2:	1a c0       	rjmp	.+52     	; 0x16d8 <__vector_11+0x66>
	{
		USB_INT_Clear(USB_INT_SUSPEND);
    16a4:	80 91 e1 00 	lds	r24, 0x00E1
    16a8:	8e 7f       	andi	r24, 0xFE	; 254
    16aa:	80 93 e1 00 	sts	0x00E1, r24

		USB_INT_Disable(USB_INT_SUSPEND);
    16ae:	80 91 e2 00 	lds	r24, 0x00E2
    16b2:	8e 7f       	andi	r24, 0xFE	; 254
    16b4:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_WAKEUP);
    16b8:	80 91 e2 00 	lds	r24, 0x00E2
    16bc:	80 61       	ori	r24, 0x10	; 16
    16be:	80 93 e2 00 	sts	0x00E2, r24
		
		USB_CLK_Freeze();
    16c2:	80 91 d8 00 	lds	r24, 0x00D8
    16c6:	80 62       	ori	r24, 0x20	; 32
    16c8:	80 93 d8 00 	sts	0x00D8, r24
		#if !defined(MANUAL_PLL_CONTROL)
		USB_PLL_Off();
    16cc:	19 bc       	out	0x29, r1	; 41
		#endif

		RAISE_EVENT(USB_Suspend);
    16ce:	65 d0       	rcall	.+202    	; 0x179a <Event_USB_DeviceEnumerationComplete>

		#if defined(USB_LIMITED_CONTROLLER)
		USB_IsConnected = false;
    16d0:	10 92 66 02 	sts	0x0266, r1
		RAISE_EVENT(USB_Disconnect);
    16d4:	0e 94 2b 03 	call	0x656	; 0x656 <Event_USB_Disconnect>
		#endif
	}

	if (USB_INT_HasOccurred(USB_INT_WAKEUP) && USB_INT_IsEnabled(USB_INT_WAKEUP))
    16d8:	80 91 e1 00 	lds	r24, 0x00E1
    16dc:	84 ff       	sbrs	r24, 4
    16de:	26 c0       	rjmp	.+76     	; 0x172c <__vector_11+0xba>
    16e0:	80 91 e2 00 	lds	r24, 0x00E2
    16e4:	84 ff       	sbrs	r24, 4
    16e6:	22 c0       	rjmp	.+68     	; 0x172c <__vector_11+0xba>
	{
		#if !defined(MANUAL_PLL_CONTROL)
		USB_PLL_On();
    16e8:	84 e0       	ldi	r24, 0x04	; 4
    16ea:	89 bd       	out	0x29, r24	; 41
    16ec:	89 b5       	in	r24, 0x29	; 41
    16ee:	82 60       	ori	r24, 0x02	; 2
    16f0:	89 bd       	out	0x29, r24	; 41
		#endif
		while (!(USB_PLL_IsReady()));
    16f2:	09 b4       	in	r0, 0x29	; 41
    16f4:	00 fe       	sbrs	r0, 0
    16f6:	fd cf       	rjmp	.-6      	; 0x16f2 <__vector_11+0x80>

		USB_CLK_Unfreeze();
    16f8:	80 91 d8 00 	lds	r24, 0x00D8
    16fc:	8f 7d       	andi	r24, 0xDF	; 223
    16fe:	80 93 d8 00 	sts	0x00D8, r24

		USB_INT_Clear(USB_INT_WAKEUP);
    1702:	80 91 e1 00 	lds	r24, 0x00E1
    1706:	8f 7e       	andi	r24, 0xEF	; 239
    1708:	80 93 e1 00 	sts	0x00E1, r24

		USB_INT_Disable(USB_INT_WAKEUP);
    170c:	80 91 e2 00 	lds	r24, 0x00E2
    1710:	8f 7e       	andi	r24, 0xEF	; 239
    1712:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_SUSPEND);
    1716:	80 91 e2 00 	lds	r24, 0x00E2
    171a:	81 60       	ori	r24, 0x01	; 1
    171c:	80 93 e2 00 	sts	0x00E2, r24
		
		#if defined(USB_LIMITED_CONTROLLER)
		USB_IsConnected = true;
    1720:	81 e0       	ldi	r24, 0x01	; 1
    1722:	80 93 66 02 	sts	0x0266, r24
		RAISE_EVENT(USB_Connect);
    1726:	0e 94 33 03 	call	0x666	; 0x666 <Event_USB_Connect>
		#endif

		RAISE_EVENT(USB_WakeUp);
    172a:	37 d0       	rcall	.+110    	; 0x179a <Event_USB_DeviceEnumerationComplete>
	}
   
	if (USB_INT_HasOccurred(USB_INT_EORSTI) && USB_INT_IsEnabled(USB_INT_EORSTI))
    172c:	80 91 e1 00 	lds	r24, 0x00E1
    1730:	83 ff       	sbrs	r24, 3
    1732:	22 c0       	rjmp	.+68     	; 0x1778 <__vector_11+0x106>
    1734:	80 91 e2 00 	lds	r24, 0x00E2
    1738:	83 ff       	sbrs	r24, 3
    173a:	1e c0       	rjmp	.+60     	; 0x1778 <__vector_11+0x106>
	{
		USB_INT_Clear(USB_INT_EORSTI);
    173c:	80 91 e1 00 	lds	r24, 0x00E1
    1740:	87 7f       	andi	r24, 0xF7	; 247
    1742:	80 93 e1 00 	sts	0x00E1, r24

		USB_ConfigurationNumber = 0;
    1746:	10 92 64 02 	sts	0x0264, r1

		USB_INT_Clear(USB_INT_SUSPEND);
    174a:	80 91 e1 00 	lds	r24, 0x00E1
    174e:	8e 7f       	andi	r24, 0xFE	; 254
    1750:	80 93 e1 00 	sts	0x00E1, r24
		USB_INT_Disable(USB_INT_SUSPEND);
    1754:	80 91 e2 00 	lds	r24, 0x00E2
    1758:	8e 7f       	andi	r24, 0xFE	; 254
    175a:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_WAKEUP);
    175e:	80 91 e2 00 	lds	r24, 0x00E2
    1762:	80 61       	ori	r24, 0x10	; 16
    1764:	80 93 e2 00 	sts	0x00E2, r24

		Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
    1768:	60 91 25 01 	lds	r22, 0x0125
    176c:	20 e0       	ldi	r18, 0x00	; 0
    176e:	40 e0       	ldi	r20, 0x00	; 0
    1770:	70 e0       	ldi	r23, 0x00	; 0
    1772:	80 e0       	ldi	r24, 0x00	; 0
    1774:	07 dd       	rcall	.-1522   	; 0x1184 <Endpoint_ConfigureEndpoint_P>
		                           ENDPOINT_DIR_OUT, USB_ControlEndpointSize,
		                           ENDPOINT_BANK_SINGLE);

		RAISE_EVENT(USB_Reset);
    1776:	11 d0       	rcall	.+34     	; 0x179a <Event_USB_DeviceEnumerationComplete>
		USB_OTGPAD_On();

		USB_SetupInterface();	
	}
	#endif
}
    1778:	ff 91       	pop	r31
    177a:	ef 91       	pop	r30
    177c:	bf 91       	pop	r27
    177e:	af 91       	pop	r26
    1780:	9f 91       	pop	r25
    1782:	8f 91       	pop	r24
    1784:	7f 91       	pop	r23
    1786:	6f 91       	pop	r22
    1788:	5f 91       	pop	r21
    178a:	4f 91       	pop	r20
    178c:	3f 91       	pop	r19
    178e:	2f 91       	pop	r18
    1790:	0f 90       	pop	r0
    1792:	0f be       	out	0x3f, r0	; 63
    1794:	0f 90       	pop	r0
    1796:	1f 90       	pop	r1
    1798:	18 95       	reti

0000179a <Event_USB_DeviceEnumerationComplete>:

#define INCLUDE_FROM_EVENTS_C
#include "Events.h"

static void __stub(void)
{
    179a:	08 95       	ret

0000179c <__mulhi3>:
    179c:	55 27       	eor	r21, r21
    179e:	00 24       	eor	r0, r0

000017a0 <__mulhi3_loop>:
    17a0:	80 ff       	sbrs	r24, 0
    17a2:	02 c0       	rjmp	.+4      	; 0x17a8 <__mulhi3_skip1>
    17a4:	06 0e       	add	r0, r22
    17a6:	57 1f       	adc	r21, r23

000017a8 <__mulhi3_skip1>:
    17a8:	66 0f       	add	r22, r22
    17aa:	77 1f       	adc	r23, r23
    17ac:	61 15       	cp	r22, r1
    17ae:	71 05       	cpc	r23, r1
    17b0:	21 f0       	breq	.+8      	; 0x17ba <__mulhi3_exit>
    17b2:	96 95       	lsr	r25
    17b4:	87 95       	ror	r24
    17b6:	00 97       	sbiw	r24, 0x00	; 0
    17b8:	99 f7       	brne	.-26     	; 0x17a0 <__mulhi3_loop>

000017ba <__mulhi3_exit>:
    17ba:	95 2f       	mov	r25, r21
    17bc:	80 2d       	mov	r24, r0
    17be:	08 95       	ret

000017c0 <__udivmodhi4>:
    17c0:	aa 1b       	sub	r26, r26
    17c2:	bb 1b       	sub	r27, r27
    17c4:	51 e1       	ldi	r21, 0x11	; 17
    17c6:	07 c0       	rjmp	.+14     	; 0x17d6 <__udivmodhi4_ep>

000017c8 <__udivmodhi4_loop>:
    17c8:	aa 1f       	adc	r26, r26
    17ca:	bb 1f       	adc	r27, r27
    17cc:	a6 17       	cp	r26, r22
    17ce:	b7 07       	cpc	r27, r23
    17d0:	10 f0       	brcs	.+4      	; 0x17d6 <__udivmodhi4_ep>
    17d2:	a6 1b       	sub	r26, r22
    17d4:	b7 0b       	sbc	r27, r23

000017d6 <__udivmodhi4_ep>:
    17d6:	88 1f       	adc	r24, r24
    17d8:	99 1f       	adc	r25, r25
    17da:	5a 95       	dec	r21
    17dc:	a9 f7       	brne	.-22     	; 0x17c8 <__udivmodhi4_loop>
    17de:	80 95       	com	r24
    17e0:	90 95       	com	r25
    17e2:	bc 01       	movw	r22, r24
    17e4:	cd 01       	movw	r24, r26
    17e6:	08 95       	ret

000017e8 <__udivmodsi4>:
    17e8:	a1 e2       	ldi	r26, 0x21	; 33
    17ea:	1a 2e       	mov	r1, r26
    17ec:	aa 1b       	sub	r26, r26
    17ee:	bb 1b       	sub	r27, r27
    17f0:	fd 01       	movw	r30, r26
    17f2:	0d c0       	rjmp	.+26     	; 0x180e <__udivmodsi4_ep>

000017f4 <__udivmodsi4_loop>:
    17f4:	aa 1f       	adc	r26, r26
    17f6:	bb 1f       	adc	r27, r27
    17f8:	ee 1f       	adc	r30, r30
    17fa:	ff 1f       	adc	r31, r31
    17fc:	a2 17       	cp	r26, r18
    17fe:	b3 07       	cpc	r27, r19
    1800:	e4 07       	cpc	r30, r20
    1802:	f5 07       	cpc	r31, r21
    1804:	20 f0       	brcs	.+8      	; 0x180e <__udivmodsi4_ep>
    1806:	a2 1b       	sub	r26, r18
    1808:	b3 0b       	sbc	r27, r19
    180a:	e4 0b       	sbc	r30, r20
    180c:	f5 0b       	sbc	r31, r21

0000180e <__udivmodsi4_ep>:
    180e:	66 1f       	adc	r22, r22
    1810:	77 1f       	adc	r23, r23
    1812:	88 1f       	adc	r24, r24
    1814:	99 1f       	adc	r25, r25
    1816:	1a 94       	dec	r1
    1818:	69 f7       	brne	.-38     	; 0x17f4 <__udivmodsi4_loop>
    181a:	60 95       	com	r22
    181c:	70 95       	com	r23
    181e:	80 95       	com	r24
    1820:	90 95       	com	r25
    1822:	9b 01       	movw	r18, r22
    1824:	ac 01       	movw	r20, r24
    1826:	bd 01       	movw	r22, r26
    1828:	cf 01       	movw	r24, r30
    182a:	08 95       	ret

0000182c <_exit>:
    182c:	f8 94       	cli

0000182e <__stop_program>:
    182e:	ff cf       	rjmp	.-2      	; 0x182e <__stop_program>
