
USB10.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .data         0000001c  00800100  00001c7c  00001cf0  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  1 .text         00001c7c  00000000  00000000  00000074  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .bss          00000095  0080011c  00001c98  00001d0c  2**0
                  ALLOC
  3 .debug_aranges 000003c8  00000000  00000000  00001d0c  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_pubnames 00000974  00000000  00000000  000020d4  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_info   00003a64  00000000  00000000  00002a48  2**0
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_abbrev 00001358  00000000  00000000  000064ac  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_line   0000371f  00000000  00000000  00007804  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_frame  000005d0  00000000  00000000  0000af24  2**2
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_str    000015e5  00000000  00000000  0000b4f4  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_loc    0000143d  00000000  00000000  0000cad9  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_ranges 00000430  00000000  00000000  0000df16  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:




void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
       0:	b7 c0       	rjmp	.+366    	; 0x170 <__ctors_end>
	
	Delay(I2C_PERIOD);
}

void Delay(uint8_t delay)
{
       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:	d1 c0       	rjmp	.+418    	; 0x1a8 <__bad_interrupt>
	
	Endpoint_AllocateMemory();
}

void Endpoint_ClearEndpoints(void)
{
       6:	00 00       	nop
       8:	cf c0       	rjmp	.+414    	; 0x1a8 <__bad_interrupt>
       a:	00 00       	nop
       c:	cd c0       	rjmp	.+410    	; 0x1a8 <__bad_interrupt>
       e:	00 00       	nop
      10:	cb c0       	rjmp	.+406    	; 0x1a8 <__bad_interrupt>
      12:	00 00       	nop
      14:	c9 c0       	rjmp	.+402    	; 0x1a8 <__bad_interrupt>
      16:	00 00       	nop
      18:	c7 c0       	rjmp	.+398    	; 0x1a8 <__bad_interrupt>
      1a:	00 00       	nop
      1c:	c5 c0       	rjmp	.+394    	; 0x1a8 <__bad_interrupt>
      1e:	00 00       	nop
      20:	c3 c0       	rjmp	.+390    	; 0x1a8 <__bad_interrupt>
      22:	00 00       	nop
      24:	c1 c0       	rjmp	.+386    	; 0x1a8 <__bad_interrupt>
      26:	00 00       	nop
      28:	bf c0       	rjmp	.+382    	; 0x1a8 <__bad_interrupt>
      2a:	00 00       	nop
      2c:	0c 94 5f 0d 	jmp	0x1abe	; 0x1abe <__vector_11>
      30:	bb c0       	rjmp	.+374    	; 0x1a8 <__bad_interrupt>
      32:	00 00       	nop
      34:	b9 c0       	rjmp	.+370    	; 0x1a8 <__bad_interrupt>
      36:	00 00       	nop
      38:	b7 c0       	rjmp	.+366    	; 0x1a8 <__bad_interrupt>
      3a:	00 00       	nop
      3c:	b5 c0       	rjmp	.+362    	; 0x1a8 <__bad_interrupt>
      3e:	00 00       	nop
      40:	b3 c0       	rjmp	.+358    	; 0x1a8 <__bad_interrupt>
      42:	00 00       	nop
      44:	b1 c0       	rjmp	.+354    	; 0x1a8 <__bad_interrupt>
      46:	00 00       	nop
      48:	af c0       	rjmp	.+350    	; 0x1a8 <__bad_interrupt>
      4a:	00 00       	nop
      4c:	ad c0       	rjmp	.+346    	; 0x1a8 <__bad_interrupt>
      4e:	00 00       	nop
      50:	ab c0       	rjmp	.+342    	; 0x1a8 <__bad_interrupt>
      52:	00 00       	nop
      54:	a9 c0       	rjmp	.+338    	; 0x1a8 <__bad_interrupt>
      56:	00 00       	nop
      58:	a7 c0       	rjmp	.+334    	; 0x1a8 <__bad_interrupt>
      5a:	00 00       	nop
      5c:	dc c1       	rjmp	.+952    	; 0x416 <__vector_23>
      5e:	00 00       	nop
      60:	a3 c0       	rjmp	.+326    	; 0x1a8 <__bad_interrupt>
      62:	00 00       	nop
      64:	2b c1       	rjmp	.+598    	; 0x2bc <__vector_25>
      66:	00 00       	nop
      68:	9f c0       	rjmp	.+318    	; 0x1a8 <__bad_interrupt>
      6a:	00 00       	nop
      6c:	9d c0       	rjmp	.+314    	; 0x1a8 <__bad_interrupt>
      6e:	00 00       	nop
      70:	9b c0       	rjmp	.+310    	; 0x1a8 <__bad_interrupt>
      72:	00 00       	nop

00000074 <MYSTRING>:
      74:	49 27 6d 20 69 6e 20 46 6c 61 73 68 00              I'm in Flash.

00000081 <__c.2409>:
      81:	0d 0a 53 4f 43 20 52 6f 62 6f 74 69 63 73 20 48     ..SOC Robotics H
      91:	65 6c 70 20 47 75 69 64 65 2e 0d 0a 2e 2e 2e 2e     elp Guide.......
      a1:	2e 2e 2e 2e 41 73 6b 20 53 74 65 76 65 3f 00        ....Ask Steve?.

000000b0 <__c.2300>:
      b0:	53 4f 43 20 52 6f 62 6f 74 69 63 73 20 55 53 42     SOC Robotics USB
      c0:	31 30 2c 20 28 63 29 20 32 30 30 38 0d 0a 0d 0a     10, (c) 2008....
      d0:	00                                                  .

000000d1 <DeviceDescriptor>:
      d1:	12 01 10 01 02 00 00 08 eb 03 4b 20 00 00 01 02     ..........K ....
      e1:	00 01                                               ..

000000e3 <ConfigurationDescriptor>:
      e3:	09 02 43 00 02 01 00 c0 32 09 04 00 00 01 02 02     ..C.....2.......
      f3:	01 00 05 24 00 01 10 05 24 01 03 01 04 24 02 06     ...$....$....$..
     103:	05 24 06 00 01 07 05 82 03 08 00 ff 09 04 01 00     .$..............
     113:	02 0a 00 00 00 07 05 04 02 10 00 00 07 05 83 02     ................
     123:	10 00 00                                            ...

00000126 <LanguageString>:
     126:	04 03 09 04                                         ....

0000012a <ManufacturerString>:
     12a:	18 03 44 00 65 00 61 00 6e 00 20 00 43 00 61 00     ..D.e.a.n. .C.a.
     13a:	6d 00 65 00 72 00 61 00 00 00                       m.e.r.a...

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

00000170 <__ctors_end>:
     170:	11 24       	eor	r1, r1
     172:	1f be       	out	0x3f, r1	; 63
     174:	cf ef       	ldi	r28, 0xFF	; 255
     176:	d2 e0       	ldi	r29, 0x02	; 2
     178:	de bf       	out	0x3e, r29	; 62
     17a:	cd bf       	out	0x3d, r28	; 61

0000017c <__do_copy_data>:
     17c:	11 e0       	ldi	r17, 0x01	; 1
     17e:	a0 e0       	ldi	r26, 0x00	; 0
     180:	b1 e0       	ldi	r27, 0x01	; 1
     182:	ec e7       	ldi	r30, 0x7C	; 124
     184:	fc e1       	ldi	r31, 0x1C	; 28
     186:	02 c0       	rjmp	.+4      	; 0x18c <.do_copy_data_start>

00000188 <.do_copy_data_loop>:
     188:	05 90       	lpm	r0, Z+
     18a:	0d 92       	st	X+, r0

0000018c <.do_copy_data_start>:
     18c:	ac 31       	cpi	r26, 0x1C	; 28
     18e:	b1 07       	cpc	r27, r17
     190:	d9 f7       	brne	.-10     	; 0x188 <.do_copy_data_loop>

00000192 <__do_clear_bss>:
     192:	11 e0       	ldi	r17, 0x01	; 1
     194:	ac e1       	ldi	r26, 0x1C	; 28
     196:	b1 e0       	ldi	r27, 0x01	; 1
     198:	01 c0       	rjmp	.+2      	; 0x19c <.do_clear_bss_start>

0000019a <.do_clear_bss_loop>:
     19a:	1d 92       	st	X+, r1

0000019c <.do_clear_bss_start>:
     19c:	a1 3b       	cpi	r26, 0xB1	; 177
     19e:	b1 07       	cpc	r27, r17
     1a0:	e1 f7       	brne	.-8      	; 0x19a <.do_clear_bss_loop>
     1a2:	4e d5       	rcall	.+2716   	; 0xc40 <main>
     1a4:	0c 94 3c 0e 	jmp	0x1c78	; 0x1c78 <_exit>

000001a8 <__bad_interrupt>:
     1a8:	2b cf       	rjmp	.-426    	; 0x0 <__vectors>

000001aa <ISP_Int>:
	}
}


void ISP_Int(void)
{
     1aa:	80 91 1e 01 	lds	r24, 0x011E
     1ae:	83 30       	cpi	r24, 0x03	; 3
     1b0:	39 f4       	brne	.+14     	; 0x1c0 <ISP_Int+0x16>
	{
		PORTC &= ~(1<<pinId);
	}
	else
	{
		PORTC |= (1<<pinId);
     1b2:	42 9a       	sbi	0x08, 2	; 8

void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
	if(state == LOW)
	{
		PORTC &= ~(1<<pinId);
     1b4:	44 98       	cbi	0x08, 4	; 8

			Change_ISP_Pin(RES_2, HIGH);
			Change_ISP_Pin(MOSI_2, LOW);
			Change_ISP_Pin(SCK_2, LOW);
			//set my inputs/outputs
			DDRC &= ~(1<<MISO_2);
     1b6:	45 98       	cbi	0x08, 5	; 8
     1b8:	3f 98       	cbi	0x07, 7	; 7
			DDRC |= (1<<MOSI_2) | (1<<SCK_2) | (1<<RES_2);
     1ba:	87 b1       	in	r24, 0x07	; 7
     1bc:	84 63       	ori	r24, 0x34	; 52
     1be:	87 b9       	out	0x07, r24	; 7
     1c0:	08 95       	ret

000001c2 <Write_ISP_Byte>:
}


//  Output MSB first
void  Write_ISP_Byte(unsigned char outbyte)
{
     1c2:	38 2f       	mov	r19, r24

void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
	if(state == LOW)
	{
		PORTC &= ~(1<<pinId);
     1c4:	45 98       	cbi	0x08, 5	; 8
     1c6:	20 e8       	ldi	r18, 0x80	; 128
     1c8:	90 e0       	ldi	r25, 0x00	; 0
	Change_ISP_Pin(SCK_2,LOW);
	DelayUsec(5+INTERBITDELAY);
	mask = 0x80;
	for(i=0; i<8; i++)
	{
		if((outbyte&mask))
     1ca:	82 2f       	mov	r24, r18
     1cc:	83 23       	and	r24, r19
     1ce:	11 f0       	breq	.+4      	; 0x1d4 <Write_ISP_Byte+0x12>
	{
		PORTC &= ~(1<<pinId);
	}
	else
	{
		PORTC |= (1<<pinId);
     1d0:	44 9a       	sbi	0x08, 4	; 8
     1d2:	01 c0       	rjmp	.+2      	; 0x1d6 <Write_ISP_Byte+0x14>

void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
	if(state == LOW)
	{
		PORTC &= ~(1<<pinId);
     1d4:	44 98       	cbi	0x08, 4	; 8
	}
	else
	{
		PORTC |= (1<<pinId);
     1d6:	45 9a       	sbi	0x08, 5	; 8

void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
	if(state == LOW)
	{
		PORTC &= ~(1<<pinId);
     1d8:	45 98       	cbi	0x08, 5	; 8
	unsigned char  i;

	Change_ISP_Pin(SCK_2,LOW);
	DelayUsec(5+INTERBITDELAY);
	mask = 0x80;
	for(i=0; i<8; i++)
     1da:	9f 5f       	subi	r25, 0xFF	; 255
     1dc:	98 30       	cpi	r25, 0x08	; 8
     1de:	11 f0       	breq	.+4      	; 0x1e4 <Write_ISP_Byte+0x22>
		DelayUsec(INTERBITDELAY);
		Change_ISP_Pin(SCK_2,HIGH);
		DelayUsec(INTERBITDELAY);
		Change_ISP_Pin(SCK_2,LOW);
		DelayUsec(INTERBITDELAY);  // May not need this delay
		mask = mask>>1;
     1e0:	26 95       	lsr	r18
     1e2:	f3 cf       	rjmp	.-26     	; 0x1ca <Write_ISP_Byte+0x8>
     1e4:	08 95       	ret

000001e6 <Write_Read_ISP_Byte>:
	}
}


unsigned char Write_Read_ISP_Byte(unsigned char outbyte)
{
     1e6:	48 2f       	mov	r20, r24

void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
	if(state == LOW)
	{
		PORTC &= ~(1<<pinId);
     1e8:	45 98       	cbi	0x08, 5	; 8
     1ea:	30 e8       	ldi	r19, 0x80	; 128
     1ec:	90 e0       	ldi	r25, 0x00	; 0
     1ee:	20 e0       	ldi	r18, 0x00	; 0
	DelayUsec(5+INTERBITDELAY);
	mask = 0x80;
	inbyte = 0x00;
	for(i=0; i<8; i++)
	{
		if((outbyte&mask))
     1f0:	83 2f       	mov	r24, r19
     1f2:	84 23       	and	r24, r20
     1f4:	11 f0       	breq	.+4      	; 0x1fa <Write_Read_ISP_Byte+0x14>
	{
		PORTC &= ~(1<<pinId);
	}
	else
	{
		PORTC |= (1<<pinId);
     1f6:	44 9a       	sbi	0x08, 4	; 8
     1f8:	01 c0       	rjmp	.+2      	; 0x1fc <Write_Read_ISP_Byte+0x16>

void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
	if(state == LOW)
	{
		PORTC &= ~(1<<pinId);
     1fa:	44 98       	cbi	0x08, 4	; 8
	}
	else
	{
		PORTC |= (1<<pinId);
     1fc:	45 9a       	sbi	0x08, 5	; 8
			Change_ISP_Pin(MOSI_2,LOW);
		}
		DelayUsec(10);
		Change_ISP_Pin(SCK_2,HIGH);
		DelayUsec(INTERBITDELAY);
		if(i>0)//??why check??
     1fe:	21 11       	cpse	r18, r1
		{
			inbyte = inbyte<<1;
     200:	99 0f       	add	r25, r25
		}	
		if(PINC & (1<<MISO_2))
     202:	37 99       	sbic	0x06, 7	; 6
		{
			inbyte |= 0x01;
     204:	91 60       	ori	r25, 0x01	; 1

void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
	if(state == LOW)
	{
		PORTC &= ~(1<<pinId);
     206:	45 98       	cbi	0x08, 5	; 8

	Change_ISP_Pin(SCK_2,LOW);
	DelayUsec(5+INTERBITDELAY);
	mask = 0x80;
	inbyte = 0x00;
	for(i=0; i<8; i++)
     208:	2f 5f       	subi	r18, 0xFF	; 255
     20a:	28 30       	cpi	r18, 0x08	; 8
     20c:	11 f0       	breq	.+4      	; 0x212 <Write_Read_ISP_Byte+0x2c>
			inbyte |= 0x01;
		}
		DelayUsec(INTERBITDELAY);
		Change_ISP_Pin(SCK_2,LOW);
		DelayUsec(INTERBITDELAY);  // May not need this delay
		mask = mask>>1;	
     20e:	36 95       	lsr	r19
     210:	ef cf       	rjmp	.-34     	; 0x1f0 <Write_Read_ISP_Byte+0xa>
	}
	return inbyte;
}
     212:	89 2f       	mov	r24, r25
     214:	08 95       	ret

00000216 <Chip_Busy_Status>:
		}
	}
	return '0';
}
unsigned char Chip_Busy_Status(void)
{
     216:	80 ef       	ldi	r24, 0xF0	; 240
     218:	d4 df       	rcall	.-88     	; 0x1c2 <Write_ISP_Byte>
	unsigned char busybyte;

	//  Read Fuse Low Byte 0
	Write_ISP_Byte(0xF0);//POLL_RDYBSY
	Write_ISP_Byte(0x00);
     21a:	80 e0       	ldi	r24, 0x00	; 0
     21c:	d2 df       	rcall	.-92     	; 0x1c2 <Write_ISP_Byte>
	Write_ISP_Byte(0x00);
     21e:	80 e0       	ldi	r24, 0x00	; 0
     220:	d0 df       	rcall	.-96     	; 0x1c2 <Write_ISP_Byte>
	busybyte = Write_Read_ISP_Byte(0x00);
     222:	80 e0       	ldi	r24, 0x00	; 0

	return busybyte;
}
     224:	e0 cf       	rjmp	.-64     	; 0x1e6 <Write_Read_ISP_Byte>

00000226 <Wait_For_Busy>:
	}
	return inbyte;
}

unsigned char Wait_For_Busy(void)
{
     226:	cf 93       	push	r28
     228:	df 93       	push	r29
     22a:	c0 e0       	ldi	r28, 0x00	; 0
     22c:	d0 e0       	ldi	r29, 0x00	; 0
     22e:	07 c0       	rjmp	.+14     	; 0x23e <Wait_For_Busy+0x18>
	uint32_t loopcnt;

	loopcnt = 0;
	while((Chip_Busy_Status()&0x01))
     230:	21 96       	adiw	r28, 0x01	; 1
	{
		DelayUsec(100);
		if(loopcnt++>5000)
     232:	83 e1       	ldi	r24, 0x13	; 19
     234:	ca 38       	cpi	r28, 0x8A	; 138
     236:	d8 07       	cpc	r29, r24
     238:	11 f4       	brne	.+4      	; 0x23e <Wait_For_Busy+0x18>
     23a:	81 e3       	ldi	r24, 0x31	; 49
     23c:	04 c0       	rjmp	.+8      	; 0x246 <Wait_For_Busy+0x20>
unsigned char Wait_For_Busy(void)
{
	uint32_t loopcnt;

	loopcnt = 0;
	while((Chip_Busy_Status()&0x01))
     23e:	eb df       	rcall	.-42     	; 0x216 <Chip_Busy_Status>
     240:	80 fd       	sbrc	r24, 0
     242:	f6 cf       	rjmp	.-20     	; 0x230 <Wait_For_Busy+0xa>
     244:	80 e3       	ldi	r24, 0x30	; 48
		{
			return '1';
		}
	}
	return '0';
}
     246:	df 91       	pop	r29
     248:	cf 91       	pop	r28
     24a:	08 95       	ret

0000024c <ReconfigureUSART>:
		Buffer_StoreElementOnTop(&Tx_Buffer, UDR1);
	}
}

void ReconfigureUSART(void)
{
     24c:	80 91 17 01 	lds	r24, 0x0117
     250:	81 30       	cpi	r24, 0x01	; 1
     252:	11 f4       	brne	.+4      	; 0x258 <ReconfigureUSART+0xc>
     254:	90 e3       	ldi	r25, 0x30	; 48
     256:	05 c0       	rjmp	.+10     	; 0x262 <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)
     258:	82 30       	cpi	r24, 0x02	; 2
     25a:	11 f4       	brne	.+4      	; 0x260 <ReconfigureUSART+0x14>
     25c:	90 e2       	ldi	r25, 0x20	; 32
     25e:	01 c0       	rjmp	.+2      	; 0x262 <ReconfigureUSART+0x16>
     260:	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)
     262:	80 91 16 01 	lds	r24, 0x0116
     266:	82 30       	cpi	r24, 0x02	; 2
     268:	09 f4       	brne	.+2      	; 0x26c <ReconfigureUSART+0x20>
	  ConfigMask |= (1 << USBS1);
     26a:	98 60       	ori	r25, 0x08	; 8

	/* Determine data size - 5, 6, 7, or 8 bits are supported */
	if (LineCoding.DataBits == 6)
     26c:	80 91 18 01 	lds	r24, 0x0118
     270:	86 30       	cpi	r24, 0x06	; 6
     272:	11 f4       	brne	.+4      	; 0x278 <ReconfigureUSART+0x2c>
	  ConfigMask |= (1 << UCSZ10);
     274:	92 60       	ori	r25, 0x02	; 2
     276:	07 c0       	rjmp	.+14     	; 0x286 <ReconfigureUSART+0x3a>
	else if (LineCoding.DataBits == 7)
     278:	87 30       	cpi	r24, 0x07	; 7
     27a:	11 f4       	brne	.+4      	; 0x280 <ReconfigureUSART+0x34>
	  ConfigMask |= (1 << UCSZ11);
     27c:	94 60       	ori	r25, 0x04	; 4
     27e:	03 c0       	rjmp	.+6      	; 0x286 <ReconfigureUSART+0x3a>
	else if (LineCoding.DataBits == 8)
     280:	88 30       	cpi	r24, 0x08	; 8
     282:	09 f4       	brne	.+2      	; 0x286 <ReconfigureUSART+0x3a>
	  ConfigMask |= ((1 << UCSZ11) | (1 << UCSZ10));
     284:	96 60       	ori	r25, 0x06	; 6

	/* Enable double speed, gives better error percentages at 8MHz */
	UCSR1A = (1 << U2X1);
     286:	82 e0       	ldi	r24, 0x02	; 2
     288:	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)
     28c:	88 ed       	ldi	r24, 0xD8	; 216
     28e:	80 93 c9 00 	sts	0x00C9, r24

	/* Set the USART mode to the mask generated by the Line Coding options */
	UCSR1C = ConfigMask;
     292:	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);
     296:	20 91 12 01 	lds	r18, 0x0112
     29a:	30 91 13 01 	lds	r19, 0x0113
     29e:	40 e0       	ldi	r20, 0x00	; 0
     2a0:	50 e0       	ldi	r21, 0x00	; 0
     2a2:	60 e4       	ldi	r22, 0x40	; 64
     2a4:	72 e4       	ldi	r23, 0x42	; 66
     2a6:	8f e0       	ldi	r24, 0x0F	; 15
     2a8:	90 e0       	ldi	r25, 0x00	; 0
     2aa:	0e 94 1a 0e 	call	0x1c34	; 0x1c34 <__udivmodsi4>
     2ae:	21 50       	subi	r18, 0x01	; 1
     2b0:	30 40       	sbci	r19, 0x00	; 0
     2b2:	30 93 cd 00 	sts	0x00CD, r19
     2b6:	20 93 cc 00 	sts	0x00CC, r18
}
     2ba:	08 95       	ret

000002bc <__vector_25>:
		Serial_TxByte(Buffer_GetElementFromBottom(&Rx_Buffer));
	}
}

ISR(USART1_TX_vect)
{
     2bc:	1f 92       	push	r1
     2be:	0f 92       	push	r0
     2c0:	0f b6       	in	r0, 0x3f	; 63
     2c2:	0f 92       	push	r0
     2c4:	11 24       	eor	r1, r1
     2c6:	2f 93       	push	r18
     2c8:	3f 93       	push	r19
     2ca:	4f 93       	push	r20
     2cc:	5f 93       	push	r21
     2ce:	6f 93       	push	r22
     2d0:	7f 93       	push	r23
     2d2:	8f 93       	push	r24
     2d4:	9f 93       	push	r25
     2d6:	af 93       	push	r26
     2d8:	bf 93       	push	r27
     2da:	ef 93       	push	r30
     2dc:	ff 93       	push	r31
	/* Send next character if avaliable */
	if (Rx_Buffer.Elements != 0 && mode == SERIAL)
     2de:	80 91 a8 01 	lds	r24, 0x01A8
     2e2:	88 23       	and	r24, r24
     2e4:	51 f0       	breq	.+20     	; 0x2fa <__vector_25+0x3e>
     2e6:	80 91 1e 01 	lds	r24, 0x011E
     2ea:	81 30       	cpi	r24, 0x01	; 1
     2ec:	31 f4       	brne	.+12     	; 0x2fa <__vector_25+0x3e>
	{
		UDR1 = Buffer_GetElementFromBottom(&Rx_Buffer);
     2ee:	84 e6       	ldi	r24, 0x64	; 100
     2f0:	91 e0       	ldi	r25, 0x01	; 1
     2f2:	8f d5       	rcall	.+2846   	; 0xe12 <Buffer_GetElementFromBottom>
     2f4:	80 93 ce 00 	sts	0x00CE, r24
     2f8:	02 c0       	rjmp	.+4      	; 0x2fe <__vector_25+0x42>
	}
	else
	{
		Transmitting = false;
     2fa:	10 92 1c 01 	sts	0x011C, r1
	}
	  
}
     2fe:	ff 91       	pop	r31
     300:	ef 91       	pop	r30
     302:	bf 91       	pop	r27
     304:	af 91       	pop	r26
     306:	9f 91       	pop	r25
     308:	8f 91       	pop	r24
     30a:	7f 91       	pop	r23
     30c:	6f 91       	pop	r22
     30e:	5f 91       	pop	r21
     310:	4f 91       	pop	r20
     312:	3f 91       	pop	r19
     314:	2f 91       	pop	r18
     316:	0f 90       	pop	r0
     318:	0f be       	out	0x3f, r0	; 63
     31a:	0f 90       	pop	r0
     31c:	1f 90       	pop	r1
     31e:	18 95       	reti

00000320 <RemoveWhiteSpace>:
	return number;

}

void RemoveWhiteSpace(void)
{
     320:	84 e6       	ldi	r24, 0x64	; 100
     322:	91 e0       	ldi	r25, 0x01	; 1
     324:	76 d5       	rcall	.+2796   	; 0xe12 <Buffer_GetElementFromBottom>
     326:	68 2f       	mov	r22, r24
	uint8_t temp;

	temp = Buffer_GetElementFromBottom(&Rx_Buffer);
	//remove white space
	while(temp == ' ' || temp == '\t' || temp == ',')
     328:	80 32       	cpi	r24, 0x20	; 32
     32a:	d1 f3       	breq	.-12     	; 0x320 <RemoveWhiteSpace>
     32c:	89 30       	cpi	r24, 0x09	; 9
     32e:	c1 f3       	breq	.-16     	; 0x320 <RemoveWhiteSpace>
     330:	8c 32       	cpi	r24, 0x2C	; 44
     332:	b1 f3       	breq	.-20     	; 0x320 <RemoveWhiteSpace>
	{
		temp = Buffer_GetElementFromBottom(&Rx_Buffer);
	}
	Buffer_StoreElementOnBottom(&Rx_Buffer, temp);
     334:	84 e6       	ldi	r24, 0x64	; 100
     336:	91 e0       	ldi	r25, 0x01	; 1
}
     338:	9c c5       	rjmp	.+2872   	; 0xe72 <Buffer_StoreElementOnBottom>

0000033a <GetHexNumber>:
	UBRR1  = MY_SERIAL_2X_UBBRVAL((uint16_t)LineCoding.BaudRateBPS);
}


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

	temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     33c:	84 e6       	ldi	r24, 0x64	; 100
     33e:	91 e0       	ldi	r25, 0x01	; 1
     340:	68 d5       	rcall	.+2768   	; 0xe12 <Buffer_GetElementFromBottom>
     342:	68 2f       	mov	r22, r24

	if(temp >= 'a' && temp <= 'f')
     344:	81 56       	subi	r24, 0x61	; 97
     346:	86 30       	cpi	r24, 0x06	; 6
     348:	18 f4       	brcc	.+6      	; 0x350 <GetHexNumber+0x16>
	{
		number = temp -'a' + 0xA;
     34a:	16 2f       	mov	r17, r22
     34c:	17 55       	subi	r17, 0x57	; 87
     34e:	10 c0       	rjmp	.+32     	; 0x370 <GetHexNumber+0x36>
	}
	else if(temp >= 'A' && temp <= 'F')
     350:	86 2f       	mov	r24, r22
     352:	81 54       	subi	r24, 0x41	; 65
     354:	86 30       	cpi	r24, 0x06	; 6
     356:	18 f4       	brcc	.+6      	; 0x35e <GetHexNumber+0x24>
	{
		number = temp -'A' + 0xA;
     358:	16 2f       	mov	r17, r22
     35a:	17 53       	subi	r17, 0x37	; 55
     35c:	09 c0       	rjmp	.+18     	; 0x370 <GetHexNumber+0x36>
	}
	else if(temp >= '0' && temp <= '9')
     35e:	16 2f       	mov	r17, r22
     360:	10 53       	subi	r17, 0x30	; 48
     362:	1a 30       	cpi	r17, 0x0A	; 10
     364:	28 f0       	brcs	.+10     	; 0x370 <GetHexNumber+0x36>
	{
		number = temp -'0';
	}
	else
	{
		Buffer_StoreElementOnBottom(&Rx_Buffer, temp);//if not a valid character return it to the buffer
     366:	84 e6       	ldi	r24, 0x64	; 100
     368:	91 e0       	ldi	r25, 0x01	; 1
     36a:	83 d5       	rcall	.+2822   	; 0xe72 <Buffer_StoreElementOnBottom>
     36c:	10 e0       	ldi	r17, 0x00	; 0
     36e:	1b c0       	rjmp	.+54     	; 0x3a6 <GetHexNumber+0x6c>
		return 0;
	}

	temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     370:	84 e6       	ldi	r24, 0x64	; 100
     372:	91 e0       	ldi	r25, 0x01	; 1
     374:	4e d5       	rcall	.+2716   	; 0xe12 <Buffer_GetElementFromBottom>
     376:	68 2f       	mov	r22, r24


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

	if(temp >= 'a' && temp <= 'f')
     37c:	81 56       	subi	r24, 0x61	; 97
     37e:	86 30       	cpi	r24, 0x06	; 6
     380:	10 f4       	brcc	.+4      	; 0x386 <GetHexNumber+0x4c>
	{
		number += temp -'a' + 0xA;
     382:	67 55       	subi	r22, 0x57	; 87
     384:	05 c0       	rjmp	.+10     	; 0x390 <GetHexNumber+0x56>
	}
	else if(temp >= 'A' && temp <= 'F')
     386:	86 2f       	mov	r24, r22
     388:	81 54       	subi	r24, 0x41	; 65
     38a:	86 30       	cpi	r24, 0x06	; 6
     38c:	18 f4       	brcc	.+6      	; 0x394 <GetHexNumber+0x5a>
	{
		number += temp -'A' + 0xA;
     38e:	67 53       	subi	r22, 0x37	; 55
     390:	16 0f       	add	r17, r22
     392:	09 c0       	rjmp	.+18     	; 0x3a6 <GetHexNumber+0x6c>
	}
	else if(temp >= '0' && temp <= '9')
     394:	86 2f       	mov	r24, r22
     396:	80 53       	subi	r24, 0x30	; 48
     398:	8a 30       	cpi	r24, 0x0A	; 10
     39a:	10 f4       	brcc	.+4      	; 0x3a0 <GetHexNumber+0x66>
	{
		number += temp -'0';
     39c:	18 0f       	add	r17, r24
     39e:	03 c0       	rjmp	.+6      	; 0x3a6 <GetHexNumber+0x6c>
	}
	else
	{
		Buffer_StoreElementOnBottom(&Rx_Buffer, temp);//if the character is no good to us, return it back to the buffer
     3a0:	84 e6       	ldi	r24, 0x64	; 100
     3a2:	91 e0       	ldi	r25, 0x01	; 1
     3a4:	66 d5       	rcall	.+2764   	; 0xe72 <Buffer_StoreElementOnBottom>
	}


	return number;

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

000003ac <ParseNumber>:


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

	
	RemoveWhiteSpace();
     3ae:	b8 df       	rcall	.-144    	; 0x320 <RemoveWhiteSpace>

	temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     3b0:	84 e6       	ldi	r24, 0x64	; 100
     3b2:	91 e0       	ldi	r25, 0x01	; 1
     3b4:	2e d5       	rcall	.+2652   	; 0xe12 <Buffer_GetElementFromBottom>
     3b6:	28 2f       	mov	r18, r24

	if(temp == '\\')
     3b8:	8c 35       	cpi	r24, 0x5C	; 92
     3ba:	81 f4       	brne	.+32     	; 0x3dc <ParseNumber+0x30>
	{
		temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     3bc:	84 e6       	ldi	r24, 0x64	; 100
     3be:	91 e0       	ldi	r25, 0x01	; 1
     3c0:	28 d5       	rcall	.+2640   	; 0xe12 <Buffer_GetElementFromBottom>
     3c2:	68 2f       	mov	r22, r24
		if(temp == 'x' || temp == 'X')
     3c4:	88 37       	cpi	r24, 0x78	; 120
     3c6:	11 f0       	breq	.+4      	; 0x3cc <ParseNumber+0x20>
     3c8:	88 35       	cpi	r24, 0x58	; 88
     3ca:	19 f4       	brne	.+6      	; 0x3d2 <ParseNumber+0x26>
		{
			number = GetHexNumber();
     3cc:	b6 df       	rcall	.-148    	; 0x33a <GetHexNumber>
     3ce:	18 2f       	mov	r17, r24
     3d0:	1f c0       	rjmp	.+62     	; 0x410 <ParseNumber+0x64>
		}
		else
		{
			Buffer_StoreElementOnBottom(&Rx_Buffer, temp);//if not a valid character return it to the buffer
     3d2:	84 e6       	ldi	r24, 0x64	; 100
     3d4:	91 e0       	ldi	r25, 0x01	; 1
     3d6:	4d d5       	rcall	.+2714   	; 0xe72 <Buffer_StoreElementOnBottom>
     3d8:	10 e0       	ldi	r17, 0x00	; 0
     3da:	1a c0       	rjmp	.+52     	; 0x410 <ParseNumber+0x64>
			return 0;
		}	
	}
	else if(temp >= '0' && temp <= '9' )
     3dc:	80 53       	subi	r24, 0x30	; 48
     3de:	8a 30       	cpi	r24, 0x0A	; 10
     3e0:	10 f0       	brcs	.+4      	; 0x3e6 <ParseNumber+0x3a>
     3e2:	12 2f       	mov	r17, r18
     3e4:	15 c0       	rjmp	.+42     	; 0x410 <ParseNumber+0x64>
     3e6:	10 e0       	ldi	r17, 0x00	; 0
	{
		do
		{
			number *= 10;
     3e8:	81 2f       	mov	r24, r17
     3ea:	90 e0       	ldi	r25, 0x00	; 0
     3ec:	6a e0       	ldi	r22, 0x0A	; 10
     3ee:	70 e0       	ldi	r23, 0x00	; 0
     3f0:	0e 94 f4 0d 	call	0x1be8	; 0x1be8 <__mulhi3>
			number += temp - '0';
     3f4:	12 2f       	mov	r17, r18
     3f6:	10 53       	subi	r17, 0x30	; 48
     3f8:	18 0f       	add	r17, r24
			temp = Buffer_GetElementFromBottom(&Rx_Buffer);
     3fa:	84 e6       	ldi	r24, 0x64	; 100
     3fc:	91 e0       	ldi	r25, 0x01	; 1
     3fe:	09 d5       	rcall	.+2578   	; 0xe12 <Buffer_GetElementFromBottom>
     400:	28 2f       	mov	r18, r24
		} while (temp >= '0' && temp <= '9' );
     402:	80 53       	subi	r24, 0x30	; 48
     404:	8a 30       	cpi	r24, 0x0A	; 10
     406:	80 f3       	brcs	.-32     	; 0x3e8 <ParseNumber+0x3c>

		Buffer_StoreElementOnBottom(&Rx_Buffer, temp);//if not a valid character return it to the buffer
     408:	62 2f       	mov	r22, r18
     40a:	84 e6       	ldi	r24, 0x64	; 100
     40c:	91 e0       	ldi	r25, 0x01	; 1
     40e:	31 d5       	rcall	.+2658   	; 0xe72 <Buffer_StoreElementOnBottom>
	}
	

	return number;

}
     410:	81 2f       	mov	r24, r17
     412:	1f 91       	pop	r17
     414:	08 95       	ret

00000416 <__vector_23>:

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

ISR(USART1_RX_vect)
{
     416:	1f 92       	push	r1
     418:	0f 92       	push	r0
     41a:	0f b6       	in	r0, 0x3f	; 63
     41c:	0f 92       	push	r0
     41e:	11 24       	eor	r1, r1
     420:	2f 93       	push	r18
     422:	3f 93       	push	r19
     424:	4f 93       	push	r20
     426:	5f 93       	push	r21
     428:	6f 93       	push	r22
     42a:	7f 93       	push	r23
     42c:	8f 93       	push	r24
     42e:	9f 93       	push	r25
     430:	af 93       	push	r26
     432:	bf 93       	push	r27
     434:	ef 93       	push	r30
     436:	ff 93       	push	r31
	if(mode == SERIAL)
     438:	80 91 1e 01 	lds	r24, 0x011E
     43c:	81 30       	cpi	r24, 0x01	; 1
     43e:	29 f4       	brne	.+10     	; 0x44a <__vector_23+0x34>
	{
		/* Character recieved, store it into the buffer */
		Buffer_StoreElementOnTop(&Tx_Buffer, UDR1);
     440:	60 91 ce 00 	lds	r22, 0x00CE
     444:	8f e1       	ldi	r24, 0x1F	; 31
     446:	91 e0       	ldi	r25, 0x01	; 1
     448:	82 d4       	rcall	.+2308   	; 0xd4e <Buffer_StoreElementOnTop>
	}
}
     44a:	ff 91       	pop	r31
     44c:	ef 91       	pop	r30
     44e:	bf 91       	pop	r27
     450:	af 91       	pop	r26
     452:	9f 91       	pop	r25
     454:	8f 91       	pop	r24
     456:	7f 91       	pop	r23
     458:	6f 91       	pop	r22
     45a:	5f 91       	pop	r21
     45c:	4f 91       	pop	r20
     45e:	3f 91       	pop	r19
     460:	2f 91       	pop	r18
     462:	0f 90       	pop	r0
     464:	0f be       	out	0x3f, r0	; 63
     466:	0f 90       	pop	r0
     468:	1f 90       	pop	r1
     46a:	18 95       	reti

0000046c <ISP_Update_Buffers>:
	}	
}


void ISP_Update_Buffers(void)
{
     46c:	80 91 b0 01 	lds	r24, 0x01B0
     470:	88 23       	and	r24, r24
     472:	e1 f1       	breq	.+120    	; 0x4ec <ISP_Update_Buffers+0x80>
	if (USB_IsConnected)
	{
		/* Select the Serial Rx Endpoint */
		Endpoint_SelectEndpoint(CDC_RX_EPNUM);
     474:	84 e0       	ldi	r24, 0x04	; 4
     476:	80 93 e9 00 	sts	0x00E9, r24

		if (Endpoint_ReadWriteAllowed())
     47a:	80 91 e8 00 	lds	r24, 0x00E8
     47e:	85 fd       	sbrc	r24, 5
     480:	06 c0       	rjmp	.+12     	; 0x48e <ISP_Update_Buffers+0x22>
     482:	0e c0       	rjmp	.+28     	; 0x4a0 <ISP_Update_Buffers+0x34>
		/* 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;
     484:	60 91 f1 00 	lds	r22, 0x00F1
		{
			/* Read the recieved data endpoint into the transmission buffer */
			while (Endpoint_BytesInEndpoint())
			{
				Buffer_StoreElementOnTop(&Rx_Buffer, Endpoint_Read_Byte());
     488:	84 e6       	ldi	r24, 0x64	; 100
     48a:	91 e0       	ldi	r25, 0x01	; 1
     48c:	60 d4       	rcall	.+2240   	; 0xd4e <Buffer_StoreElementOnTop>
		Endpoint_SelectEndpoint(CDC_RX_EPNUM);

		if (Endpoint_ReadWriteAllowed())
		{
			/* Read the recieved data endpoint into the transmission buffer */
			while (Endpoint_BytesInEndpoint())
     48e:	80 91 f2 00 	lds	r24, 0x00F2
     492:	88 23       	and	r24, r24
     494:	b9 f7       	brne	.-18     	; 0x484 <ISP_Update_Buffers+0x18>
			{
				Buffer_StoreElementOnTop(&Rx_Buffer, Endpoint_Read_Byte());
			}

			/* Clear the endpoint buffer */
			Endpoint_ClearCurrentBank();
     496:	80 91 e8 00 	lds	r24, 0x00E8
     49a:	8f 77       	andi	r24, 0x7F	; 127
     49c:	80 93 e8 00 	sts	0x00E8, r24
		}
		
		/* Select the Serial Tx Endpoint */
		Endpoint_SelectEndpoint(CDC_TX_EPNUM);
     4a0:	83 e0       	ldi	r24, 0x03	; 3
     4a2:	80 93 e9 00 	sts	0x00E9, r24

		/* Write the Data to the Endpoint */
		if(Tx_Buffer.Elements != 0)
     4a6:	80 91 63 01 	lds	r24, 0x0163
     4aa:	88 23       	and	r24, r24
     4ac:	f9 f0       	breq	.+62     	; 0x4ec <ISP_Update_Buffers+0x80>
		{

			do{
				/* Wait until Serial Tx Endpoint Ready for Read/Write */
				while (!(Endpoint_ReadWriteAllowed()));
     4ae:	80 91 e8 00 	lds	r24, 0x00E8
     4b2:	85 ff       	sbrs	r24, 5
     4b4:	fc cf       	rjmp	.-8      	; 0x4ae <ISP_Update_Buffers+0x42>

				Endpoint_Write_Byte(Buffer_GetElementFromBottom(&Tx_Buffer));
     4b6:	8f e1       	ldi	r24, 0x1F	; 31
     4b8:	91 e0       	ldi	r25, 0x01	; 1
     4ba:	ab d4       	rcall	.+2390   	; 0xe12 <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;
     4bc:	80 93 f1 00 	sts	0x00F1, r24

				/* Check if the endpoint is full */
				if (Endpoint_BytesInEndpoint() == CDC_TXRX_EPSIZE)
     4c0:	80 91 f2 00 	lds	r24, 0x00F2
     4c4:	80 31       	cpi	r24, 0x10	; 16
     4c6:	49 f4       	brne	.+18     	; 0x4da <ISP_Update_Buffers+0x6e>
				{
					/* Send the data */
					Endpoint_ClearCurrentBank();
     4c8:	80 91 e8 00 	lds	r24, 0x00E8
     4cc:	8f 77       	andi	r24, 0x7F	; 127
     4ce:	80 93 e8 00 	sts	0x00E8, r24

					/* Wait until Serial Tx Endpoint Ready for Read/Write */
					while (!(Endpoint_ReadWriteAllowed()));
     4d2:	80 91 e8 00 	lds	r24, 0x00E8
     4d6:	85 ff       	sbrs	r24, 5
     4d8:	fc cf       	rjmp	.-8      	; 0x4d2 <ISP_Update_Buffers+0x66>
				}
			}while (Tx_Buffer.Elements != 0);
     4da:	80 91 63 01 	lds	r24, 0x0163
     4de:	88 23       	and	r24, r24
     4e0:	31 f7       	brne	.-52     	; 0x4ae <ISP_Update_Buffers+0x42>

			/* Send the last packet of the transfer to the host */
			Endpoint_ClearCurrentBank();
     4e2:	80 91 e8 00 	lds	r24, 0x00E8
     4e6:	8f 77       	andi	r24, 0x7F	; 127
     4e8:	80 93 e8 00 	sts	0x00E8, r24
     4ec:	08 95       	ret

000004ee <StringToBuffer_P>:
			break;
	}
}

void StringToBuffer_P(const char *data)
{
     4ee:	cf 93       	push	r28
     4f0:	df 93       	push	r29
     4f2:	ec 01       	movw	r28, r24
     4f4:	06 c0       	rjmp	.+12     	; 0x502 <StringToBuffer_P+0x14>
	while (pgm_read_byte(data) != 0x00)
	{
		Buffer_StoreElementOnTop(&Tx_Buffer, pgm_read_byte(data++));
     4f6:	21 96       	adiw	r28, 0x01	; 1
     4f8:	f9 01       	movw	r30, r18
     4fa:	64 91       	lpm	r22, Z+
     4fc:	8f e1       	ldi	r24, 0x1F	; 31
     4fe:	91 e0       	ldi	r25, 0x01	; 1
     500:	26 d4       	rcall	.+2124   	; 0xd4e <Buffer_StoreElementOnTop>
     502:	9e 01       	movw	r18, r28
	}
}

void StringToBuffer_P(const char *data)
{
	while (pgm_read_byte(data) != 0x00)
     504:	fe 01       	movw	r30, r28
     506:	84 91       	lpm	r24, Z+
     508:	88 23       	and	r24, r24
     50a:	a9 f7       	brne	.-22     	; 0x4f6 <StringToBuffer_P+0x8>
	{
		Buffer_StoreElementOnTop(&Tx_Buffer, pgm_read_byte(data++));
	}

}
     50c:	df 91       	pop	r29
     50e:	cf 91       	pop	r28
     510:	08 95       	ret

00000512 <PROG_Task>:




TASK(PROG_Task)
{
     512:	ac df       	rcall	.-168    	; 0x46c <ISP_Update_Buffers>
	ISP_Update_Buffers();

	if(Rx_Buffer.Elements != 0)
     514:	80 91 a8 01 	lds	r24, 0x01A8
     518:	88 23       	and	r24, r24
     51a:	09 f4       	brne	.+2      	; 0x51e <PROG_Task+0xc>
     51c:	94 c0       	rjmp	.+296    	; 0x646 <PROG_Task+0x134>
	{
		switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     51e:	84 e6       	ldi	r24, 0x64	; 100
     520:	91 e0       	ldi	r25, 0x01	; 1
     522:	77 d4       	rcall	.+2286   	; 0xe12 <Buffer_GetElementFromBottom>
     524:	82 36       	cpi	r24, 0x62	; 98
     526:	09 f4       	brne	.+2      	; 0x52a <PROG_Task+0x18>
     528:	6d c0       	rjmp	.+218    	; 0x604 <PROG_Task+0xf2>
     52a:	83 36       	cpi	r24, 0x63	; 99
     52c:	30 f4       	brcc	.+12     	; 0x53a <PROG_Task+0x28>
     52e:	83 33       	cpi	r24, 0x33	; 51
     530:	b1 f1       	breq	.+108    	; 0x59e <PROG_Task+0x8c>
     532:	84 33       	cpi	r24, 0x34	; 52
     534:	09 f0       	breq	.+2      	; 0x538 <PROG_Task+0x26>
     536:	87 c0       	rjmp	.+270    	; 0x646 <PROG_Task+0x134>
     538:	4c c0       	rjmp	.+152    	; 0x5d2 <PROG_Task+0xc0>
     53a:	82 37       	cpi	r24, 0x72	; 114
     53c:	31 f0       	breq	.+12     	; 0x54a <PROG_Task+0x38>
     53e:	87 37       	cpi	r24, 0x77	; 119
     540:	d9 f0       	breq	.+54     	; 0x578 <PROG_Task+0x66>
     542:	85 36       	cpi	r24, 0x65	; 101
     544:	09 f0       	breq	.+2      	; 0x548 <PROG_Task+0x36>
     546:	7f c0       	rjmp	.+254    	; 0x646 <PROG_Task+0x134>
     548:	62 c0       	rjmp	.+196    	; 0x60e <PROG_Task+0xfc>
		{
			case 'r':
				if (Rx_Buffer.Elements)//ensure we have received enough data
     54a:	80 91 a8 01 	lds	r24, 0x01A8
     54e:	88 23       	and	r24, r24
     550:	89 f0       	breq	.+34     	; 0x574 <PROG_Task+0x62>
				{
					if(Buffer_GetElementFromBottom(&Rx_Buffer) == 'l')//set reset low on target board
     552:	84 e6       	ldi	r24, 0x64	; 100
     554:	91 e0       	ldi	r25, 0x01	; 1
     556:	5d d4       	rcall	.+2234   	; 0xe12 <Buffer_GetElementFromBottom>
     558:	90 91 1e 01 	lds	r25, 0x011E
     55c:	8c 36       	cpi	r24, 0x6C	; 108
     55e:	29 f4       	brne	.+10     	; 0x56a <PROG_Task+0x58>
					{
						if(mode == ISP2)
     560:	93 30       	cpi	r25, 0x03	; 3
     562:	09 f0       	breq	.+2      	; 0x566 <PROG_Task+0x54>
     564:	70 c0       	rjmp	.+224    	; 0x646 <PROG_Task+0x134>

void Change_ISP_Pin(unsigned char pinId,unsigned char state)
{
	if(state == LOW)
	{
		PORTC &= ~(1<<pinId);
     566:	42 98       	cbi	0x08, 2	; 8
     568:	08 95       	ret
							;
						}
					}
					else//set reset high
					{
						if(mode == ISP2)
     56a:	93 30       	cpi	r25, 0x03	; 3
     56c:	09 f0       	breq	.+2      	; 0x570 <PROG_Task+0x5e>
     56e:	6b c0       	rjmp	.+214    	; 0x646 <PROG_Task+0x134>
	{
		PORTC &= ~(1<<pinId);
	}
	else
	{
		PORTC |= (1<<pinId);
     570:	42 9a       	sbi	0x08, 2	; 8
     572:	08 95       	ret
					}

				}
				else
				{
					Buffer_StoreElementOnBottom(&Rx_Buffer, 'r');//not enough data received yet
     574:	62 e7       	ldi	r22, 0x72	; 114
     576:	43 c0       	rjmp	.+134    	; 0x5fe <PROG_Task+0xec>
				}

				break;

			case 'w':
				if (Rx_Buffer.Elements >= 4)//ensure we have received enough data
     578:	80 91 a8 01 	lds	r24, 0x01A8
     57c:	84 30       	cpi	r24, 0x04	; 4
     57e:	68 f0       	brcs	.+26     	; 0x59a <PROG_Task+0x88>
					{
						Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     580:	84 e6       	ldi	r24, 0x64	; 100
     582:	91 e0       	ldi	r25, 0x01	; 1
     584:	46 d4       	rcall	.+2188   	; 0xe12 <Buffer_GetElementFromBottom>
     586:	1d de       	rcall	.-966    	; 0x1c2 <Write_ISP_Byte>
						Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     588:	84 e6       	ldi	r24, 0x64	; 100
     58a:	91 e0       	ldi	r25, 0x01	; 1
     58c:	42 d4       	rcall	.+2180   	; 0xe12 <Buffer_GetElementFromBottom>
     58e:	19 de       	rcall	.-974    	; 0x1c2 <Write_ISP_Byte>
						Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     590:	84 e6       	ldi	r24, 0x64	; 100
     592:	91 e0       	ldi	r25, 0x01	; 1
     594:	3e d4       	rcall	.+2172   	; 0xe12 <Buffer_GetElementFromBottom>
     596:	15 de       	rcall	.-982    	; 0x1c2 <Write_ISP_Byte>
     598:	16 c0       	rjmp	.+44     	; 0x5c6 <PROG_Task+0xb4>
						Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
					}
					else
					{
						Buffer_StoreElementOnBottom(&Rx_Buffer, 'w');//not enough data received yet
     59a:	67 e7       	ldi	r22, 0x77	; 119
     59c:	30 c0       	rjmp	.+96     	; 0x5fe <PROG_Task+0xec>
					}

				break;
			case '3':
				if (Rx_Buffer.Elements >= 4)//ensure we have received enough data
     59e:	80 91 a8 01 	lds	r24, 0x01A8
     5a2:	84 30       	cpi	r24, 0x04	; 4
     5a4:	a0 f0       	brcs	.+40     	; 0x5ce <PROG_Task+0xbc>
				{
					Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     5a6:	84 e6       	ldi	r24, 0x64	; 100
     5a8:	91 e0       	ldi	r25, 0x01	; 1
     5aa:	33 d4       	rcall	.+2150   	; 0xe12 <Buffer_GetElementFromBottom>
     5ac:	0a de       	rcall	.-1004   	; 0x1c2 <Write_ISP_Byte>
					Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     5ae:	84 e6       	ldi	r24, 0x64	; 100
     5b0:	91 e0       	ldi	r25, 0x01	; 1
     5b2:	2f d4       	rcall	.+2142   	; 0xe12 <Buffer_GetElementFromBottom>
     5b4:	06 de       	rcall	.-1012   	; 0x1c2 <Write_ISP_Byte>
					Buffer_StoreElementOnTop(&Tx_Buffer, Write_Read_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer)) );
     5b6:	84 e6       	ldi	r24, 0x64	; 100
     5b8:	91 e0       	ldi	r25, 0x01	; 1
     5ba:	2b d4       	rcall	.+2134   	; 0xe12 <Buffer_GetElementFromBottom>
     5bc:	14 de       	rcall	.-984    	; 0x1e6 <Write_Read_ISP_Byte>
     5be:	68 2f       	mov	r22, r24
     5c0:	8f e1       	ldi	r24, 0x1F	; 31
     5c2:	91 e0       	ldi	r25, 0x01	; 1
     5c4:	c4 d3       	rcall	.+1928   	; 0xd4e <Buffer_StoreElementOnTop>
					Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     5c6:	84 e6       	ldi	r24, 0x64	; 100
     5c8:	91 e0       	ldi	r25, 0x01	; 1
     5ca:	23 d4       	rcall	.+2118   	; 0xe12 <Buffer_GetElementFromBottom>
     5cc:	fa cd       	rjmp	.-1036   	; 0x1c2 <Write_ISP_Byte>
				}
				else
				{
					Buffer_StoreElementOnBottom(&Rx_Buffer, '3');//not enough data received yet
     5ce:	63 e3       	ldi	r22, 0x33	; 51
     5d0:	16 c0       	rjmp	.+44     	; 0x5fe <PROG_Task+0xec>
				}

				break;
			case '4':
				if (Rx_Buffer.Elements >= 4)//ensure we have received enough data
     5d2:	80 91 a8 01 	lds	r24, 0x01A8
     5d6:	84 30       	cpi	r24, 0x04	; 4
     5d8:	88 f0       	brcs	.+34     	; 0x5fc <PROG_Task+0xea>
					{
						Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     5da:	84 e6       	ldi	r24, 0x64	; 100
     5dc:	91 e0       	ldi	r25, 0x01	; 1
     5de:	19 d4       	rcall	.+2098   	; 0xe12 <Buffer_GetElementFromBottom>
     5e0:	f0 dd       	rcall	.-1056   	; 0x1c2 <Write_ISP_Byte>
						Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     5e2:	84 e6       	ldi	r24, 0x64	; 100
     5e4:	91 e0       	ldi	r25, 0x01	; 1
     5e6:	15 d4       	rcall	.+2090   	; 0xe12 <Buffer_GetElementFromBottom>
     5e8:	ec dd       	rcall	.-1064   	; 0x1c2 <Write_ISP_Byte>
						Write_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer));
     5ea:	84 e6       	ldi	r24, 0x64	; 100
     5ec:	91 e0       	ldi	r25, 0x01	; 1
     5ee:	11 d4       	rcall	.+2082   	; 0xe12 <Buffer_GetElementFromBottom>
     5f0:	e8 dd       	rcall	.-1072   	; 0x1c2 <Write_ISP_Byte>
						Buffer_StoreElementOnTop(&Tx_Buffer, Write_Read_ISP_Byte(Buffer_GetElementFromBottom(&Rx_Buffer)) );	
     5f2:	84 e6       	ldi	r24, 0x64	; 100
     5f4:	91 e0       	ldi	r25, 0x01	; 1
     5f6:	0d d4       	rcall	.+2074   	; 0xe12 <Buffer_GetElementFromBottom>
     5f8:	f6 dd       	rcall	.-1044   	; 0x1e6 <Write_Read_ISP_Byte>
     5fa:	05 c0       	rjmp	.+10     	; 0x606 <PROG_Task+0xf4>
					}
					else
					{
						Buffer_StoreElementOnBottom(&Rx_Buffer, '4');//not enough data received yet
     5fc:	64 e3       	ldi	r22, 0x34	; 52
     5fe:	84 e6       	ldi	r24, 0x64	; 100
     600:	91 e0       	ldi	r25, 0x01	; 1
     602:	37 c4       	rjmp	.+2158   	; 0xe72 <Buffer_StoreElementOnBottom>
					}

				break;
			case 'b':

				Buffer_StoreElementOnTop(&Tx_Buffer, Wait_For_Busy());
     604:	10 de       	rcall	.-992    	; 0x226 <Wait_For_Busy>
     606:	68 2f       	mov	r22, r24
     608:	8f e1       	ldi	r24, 0x1F	; 31
     60a:	91 e0       	ldi	r25, 0x01	; 1
     60c:	a0 c3       	rjmp	.+1856   	; 0xd4e <Buffer_StoreElementOnTop>

				break;
			case 'e':

				Buffer_Initialize(&Rx_Buffer);//dump any unused data
     60e:	84 e6       	ldi	r24, 0x64	; 100
     610:	91 e0       	ldi	r25, 0x01	; 1
     612:	89 d3       	rcall	.+1810   	; 0xd26 <Buffer_Initialize>
				Buffer_Initialize(&Tx_Buffer);//dump any unused data
     614:	8f e1       	ldi	r24, 0x1F	; 31
     616:	91 e0       	ldi	r25, 0x01	; 1
     618:	86 d3       	rcall	.+1804   	; 0xd26 <Buffer_Initialize>

				Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     61a:	6d e0       	ldi	r22, 0x0D	; 13
     61c:	8f e1       	ldi	r24, 0x1F	; 31
     61e:	91 e0       	ldi	r25, 0x01	; 1
     620:	96 d3       	rcall	.+1836   	; 0xd4e <Buffer_StoreElementOnTop>
				Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     622:	6a e0       	ldi	r22, 0x0A	; 10
     624:	8f e1       	ldi	r24, 0x1F	; 31
     626:	91 e0       	ldi	r25, 0x01	; 1
     628:	92 d3       	rcall	.+1828   	; 0xd4e <Buffer_StoreElementOnTop>
				Buffer_StoreElementOnTop(&Tx_Buffer, '>');
     62a:	6e e3       	ldi	r22, 0x3E	; 62
     62c:	8f e1       	ldi	r24, 0x1F	; 31
     62e:	91 e0       	ldi	r25, 0x01	; 1
     630:	8e d3       	rcall	.+1820   	; 0xd4e <Buffer_StoreElementOnTop>
				mode = COMMAND;
     632:	10 92 1e 01 	sts	0x011E, r1
				Scheduler_SetTaskMode(PROG_Task, TASK_STOP);		
     636:	60 e0       	ldi	r22, 0x00	; 0
     638:	89 e8       	ldi	r24, 0x89	; 137
     63a:	92 e0       	ldi	r25, 0x02	; 2
     63c:	3e d7       	rcall	.+3708   	; 0x14ba <Scheduler_SetTaskMode>
				Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
     63e:	61 e0       	ldi	r22, 0x01	; 1
     640:	8e ed       	ldi	r24, 0xDE	; 222
     642:	94 e0       	ldi	r25, 0x04	; 4
     644:	3a c7       	rjmp	.+3700   	; 0x14ba <Scheduler_SetTaskMode>
     646:	08 95       	ret

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

}

EVENT_HANDLER(USB_Disconnect)
{
     648:	60 e0       	ldi	r22, 0x00	; 0
     64a:	8e ed       	ldi	r24, 0xDE	; 222
     64c:	94 e0       	ldi	r25, 0x04	; 4
     64e:	35 d7       	rcall	.+3690   	; 0x14ba <Scheduler_SetTaskMode>
	/* Stop running CDC and USB management tasks */
	Scheduler_SetTaskMode(CDC_Task, TASK_STOP);
	Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
     650:	60 e0       	ldi	r22, 0x00	; 0
     652:	86 e4       	ldi	r24, 0x46	; 70
     654:	9d e0       	ldi	r25, 0x0D	; 13

}
     656:	31 c7       	rjmp	.+3682   	; 0x14ba <Scheduler_SetTaskMode>

00000658 <Event_USB_Connect>:

}
*/

EVENT_HANDLER(USB_Connect)
{
     658:	61 e0       	ldi	r22, 0x01	; 1
     65a:	86 e4       	ldi	r24, 0x46	; 70
     65c:	9d e0       	ldi	r25, 0x0D	; 13
	/* Start USB management task */
	Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);

}
     65e:	2d c7       	rjmp	.+3674   	; 0x14ba <Scheduler_SetTaskMode>

00000660 <Command_Task>:
}



TASK(Command_Task)
{
     660:	9f 92       	push	r9
     662:	af 92       	push	r10
     664:	bf 92       	push	r11
     666:	cf 92       	push	r12
     668:	df 92       	push	r13
     66a:	ef 92       	push	r14
     66c:	ff 92       	push	r15
     66e:	0f 93       	push	r16
     670:	1f 93       	push	r17
     672:	df 93       	push	r29
     674:	cf 93       	push	r28
     676:	cd b7       	in	r28, 0x3d	; 61
     678:	de b7       	in	r29, 0x3e	; 62
     67a:	c0 54       	subi	r28, 0x40	; 64
     67c:	d0 40       	sbci	r29, 0x00	; 0
     67e:	0f b6       	in	r0, 0x3f	; 63
     680:	f8 94       	cli
     682:	de bf       	out	0x3e, r29	; 62
     684:	0f be       	out	0x3f, r0	; 63
     686:	cd bf       	out	0x3d, r28	; 61
	uint8_t i, address = 0, lenght = 0, axis, oldValue;
	uint8_t temp[64];


	RemoveWhiteSpace();
     688:	4b de       	rcall	.-874    	; 0x320 <RemoveWhiteSpace>


	switch (Buffer_GetElementFromBottom(&Rx_Buffer))
     68a:	84 e6       	ldi	r24, 0x64	; 100
     68c:	91 e0       	ldi	r25, 0x01	; 1
     68e:	c1 d3       	rcall	.+1922   	; 0xe12 <Buffer_GetElementFromBottom>
     690:	82 36       	cpi	r24, 0x62	; 98
     692:	09 f4       	brne	.+2      	; 0x696 <Command_Task+0x36>
     694:	10 c1       	rjmp	.+544    	; 0x8b6 <Command_Task+0x256>
     696:	83 36       	cpi	r24, 0x63	; 99
     698:	e0 f4       	brcc	.+56     	; 0x6d2 <Command_Task+0x72>
     69a:	8c 34       	cpi	r24, 0x4C	; 76
     69c:	09 f4       	brne	.+2      	; 0x6a0 <Command_Task+0x40>
     69e:	11 c1       	rjmp	.+546    	; 0x8c2 <Command_Task+0x262>
     6a0:	8d 34       	cpi	r24, 0x4D	; 77
     6a2:	80 f4       	brcc	.+32     	; 0x6c4 <Command_Task+0x64>
     6a4:	82 34       	cpi	r24, 0x42	; 66
     6a6:	09 f4       	brne	.+2      	; 0x6aa <Command_Task+0x4a>
     6a8:	06 c1       	rjmp	.+524    	; 0x8b6 <Command_Task+0x256>
     6aa:	83 34       	cpi	r24, 0x43	; 67
     6ac:	38 f4       	brcc	.+14     	; 0x6bc <Command_Task+0x5c>
     6ae:	88 23       	and	r24, r24
     6b0:	09 f4       	brne	.+2      	; 0x6b4 <Command_Task+0x54>
     6b2:	4a c1       	rjmp	.+660    	; 0x948 <Command_Task+0x2e8>
     6b4:	8f 33       	cpi	r24, 0x3F	; 63
     6b6:	09 f0       	breq	.+2      	; 0x6ba <Command_Task+0x5a>
     6b8:	3b c1       	rjmp	.+630    	; 0x930 <Command_Task+0x2d0>
     6ba:	b5 c0       	rjmp	.+362    	; 0x826 <Command_Task+0x1c6>
     6bc:	83 34       	cpi	r24, 0x43	; 67
     6be:	09 f0       	breq	.+2      	; 0x6c2 <Command_Task+0x62>
     6c0:	37 c1       	rjmp	.+622    	; 0x930 <Command_Task+0x2d0>
     6c2:	24 c0       	rjmp	.+72     	; 0x70c <Command_Task+0xac>
     6c4:	8d 34       	cpi	r24, 0x4D	; 77
     6c6:	09 f4       	brne	.+2      	; 0x6ca <Command_Task+0x6a>
     6c8:	b2 c0       	rjmp	.+356    	; 0x82e <Command_Task+0x1ce>
     6ca:	83 35       	cpi	r24, 0x53	; 83
     6cc:	09 f0       	breq	.+2      	; 0x6d0 <Command_Task+0x70>
     6ce:	30 c1       	rjmp	.+608    	; 0x930 <Command_Task+0x2d0>
     6d0:	e0 c0       	rjmp	.+448    	; 0x892 <Command_Task+0x232>
     6d2:	8d 36       	cpi	r24, 0x6D	; 109
     6d4:	09 f4       	brne	.+2      	; 0x6d8 <Command_Task+0x78>
     6d6:	ab c0       	rjmp	.+342    	; 0x82e <Command_Task+0x1ce>
     6d8:	8e 36       	cpi	r24, 0x6E	; 110
     6da:	30 f4       	brcc	.+12     	; 0x6e8 <Command_Task+0x88>
     6dc:	83 36       	cpi	r24, 0x63	; 99
     6de:	b1 f0       	breq	.+44     	; 0x70c <Command_Task+0xac>
     6e0:	8c 36       	cpi	r24, 0x6C	; 108
     6e2:	09 f0       	breq	.+2      	; 0x6e6 <Command_Task+0x86>
     6e4:	25 c1       	rjmp	.+586    	; 0x930 <Command_Task+0x2d0>
     6e6:	ed c0       	rjmp	.+474    	; 0x8c2 <Command_Task+0x262>
     6e8:	80 37       	cpi	r24, 0x70	; 112
     6ea:	21 f0       	breq	.+8      	; 0x6f4 <Command_Task+0x94>
     6ec:	83 37       	cpi	r24, 0x73	; 115
     6ee:	09 f0       	breq	.+2      	; 0x6f2 <Command_Task+0x92>
     6f0:	1f c1       	rjmp	.+574    	; 0x930 <Command_Task+0x2d0>
     6f2:	cf c0       	rjmp	.+414    	; 0x892 <Command_Task+0x232>
		
		
		
		case 'p':

			oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     6f4:	84 e6       	ldi	r24, 0x64	; 100
     6f6:	91 e0       	ldi	r25, 0x01	; 1
     6f8:	8c d3       	rcall	.+1816   	; 0xe12 <Buffer_GetElementFromBottom>
			
			if(oldValue == '1')
     6fa:	81 33       	cpi	r24, 0x31	; 49
     6fc:	11 f4       	brne	.+4      	; 0x702 <Command_Task+0xa2>
			{
				mode = ISP1;
     6fe:	82 e0       	ldi	r24, 0x02	; 2
     700:	01 c0       	rjmp	.+2      	; 0x704 <Command_Task+0xa4>
				
			}
			else
			{
				mode = ISP2;
     702:	83 e0       	ldi	r24, 0x03	; 3
     704:	80 93 1e 01 	sts	0x011E, r24
			}
			
			ISP_Int();
     708:	50 dd       	rcall	.-1376   	; 0x1aa <ISP_Int>
     70a:	ce c0       	rjmp	.+412    	; 0x8a8 <Command_Task+0x248>
		
		
		case 'c':
		case 'C':
			
			I2C_Port = Buffer_GetElementFromBottom(&Rx_Buffer);
     70c:	84 e6       	ldi	r24, 0x64	; 100
     70e:	91 e0       	ldi	r25, 0x01	; 1
     710:	80 d3       	rcall	.+1792   	; 0xe12 <Buffer_GetElementFromBottom>
     712:	80 93 19 01 	sts	0x0119, r24
			//should check to ensure val ok!
			
			I2C_Init();
     716:	ec d3       	rcall	.+2008   	; 0xef0 <I2C_Init>
						
			RemoveWhiteSpace();
     718:	03 de       	rcall	.-1018   	; 0x320 <RemoveWhiteSpace>

			address = ParseNumber();
     71a:	48 de       	rcall	.-880    	; 0x3ac <ParseNumber>
     71c:	98 2e       	mov	r9, r24
			RemoveWhiteSpace();
     71e:	00 de       	rcall	.-1024   	; 0x320 <RemoveWhiteSpace>

			oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     720:	84 e6       	ldi	r24, 0x64	; 100
     722:	91 e0       	ldi	r25, 0x01	; 1
     724:	76 d3       	rcall	.+1772   	; 0xe12 <Buffer_GetElementFromBottom>

			if(oldValue == 'w' || oldValue == 'W')
     726:	87 37       	cpi	r24, 0x77	; 119
     728:	19 f0       	breq	.+6      	; 0x730 <Command_Task+0xd0>
     72a:	87 35       	cpi	r24, 0x57	; 87
     72c:	09 f0       	breq	.+2      	; 0x730 <Command_Task+0xd0>
     72e:	49 c0       	rjmp	.+146    	; 0x7c2 <Command_Task+0x162>
			{
						
				lenght = ParseNumber();
     730:	3d de       	rcall	.-902    	; 0x3ac <ParseNumber>
     732:	e8 2e       	mov	r14, r24

				oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     734:	84 e6       	ldi	r24, 0x64	; 100
     736:	91 e0       	ldi	r25, 0x01	; 1
     738:	6c d3       	rcall	.+1752   	; 0xe12 <Buffer_GetElementFromBottom>
     73a:	68 2f       	mov	r22, r24
				if(oldValue != ' ' && oldValue != ',')
     73c:	80 32       	cpi	r24, 0x20	; 32
     73e:	29 f0       	breq	.+10     	; 0x74a <Command_Task+0xea>
     740:	8c 32       	cpi	r24, 0x2C	; 44
     742:	19 f0       	breq	.+6      	; 0x74a <Command_Task+0xea>
				{
					Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
     744:	84 e6       	ldi	r24, 0x64	; 100
     746:	91 e0       	ldi	r25, 0x01	; 1
     748:	94 d3       	rcall	.+1832   	; 0xe72 <Buffer_StoreElementOnBottom>
     74a:	ff 24       	eor	r15, r15
     74c:	5e 01       	movw	r10, r28
     74e:	08 94       	sec
     750:	a1 1c       	adc	r10, r1
     752:	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
     754:	ce 2c       	mov	r12, r14
     756:	dd 24       	eor	r13, r13
     758:	08 94       	sec
     75a:	c1 08       	sbc	r12, r1
     75c:	d1 08       	sbc	r13, r1
     75e:	26 c0       	rjmp	.+76     	; 0x7ac <Command_Task+0x14c>
					Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
				}
						
				for (i = 0; i < lenght; i++)
				{
					temp[i] = Buffer_GetElementFromBottom(&Rx_Buffer);
     760:	0f 2d       	mov	r16, r15
     762:	10 e0       	ldi	r17, 0x00	; 0
     764:	84 e6       	ldi	r24, 0x64	; 100
     766:	91 e0       	ldi	r25, 0x01	; 1
     768:	54 d3       	rcall	.+1704   	; 0xe12 <Buffer_GetElementFromBottom>
     76a:	f5 01       	movw	r30, r10
     76c:	e0 0f       	add	r30, r16
     76e:	f1 1f       	adc	r31, r17
     770:	80 83       	st	Z, r24
					if(temp[i] == '\\')
     772:	8c 35       	cpi	r24, 0x5C	; 92
     774:	d1 f4       	brne	.+52     	; 0x7aa <Command_Task+0x14a>
					{	
						oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     776:	84 e6       	ldi	r24, 0x64	; 100
     778:	91 e0       	ldi	r25, 0x01	; 1
     77a:	4b d3       	rcall	.+1686   	; 0xe12 <Buffer_GetElementFromBottom>
     77c:	68 2f       	mov	r22, r24

						if(oldValue == 'x' || oldValue == 'X')
     77e:	88 37       	cpi	r24, 0x78	; 120
     780:	11 f0       	breq	.+4      	; 0x786 <Command_Task+0x126>
     782:	88 35       	cpi	r24, 0x58	; 88
     784:	31 f4       	brne	.+12     	; 0x792 <Command_Task+0x132>
						{
							temp[i] = GetHexNumber();
     786:	d9 dd       	rcall	.-1102   	; 0x33a <GetHexNumber>
     788:	0a 0d       	add	r16, r10
     78a:	1b 1d       	adc	r17, r11
     78c:	f8 01       	movw	r30, r16
     78e:	80 83       	st	Z, r24
     790:	0c c0       	rjmp	.+24     	; 0x7aa <Command_Task+0x14a>
						}
						else
						{
							if(i < lenght-1)//will we even get a chance to send it.  If so write it
     792:	0c 15       	cp	r16, r12
     794:	1d 05       	cpc	r17, r13
     796:	34 f4       	brge	.+12     	; 0x7a4 <Command_Task+0x144>
							{
								temp[++i] = oldValue;
     798:	f3 94       	inc	r15
     79a:	f5 01       	movw	r30, r10
     79c:	ef 0d       	add	r30, r15
     79e:	f1 1d       	adc	r31, r1
     7a0:	80 83       	st	Z, r24
     7a2:	03 c0       	rjmp	.+6      	; 0x7aa <Command_Task+0x14a>
							}
							else//put the data back.  This is not needed though as we will dump the data latter
							{
								Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
     7a4:	84 e6       	ldi	r24, 0x64	; 100
     7a6:	91 e0       	ldi	r25, 0x01	; 1
     7a8:	64 d3       	rcall	.+1736   	; 0xe72 <Buffer_StoreElementOnBottom>
				if(oldValue != ' ' && oldValue != ',')
				{
					Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
				}
						
				for (i = 0; i < lenght; i++)
     7aa:	f3 94       	inc	r15
     7ac:	fe 14       	cp	r15, r14
     7ae:	c0 f2       	brcs	.-80     	; 0x760 <Command_Task+0x100>
							} 
						}	
					}
				}

				if(I2C_Write(address, temp, lenght) != lenght)
     7b0:	4e 2d       	mov	r20, r14
     7b2:	50 e0       	ldi	r21, 0x00	; 0
     7b4:	b5 01       	movw	r22, r10
     7b6:	89 2d       	mov	r24, r9
     7b8:	6c d5       	rcall	.+2776   	; 0x1292 <I2C_Write>
     7ba:	8e 15       	cp	r24, r14
     7bc:	09 f4       	brne	.+2      	; 0x7c0 <Command_Task+0x160>
     7be:	c4 c0       	rjmp	.+392    	; 0x948 <Command_Task+0x2e8>
     7c0:	28 c0       	rjmp	.+80     	; 0x812 <Command_Task+0x1b2>
					Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
					Buffer_StoreElementOnTop(&Tx_Buffer, '-');
				}					
						 
			}
			else if(oldValue == 'r' || oldValue == 'R')
     7c2:	82 37       	cpi	r24, 0x72	; 114
     7c4:	19 f0       	breq	.+6      	; 0x7cc <Command_Task+0x16c>
     7c6:	82 35       	cpi	r24, 0x52	; 82
     7c8:	09 f0       	breq	.+2      	; 0x7cc <Command_Task+0x16c>
     7ca:	be c0       	rjmp	.+380    	; 0x948 <Command_Task+0x2e8>
			{
				Buffer_StoreElementOnTop(&Tx_Buffer, '\r');//so the data read back will be printed on a new line
     7cc:	6d e0       	ldi	r22, 0x0D	; 13
     7ce:	8f e1       	ldi	r24, 0x1F	; 31
     7d0:	91 e0       	ldi	r25, 0x01	; 1
     7d2:	bd d2       	rcall	.+1402   	; 0xd4e <Buffer_StoreElementOnTop>
				Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     7d4:	6a e0       	ldi	r22, 0x0A	; 10
     7d6:	8f e1       	ldi	r24, 0x1F	; 31
     7d8:	91 e0       	ldi	r25, 0x01	; 1
     7da:	b9 d2       	rcall	.+1394   	; 0xd4e <Buffer_StoreElementOnTop>

				lenght = ParseNumber();
     7dc:	e7 dd       	rcall	.-1074   	; 0x3ac <ParseNumber>
     7de:	18 2f       	mov	r17, r24

				if(I2C_Read(address, temp, lenght) == lenght)
     7e0:	48 2f       	mov	r20, r24
     7e2:	50 e0       	ldi	r21, 0x00	; 0
     7e4:	7e 01       	movw	r14, r28
     7e6:	08 94       	sec
     7e8:	e1 1c       	adc	r14, r1
     7ea:	f1 1c       	adc	r15, r1
     7ec:	b7 01       	movw	r22, r14
     7ee:	89 2d       	mov	r24, r9
     7f0:	18 d5       	rcall	.+2608   	; 0x1222 <I2C_Read>
     7f2:	d8 2e       	mov	r13, r24
     7f4:	81 17       	cp	r24, r17
     7f6:	69 f4       	brne	.+26     	; 0x812 <Command_Task+0x1b2>
     7f8:	87 01       	movw	r16, r14
     7fa:	06 c0       	rjmp	.+12     	; 0x808 <Command_Task+0x1a8>
				{
					for (i = 0; i < lenght; i++)
					{
						Buffer_StoreElementOnTop(&Tx_Buffer, temp[i]);
     7fc:	f8 01       	movw	r30, r16
     7fe:	61 91       	ld	r22, Z+
     800:	8f 01       	movw	r16, r30
     802:	8f e1       	ldi	r24, 0x1F	; 31
     804:	91 e0       	ldi	r25, 0x01	; 1
     806:	a3 d2       	rcall	.+1350   	; 0xd4e <Buffer_StoreElementOnTop>

				lenght = ParseNumber();

				if(I2C_Read(address, temp, lenght) == lenght)
				{
					for (i = 0; i < lenght; i++)
     808:	80 2f       	mov	r24, r16
     80a:	8e 19       	sub	r24, r14
     80c:	8d 15       	cp	r24, r13
     80e:	b0 f3       	brcs	.-20     	; 0x7fc <Command_Task+0x19c>
     810:	9b c0       	rjmp	.+310    	; 0x948 <Command_Task+0x2e8>
						Buffer_StoreElementOnTop(&Tx_Buffer, temp[i]);
					}
				}
				else
				{
					Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     812:	6d e0       	ldi	r22, 0x0D	; 13
     814:	8f e1       	ldi	r24, 0x1F	; 31
     816:	91 e0       	ldi	r25, 0x01	; 1
     818:	9a d2       	rcall	.+1332   	; 0xd4e <Buffer_StoreElementOnTop>
					Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     81a:	6a e0       	ldi	r22, 0x0A	; 10
     81c:	8f e1       	ldi	r24, 0x1F	; 31
     81e:	91 e0       	ldi	r25, 0x01	; 1
     820:	96 d2       	rcall	.+1324   	; 0xd4e <Buffer_StoreElementOnTop>
					Buffer_StoreElementOnTop(&Tx_Buffer, '-');
     822:	6d e2       	ldi	r22, 0x2D	; 45
     824:	8e c0       	rjmp	.+284    	; 0x942 <Command_Task+0x2e2>
				}			
			}
			
			break;
		case '?':
			StringToBuffer_P(PSTR("\r\nSOC Robotics Help Guide.\r\n........Ask Steve?"));
     826:	81 e8       	ldi	r24, 0x81	; 129
     828:	90 e0       	ldi	r25, 0x00	; 0
     82a:	61 de       	rcall	.-830    	; 0x4ee <StringToBuffer_P>
     82c:	8d c0       	rjmp	.+282    	; 0x948 <Command_Task+0x2e8>
			break;
		case 'm':
		case 'M':
					
			RemoveWhiteSpace();
     82e:	78 dd       	rcall	.-1296   	; 0x320 <RemoveWhiteSpace>

			switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     830:	84 e6       	ldi	r24, 0x64	; 100
     832:	91 e0       	ldi	r25, 0x01	; 1
     834:	ee d2       	rcall	.+1500   	; 0xe12 <Buffer_GetElementFromBottom>
     836:	8a 35       	cpi	r24, 0x5A	; 90
     838:	49 f0       	breq	.+18     	; 0x84c <Command_Task+0x1ec>
     83a:	8b 35       	cpi	r24, 0x5B	; 91
     83c:	18 f4       	brcc	.+6      	; 0x844 <Command_Task+0x1e4>
     83e:	89 35       	cpi	r24, 0x59	; 89
     840:	49 f4       	brne	.+18     	; 0x854 <Command_Task+0x1f4>
     842:	06 c0       	rjmp	.+12     	; 0x850 <Command_Task+0x1f0>
     844:	89 37       	cpi	r24, 0x79	; 121
     846:	21 f0       	breq	.+8      	; 0x850 <Command_Task+0x1f0>
     848:	8a 37       	cpi	r24, 0x7A	; 122
     84a:	21 f4       	brne	.+8      	; 0x854 <Command_Task+0x1f4>
     84c:	02 e0       	ldi	r16, 0x02	; 2
     84e:	03 c0       	rjmp	.+6      	; 0x856 <Command_Task+0x1f6>
     850:	01 e0       	ldi	r16, 0x01	; 1
     852:	01 c0       	rjmp	.+2      	; 0x856 <Command_Task+0x1f6>
     854:	00 e0       	ldi	r16, 0x00	; 0
					axis = X_AXIS;
					break;
				
			}

			RemoveWhiteSpace();
     856:	64 dd       	rcall	.-1336   	; 0x320 <RemoveWhiteSpace>

			lenght = ParseNumber();
     858:	a9 dd       	rcall	.-1198   	; 0x3ac <ParseNumber>
     85a:	f8 2e       	mov	r15, r24

			oldValue = Buffer_GetElementFromBottom(&Rx_Buffer);
     85c:	84 e6       	ldi	r24, 0x64	; 100
     85e:	91 e0       	ldi	r25, 0x01	; 1
     860:	d8 d2       	rcall	.+1456   	; 0xe12 <Buffer_GetElementFromBottom>
     862:	68 2f       	mov	r22, r24

			if(oldValue != ' ' && oldValue != ',')//allow for 1 peice of white space
     864:	80 32       	cpi	r24, 0x20	; 32
     866:	29 f0       	breq	.+10     	; 0x872 <Command_Task+0x212>
     868:	8c 32       	cpi	r24, 0x2C	; 44
     86a:	19 f0       	breq	.+6      	; 0x872 <Command_Task+0x212>
			{
				Buffer_StoreElementOnBottom(&Rx_Buffer, oldValue);
     86c:	84 e6       	ldi	r24, 0x64	; 100
     86e:	91 e0       	ldi	r25, 0x01	; 1
     870:	00 d3       	rcall	.+1536   	; 0xe72 <Buffer_StoreElementOnBottom>
     872:	10 e0       	ldi	r17, 0x00	; 0
     874:	06 c0       	rjmp	.+12     	; 0x882 <Command_Task+0x222>
			}
						
			for (i = 0; i < lenght && Rx_Buffer.Elements != 0; i++)
			{
				SendByte(Buffer_GetElementFromBottom(&Rx_Buffer),axis);
     876:	84 e6       	ldi	r24, 0x64	; 100
     878:	91 e0       	ldi	r25, 0x01	; 1
     87a:	cb d2       	rcall	.+1430   	; 0xe12 <Buffer_GetElementFromBottom>
     87c:	60 2f       	mov	r22, r16
     87e:	8f d5       	rcall	.+2846   	; 0x139e <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++)
     880:	1f 5f       	subi	r17, 0xFF	; 255
     882:	1f 15       	cp	r17, r15
     884:	08 f0       	brcs	.+2      	; 0x888 <Command_Task+0x228>
     886:	60 c0       	rjmp	.+192    	; 0x948 <Command_Task+0x2e8>
     888:	80 91 a8 01 	lds	r24, 0x01A8
     88c:	88 23       	and	r24, r24
     88e:	99 f7       	brne	.-26     	; 0x876 <Command_Task+0x216>
     890:	5b c0       	rjmp	.+182    	; 0x948 <Command_Task+0x2e8>
			break;

		case 's'://enter serial mode
		case 'S':
			
			mode = SERIAL;
     892:	81 e0       	ldi	r24, 0x01	; 1
     894:	80 93 1e 01 	sts	0x011E, r24
			if(Buffer_GetElementFromBottom(&Rx_Buffer) == 'b')//bang the reset line
     898:	84 e6       	ldi	r24, 0x64	; 100
     89a:	91 e0       	ldi	r25, 0x01	; 1
     89c:	ba d2       	rcall	.+1396   	; 0xe12 <Buffer_GetElementFromBottom>
     89e:	82 36       	cpi	r24, 0x62	; 98
     8a0:	19 f4       	brne	.+6      	; 0x8a8 <Command_Task+0x248>
			{

				DDRC |= (1<<RES_2);
     8a2:	3a 9a       	sbi	0x07, 2	; 7

				PORTC &= ~(1<<RES_2);
     8a4:	42 98       	cbi	0x08, 2	; 8
				DelayUsec(100);
				PORTC |= (1<<RES_2);
     8a6:	42 9a       	sbi	0x08, 2	; 8
			}
			Buffer_Initialize(&Rx_Buffer);//dump any unused data
     8a8:	84 e6       	ldi	r24, 0x64	; 100
     8aa:	91 e0       	ldi	r25, 0x01	; 1
     8ac:	3c d2       	rcall	.+1144   	; 0xd26 <Buffer_Initialize>
			Buffer_Initialize(&Tx_Buffer);//dump any unused data
     8ae:	8f e1       	ldi	r24, 0x1F	; 31
     8b0:	91 e0       	ldi	r25, 0x01	; 1
     8b2:	39 d2       	rcall	.+1138   	; 0xd26 <Buffer_Initialize>
     8b4:	49 c0       	rjmp	.+146    	; 0x948 <Command_Task+0x2e8>
		case 0://empty command
			break;

		case 'b'://start the bootloader
		case 'B':
			(*bootloader)();//will not return
     8b6:	e0 91 00 01 	lds	r30, 0x0100
     8ba:	f0 91 01 01 	lds	r31, 0x0101
     8be:	09 95       	icall
     8c0:	43 c0       	rjmp	.+134    	; 0x948 <Command_Task+0x2e8>
			break;

		case 'l':
		case 'L':

			RemoveWhiteSpace();
     8c2:	2e dd       	rcall	.-1444   	; 0x320 <RemoveWhiteSpace>

			switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     8c4:	84 e6       	ldi	r24, 0x64	; 100
     8c6:	91 e0       	ldi	r25, 0x01	; 1
     8c8:	a4 d2       	rcall	.+1352   	; 0xe12 <Buffer_GetElementFromBottom>
     8ca:	82 35       	cpi	r24, 0x52	; 82
     8cc:	f1 f0       	breq	.+60     	; 0x90a <Command_Task+0x2aa>
     8ce:	83 35       	cpi	r24, 0x53	; 83
     8d0:	20 f4       	brcc	.+8      	; 0x8da <Command_Task+0x27a>
     8d2:	87 34       	cpi	r24, 0x47	; 71
     8d4:	09 f0       	breq	.+2      	; 0x8d8 <Command_Task+0x278>
     8d6:	38 c0       	rjmp	.+112    	; 0x948 <Command_Task+0x2e8>
     8d8:	05 c0       	rjmp	.+10     	; 0x8e4 <Command_Task+0x284>
     8da:	87 36       	cpi	r24, 0x67	; 103
     8dc:	19 f0       	breq	.+6      	; 0x8e4 <Command_Task+0x284>
     8de:	82 37       	cpi	r24, 0x72	; 114
     8e0:	99 f5       	brne	.+102    	; 0x948 <Command_Task+0x2e8>
     8e2:	13 c0       	rjmp	.+38     	; 0x90a <Command_Task+0x2aa>
			{
				case 'g':
				case 'G':
						
					RemoveWhiteSpace();
     8e4:	1d dd       	rcall	.-1478   	; 0x320 <RemoveWhiteSpace>

					switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     8e6:	84 e6       	ldi	r24, 0x64	; 100
     8e8:	91 e0       	ldi	r25, 0x01	; 1
     8ea:	93 d2       	rcall	.+1318   	; 0xe12 <Buffer_GetElementFromBottom>
     8ec:	8f 34       	cpi	r24, 0x4F	; 79
     8ee:	49 f0       	breq	.+18     	; 0x902 <Command_Task+0x2a2>
     8f0:	80 35       	cpi	r24, 0x50	; 80
     8f2:	18 f4       	brcc	.+6      	; 0x8fa <Command_Task+0x29a>
     8f4:	86 34       	cpi	r24, 0x46	; 70
     8f6:	41 f5       	brne	.+80     	; 0x948 <Command_Task+0x2e8>
     8f8:	06 c0       	rjmp	.+12     	; 0x906 <Command_Task+0x2a6>
     8fa:	86 36       	cpi	r24, 0x66	; 102
     8fc:	21 f0       	breq	.+8      	; 0x906 <Command_Task+0x2a6>
     8fe:	8f 36       	cpi	r24, 0x6F	; 111
     900:	19 f5       	brne	.+70     	; 0x948 <Command_Task+0x2e8>
					{
						case 'o':
						case 'O':
							greenLedOn();
     902:	2d 98       	cbi	0x05, 5	; 5
     904:	21 c0       	rjmp	.+66     	; 0x948 <Command_Task+0x2e8>
							break;

						case 'f':
						case 'F':
							greenLedOff();				
     906:	2d 9a       	sbi	0x05, 5	; 5
     908:	1f c0       	rjmp	.+62     	; 0x948 <Command_Task+0x2e8>
					break;

				case 'r':
				case 'R':

					RemoveWhiteSpace();
     90a:	0a dd       	rcall	.-1516   	; 0x320 <RemoveWhiteSpace>

					switch(Buffer_GetElementFromBottom(&Rx_Buffer))
     90c:	84 e6       	ldi	r24, 0x64	; 100
     90e:	91 e0       	ldi	r25, 0x01	; 1
     910:	80 d2       	rcall	.+1280   	; 0xe12 <Buffer_GetElementFromBottom>
     912:	8f 34       	cpi	r24, 0x4F	; 79
     914:	49 f0       	breq	.+18     	; 0x928 <Command_Task+0x2c8>
     916:	80 35       	cpi	r24, 0x50	; 80
     918:	18 f4       	brcc	.+6      	; 0x920 <Command_Task+0x2c0>
     91a:	86 34       	cpi	r24, 0x46	; 70
     91c:	a9 f4       	brne	.+42     	; 0x948 <Command_Task+0x2e8>
     91e:	06 c0       	rjmp	.+12     	; 0x92c <Command_Task+0x2cc>
     920:	86 36       	cpi	r24, 0x66	; 102
     922:	21 f0       	breq	.+8      	; 0x92c <Command_Task+0x2cc>
     924:	8f 36       	cpi	r24, 0x6F	; 111
     926:	81 f4       	brne	.+32     	; 0x948 <Command_Task+0x2e8>
					{
						case 'o':
						case 'O':
							redLedOn();
     928:	42 98       	cbi	0x08, 2	; 8
     92a:	0e c0       	rjmp	.+28     	; 0x948 <Command_Task+0x2e8>
							break;

						case 'f':
						case 'F':
							redLedOff();				
     92c:	42 9a       	sbi	0x08, 2	; 8
     92e:	0c c0       	rjmp	.+24     	; 0x948 <Command_Task+0x2e8>
			}

			break;

		default:
			Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     930:	6d e0       	ldi	r22, 0x0D	; 13
     932:	8f e1       	ldi	r24, 0x1F	; 31
     934:	91 e0       	ldi	r25, 0x01	; 1
     936:	0b d2       	rcall	.+1046   	; 0xd4e <Buffer_StoreElementOnTop>
			Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     938:	6a e0       	ldi	r22, 0x0A	; 10
     93a:	8f e1       	ldi	r24, 0x1F	; 31
     93c:	91 e0       	ldi	r25, 0x01	; 1
     93e:	07 d2       	rcall	.+1038   	; 0xd4e <Buffer_StoreElementOnTop>
			Buffer_StoreElementOnTop(&Tx_Buffer, '?');			
     940:	6f e3       	ldi	r22, 0x3F	; 63
     942:	8f e1       	ldi	r24, 0x1F	; 31
     944:	91 e0       	ldi	r25, 0x01	; 1
     946:	03 d2       	rcall	.+1030   	; 0xd4e <Buffer_StoreElementOnTop>
	}
	


	
	switch(mode)
     948:	80 91 1e 01 	lds	r24, 0x011E
     94c:	81 30       	cpi	r24, 0x01	; 1
     94e:	d9 f0       	breq	.+54     	; 0x986 <Command_Task+0x326>
     950:	81 30       	cpi	r24, 0x01	; 1
     952:	50 f0       	brcs	.+20     	; 0x968 <Command_Task+0x308>
     954:	84 30       	cpi	r24, 0x04	; 4
     956:	40 f4       	brcc	.+16     	; 0x968 <Command_Task+0x308>
	{
		case ISP1:
		case ISP2:	
			Buffer_StoreElementOnTop(&Tx_Buffer, 'a');
     958:	61 e6       	ldi	r22, 0x61	; 97
     95a:	8f e1       	ldi	r24, 0x1F	; 31
     95c:	91 e0       	ldi	r25, 0x01	; 1
     95e:	f7 d1       	rcall	.+1006   	; 0xd4e <Buffer_StoreElementOnTop>
			Scheduler_SetTaskMode(PROG_Task, TASK_RUN);
     960:	61 e0       	ldi	r22, 0x01	; 1
     962:	89 e8       	ldi	r24, 0x89	; 137
     964:	92 e0       	ldi	r25, 0x02	; 2
     966:	12 c0       	rjmp	.+36     	; 0x98c <Command_Task+0x32c>
		case SERIAL:
			Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
			break;

		default://Return a <CR>
			Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     968:	6d e0       	ldi	r22, 0x0D	; 13
     96a:	8f e1       	ldi	r24, 0x1F	; 31
     96c:	91 e0       	ldi	r25, 0x01	; 1
     96e:	ef d1       	rcall	.+990    	; 0xd4e <Buffer_StoreElementOnTop>
			Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     970:	6a e0       	ldi	r22, 0x0A	; 10
     972:	8f e1       	ldi	r24, 0x1F	; 31
     974:	91 e0       	ldi	r25, 0x01	; 1
     976:	eb d1       	rcall	.+982    	; 0xd4e <Buffer_StoreElementOnTop>
			Buffer_StoreElementOnTop(&Tx_Buffer, '>');
     978:	6e e3       	ldi	r22, 0x3E	; 62
     97a:	8f e1       	ldi	r24, 0x1F	; 31
     97c:	91 e0       	ldi	r25, 0x01	; 1
     97e:	e7 d1       	rcall	.+974    	; 0xd4e <Buffer_StoreElementOnTop>
					
			Buffer_Initialize(&Rx_Buffer);//dump any unused data
     980:	84 e6       	ldi	r24, 0x64	; 100
     982:	91 e0       	ldi	r25, 0x01	; 1
     984:	d0 d1       	rcall	.+928    	; 0xd26 <Buffer_Initialize>
			Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
     986:	61 e0       	ldi	r22, 0x01	; 1
     988:	8e ed       	ldi	r24, 0xDE	; 222
     98a:	94 e0       	ldi	r25, 0x04	; 4
     98c:	96 d5       	rcall	.+2860   	; 0x14ba <Scheduler_SetTaskMode>
	}

	Scheduler_SetTaskMode(Command_Task, TASK_STOP);
     98e:	60 e0       	ldi	r22, 0x00	; 0
     990:	80 e3       	ldi	r24, 0x30	; 48
     992:	93 e0       	ldi	r25, 0x03	; 3
     994:	92 d5       	rcall	.+2852   	; 0x14ba <Scheduler_SetTaskMode>

}
     996:	c0 5c       	subi	r28, 0xC0	; 192
     998:	df 4f       	sbci	r29, 0xFF	; 255
     99a:	0f b6       	in	r0, 0x3f	; 63
     99c:	f8 94       	cli
     99e:	de bf       	out	0x3e, r29	; 62
     9a0:	0f be       	out	0x3f, r0	; 63
     9a2:	cd bf       	out	0x3d, r28	; 61
     9a4:	cf 91       	pop	r28
     9a6:	df 91       	pop	r29
     9a8:	1f 91       	pop	r17
     9aa:	0f 91       	pop	r16
     9ac:	ff 90       	pop	r15
     9ae:	ef 90       	pop	r14
     9b0:	df 90       	pop	r13
     9b2:	cf 90       	pop	r12
     9b4:	bf 90       	pop	r11
     9b6:	af 90       	pop	r10
     9b8:	9f 90       	pop	r9
     9ba:	08 95       	ret

000009bc <CDC_Task>:

}


TASK(CDC_Task)
{
     9bc:	0f 93       	push	r16
     9be:	1f 93       	push	r17
	uint8_t temp;
	
	if (USB_IsConnected)
     9c0:	80 91 b0 01 	lds	r24, 0x01B0
     9c4:	88 23       	and	r24, r24
     9c6:	09 f4       	brne	.+2      	; 0x9ca <CDC_Task+0xe>
     9c8:	dd c0       	rjmp	.+442    	; 0xb84 <CDC_Task+0x1c8>
	{
		/* Select the Serial Rx Endpoint */
		Endpoint_SelectEndpoint(CDC_RX_EPNUM);
     9ca:	84 e0       	ldi	r24, 0x04	; 4
     9cc:	80 93 e9 00 	sts	0x00E9, r24

		if (Endpoint_ReadWriteAllowed())
     9d0:	80 91 e8 00 	lds	r24, 0x00E8
     9d4:	85 fd       	sbrc	r24, 5
     9d6:	8d c0       	rjmp	.+282    	; 0xaf2 <CDC_Task+0x136>
     9d8:	97 c0       	rjmp	.+302    	; 0xb08 <CDC_Task+0x14c>
		{
			/* Read the recieved data endpoint into the transmission buffer */
			while (Endpoint_BytesInEndpoint())
			{
				if(mode == COMMAND)
     9da:	90 91 1e 01 	lds	r25, 0x011E
     9de:	99 23       	and	r25, r25
     9e0:	69 f5       	brne	.+90     	; 0xa3c <CDC_Task+0x80>
		/* 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;
     9e2:	10 91 f1 00 	lds	r17, 0x00F1
				{
					temp =  Endpoint_Read_Byte();

					Buffer_StoreElementOnTop(&Tx_Buffer, temp);//echo the character back
     9e6:	61 2f       	mov	r22, r17
     9e8:	8f e1       	ldi	r24, 0x1F	; 31
     9ea:	91 e0       	ldi	r25, 0x01	; 1
     9ec:	b0 d1       	rcall	.+864    	; 0xd4e <Buffer_StoreElementOnTop>
					Buffer_StoreElementOnTop(&Rx_Buffer, temp);//save it to our buffer
     9ee:	61 2f       	mov	r22, r17
     9f0:	84 e6       	ldi	r24, 0x64	; 100
     9f2:	91 e0       	ldi	r25, 0x01	; 1
     9f4:	ac d1       	rcall	.+856    	; 0xd4e <Buffer_StoreElementOnTop>

					if(temp == '\b')
     9f6:	18 30       	cpi	r17, 0x08	; 8
     9f8:	79 f4       	brne	.+30     	; 0xa18 <CDC_Task+0x5c>
					{
						Buffer_StoreElementOnTop(&Tx_Buffer, ' ');//clear the mistake
     9fa:	60 e2       	ldi	r22, 0x20	; 32
     9fc:	8f e1       	ldi	r24, 0x1F	; 31
     9fe:	91 e0       	ldi	r25, 0x01	; 1
     a00:	a6 d1       	rcall	.+844    	; 0xd4e <Buffer_StoreElementOnTop>
						Buffer_StoreElementOnTop(&Tx_Buffer, '\b');
     a02:	68 e0       	ldi	r22, 0x08	; 8
     a04:	8f e1       	ldi	r24, 0x1F	; 31
     a06:	91 e0       	ldi	r25, 0x01	; 1
     a08:	a2 d1       	rcall	.+836    	; 0xd4e <Buffer_StoreElementOnTop>
					
						Buffer_GetElementFromTop(&Rx_Buffer);//remove the \b and the character sent from our buffer
     a0a:	84 e6       	ldi	r24, 0x64	; 100
     a0c:	91 e0       	ldi	r25, 0x01	; 1
     a0e:	d6 d1       	rcall	.+940    	; 0xdbc <Buffer_GetElementFromTop>
						Buffer_GetElementFromTop(&Rx_Buffer);
     a10:	84 e6       	ldi	r24, 0x64	; 100
     a12:	91 e0       	ldi	r25, 0x01	; 1
     a14:	d3 d1       	rcall	.+934    	; 0xdbc <Buffer_GetElementFromTop>
     a16:	6e c0       	rjmp	.+220    	; 0xaf4 <CDC_Task+0x138>
					}
					else if(temp == '\r')
     a18:	1d 30       	cpi	r17, 0x0D	; 13
     a1a:	09 f0       	breq	.+2      	; 0xa1e <CDC_Task+0x62>
     a1c:	6b c0       	rjmp	.+214    	; 0xaf4 <CDC_Task+0x138>
					{
					//	Buffer_StoreElementOnTop(&Tx_Buffer, '\n');//ensure \r\n is sent back
						Buffer_GetElementFromTop(&Tx_Buffer);//remove the \r
     a1e:	8f e1       	ldi	r24, 0x1F	; 31
     a20:	91 e0       	ldi	r25, 0x01	; 1
     a22:	cc d1       	rcall	.+920    	; 0xdbc <Buffer_GetElementFromTop>
						Buffer_GetElementFromTop(&Rx_Buffer);//remove the \r
     a24:	84 e6       	ldi	r24, 0x64	; 100
     a26:	91 e0       	ldi	r25, 0x01	; 1
     a28:	c9 d1       	rcall	.+914    	; 0xdbc <Buffer_GetElementFromTop>

					
						Scheduler_SetTaskMode(CDC_Task, TASK_STOP);//stop it for a while
     a2a:	60 e0       	ldi	r22, 0x00	; 0
     a2c:	8e ed       	ldi	r24, 0xDE	; 222
     a2e:	94 e0       	ldi	r25, 0x04	; 4
     a30:	44 d5       	rcall	.+2696   	; 0x14ba <Scheduler_SetTaskMode>


						Scheduler_SetTaskMode(Command_Task, TASK_RUN);//process the data
     a32:	61 e0       	ldi	r22, 0x01	; 1
     a34:	80 e3       	ldi	r24, 0x30	; 48
     a36:	93 e0       	ldi	r25, 0x03	; 3
     a38:	40 d5       	rcall	.+2688   	; 0x14ba <Scheduler_SetTaskMode>
     a3a:	61 c0       	rjmp	.+194    	; 0xafe <CDC_Task+0x142>

						break;//don't care about any other data
					}
				}
				else if(mode == SERIAL)
     a3c:	91 30       	cpi	r25, 0x01	; 1
     a3e:	09 f0       	breq	.+2      	; 0xa42 <CDC_Task+0x86>
     a40:	59 c0       	rjmp	.+178    	; 0xaf4 <CDC_Task+0x138>
     a42:	10 91 f1 00 	lds	r17, 0x00F1
				{
					temp = Endpoint_Read_Byte();
					if(temp == '\\')
     a46:	1c 35       	cpi	r17, 0x5C	; 92
     a48:	79 f4       	brne	.+30     	; 0xa68 <CDC_Task+0xac>
					{
						if (escapeCharReceived == true)
     a4a:	80 91 1d 01 	lds	r24, 0x011D
     a4e:	88 23       	and	r24, r24
     a50:	41 f0       	breq	.+16     	; 0xa62 <CDC_Task+0xa6>
						{

							escapeCharReceived = false;
     a52:	10 92 1d 01 	sts	0x011D, r1
							Buffer_StoreElementOnTop(&Rx_Buffer, '\\');//pass on the old one
     a56:	6c e5       	ldi	r22, 0x5C	; 92
     a58:	84 e6       	ldi	r24, 0x64	; 100
     a5a:	91 e0       	ldi	r25, 0x01	; 1
     a5c:	78 d1       	rcall	.+752    	; 0xd4e <Buffer_StoreElementOnTop>
							Buffer_StoreElementOnTop(&Rx_Buffer, temp);//pass on the new one
     a5e:	6c e5       	ldi	r22, 0x5C	; 92
     a60:	44 c0       	rjmp	.+136    	; 0xaea <CDC_Task+0x12e>
						}
						else
						{
							escapeCharReceived = true;
     a62:	90 93 1d 01 	sts	0x011D, r25
     a66:	46 c0       	rjmp	.+140    	; 0xaf4 <CDC_Task+0x138>
						}
					}
					else if( escapeCharReceived == true)
     a68:	80 91 1d 01 	lds	r24, 0x011D
     a6c:	88 23       	and	r24, r24
     a6e:	09 f4       	brne	.+2      	; 0xa72 <CDC_Task+0xb6>
     a70:	3b c0       	rjmp	.+118    	; 0xae8 <CDC_Task+0x12c>
					{
					
						if(temp == 'c' || temp == 'C')
     a72:	13 36       	cpi	r17, 0x63	; 99
     a74:	11 f0       	breq	.+4      	; 0xa7a <CDC_Task+0xbe>
     a76:	13 34       	cpi	r17, 0x43	; 67
     a78:	61 f5       	brne	.+88     	; 0xad2 <CDC_Task+0x116>
						{
							/* Initiate the transmission of the buffer contents if USART idle */
							if (Transmitting == false && Rx_Buffer.Elements != 0)
     a7a:	80 91 1c 01 	lds	r24, 0x011C
     a7e:	88 23       	and	r24, r24
     a80:	81 f4       	brne	.+32     	; 0xaa2 <CDC_Task+0xe6>
     a82:	80 91 a8 01 	lds	r24, 0x01A8
     a86:	88 23       	and	r24, r24
     a88:	61 f0       	breq	.+24     	; 0xaa2 <CDC_Task+0xe6>
							{
								Transmitting = true;
     a8a:	00 93 1c 01 	sts	0x011C, r16
								Serial_TxByte(Buffer_GetElementFromBottom(&Rx_Buffer));
     a8e:	84 e6       	ldi	r24, 0x64	; 100
     a90:	91 e0       	ldi	r25, 0x01	; 1
     a92:	bf d1       	rcall	.+894    	; 0xe12 <Buffer_GetElementFromBottom>
     a94:	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)));
     a96:	80 91 c8 00 	lds	r24, 0x00C8
     a9a:	85 ff       	sbrs	r24, 5
     a9c:	fc cf       	rjmp	.-8      	; 0xa96 <CDC_Task+0xda>
				UDR1 = DataByte;
     a9e:	90 93 ce 00 	sts	0x00CE, r25
							}
							while(Transmitting == true)//wait until we finish
     aa2:	80 91 1c 01 	lds	r24, 0x011C
     aa6:	88 23       	and	r24, r24
     aa8:	e1 f7       	brne	.-8      	; 0xaa2 <CDC_Task+0xe6>
							{
								;
							}
							mode = COMMAND;
     aaa:	10 92 1e 01 	sts	0x011E, r1
							Buffer_Initialize(&Rx_Buffer);//clear out all data
     aae:	84 e6       	ldi	r24, 0x64	; 100
     ab0:	91 e0       	ldi	r25, 0x01	; 1
     ab2:	39 d1       	rcall	.+626    	; 0xd26 <Buffer_Initialize>
							Buffer_Initialize(&Tx_Buffer);
     ab4:	8f e1       	ldi	r24, 0x1F	; 31
     ab6:	91 e0       	ldi	r25, 0x01	; 1
     ab8:	36 d1       	rcall	.+620    	; 0xd26 <Buffer_Initialize>

							Buffer_StoreElementOnTop(&Tx_Buffer, '\r');
     aba:	6d e0       	ldi	r22, 0x0D	; 13
     abc:	8f e1       	ldi	r24, 0x1F	; 31
     abe:	91 e0       	ldi	r25, 0x01	; 1
     ac0:	46 d1       	rcall	.+652    	; 0xd4e <Buffer_StoreElementOnTop>
							Buffer_StoreElementOnTop(&Tx_Buffer, '\n');
     ac2:	6a e0       	ldi	r22, 0x0A	; 10
     ac4:	8f e1       	ldi	r24, 0x1F	; 31
     ac6:	91 e0       	ldi	r25, 0x01	; 1
     ac8:	42 d1       	rcall	.+644    	; 0xd4e <Buffer_StoreElementOnTop>
							Buffer_StoreElementOnTop(&Tx_Buffer, '>');
     aca:	6e e3       	ldi	r22, 0x3E	; 62
     acc:	8f e1       	ldi	r24, 0x1F	; 31
     ace:	91 e0       	ldi	r25, 0x01	; 1
     ad0:	07 c0       	rjmp	.+14     	; 0xae0 <CDC_Task+0x124>

						}
						else
						{
							Buffer_StoreElementOnTop(&Rx_Buffer, '\\');//pass on all the data
     ad2:	6c e5       	ldi	r22, 0x5C	; 92
     ad4:	84 e6       	ldi	r24, 0x64	; 100
     ad6:	91 e0       	ldi	r25, 0x01	; 1
     ad8:	3a d1       	rcall	.+628    	; 0xd4e <Buffer_StoreElementOnTop>
							Buffer_StoreElementOnTop(&Rx_Buffer, temp);
     ada:	61 2f       	mov	r22, r17
     adc:	84 e6       	ldi	r24, 0x64	; 100
     ade:	91 e0       	ldi	r25, 0x01	; 1
     ae0:	36 d1       	rcall	.+620    	; 0xd4e <Buffer_StoreElementOnTop>
						}

						escapeCharReceived = false;
     ae2:	10 92 1d 01 	sts	0x011D, r1
     ae6:	06 c0       	rjmp	.+12     	; 0xaf4 <CDC_Task+0x138>
					}
					else
					{
						Buffer_StoreElementOnTop(&Rx_Buffer, temp);
     ae8:	61 2f       	mov	r22, r17
     aea:	84 e6       	ldi	r24, 0x64	; 100
     aec:	91 e0       	ldi	r25, 0x01	; 1
     aee:	2f d1       	rcall	.+606    	; 0xd4e <Buffer_StoreElementOnTop>
     af0:	01 c0       	rjmp	.+2      	; 0xaf4 <CDC_Task+0x138>
						if(temp == 'c' || temp == 'C')
						{
							/* Initiate the transmission of the buffer contents if USART idle */
							if (Transmitting == false && Rx_Buffer.Elements != 0)
							{
								Transmitting = true;
     af2:	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())
     af4:	80 91 f2 00 	lds	r24, 0x00F2
     af8:	88 23       	and	r24, r24
     afa:	09 f0       	breq	.+2      	; 0xafe <CDC_Task+0x142>
     afc:	6e cf       	rjmp	.-292    	; 0x9da <CDC_Task+0x1e>
					}	
				}
			}

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

		/* Select the Serial Tx Endpoint */
		Endpoint_SelectEndpoint(CDC_TX_EPNUM);
     b08:	83 e0       	ldi	r24, 0x03	; 3
     b0a:	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)
     b0e:	80 91 1c 01 	lds	r24, 0x011C
     b12:	88 23       	and	r24, r24
     b14:	a1 f4       	brne	.+40     	; 0xb3e <CDC_Task+0x182>
     b16:	90 91 1e 01 	lds	r25, 0x011E
     b1a:	91 30       	cpi	r25, 0x01	; 1
     b1c:	81 f4       	brne	.+32     	; 0xb3e <CDC_Task+0x182>
     b1e:	80 91 a8 01 	lds	r24, 0x01A8
     b22:	88 23       	and	r24, r24
     b24:	61 f0       	breq	.+24     	; 0xb3e <CDC_Task+0x182>
		{
				Transmitting = true;
     b26:	90 93 1c 01 	sts	0x011C, r25
				Serial_TxByte(Buffer_GetElementFromBottom(&Rx_Buffer));
     b2a:	84 e6       	ldi	r24, 0x64	; 100
     b2c:	91 e0       	ldi	r25, 0x01	; 1
     b2e:	71 d1       	rcall	.+738    	; 0xe12 <Buffer_GetElementFromBottom>
     b30:	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)));
     b32:	80 91 c8 00 	lds	r24, 0x00C8
     b36:	85 ff       	sbrs	r24, 5
     b38:	fc cf       	rjmp	.-8      	; 0xb32 <CDC_Task+0x176>
				UDR1 = DataByte;
     b3a:	90 93 ce 00 	sts	0x00CE, r25
		}


		/* Write the Data to the Endpoint */
		if(Tx_Buffer.Elements != 0)
     b3e:	80 91 63 01 	lds	r24, 0x0163
     b42:	88 23       	and	r24, r24
     b44:	f9 f0       	breq	.+62     	; 0xb84 <CDC_Task+0x1c8>
		{

			do{
				/* Wait until Serial Tx Endpoint Ready for Read/Write */
				while (!(Endpoint_ReadWriteAllowed()));
     b46:	80 91 e8 00 	lds	r24, 0x00E8
     b4a:	85 ff       	sbrs	r24, 5
     b4c:	fc cf       	rjmp	.-8      	; 0xb46 <CDC_Task+0x18a>

				Endpoint_Write_Byte(Buffer_GetElementFromBottom(&Tx_Buffer));
     b4e:	8f e1       	ldi	r24, 0x1F	; 31
     b50:	91 e0       	ldi	r25, 0x01	; 1
     b52:	5f d1       	rcall	.+702    	; 0xe12 <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;
     b54:	80 93 f1 00 	sts	0x00F1, r24

				/* Check if the endpoint is full */
				if (Endpoint_BytesInEndpoint() == CDC_TXRX_EPSIZE)
     b58:	80 91 f2 00 	lds	r24, 0x00F2
     b5c:	80 31       	cpi	r24, 0x10	; 16
     b5e:	49 f4       	brne	.+18     	; 0xb72 <CDC_Task+0x1b6>
				{
					/* Send the data */
					Endpoint_ClearCurrentBank();
     b60:	80 91 e8 00 	lds	r24, 0x00E8
     b64:	8f 77       	andi	r24, 0x7F	; 127
     b66:	80 93 e8 00 	sts	0x00E8, r24

					/* Wait until Serial Tx Endpoint Ready for Read/Write */
					while (!(Endpoint_ReadWriteAllowed()));
     b6a:	80 91 e8 00 	lds	r24, 0x00E8
     b6e:	85 ff       	sbrs	r24, 5
     b70:	fc cf       	rjmp	.-8      	; 0xb6a <CDC_Task+0x1ae>
				}
			}while (Tx_Buffer.Elements != 0);
     b72:	80 91 63 01 	lds	r24, 0x0163
     b76:	88 23       	and	r24, r24
     b78:	31 f7       	brne	.-52     	; 0xb46 <CDC_Task+0x18a>

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

		}
	}
}
     b84:	1f 91       	pop	r17
     b86:	0f 91       	pop	r16
     b88:	08 95       	ret

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

EVENT_HANDLER(USB_UnhandledControlPacket)
{
     b8a:	81 32       	cpi	r24, 0x21	; 33
     b8c:	31 f0       	breq	.+12     	; 0xb9a <Event_USB_UnhandledControlPacket+0x10>
     b8e:	82 32       	cpi	r24, 0x22	; 34
     b90:	49 f1       	breq	.+82     	; 0xbe4 <Event_USB_UnhandledControlPacket+0x5a>
     b92:	80 32       	cpi	r24, 0x20	; 32
     b94:	09 f0       	breq	.+2      	; 0xb98 <Event_USB_UnhandledControlPacket+0xe>
     b96:	3d c0       	rjmp	.+122    	; 0xc12 <Event_USB_UnhandledControlPacket+0x88>
     b98:	13 c0       	rjmp	.+38     	; 0xbc0 <Event_USB_UnhandledControlPacket+0x36>

	/* Process CDC specific control requests */
	switch (bRequest)
	{
		case GET_LINE_CODING:
			if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
     b9a:	61 3a       	cpi	r22, 0xA1	; 161
     b9c:	09 f0       	breq	.+2      	; 0xba0 <Event_USB_UnhandledControlPacket+0x16>
     b9e:	39 c0       	rjmp	.+114    	; 0xc12 <Event_USB_UnhandledControlPacket+0x88>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
     ba0:	80 91 e8 00 	lds	r24, 0x00E8
     ba4:	87 7f       	andi	r24, 0xF7	; 247
     ba6:	80 93 e8 00 	sts	0x00E8, r24

				/* Write the line coding data to the control endpoint */
				Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(LineCoding));
     baa:	67 e0       	ldi	r22, 0x07	; 7
     bac:	70 e0       	ldi	r23, 0x00	; 0
     bae:	82 e1       	ldi	r24, 0x12	; 18
     bb0:	91 e0       	ldi	r25, 0x01	; 1
     bb2:	35 d5       	rcall	.+2666   	; 0x161e <Endpoint_Write_Control_Stream_LE>

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

			break;
		case SET_LINE_CODING:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
     bc0:	61 32       	cpi	r22, 0x21	; 33
     bc2:	39 f5       	brne	.+78     	; 0xc12 <Event_USB_UnhandledControlPacket+0x88>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
     bc4:	80 91 e8 00 	lds	r24, 0x00E8
     bc8:	87 7f       	andi	r24, 0xF7	; 247
     bca:	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));
     bce:	67 e0       	ldi	r22, 0x07	; 7
     bd0:	70 e0       	ldi	r23, 0x00	; 0
     bd2:	82 e1       	ldi	r24, 0x12	; 18
     bd4:	91 e0       	ldi	r25, 0x01	; 1
     bd6:	67 d5       	rcall	.+2766   	; 0x16a6 <Endpoint_Read_Control_Stream_LE>

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

				/* Reconfigure the USART with the new settings */
				ReconfigureUSART();
     be2:	34 cb       	rjmp	.-2456   	; 0x24c <ReconfigureUSART>
			}

			break;
		case SET_CONTROL_LINE_STATE:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
     be4:	61 32       	cpi	r22, 0x21	; 33
     be6:	a9 f4       	brne	.+42     	; 0xc12 <Event_USB_UnhandledControlPacket+0x88>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
     be8:	80 91 e8 00 	lds	r24, 0x00E8
     bec:	87 7f       	andi	r24, 0xF7	; 247
     bee:	80 93 e8 00 	sts	0x00E8, r24

				/* Send an empty packet to acknowedge the command (currently unused) */
				Endpoint_ClearSetupIN();
     bf2:	80 91 e8 00 	lds	r24, 0x00E8
     bf6:	8e 7f       	andi	r24, 0xFE	; 254
     bf8:	80 93 e8 00 	sts	0x00E8, r24
				if(mode == COMMAND)
     bfc:	80 91 1e 01 	lds	r24, 0x011E
     c00:	88 23       	and	r24, r24
     c02:	39 f4       	brne	.+14     	; 0xc12 <Event_USB_UnhandledControlPacket+0x88>
				{
					
					StringToBuffer_P(PSTR("SOC Robotics USB10, (c) 2008\r\n\r\n"));
     c04:	80 eb       	ldi	r24, 0xB0	; 176
     c06:	90 e0       	ldi	r25, 0x00	; 0
     c08:	72 dc       	rcall	.-1820   	; 0x4ee <StringToBuffer_P>
					Buffer_StoreElementOnTop(&Tx_Buffer, '>');//prompt character
     c0a:	6e e3       	ldi	r22, 0x3E	; 62
     c0c:	8f e1       	ldi	r24, 0x1F	; 31
     c0e:	91 e0       	ldi	r25, 0x01	; 1
     c10:	9e c0       	rjmp	.+316    	; 0xd4e <Buffer_StoreElementOnTop>
     c12:	08 95       	ret

00000c14 <Event_USB_ConfigurationChanged>:
	Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);

}

EVENT_HANDLER(USB_ConfigurationChanged)
{
     c14:	20 e0       	ldi	r18, 0x00	; 0
     c16:	41 ec       	ldi	r20, 0xC1	; 193
     c18:	68 e0       	ldi	r22, 0x08	; 8
     c1a:	70 e0       	ldi	r23, 0x00	; 0
     c1c:	82 e0       	ldi	r24, 0x02	; 2
     c1e:	d8 d4       	rcall	.+2480   	; 0x15d0 <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,
     c20:	24 e0       	ldi	r18, 0x04	; 4
     c22:	41 e8       	ldi	r20, 0x81	; 129
     c24:	60 e1       	ldi	r22, 0x10	; 16
     c26:	70 e0       	ldi	r23, 0x00	; 0
     c28:	83 e0       	ldi	r24, 0x03	; 3
     c2a:	d2 d4       	rcall	.+2468   	; 0x15d0 <Endpoint_ConfigureEndpoint_P>
		                       ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,
	                           ENDPOINT_BANK_DOUBLE);

	Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,
     c2c:	24 e0       	ldi	r18, 0x04	; 4
     c2e:	40 e8       	ldi	r20, 0x80	; 128
     c30:	60 e1       	ldi	r22, 0x10	; 16
     c32:	70 e0       	ldi	r23, 0x00	; 0
     c34:	84 e0       	ldi	r24, 0x04	; 4
     c36:	cc d4       	rcall	.+2456   	; 0x15d0 <Endpoint_ConfigureEndpoint_P>
		                       ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,
	                           ENDPOINT_BANK_DOUBLE);


	/* Start CDC task */
	Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
     c38:	61 e0       	ldi	r22, 0x01	; 1
     c3a:	8e ed       	ldi	r24, 0xDE	; 222
     c3c:	94 e0       	ldi	r25, 0x04	; 4
}
     c3e:	3d c4       	rjmp	.+2170   	; 0x14ba <Scheduler_SetTaskMode>

00000c40 <main>:

const char MYSTRING[] PROGMEM = "I'm in Flash";


int main(void)
{
     c40:	1f 93       	push	r17
     c42:	cf 93       	push	r28
     c44:	df 93       	push	r29
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
     c46:	84 b7       	in	r24, 0x34	; 52
     c48:	87 7f       	andi	r24, 0xF7	; 247
     c4a:	84 bf       	out	0x34, r24	; 52
	wdt_disable();
     c4c:	88 e1       	ldi	r24, 0x18	; 24
     c4e:	0f b6       	in	r0, 0x3f	; 63
     c50:	f8 94       	cli
     c52:	80 93 60 00 	sts	0x0060, r24
     c56:	10 92 60 00 	sts	0x0060, r1
     c5a:	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__ (
     c5c:	91 e0       	ldi	r25, 0x01	; 1
     c5e:	80 e8       	ldi	r24, 0x80	; 128
     c60:	0f b6       	in	r0, 0x3f	; 63
     c62:	f8 94       	cli
     c64:	80 93 61 00 	sts	0x0061, r24
     c68:	90 93 61 00 	sts	0x0061, r25
     c6c:	0f be       	out	0x3f, r0	; 63

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

	I2C_Init();
     c6e:	40 d1       	rcall	.+640    	; 0xef0 <I2C_Init>
	StepDirLineCoding_Init();
     c70:	46 d3       	rcall	.+1676   	; 0x12fe <StepDirLineCoding_Init>

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

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


	/* Ringbuffer Initialization */
	Buffer_Initialize(&Rx_Buffer);
     c7a:	84 e6       	ldi	r24, 0x64	; 100
     c7c:	91 e0       	ldi	r25, 0x01	; 1
     c7e:	53 d0       	rcall	.+166    	; 0xd26 <Buffer_Initialize>
	Buffer_Initialize(&Tx_Buffer);
     c80:	8f e1       	ldi	r24, 0x1F	; 31
     c82:	91 e0       	ldi	r25, 0x01	; 1
     c84:	50 d0       	rcall	.+160    	; 0xd26 <Buffer_Initialize>
			#define MAX_DELAYCTR_COUNT                0xFFFF

		/* Inline Functions: */
			static inline void Scheduler_InitScheduler(const uint8_t TotalTasks)
			{
				Scheduler_TotalTasks = TotalTasks;
     c86:	14 e0       	ldi	r17, 0x04	; 4
     c88:	10 93 a9 01 	sts	0x01A9, r17

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

	/* Initialize USB Subsystem */
	USB_Init();
     c8c:	96 d4       	rcall	.+2348   	; 0x15ba <USB_Init>
     c8e:	10 93 a9 01 	sts	0x01A9, r17
     c92:	c2 e0       	ldi	r28, 0x02	; 2
     c94:	d1 e0       	ldi	r29, 0x01	; 1
     c96:	07 c0       	rjmp	.+14     	; 0xca6 <main+0x66>
				{
					TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
					while (CurrTask != &Scheduler_TaskList[TotalTasks])
					{
						if (CurrTask->TaskStatus == TASK_RUN)
     c98:	8a 81       	ldd	r24, Y+2	; 0x02
     c9a:	88 23       	and	r24, r24
     c9c:	19 f0       	breq	.+6      	; 0xca4 <main+0x64>
						  CurrTask->Task();
     c9e:	e8 81       	ld	r30, Y
     ca0:	f9 81       	ldd	r31, Y+1	; 0x01
     ca2:	09 95       	icall

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

				for (;;)
				{
					TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
					while (CurrTask != &Scheduler_TaskList[TotalTasks])
     ca6:	81 e0       	ldi	r24, 0x01	; 1
     ca8:	c2 31       	cpi	r28, 0x12	; 18
     caa:	d8 07       	cpc	r29, r24
     cac:	a9 f7       	brne	.-22     	; 0xc98 <main+0x58>
     cae:	60 97       	sbiw	r28, 0x10	; 16
     cb0:	fa cf       	rjmp	.-12     	; 0xca6 <main+0x66>

00000cb2 <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)
{
     cb2:	cf 93       	push	r28
     cb4:	df 93       	push	r29
     cb6:	da 01       	movw	r26, r20
     cb8:	e9 01       	movw	r28, r18
	void*    Address = NULL;
	uint16_t Size    = 0;

	switch (wValue >> 8)
     cba:	29 2f       	mov	r18, r25
     cbc:	33 27       	eor	r19, r19
     cbe:	22 30       	cpi	r18, 0x02	; 2
     cc0:	31 05       	cpc	r19, r1
     cc2:	39 f0       	breq	.+14     	; 0xcd2 <USB_GetDescriptor+0x20>
     cc4:	23 30       	cpi	r18, 0x03	; 3
     cc6:	31 05       	cpc	r19, r1
     cc8:	49 f0       	breq	.+18     	; 0xcdc <USB_GetDescriptor+0x2a>
     cca:	21 30       	cpi	r18, 0x01	; 1
     ccc:	31 05       	cpc	r19, r1
     cce:	e9 f4       	brne	.+58     	; 0xd0a <USB_GetDescriptor+0x58>
     cd0:	20 c0       	rjmp	.+64     	; 0xd12 <USB_GetDescriptor+0x60>
     cd2:	e3 ee       	ldi	r30, 0xE3	; 227
     cd4:	f0 e0       	ldi	r31, 0x00	; 0
     cd6:	83 e4       	ldi	r24, 0x43	; 67
     cd8:	90 e0       	ldi	r25, 0x00	; 0
     cda:	1f c0       	rjmp	.+62     	; 0xd1a <USB_GetDescriptor+0x68>
		case DTYPE_Configuration:
			Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
			Size    = sizeof(USB_Descriptor_Configuration_t);
			break;
		case DTYPE_String:
			switch (wValue & 0xFF)
     cdc:	90 70       	andi	r25, 0x00	; 0
     cde:	81 30       	cpi	r24, 0x01	; 1
     ce0:	91 05       	cpc	r25, r1
     ce2:	51 f0       	breq	.+20     	; 0xcf8 <USB_GetDescriptor+0x46>
     ce4:	81 30       	cpi	r24, 0x01	; 1
     ce6:	91 05       	cpc	r25, r1
     ce8:	18 f0       	brcs	.+6      	; 0xcf0 <USB_GetDescriptor+0x3e>
     cea:	02 97       	sbiw	r24, 0x02	; 2
     cec:	71 f4       	brne	.+28     	; 0xd0a <USB_GetDescriptor+0x58>
     cee:	08 c0       	rjmp	.+16     	; 0xd00 <USB_GetDescriptor+0x4e>
			{
				case 0x00:
					Address = DESCRIPTOR_ADDRESS(LanguageString);
					Size    = pgm_read_byte(&LanguageString.Header.Size);
     cf0:	e6 e2       	ldi	r30, 0x26	; 38
     cf2:	f1 e0       	ldi	r31, 0x01	; 1
     cf4:	84 91       	lpm	r24, Z+
     cf6:	07 c0       	rjmp	.+14     	; 0xd06 <USB_GetDescriptor+0x54>
					break;
				case 0x01:
					Address = DESCRIPTOR_ADDRESS(ManufacturerString);
					Size    = pgm_read_byte(&ManufacturerString.Header.Size);
     cf8:	ea e2       	ldi	r30, 0x2A	; 42
     cfa:	f1 e0       	ldi	r31, 0x01	; 1
     cfc:	84 91       	lpm	r24, Z+
     cfe:	03 c0       	rjmp	.+6      	; 0xd06 <USB_GetDescriptor+0x54>
					break;
				case 0x02:
					Address = DESCRIPTOR_ADDRESS(ProductString);
					Size    = pgm_read_byte(&ProductString.Header.Size);
     d00:	e4 e4       	ldi	r30, 0x44	; 68
     d02:	f1 e0       	ldi	r31, 0x01	; 1
     d04:	84 91       	lpm	r24, Z+
     d06:	90 e0       	ldi	r25, 0x00	; 0
     d08:	08 c0       	rjmp	.+16     	; 0xd1a <USB_GetDescriptor+0x68>
     d0a:	80 e0       	ldi	r24, 0x00	; 0

		return true;
	}
		
	return false;
}
     d0c:	df 91       	pop	r29
     d0e:	cf 91       	pop	r28
     d10:	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);
     d12:	e1 ed       	ldi	r30, 0xD1	; 209
     d14:	f0 e0       	ldi	r31, 0x00	; 0
     d16:	82 e1       	ldi	r24, 0x12	; 18
     d18:	90 e0       	ldi	r25, 0x00	; 0
			break;
	}
	
	if (Address != NULL)
	{
		*DescriptorAddress = Address;
     d1a:	ed 93       	st	X+, r30
     d1c:	fc 93       	st	X, r31
		*DescriptorSize    = Size;
     d1e:	99 83       	std	Y+1, r25	; 0x01
     d20:	88 83       	st	Y, r24
     d22:	81 e0       	ldi	r24, 0x01	; 1
     d24:	f3 cf       	rjmp	.-26     	; 0xd0c <USB_GetDescriptor+0x5a>

00000d26 <Buffer_Initialize>:
*/

#include "RingBuff.h"

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

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     d2a:	f8 94       	cli
	{
		Buffer->TopPtr    = (RingBuff_Data_t*)&Buffer->Buffer;
     d2c:	df 01       	movw	r26, r30
     d2e:	a0 5c       	subi	r26, 0xC0	; 192
     d30:	bf 4f       	sbci	r27, 0xFF	; 255
     d32:	11 96       	adiw	r26, 0x01	; 1
     d34:	fc 93       	st	X, r31
     d36:	ee 93       	st	-X, r30
		Buffer->BottomPtr   = (RingBuff_Data_t*)&Buffer->Buffer;
     d38:	df 01       	movw	r26, r30
     d3a:	ae 5b       	subi	r26, 0xBE	; 190
     d3c:	bf 4f       	sbci	r27, 0xFF	; 255
     d3e:	11 96       	adiw	r26, 0x01	; 1
     d40:	fc 93       	st	X, r31
     d42:	ee 93       	st	-X, r30
		Buffer->Elements = 0;
     d44:	ec 5b       	subi	r30, 0xBC	; 188
     d46:	ff 4f       	sbci	r31, 0xFF	; 255
     d48:	10 82       	st	Z, r1
    (void)__s;
}

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

00000d4e <Buffer_StoreElementOnTop>:
	}
}

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

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     d52:	f8 94       	cli
	{
		if (Buffer->Elements == BUFF_LENGTH)//i.e. buffer is full.  So we will remove our oldest data
     d54:	fc 01       	movw	r30, r24
     d56:	ec 5b       	subi	r30, 0xBC	; 188
     d58:	ff 4f       	sbci	r31, 0xFF	; 255
     d5a:	80 81       	ld	r24, Z
     d5c:	80 34       	cpi	r24, 0x40	; 64
     d5e:	99 f4       	brne	.+38     	; 0xd86 <Buffer_StoreElementOnTop+0x38>
		{
			Buffer->BottomPtr++;
     d60:	fa 01       	movw	r30, r20
     d62:	ee 5b       	subi	r30, 0xBE	; 190
     d64:	ff 4f       	sbci	r31, 0xFF	; 255
     d66:	80 81       	ld	r24, Z
     d68:	91 81       	ldd	r25, Z+1	; 0x01
     d6a:	01 96       	adiw	r24, 0x01	; 1
     d6c:	91 83       	std	Z+1, r25	; 0x01
     d6e:	80 83       	st	Z, r24

			if (Buffer->BottomPtr == &Buffer->Buffer[BUFF_LENGTH])
     d70:	20 81       	ld	r18, Z
     d72:	31 81       	ldd	r19, Z+1	; 0x01
     d74:	ca 01       	movw	r24, r20
     d76:	80 5c       	subi	r24, 0xC0	; 192
     d78:	9f 4f       	sbci	r25, 0xFF	; 255
     d7a:	28 17       	cp	r18, r24
     d7c:	39 07       	cpc	r19, r25
     d7e:	31 f4       	brne	.+12     	; 0xd8c <Buffer_StoreElementOnTop+0x3e>
			{
				Buffer->BottomPtr = (RingBuff_Data_t*)&Buffer->Buffer;
     d80:	51 83       	std	Z+1, r21	; 0x01
     d82:	40 83       	st	Z, r20
     d84:	03 c0       	rjmp	.+6      	; 0xd8c <Buffer_StoreElementOnTop+0x3e>
			}
		}
		else
		{
			Buffer->Elements++;
     d86:	80 81       	ld	r24, Z
     d88:	8f 5f       	subi	r24, 0xFF	; 255
     d8a:	80 83       	st	Z, r24
		}


		*(Buffer->TopPtr) = Data;
     d8c:	da 01       	movw	r26, r20
     d8e:	a0 5c       	subi	r26, 0xC0	; 192
     d90:	bf 4f       	sbci	r27, 0xFF	; 255
     d92:	ed 91       	ld	r30, X+
     d94:	fc 91       	ld	r31, X
     d96:	11 97       	sbiw	r26, 0x01	; 1
     d98:	60 83       	st	Z, r22
		Buffer->TopPtr++;
     d9a:	8d 91       	ld	r24, X+
     d9c:	9c 91       	ld	r25, X
     d9e:	11 97       	sbiw	r26, 0x01	; 1
     da0:	01 96       	adiw	r24, 0x01	; 1
     da2:	11 96       	adiw	r26, 0x01	; 1
     da4:	9c 93       	st	X, r25
     da6:	8e 93       	st	-X, r24

		if (Buffer->TopPtr == &Buffer->Buffer[BUFF_LENGTH])
     da8:	ed 91       	ld	r30, X+
     daa:	fc 91       	ld	r31, X
     dac:	11 97       	sbiw	r26, 0x01	; 1
     dae:	ea 17       	cp	r30, r26
     db0:	fb 07       	cpc	r31, r27
     db2:	11 f4       	brne	.+4      	; 0xdb8 <Buffer_StoreElementOnTop+0x6a>
		{
			Buffer->TopPtr = (RingBuff_Data_t*)&Buffer->Buffer;
     db4:	51 83       	std	Z+1, r21	; 0x01
     db6:	40 83       	st	Z, r20
    (void)__s;
}

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

00000dbc <Buffer_GetElementFromTop>:
		}
	}
}

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

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

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     dc0:	f8 94       	cli
	{
		if (!(Buffer->Elements))
     dc2:	ac 5b       	subi	r26, 0xBC	; 188
     dc4:	bf 4f       	sbci	r27, 0xFF	; 255
     dc6:	8c 91       	ld	r24, X
     dc8:	a4 54       	subi	r26, 0x44	; 68
     dca:	b0 40       	sbci	r27, 0x00	; 0
     dcc:	88 23       	and	r24, r24
     dce:	11 f4       	brne	.+4      	; 0xdd4 <Buffer_GetElementFromTop+0x18>
    (void)__s;
}

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

		if(Buffer->TopPtr == (RingBuff_Data_t*)&Buffer->Buffer)//at index 0
     dd4:	fd 01       	movw	r30, r26
     dd6:	e0 5c       	subi	r30, 0xC0	; 192
     dd8:	ff 4f       	sbci	r31, 0xFF	; 255
     dda:	80 81       	ld	r24, Z
     ddc:	91 81       	ldd	r25, Z+1	; 0x01
     dde:	8a 17       	cp	r24, r26
     de0:	9b 07       	cpc	r25, r27
     de2:	29 f4       	brne	.+10     	; 0xdee <Buffer_GetElementFromTop+0x32>
		{
			Buffer->TopPtr = (RingBuff_Data_t*)&Buffer->Buffer[BUFF_LENGTH-1];//now at the top of the array
     de4:	df 96       	adiw	r26, 0x3f	; 63
     de6:	b1 83       	std	Z+1, r27	; 0x01
     de8:	a0 83       	st	Z, r26
     dea:	df 97       	sbiw	r26, 0x3f	; 63
     dec:	05 c0       	rjmp	.+10     	; 0xdf8 <Buffer_GetElementFromTop+0x3c>
		}
		else
		{
			Buffer->TopPtr--;
     dee:	80 81       	ld	r24, Z
     df0:	91 81       	ldd	r25, Z+1	; 0x01
     df2:	01 97       	sbiw	r24, 0x01	; 1
     df4:	91 83       	std	Z+1, r25	; 0x01
     df6:	80 83       	st	Z, r24
		}

		Buffer->Elements--;
     df8:	fd 01       	movw	r30, r26
     dfa:	ec 5b       	subi	r30, 0xBC	; 188
     dfc:	ff 4f       	sbci	r31, 0xFF	; 255
     dfe:	80 81       	ld	r24, Z
     e00:	81 50       	subi	r24, 0x01	; 1
     e02:	80 83       	st	Z, r24

		BuffData = *(Buffer->TopPtr);
     e04:	a0 5c       	subi	r26, 0xC0	; 192
     e06:	bf 4f       	sbci	r27, 0xFF	; 255
     e08:	ed 91       	ld	r30, X+
     e0a:	fc 91       	ld	r31, X
     e0c:	80 81       	ld	r24, Z
    (void)__s;
}

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

00000e12 <Buffer_GetElementFromBottom>:
	return BuffData;
}

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

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

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     e1a:	f8 94       	cli
	{
		if (!(Buffer->Elements))
     e1c:	ec 01       	movw	r28, r24
     e1e:	cc 5b       	subi	r28, 0xBC	; 188
     e20:	df 4f       	sbci	r29, 0xFF	; 255
     e22:	88 81       	ld	r24, Y
     e24:	88 23       	and	r24, r24
     e26:	19 f4       	brne	.+6      	; 0xe2e <Buffer_GetElementFromBottom+0x1c>
    (void)__s;
}

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

		BuffData = *(Buffer->BottomPtr);
     e2e:	da 01       	movw	r26, r20
     e30:	ae 5b       	subi	r26, 0xBE	; 190
     e32:	bf 4f       	sbci	r27, 0xFF	; 255
     e34:	ed 91       	ld	r30, X+
     e36:	fc 91       	ld	r31, X
     e38:	11 97       	sbiw	r26, 0x01	; 1
     e3a:	e0 81       	ld	r30, Z

		Buffer->BottomPtr++;
     e3c:	8d 91       	ld	r24, X+
     e3e:	9c 91       	ld	r25, X
     e40:	11 97       	sbiw	r26, 0x01	; 1
     e42:	01 96       	adiw	r24, 0x01	; 1
     e44:	11 96       	adiw	r26, 0x01	; 1
     e46:	9c 93       	st	X, r25
     e48:	8e 93       	st	-X, r24
		Buffer->Elements--;
     e4a:	88 81       	ld	r24, Y
     e4c:	81 50       	subi	r24, 0x01	; 1
     e4e:	88 83       	st	Y, r24

		if (Buffer->BottomPtr == &Buffer->Buffer[BUFF_LENGTH])
     e50:	2d 91       	ld	r18, X+
     e52:	3c 91       	ld	r19, X
     e54:	11 97       	sbiw	r26, 0x01	; 1
     e56:	ca 01       	movw	r24, r20
     e58:	80 5c       	subi	r24, 0xC0	; 192
     e5a:	9f 4f       	sbci	r25, 0xFF	; 255
     e5c:	28 17       	cp	r18, r24
     e5e:	39 07       	cpc	r19, r25
     e60:	19 f4       	brne	.+6      	; 0xe68 <Buffer_GetElementFromBottom+0x56>
		  Buffer->BottomPtr = (RingBuff_Data_t*)&Buffer->Buffer;
     e62:	11 96       	adiw	r26, 0x01	; 1
     e64:	5c 93       	st	X, r21
     e66:	4e 93       	st	-X, r20
    (void)__s;
}

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

00000e72 <Buffer_StoreElementOnBottom>:

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

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
     e76:	f8 94       	cli
	{
		if(Buffer->Elements == BUFF_LENGTH)//i.e. buffer is full.  So we have no room
     e78:	ac 5b       	subi	r26, 0xBC	; 188
     e7a:	bf 4f       	sbci	r27, 0xFF	; 255
     e7c:	8c 91       	ld	r24, X
     e7e:	a4 54       	subi	r26, 0x44	; 68
     e80:	b0 40       	sbci	r27, 0x00	; 0
     e82:	80 34       	cpi	r24, 0x40	; 64
     e84:	d9 f0       	breq	.+54     	; 0xebc <Buffer_StoreElementOnBottom+0x4a>
		{
			return;
		}
		if(Buffer->BottomPtr == (RingBuff_Data_t*)&Buffer->Buffer)
     e86:	fd 01       	movw	r30, r26
     e88:	ee 5b       	subi	r30, 0xBE	; 190
     e8a:	ff 4f       	sbci	r31, 0xFF	; 255
     e8c:	80 81       	ld	r24, Z
     e8e:	91 81       	ldd	r25, Z+1	; 0x01
     e90:	8a 17       	cp	r24, r26
     e92:	9b 07       	cpc	r25, r27
     e94:	29 f4       	brne	.+10     	; 0xea0 <Buffer_StoreElementOnBottom+0x2e>
		{
			Buffer->BottomPtr = (RingBuff_Data_t*)&Buffer->Buffer[BUFF_LENGTH-1];
     e96:	df 96       	adiw	r26, 0x3f	; 63
     e98:	b1 83       	std	Z+1, r27	; 0x01
     e9a:	a0 83       	st	Z, r26
     e9c:	df 97       	sbiw	r26, 0x3f	; 63
     e9e:	05 c0       	rjmp	.+10     	; 0xeaa <Buffer_StoreElementOnBottom+0x38>
		}
		else
		{
			Buffer->BottomPtr--;
     ea0:	80 81       	ld	r24, Z
     ea2:	91 81       	ldd	r25, Z+1	; 0x01
     ea4:	01 97       	sbiw	r24, 0x01	; 1
     ea6:	91 83       	std	Z+1, r25	; 0x01
     ea8:	80 83       	st	Z, r24
		}

		*(Buffer->BottomPtr) = Data;
     eaa:	ae 5b       	subi	r26, 0xBE	; 190
     eac:	bf 4f       	sbci	r27, 0xFF	; 255
     eae:	ed 91       	ld	r30, X+
     eb0:	fd 91       	ld	r31, X+
     eb2:	60 83       	st	Z, r22
		Buffer->Elements++;
     eb4:	fd 01       	movw	r30, r26
     eb6:	80 81       	ld	r24, Z
     eb8:	8f 5f       	subi	r24, 0xFF	; 255
     eba:	80 83       	st	Z, r24
    (void)__s;
}

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

00000ec0 <Set_High>:
}



void Set_High(uint8_t x)
{
     ec0:	90 91 19 01 	lds	r25, 0x0119
     ec4:	92 33       	cpi	r25, 0x32	; 50
     ec6:	41 f0       	breq	.+16     	; 0xed8 <Set_High+0x18>
     ec8:	93 33       	cpi	r25, 0x33	; 51
     eca:	61 f0       	breq	.+24     	; 0xee4 <Set_High+0x24>
     ecc:	91 33       	cpi	r25, 0x31	; 49
     ece:	79 f4       	brne	.+30     	; 0xeee <Set_High+0x2e>
	switch(I2C_Port)
	{
		case '1':
			if(x == SCL)
     ed0:	88 23       	and	r24, r24
     ed2:	31 f0       	breq	.+12     	; 0xee0 <Set_High+0x20>
			{
				DDRD &= ~(1<<5);
			}
			else
			{
				DDRD &= ~(1<<6);
     ed4:	56 98       	cbi	0x0a, 6	; 10
     ed6:	08 95       	ret
			}
			break;
		case '2':
			if(x == SCL)
     ed8:	88 23       	and	r24, r24
     eda:	11 f4       	brne	.+4      	; 0xee0 <Set_High+0x20>
			{
				DDRD &= ~(1<<4);
     edc:	54 98       	cbi	0x0a, 4	; 10
     ede:	08 95       	ret
			}
			else
			{
				DDRD &= ~(1<<5);
     ee0:	55 98       	cbi	0x0a, 5	; 10
     ee2:	08 95       	ret
			}
			break;
		case '3':
			if(x == SCL)
     ee4:	88 23       	and	r24, r24
     ee6:	11 f4       	brne	.+4      	; 0xeec <Set_High+0x2c>
			{
				DDRB &= ~(1<<3);
     ee8:	23 98       	cbi	0x04, 3	; 4
     eea:	08 95       	ret
			}
			else
			{
				DDRB &= ~(1<<0);
     eec:	20 98       	cbi	0x04, 0	; 4
     eee:	08 95       	ret

00000ef0 <I2C_Init>:
volatile uint8_t I2C_Port = '1';
/*
 * This function will set up the I2C port pins to their correct values
 */ 
void I2C_Init(void)
{
     ef0:	80 91 19 01 	lds	r24, 0x0119
     ef4:	82 33       	cpi	r24, 0x32	; 50
     ef6:	39 f0       	breq	.+14     	; 0xf06 <I2C_Init+0x16>
     ef8:	83 33       	cpi	r24, 0x33	; 51
     efa:	49 f0       	breq	.+18     	; 0xf0e <I2C_Init+0x1e>
     efc:	81 33       	cpi	r24, 0x31	; 49
     efe:	51 f4       	brne	.+20     	; 0xf14 <I2C_Init+0x24>
	
	switch(I2C_Port)
	{
		case '1':
			PORTD &= ~((1<<5) | (1<<6));
     f00:	8b b1       	in	r24, 0x0b	; 11
     f02:	8f 79       	andi	r24, 0x9F	; 159
     f04:	02 c0       	rjmp	.+4      	; 0xf0a <I2C_Init+0x1a>
			break;
		case '2':
			PORTD &= ~((1<<4) | (1<<5));
     f06:	8b b1       	in	r24, 0x0b	; 11
     f08:	8f 7c       	andi	r24, 0xCF	; 207
     f0a:	8b b9       	out	0x0b, r24	; 11
     f0c:	03 c0       	rjmp	.+6      	; 0xf14 <I2C_Init+0x24>
			break;
		case '3':
			PORTB &= ~((1<<0) | (1<<3));
     f0e:	85 b1       	in	r24, 0x05	; 5
     f10:	86 7f       	andi	r24, 0xF6	; 246
     f12:	85 b9       	out	0x05, r24	; 5
			break;
	}	
	
	Set_High(SDA);
     f14:	81 e0       	ldi	r24, 0x01	; 1
     f16:	d4 df       	rcall	.-88     	; 0xec0 <Set_High>
	Set_High(SCL);//ensure that the I2C lines are released
     f18:	80 e0       	ldi	r24, 0x00	; 0
}
     f1a:	d2 cf       	rjmp	.-92     	; 0xec0 <Set_High>

00000f1c <Set_Low>:
			break;
	}

} 
void Set_Low(uint8_t x)
{
     f1c:	90 91 19 01 	lds	r25, 0x0119
     f20:	92 33       	cpi	r25, 0x32	; 50
     f22:	41 f0       	breq	.+16     	; 0xf34 <Set_Low+0x18>
     f24:	93 33       	cpi	r25, 0x33	; 51
     f26:	61 f0       	breq	.+24     	; 0xf40 <Set_Low+0x24>
     f28:	91 33       	cpi	r25, 0x31	; 49
     f2a:	79 f4       	brne	.+30     	; 0xf4a <Set_Low+0x2e>
	switch(I2C_Port)
	{
		case '1'://to molex
			if(x == SCL)
     f2c:	88 23       	and	r24, r24
     f2e:	31 f0       	breq	.+12     	; 0xf3c <Set_Low+0x20>
			{
				DDRD |= (1<<5);
			}
			else
			{
				DDRD |= (1<<6);
     f30:	56 9a       	sbi	0x0a, 6	; 10
     f32:	08 95       	ret
			}
			break;
		case '2'://to pins
			if(x == SCL)
     f34:	88 23       	and	r24, r24
     f36:	11 f4       	brne	.+4      	; 0xf3c <Set_Low+0x20>
			{
				DDRD |= (1<<4);
     f38:	54 9a       	sbi	0x0a, 4	; 10
     f3a:	08 95       	ret
			}
			else
			{
				DDRD |= (1<<5);
     f3c:	55 9a       	sbi	0x0a, 5	; 10
     f3e:	08 95       	ret
			}
			break;
		case '3'://to motor
			if(x == SCL)
     f40:	88 23       	and	r24, r24
     f42:	11 f4       	brne	.+4      	; 0xf48 <Set_Low+0x2c>
			{
				DDRB |= (1<<3);
     f44:	23 9a       	sbi	0x04, 3	; 4
     f46:	08 95       	ret
			}
			else
			{
				DDRB |= (1<<0);
     f48:	20 9a       	sbi	0x04, 0	; 4
     f4a:	08 95       	ret

00000f4c <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)
{	
     f4c:	df 93       	push	r29
     f4e:	cf 93       	push	r28
     f50:	0f 92       	push	r0
     f52:	cd b7       	in	r28, 0x3d	; 61
     f54:	de b7       	in	r29, 0x3e	; 62
	//  Set SCL high
	Set_High(SCL);
     f56:	80 e0       	ldi	r24, 0x00	; 0
     f58:	b3 df       	rcall	.-154    	; 0xec0 <Set_High>
     f5a:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     f5c:	21 e0       	ldi	r18, 0x01	; 1
     f5e:	29 83       	std	Y+1, r18	; 0x01
     f60:	03 c0       	rjmp	.+6      	; 0xf68 <I2C_Pulse_SCL+0x1c>
     f62:	89 81       	ldd	r24, Y+1	; 0x01
     f64:	8f 5f       	subi	r24, 0xFF	; 255
     f66:	89 83       	std	Y+1, r24	; 0x01
     f68:	89 81       	ldd	r24, Y+1	; 0x01
     f6a:	8a 30       	cpi	r24, 0x0A	; 10
     f6c:	d0 f3       	brcs	.-12     	; 0xf62 <I2C_Pulse_SCL+0x16>
		{
		
				;
			
		}
		delay--;
     f6e:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     f70:	b1 f7       	brne	.-20     	; 0xf5e <I2C_Pulse_SCL+0x12>
	
	//  Delay
	Delay(I2C_PERIOD);
	
	// Set SCL Low
	Set_Low(SCL);
     f72:	80 e0       	ldi	r24, 0x00	; 0
     f74:	d3 df       	rcall	.-90     	; 0xf1c <Set_Low>
     f76:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     f78:	21 e0       	ldi	r18, 0x01	; 1
     f7a:	29 83       	std	Y+1, r18	; 0x01
     f7c:	03 c0       	rjmp	.+6      	; 0xf84 <I2C_Pulse_SCL+0x38>
     f7e:	89 81       	ldd	r24, Y+1	; 0x01
     f80:	8f 5f       	subi	r24, 0xFF	; 255
     f82:	89 83       	std	Y+1, r24	; 0x01
     f84:	89 81       	ldd	r24, Y+1	; 0x01
     f86:	8a 30       	cpi	r24, 0x0A	; 10
     f88:	d0 f3       	brcs	.-12     	; 0xf7e <I2C_Pulse_SCL+0x32>
		{
		
				;
			
		}
		delay--;
     f8a:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     f8c:	b1 f7       	brne	.-20     	; 0xf7a <I2C_Pulse_SCL+0x2e>
	
	// Set SCL Low
	Set_Low(SCL);
	
	Delay(I2C_PERIOD);
}
     f8e:	0f 90       	pop	r0
     f90:	cf 91       	pop	r28
     f92:	df 91       	pop	r29
     f94:	08 95       	ret

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

void I2C_Send_NACK(void)
{
     f96:	81 e0       	ldi	r24, 0x01	; 1
     f98:	93 df       	rcall	.-218    	; 0xec0 <Set_High>
	Set_High(SDA);
	//may want a bit of a delay here?
	I2C_Pulse_SCL();
     f9a:	d8 cf       	rjmp	.-80     	; 0xf4c <I2C_Pulse_SCL>

00000f9c <I2C_Start>:
	
/*
 * This places a start condition onto the I2C lines
 */
void I2C_Start(void)
{
     f9c:	df 93       	push	r29
     f9e:	cf 93       	push	r28
     fa0:	0f 92       	push	r0
     fa2:	cd b7       	in	r28, 0x3d	; 61
     fa4:	de b7       	in	r29, 0x3e	; 62
	Set_Low(SDA);
     fa6:	81 e0       	ldi	r24, 0x01	; 1
     fa8:	b9 df       	rcall	.-142    	; 0xf1c <Set_Low>
     faa:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     fac:	21 e0       	ldi	r18, 0x01	; 1
     fae:	29 83       	std	Y+1, r18	; 0x01
     fb0:	03 c0       	rjmp	.+6      	; 0xfb8 <I2C_Start+0x1c>
     fb2:	89 81       	ldd	r24, Y+1	; 0x01
     fb4:	8f 5f       	subi	r24, 0xFF	; 255
     fb6:	89 83       	std	Y+1, r24	; 0x01
     fb8:	89 81       	ldd	r24, Y+1	; 0x01
     fba:	8a 30       	cpi	r24, 0x0A	; 10
     fbc:	d0 f3       	brcs	.-12     	; 0xfb2 <I2C_Start+0x16>
		{
		
				;
			
		}
		delay--;
     fbe:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     fc0:	b1 f7       	brne	.-20     	; 0xfae <I2C_Start+0x12>
 */
void I2C_Start(void)
{
	Set_Low(SDA);
	Delay(I2C_PERIOD);
	Set_Low(SCL);
     fc2:	80 e0       	ldi	r24, 0x00	; 0
     fc4:	ab df       	rcall	.-170    	; 0xf1c <Set_Low>
     fc6:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
     fc8:	21 e0       	ldi	r18, 0x01	; 1
     fca:	29 83       	std	Y+1, r18	; 0x01
     fcc:	03 c0       	rjmp	.+6      	; 0xfd4 <I2C_Start+0x38>
     fce:	89 81       	ldd	r24, Y+1	; 0x01
     fd0:	8f 5f       	subi	r24, 0xFF	; 255
     fd2:	89 83       	std	Y+1, r24	; 0x01
     fd4:	89 81       	ldd	r24, Y+1	; 0x01
     fd6:	8a 30       	cpi	r24, 0x0A	; 10
     fd8:	d0 f3       	brcs	.-12     	; 0xfce <I2C_Start+0x32>
		{
		
				;
			
		}
		delay--;
     fda:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
     fdc:	b1 f7       	brne	.-20     	; 0xfca <I2C_Start+0x2e>
{
	Set_Low(SDA);
	Delay(I2C_PERIOD);
	Set_Low(SCL);
	Delay(I2C_PERIOD);
}
     fde:	0f 90       	pop	r0
     fe0:	cf 91       	pop	r28
     fe2:	df 91       	pop	r29
     fe4:	08 95       	ret

00000fe6 <I2C_Send_ACK>:

/*
 * This function will place an ACK on the bus for the slave to read
 */
void I2C_Send_ACK(void)
{
     fe6:	81 e0       	ldi	r24, 0x01	; 1
     fe8:	99 df       	rcall	.-206    	; 0xf1c <Set_Low>
	Set_Low(SDA);
	//may want a bit of a delay here?
	I2C_Pulse_SCL()	;
     fea:	b0 df       	rcall	.-160    	; 0xf4c <I2C_Pulse_SCL>
	Set_High(SDA);//release the line
     fec:	81 e0       	ldi	r24, 0x01	; 1
}
     fee:	68 cf       	rjmp	.-304    	; 0xec0 <Set_High>

00000ff0 <Wait_On_SCL_Low>:
			break;
	}
}

void Wait_On_SCL_Low(void)
{
     ff0:	80 91 19 01 	lds	r24, 0x0119
     ff4:	82 33       	cpi	r24, 0x32	; 50
     ff6:	39 f0       	breq	.+14     	; 0x1006 <Wait_On_SCL_Low+0x16>
     ff8:	83 33       	cpi	r24, 0x33	; 51
     ffa:	41 f0       	breq	.+16     	; 0x100c <Wait_On_SCL_Low+0x1c>
     ffc:	81 33       	cpi	r24, 0x31	; 49
     ffe:	41 f4       	brne	.+16     	; 0x1010 <Wait_On_SCL_Low+0x20>
	switch(I2C_Port)
	{
		case '1'://to molex
			while( !(PIND & (1<<5)) );	
    1000:	4d 9b       	sbis	0x09, 5	; 9
    1002:	fe cf       	rjmp	.-4      	; 0x1000 <Wait_On_SCL_Low+0x10>
    1004:	08 95       	ret
			break;
		case '2'://to pins
			while( !(PIND & (1<<4)) );	
    1006:	4c 9b       	sbis	0x09, 4	; 9
    1008:	fe cf       	rjmp	.-4      	; 0x1006 <Wait_On_SCL_Low+0x16>
    100a:	08 95       	ret
			break;
		case '3'://to motor
			while( !(PINB & (1<<3)) );	
    100c:	1b 9b       	sbis	0x03, 3	; 3
    100e:	fe cf       	rjmp	.-4      	; 0x100c <Wait_On_SCL_Low+0x1c>
    1010:	08 95       	ret

00001012 <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)
{	
    1012:	df 93       	push	r29
    1014:	cf 93       	push	r28
    1016:	0f 92       	push	r0
    1018:	cd b7       	in	r28, 0x3d	; 61
    101a:	de b7       	in	r29, 0x3e	; 62
	//  Set SCL high
	Set_High(SCL);
    101c:	80 e0       	ldi	r24, 0x00	; 0
    101e:	50 df       	rcall	.-352    	; 0xec0 <Set_High>
	
	Wait_On_SCL_Low();//wait for the Slave to allow us to move on
    1020:	e7 df       	rcall	.-50     	; 0xff0 <Wait_On_SCL_Low>
    1022:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    1024:	21 e0       	ldi	r18, 0x01	; 1
    1026:	29 83       	std	Y+1, r18	; 0x01
    1028:	03 c0       	rjmp	.+6      	; 0x1030 <I2C_Pulse_SCL_After_ACK+0x1e>
    102a:	89 81       	ldd	r24, Y+1	; 0x01
    102c:	8f 5f       	subi	r24, 0xFF	; 255
    102e:	89 83       	std	Y+1, r24	; 0x01
    1030:	89 81       	ldd	r24, Y+1	; 0x01
    1032:	8a 30       	cpi	r24, 0x0A	; 10
    1034:	d0 f3       	brcs	.-12     	; 0x102a <I2C_Pulse_SCL_After_ACK+0x18>
		{
		
				;
			
		}
		delay--;
    1036:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
    1038:	b1 f7       	brne	.-20     	; 0x1026 <I2C_Pulse_SCL_After_ACK+0x14>
	
	//  Delay
	Delay(I2C_PERIOD);
	
	// Set SCL Low
	Set_Low(SCL);
    103a:	80 e0       	ldi	r24, 0x00	; 0
    103c:	6f df       	rcall	.-290    	; 0xf1c <Set_Low>
    103e:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    1040:	21 e0       	ldi	r18, 0x01	; 1
    1042:	29 83       	std	Y+1, r18	; 0x01
    1044:	03 c0       	rjmp	.+6      	; 0x104c <I2C_Pulse_SCL_After_ACK+0x3a>
    1046:	89 81       	ldd	r24, Y+1	; 0x01
    1048:	8f 5f       	subi	r24, 0xFF	; 255
    104a:	89 83       	std	Y+1, r24	; 0x01
    104c:	89 81       	ldd	r24, Y+1	; 0x01
    104e:	8a 30       	cpi	r24, 0x0A	; 10
    1050:	d0 f3       	brcs	.-12     	; 0x1046 <I2C_Pulse_SCL_After_ACK+0x34>
		{
		
				;
			
		}
		delay--;
    1052:	91 50       	subi	r25, 0x01	; 1

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

	return 0;
}
    1056:	80 e0       	ldi	r24, 0x00	; 0
    1058:	0f 90       	pop	r0
    105a:	cf 91       	pop	r28
    105c:	df 91       	pop	r29
    105e:	08 95       	ret

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

	
	if( data & 0x80)
    1066:	87 ff       	sbrs	r24, 7
    1068:	03 c0       	rjmp	.+6      	; 0x1070 <I2C_Send_Byte+0x10>
	{
		Set_High(SDA);
    106a:	81 e0       	ldi	r24, 0x01	; 1
    106c:	29 df       	rcall	.-430    	; 0xec0 <Set_High>
    106e:	02 c0       	rjmp	.+4      	; 0x1074 <I2C_Send_Byte+0x14>
	}
	else
	{
		Set_Low(SDA);
    1070:	81 e0       	ldi	r24, 0x01	; 1
    1072:	54 df       	rcall	.-344    	; 0xf1c <Set_Low>
	}
		
	if(I2C_Pulse_SCL_After_ACK())//ensure that the slave is not holding the SCL line to force us to wait
    1074:	ce df       	rcall	.-100    	; 0x1012 <I2C_Pulse_SCL_After_ACK>
    1076:	88 23       	and	r24, r24
    1078:	11 f0       	breq	.+4      	; 0x107e <I2C_Send_Byte+0x1e>
    107a:	81 e0       	ldi	r24, 0x01	; 1
    107c:	13 c0       	rjmp	.+38     	; 0x10a4 <I2C_Send_Byte+0x44>
	{
		return 1;
	}
	data <<= 1;//shift the next data bit up
    107e:	01 2f       	mov	r16, r17
    1080:	00 0f       	add	r16, r16
    1082:	11 e0       	ldi	r17, 0x01	; 1
	
	for(i = 1; i < 8; i++)//write out each data bit, MSB first
	{
		if( data & 0x80)
    1084:	07 ff       	sbrs	r16, 7
    1086:	03 c0       	rjmp	.+6      	; 0x108e <I2C_Send_Byte+0x2e>
		{
			Set_High(SDA);
    1088:	81 e0       	ldi	r24, 0x01	; 1
    108a:	1a df       	rcall	.-460    	; 0xec0 <Set_High>
    108c:	02 c0       	rjmp	.+4      	; 0x1092 <I2C_Send_Byte+0x32>
		}
		else
		{
			Set_Low(SDA);
    108e:	81 e0       	ldi	r24, 0x01	; 1
    1090:	45 df       	rcall	.-374    	; 0xf1c <Set_Low>
		}
		
		I2C_Pulse_SCL();//no checking to see if the slave is holding the SL line down
    1092:	5c df       	rcall	.-328    	; 0xf4c <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
    1094:	1f 5f       	subi	r17, 0xFF	; 255
    1096:	18 30       	cpi	r17, 0x08	; 8
    1098:	11 f0       	breq	.+4      	; 0x109e <I2C_Send_Byte+0x3e>
		{
			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
    109a:	00 0f       	add	r16, r16
    109c:	f3 cf       	rjmp	.-26     	; 0x1084 <I2C_Send_Byte+0x24>
	}

	Set_High(SDA);//release line
    109e:	81 e0       	ldi	r24, 0x01	; 1
    10a0:	0f df       	rcall	.-482    	; 0xec0 <Set_High>
    10a2:	80 e0       	ldi	r24, 0x00	; 0

	return 0;

}
    10a4:	1f 91       	pop	r17
    10a6:	0f 91       	pop	r16
    10a8:	08 95       	ret

000010aa <I2C_Stop>:

/*
 * This function places a stop condition onto the I2C bus
 */
void I2C_Stop(void)
{
    10aa:	df 93       	push	r29
    10ac:	cf 93       	push	r28
    10ae:	0f 92       	push	r0
    10b0:	cd b7       	in	r28, 0x3d	; 61
    10b2:	de b7       	in	r29, 0x3e	; 62
	
	Set_Low(SDA);
    10b4:	81 e0       	ldi	r24, 0x01	; 1
    10b6:	32 df       	rcall	.-412    	; 0xf1c <Set_Low>
    10b8:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    10ba:	21 e0       	ldi	r18, 0x01	; 1
    10bc:	29 83       	std	Y+1, r18	; 0x01
    10be:	03 c0       	rjmp	.+6      	; 0x10c6 <I2C_Stop+0x1c>
    10c0:	89 81       	ldd	r24, Y+1	; 0x01
    10c2:	8f 5f       	subi	r24, 0xFF	; 255
    10c4:	89 83       	std	Y+1, r24	; 0x01
    10c6:	89 81       	ldd	r24, Y+1	; 0x01
    10c8:	8a 30       	cpi	r24, 0x0A	; 10
    10ca:	d0 f3       	brcs	.-12     	; 0x10c0 <I2C_Stop+0x16>
		{
		
				;
			
		}
		delay--;
    10cc:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
    10ce:	b1 f7       	brne	.-20     	; 0x10bc <I2C_Stop+0x12>
void I2C_Stop(void)
{
	
	Set_Low(SDA);
	Delay(I2C_PERIOD);
	Set_High(SCL);
    10d0:	80 e0       	ldi	r24, 0x00	; 0
    10d2:	f6 de       	rcall	.-532    	; 0xec0 <Set_High>
	Wait_On_SCL_Low();//wait for the Slave to allow us to move on
    10d4:	8d df       	rcall	.-230    	; 0xff0 <Wait_On_SCL_Low>
    10d6:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    10d8:	21 e0       	ldi	r18, 0x01	; 1
    10da:	29 83       	std	Y+1, r18	; 0x01
    10dc:	03 c0       	rjmp	.+6      	; 0x10e4 <I2C_Stop+0x3a>
    10de:	89 81       	ldd	r24, Y+1	; 0x01
    10e0:	8f 5f       	subi	r24, 0xFF	; 255
    10e2:	89 83       	std	Y+1, r24	; 0x01
    10e4:	89 81       	ldd	r24, Y+1	; 0x01
    10e6:	8a 30       	cpi	r24, 0x0A	; 10
    10e8:	d0 f3       	brcs	.-12     	; 0x10de <I2C_Stop+0x34>
		{
		
				;
			
		}
		delay--;
    10ea:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
    10ec:	b1 f7       	brne	.-20     	; 0x10da <I2C_Stop+0x30>
	Set_Low(SDA);
	Delay(I2C_PERIOD);
	Set_High(SCL);
	Wait_On_SCL_Low();//wait for the Slave to allow us to move on
	Delay(I2C_PERIOD);
	Set_High(SDA);
    10ee:	81 e0       	ldi	r24, 0x01	; 1
    10f0:	e7 de       	rcall	.-562    	; 0xec0 <Set_High>
    10f2:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    10f4:	21 e0       	ldi	r18, 0x01	; 1
    10f6:	29 83       	std	Y+1, r18	; 0x01
    10f8:	03 c0       	rjmp	.+6      	; 0x1100 <I2C_Stop+0x56>
    10fa:	89 81       	ldd	r24, Y+1	; 0x01
    10fc:	8f 5f       	subi	r24, 0xFF	; 255
    10fe:	89 83       	std	Y+1, r24	; 0x01
    1100:	89 81       	ldd	r24, Y+1	; 0x01
    1102:	8a 30       	cpi	r24, 0x0A	; 10
    1104:	d0 f3       	brcs	.-12     	; 0x10fa <I2C_Stop+0x50>
		{
		
				;
			
		}
		delay--;
    1106:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
    1108:	b1 f7       	brne	.-20     	; 0x10f6 <I2C_Stop+0x4c>
	Set_High(SCL);
	Wait_On_SCL_Low();//wait for the Slave to allow us to move on
	Delay(I2C_PERIOD);
	Set_High(SDA);
	Delay(I2C_PERIOD);
}
    110a:	0f 90       	pop	r0
    110c:	cf 91       	pop	r28
    110e:	df 91       	pop	r29
    1110:	08 95       	ret

00001112 <I2C_Pin_Value>:
	}
}


uint8_t I2C_Pin_Value(uint8_t x)
{
    1112:	90 91 19 01 	lds	r25, 0x0119
    1116:	92 33       	cpi	r25, 0x32	; 50
    1118:	59 f0       	breq	.+22     	; 0x1130 <I2C_Pin_Value+0x1e>
    111a:	93 33       	cpi	r25, 0x33	; 51
    111c:	89 f0       	breq	.+34     	; 0x1140 <I2C_Pin_Value+0x2e>
    111e:	91 33       	cpi	r25, 0x31	; 49
    1120:	11 f0       	breq	.+4      	; 0x1126 <I2C_Pin_Value+0x14>
    1122:	80 e0       	ldi	r24, 0x00	; 0
    1124:	08 95       	ret
	switch(I2C_Port)
	{
		case '1'://to molex
			if(x == SCL)
    1126:	88 23       	and	r24, r24
    1128:	41 f0       	breq	.+16     	; 0x113a <I2C_Pin_Value+0x28>
			{
				return (PIND & (1<<5));
			}
			else
			{
				return (PIND & (1<<6));
    112a:	89 b1       	in	r24, 0x09	; 9
    112c:	80 74       	andi	r24, 0x40	; 64
    112e:	08 95       	ret
			}
			break;
		case '2'://to pins
			if(x == SCL)
    1130:	88 23       	and	r24, r24
    1132:	19 f4       	brne	.+6      	; 0x113a <I2C_Pin_Value+0x28>
			{
				return (PIND & (1<<4));
    1134:	89 b1       	in	r24, 0x09	; 9
    1136:	80 71       	andi	r24, 0x10	; 16
    1138:	08 95       	ret
			}
			else
			{
				return (PIND & (1<<5));
    113a:	89 b1       	in	r24, 0x09	; 9
    113c:	80 72       	andi	r24, 0x20	; 32
    113e:	08 95       	ret
			}
			break;
		case '3'://to motor
			if(x == SCL)
    1140:	88 23       	and	r24, r24
    1142:	19 f4       	brne	.+6      	; 0x114a <I2C_Pin_Value+0x38>
			{
				return (PINB & (1<<3));
    1144:	83 b1       	in	r24, 0x03	; 3
    1146:	88 70       	andi	r24, 0x08	; 8
    1148:	08 95       	ret
			}
			else
			{
				return (PINB & (1<<0));
    114a:	83 b1       	in	r24, 0x03	; 3
    114c:	81 70       	andi	r24, 0x01	; 1
			}
			break;
	}
	return 0;
}
    114e:	08 95       	ret

00001150 <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)
{
    1150:	0f 93       	push	r16
    1152:	1f 93       	push	r17
    1154:	df 93       	push	r29
    1156:	cf 93       	push	r28
    1158:	0f 92       	push	r0
    115a:	cd b7       	in	r28, 0x3d	; 61
    115c:	de b7       	in	r29, 0x3e	; 62
	uint8_t i;
	uint8_t received = 0x00;
	
	Set_High(SCL);
    115e:	80 e0       	ldi	r24, 0x00	; 0
    1160:	af de       	rcall	.-674    	; 0xec0 <Set_High>
	
	Wait_On_SCL_Low();//wait for the Slave to allow us to move on
    1162:	46 df       	rcall	.-372    	; 0xff0 <Wait_On_SCL_Low>
    1164:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    1166:	21 e0       	ldi	r18, 0x01	; 1
    1168:	29 83       	std	Y+1, r18	; 0x01
    116a:	03 c0       	rjmp	.+6      	; 0x1172 <I2C_Receive_Byte+0x22>
    116c:	89 81       	ldd	r24, Y+1	; 0x01
    116e:	8f 5f       	subi	r24, 0xFF	; 255
    1170:	89 83       	std	Y+1, r24	; 0x01
    1172:	89 81       	ldd	r24, Y+1	; 0x01
    1174:	8a 30       	cpi	r24, 0x0A	; 10
    1176:	d0 f3       	brcs	.-12     	; 0x116c <I2C_Receive_Byte+0x1c>
		{
		
				;
			
		}
		delay--;
    1178:	91 50       	subi	r25, 0x01	; 1

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

	//  Delay
	Delay(I2C_PERIOD);

	if(I2C_Pin_Value(SDA))
    117c:	81 e0       	ldi	r24, 0x01	; 1
    117e:	c9 df       	rcall	.-110    	; 0x1112 <I2C_Pin_Value>
    1180:	18 2f       	mov	r17, r24
	{
		received |= 1;//append 1 to our databyte
	}
	// Set SCL Low
	Set_Low(SCL);
    1182:	80 e0       	ldi	r24, 0x00	; 0
    1184:	cb de       	rcall	.-618    	; 0xf1c <Set_Low>
    1186:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    1188:	21 e0       	ldi	r18, 0x01	; 1
    118a:	29 83       	std	Y+1, r18	; 0x01
    118c:	03 c0       	rjmp	.+6      	; 0x1194 <I2C_Receive_Byte+0x44>
    118e:	89 81       	ldd	r24, Y+1	; 0x01
    1190:	8f 5f       	subi	r24, 0xFF	; 255
    1192:	89 83       	std	Y+1, r24	; 0x01
    1194:	89 81       	ldd	r24, Y+1	; 0x01
    1196:	8a 30       	cpi	r24, 0x0A	; 10
    1198:	d0 f3       	brcs	.-12     	; 0x118e <I2C_Receive_Byte+0x3e>
		{
		
				;
			
		}
		delay--;
    119a:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
    119c:	b1 f7       	brne	.-20     	; 0x118a <I2C_Receive_Byte+0x3a>
    119e:	81 2f       	mov	r24, r17
    11a0:	11 11       	cpse	r17, r1
    11a2:	81 e0       	ldi	r24, 0x01	; 1
    11a4:	18 2f       	mov	r17, r24
    11a6:	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
    11a8:	11 0f       	add	r17, r17
		if(I2C_Pin_Value(SDA))
    11aa:	81 e0       	ldi	r24, 0x01	; 1
    11ac:	b2 df       	rcall	.-156    	; 0x1112 <I2C_Pin_Value>
    11ae:	81 11       	cpse	r24, r1
		{
			received |= 1;//append 1 to our databyte
    11b0:	11 60       	ori	r17, 0x01	; 1
		}
		
		I2C_Pulse_SCL();//no checking to see if the slave is holding the SCL line down
    11b2:	cc de       	rcall	.-616    	; 0xf4c <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
    11b4:	0f 5f       	subi	r16, 0xFF	; 255
    11b6:	08 30       	cpi	r16, 0x08	; 8
    11b8:	b9 f7       	brne	.-18     	; 0x11a8 <I2C_Receive_Byte+0x58>
		I2C_Pulse_SCL();//no checking to see if the slave is holding the SCL line down
	}

	return received;

}
    11ba:	81 2f       	mov	r24, r17
    11bc:	0f 90       	pop	r0
    11be:	cf 91       	pop	r28
    11c0:	df 91       	pop	r29
    11c2:	1f 91       	pop	r17
    11c4:	0f 91       	pop	r16
    11c6:	08 95       	ret

000011c8 <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)
{
    11c8:	1f 93       	push	r17
    11ca:	df 93       	push	r29
    11cc:	cf 93       	push	r28
    11ce:	0f 92       	push	r0
    11d0:	cd b7       	in	r28, 0x3d	; 61
    11d2:	de b7       	in	r29, 0x3e	; 62
	uint8_t value = ACK;	
	
	//  Set SCL high
	Set_High(SCL);
    11d4:	80 e0       	ldi	r24, 0x00	; 0
    11d6:	74 de       	rcall	.-792    	; 0xec0 <Set_High>
    11d8:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    11da:	21 e0       	ldi	r18, 0x01	; 1
    11dc:	29 83       	std	Y+1, r18	; 0x01
    11de:	03 c0       	rjmp	.+6      	; 0x11e6 <I2C_Get_ACK+0x1e>
    11e0:	89 81       	ldd	r24, Y+1	; 0x01
    11e2:	8f 5f       	subi	r24, 0xFF	; 255
    11e4:	89 83       	std	Y+1, r24	; 0x01
    11e6:	89 81       	ldd	r24, Y+1	; 0x01
    11e8:	8a 30       	cpi	r24, 0x0A	; 10
    11ea:	d0 f3       	brcs	.-12     	; 0x11e0 <I2C_Get_ACK+0x18>
		{
		
				;
			
		}
		delay--;
    11ec:	91 50       	subi	r25, 0x01	; 1

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

	if ( I2C_Pin_Value(SDA) )//read in if we got an ACK (0) or a NACK (1)
    11f0:	81 e0       	ldi	r24, 0x01	; 1
    11f2:	8f df       	rcall	.-226    	; 0x1112 <I2C_Pin_Value>
    11f4:	18 2f       	mov	r17, r24
		value = NACK;
	}
	
	
	// Set SCL Low
	Set_Low(SCL);
    11f6:	80 e0       	ldi	r24, 0x00	; 0
    11f8:	91 de       	rcall	.-734    	; 0xf1c <Set_Low>
    11fa:	91 e0       	ldi	r25, 0x01	; 1
{
	volatile uint8_t a;
		
	while(delay > 0)
	{
		for ( a = 1;a<10;a++)
    11fc:	21 e0       	ldi	r18, 0x01	; 1
    11fe:	29 83       	std	Y+1, r18	; 0x01
    1200:	03 c0       	rjmp	.+6      	; 0x1208 <I2C_Get_ACK+0x40>
    1202:	89 81       	ldd	r24, Y+1	; 0x01
    1204:	8f 5f       	subi	r24, 0xFF	; 255
    1206:	89 83       	std	Y+1, r24	; 0x01
    1208:	89 81       	ldd	r24, Y+1	; 0x01
    120a:	8a 30       	cpi	r24, 0x0A	; 10
    120c:	d0 f3       	brcs	.-12     	; 0x1202 <I2C_Get_ACK+0x3a>
		{
		
				;
			
		}
		delay--;
    120e:	91 50       	subi	r25, 0x01	; 1

void Delay(uint8_t delay)
{
	volatile uint8_t a;
		
	while(delay > 0)
    1210:	b1 f7       	brne	.-20     	; 0x11fe <I2C_Get_ACK+0x36>
    1212:	81 2f       	mov	r24, r17
    1214:	11 11       	cpse	r17, r1
    1216:	81 e0       	ldi	r24, 0x01	; 1
	
	Delay(I2C_PERIOD);	

	
	return value;
}
    1218:	0f 90       	pop	r0
    121a:	cf 91       	pop	r28
    121c:	df 91       	pop	r29
    121e:	1f 91       	pop	r17
    1220:	08 95       	ret

00001222 <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)
{
    1222:	cf 92       	push	r12
    1224:	df 92       	push	r13
    1226:	ef 92       	push	r14
    1228:	ff 92       	push	r15
    122a:	0f 93       	push	r16
    122c:	1f 93       	push	r17
    122e:	cf 93       	push	r28
    1230:	df 93       	push	r29
    1232:	18 2f       	mov	r17, r24
    1234:	6b 01       	movw	r12, r22
    1236:	7a 01       	movw	r14, r20
	uint16_t i;

	I2C_Start();//place a start condition on the I2C lines
    1238:	b1 de       	rcall	.-670    	; 0xf9c <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
    123a:	11 0f       	add	r17, r17
    123c:	81 2f       	mov	r24, r17
    123e:	81 60       	ori	r24, 0x01	; 1
    1240:	0f df       	rcall	.-482    	; 0x1060 <I2C_Send_Byte>
    1242:	88 23       	and	r24, r24
    1244:	49 f4       	brne	.+18     	; 0x1258 <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
    1246:	c0 df       	rcall	.-128    	; 0x11c8 <I2C_Get_ACK>
    1248:	81 30       	cpi	r24, 0x01	; 1
    124a:	31 f0       	breq	.+12     	; 0x1258 <I2C_Read+0x36>
    124c:	c0 e0       	ldi	r28, 0x00	; 0
    124e:	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
    1250:	87 01       	movw	r16, r14
    1252:	01 50       	subi	r16, 0x01	; 1
    1254:	10 40       	sbci	r17, 0x00	; 0
    1256:	0f c0       	rjmp	.+30     	; 0x1276 <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
    1258:	28 df       	rcall	.-432    	; 0x10aa <I2C_Stop>
    125a:	80 e0       	ldi	r24, 0x00	; 0
    125c:	11 c0       	rjmp	.+34     	; 0x1280 <I2C_Read+0x5e>
	}
	
	//read the data
	for(i = 0; i < lenght; i++)
	{
		data[i] = I2C_Receive_Byte();
    125e:	78 df       	rcall	.-272    	; 0x1150 <I2C_Receive_Byte>
    1260:	f6 01       	movw	r30, r12
    1262:	ec 0f       	add	r30, r28
    1264:	fd 1f       	adc	r31, r29
    1266:	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
    1268:	c0 17       	cp	r28, r16
    126a:	d1 07       	cpc	r29, r17
    126c:	10 f4       	brcc	.+4      	; 0x1272 <I2C_Read+0x50>
		{
			I2C_Send_ACK();	
    126e:	bb de       	rcall	.-650    	; 0xfe6 <I2C_Send_ACK>
    1270:	01 c0       	rjmp	.+2      	; 0x1274 <I2C_Read+0x52>
		}
		else
		{
			I2C_Send_NACK();//Nack the last byte
    1272:	91 de       	rcall	.-734    	; 0xf96 <I2C_Send_NACK>
		return 0;
		
	}
	
	//read the data
	for(i = 0; i < lenght; i++)
    1274:	21 96       	adiw	r28, 0x01	; 1
    1276:	ce 15       	cp	r28, r14
    1278:	df 05       	cpc	r29, r15
    127a:	88 f3       	brcs	.-30     	; 0x125e <I2C_Read+0x3c>
		{
			I2C_Send_NACK();//Nack the last byte
		}
	}

	I2C_Stop();//Transaction is over so place a stop condition on the bus
    127c:	16 df       	rcall	.-468    	; 0x10aa <I2C_Stop>

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

}
    1280:	df 91       	pop	r29
    1282:	cf 91       	pop	r28
    1284:	1f 91       	pop	r17
    1286:	0f 91       	pop	r16
    1288:	ff 90       	pop	r15
    128a:	ef 90       	pop	r14
    128c:	df 90       	pop	r13
    128e:	cf 90       	pop	r12
    1290:	08 95       	ret

00001292 <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)
{
    1292:	cf 92       	push	r12
    1294:	df 92       	push	r13
    1296:	ef 92       	push	r14
    1298:	ff 92       	push	r15
    129a:	1f 93       	push	r17
    129c:	cf 93       	push	r28
    129e:	df 93       	push	r29
    12a0:	18 2f       	mov	r17, r24
    12a2:	6b 01       	movw	r12, r22
    12a4:	7a 01       	movw	r14, r20
	uint16_t i;

	I2C_Start();//place a start condition on the I2C lines
    12a6:	7a de       	rcall	.-780    	; 0xf9c <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
    12a8:	81 2f       	mov	r24, r17
    12aa:	88 0f       	add	r24, r24
    12ac:	d9 de       	rcall	.-590    	; 0x1060 <I2C_Send_Byte>
    12ae:	88 23       	and	r24, r24
    12b0:	69 f4       	brne	.+26     	; 0x12cc <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
    12b2:	8a df       	rcall	.-236    	; 0x11c8 <I2C_Get_ACK>
    12b4:	81 30       	cpi	r24, 0x01	; 1
    12b6:	51 f0       	breq	.+20     	; 0x12cc <I2C_Write+0x3a>
    12b8:	c0 e0       	ldi	r28, 0x00	; 0
    12ba:	d0 e0       	ldi	r29, 0x00	; 0
    12bc:	13 c0       	rjmp	.+38     	; 0x12e4 <I2C_Write+0x52>
	}
	
	//send the data
	for(i = 0; i < lenght; i++)
	{
		if( I2C_Send_Byte(data[i]) )
    12be:	f6 01       	movw	r30, r12
    12c0:	ec 0f       	add	r30, r28
    12c2:	fd 1f       	adc	r31, r29
    12c4:	80 81       	ld	r24, Z
    12c6:	cc de       	rcall	.-616    	; 0x1060 <I2C_Send_Byte>
    12c8:	88 23       	and	r24, r24
    12ca:	19 f0       	breq	.+6      	; 0x12d2 <I2C_Write+0x40>
		{
			I2C_Stop();//release the lines
    12cc:	ee de       	rcall	.-548    	; 0x10aa <I2C_Stop>
    12ce:	80 e0       	ldi	r24, 0x00	; 0
    12d0:	0e c0       	rjmp	.+28     	; 0x12ee <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
    12d2:	7a df       	rcall	.-268    	; 0x11c8 <I2C_Get_ACK>
    12d4:	81 30       	cpi	r24, 0x01	; 1
    12d6:	29 f4       	brne	.+10     	; 0x12e2 <I2C_Write+0x50>
		{
			I2C_Stop();//release the lines
    12d8:	e8 de       	rcall	.-560    	; 0x10aa <I2C_Stop>
			return i+1;
    12da:	9e 01       	movw	r18, r28
    12dc:	2f 5f       	subi	r18, 0xFF	; 255
    12de:	82 2f       	mov	r24, r18
    12e0:	06 c0       	rjmp	.+12     	; 0x12ee <I2C_Write+0x5c>
		return 0;
		
	}
	
	//send the data
	for(i = 0; i < lenght; i++)
    12e2:	21 96       	adiw	r28, 0x01	; 1
    12e4:	ce 15       	cp	r28, r14
    12e6:	df 05       	cpc	r29, r15
    12e8:	50 f3       	brcs	.-44     	; 0x12be <I2C_Write+0x2c>
			return i+1;
		
		}
	}

	I2C_Stop();//Transaction is over so place a stop condition on the bus
    12ea:	df de       	rcall	.-578    	; 0x10aa <I2C_Stop>

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

}
    12ee:	df 91       	pop	r29
    12f0:	cf 91       	pop	r28
    12f2:	1f 91       	pop	r17
    12f4:	ff 90       	pop	r15
    12f6:	ef 90       	pop	r14
    12f8:	df 90       	pop	r13
    12fa:	cf 90       	pop	r12
    12fc:	08 95       	ret

000012fe <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)
{
    12fe:	85 b1       	in	r24, 0x05	; 5
    1300:	80 7c       	andi	r24, 0xC0	; 192
    1302:	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) );
    1304:	84 b1       	in	r24, 0x04	; 4
    1306:	8f 63       	ori	r24, 0x3F	; 63
    1308:	84 b9       	out	0x04, r24	; 4

}
    130a:	08 95       	ret

0000130c <StartCodition>:


void StartCodition(uint8_t step, uint8_t dir)
{
    130c:	95 b1       	in	r25, 0x05	; 5
    130e:	21 e0       	ldi	r18, 0x01	; 1
    1310:	30 e0       	ldi	r19, 0x00	; 0
    1312:	a9 01       	movw	r20, r18
    1314:	02 c0       	rjmp	.+4      	; 0x131a <StartCodition+0xe>
    1316:	44 0f       	add	r20, r20
    1318:	55 1f       	adc	r21, r21
    131a:	6a 95       	dec	r22
    131c:	e2 f7       	brpl	.-8      	; 0x1316 <StartCodition+0xa>
    131e:	ba 01       	movw	r22, r20
    1320:	94 2b       	or	r25, r20
    1322:	95 b9       	out	0x05, r25	; 5
	Set_High(dir);
	Set_High(step);
    1324:	95 b1       	in	r25, 0x05	; 5
    1326:	02 c0       	rjmp	.+4      	; 0x132c <StartCodition+0x20>
    1328:	22 0f       	add	r18, r18
    132a:	33 1f       	adc	r19, r19
    132c:	8a 95       	dec	r24
    132e:	e2 f7       	brpl	.-8      	; 0x1328 <StartCodition+0x1c>
    1330:	92 2b       	or	r25, r18
    1332:	95 b9       	out	0x05, r25	; 5
	DelayUsec();
    1334:	00 00       	nop
    1336:	00 00       	nop
    1338:	00 00       	nop
    133a:	00 00       	nop
    133c:	00 00       	nop
    133e:	00 00       	nop
    1340:	00 00       	nop
    1342:	00 00       	nop
	DelayUsec();
    1344:	00 00       	nop
    1346:	00 00       	nop
    1348:	00 00       	nop
    134a:	00 00       	nop
    134c:	00 00       	nop
    134e:	00 00       	nop
    1350:	00 00       	nop
    1352:	00 00       	nop
	DelayUsec();
    1354:	00 00       	nop
    1356:	00 00       	nop
    1358:	00 00       	nop
    135a:	00 00       	nop
    135c:	00 00       	nop
    135e:	00 00       	nop
    1360:	00 00       	nop
    1362:	00 00       	nop
	DelayUsec();
    1364:	00 00       	nop
    1366:	00 00       	nop
    1368:	00 00       	nop
    136a:	00 00       	nop
    136c:	00 00       	nop
    136e:	00 00       	nop
    1370:	00 00       	nop
    1372:	00 00       	nop
	DelayUsec();
    1374:	00 00       	nop
    1376:	00 00       	nop
    1378:	00 00       	nop
    137a:	00 00       	nop
    137c:	00 00       	nop
    137e:	00 00       	nop
    1380:	00 00       	nop
    1382:	00 00       	nop
	Set_Low(dir);
    1384:	85 b1       	in	r24, 0x05	; 5
    1386:	60 95       	com	r22
    1388:	68 23       	and	r22, r24
    138a:	65 b9       	out	0x05, r22	; 5
	DelayUsec();
    138c:	00 00       	nop
    138e:	00 00       	nop
    1390:	00 00       	nop
    1392:	00 00       	nop
    1394:	00 00       	nop
    1396:	00 00       	nop
    1398:	00 00       	nop
    139a:	00 00       	nop
}
    139c:	08 95       	ret

0000139e <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)
{
    139e:	ff 92       	push	r15
    13a0:	0f 93       	push	r16
    13a2:	1f 93       	push	r17
    13a4:	f8 2e       	mov	r15, r24
	uint8_t axisdir,axisstep;
	uint8_t i;
	
	switch(axisselect)
    13a6:	61 30       	cpi	r22, 0x01	; 1
    13a8:	29 f0       	breq	.+10     	; 0x13b4 <SendByte+0x16>
    13aa:	62 30       	cpi	r22, 0x02	; 2
    13ac:	31 f4       	brne	.+12     	; 0x13ba <SendByte+0x1c>
    13ae:	02 e0       	ldi	r16, 0x02	; 2
    13b0:	11 e0       	ldi	r17, 0x01	; 1
    13b2:	05 c0       	rjmp	.+10     	; 0x13be <SendByte+0x20>
    13b4:	00 e0       	ldi	r16, 0x00	; 0
    13b6:	13 e0       	ldi	r17, 0x03	; 3
    13b8:	02 c0       	rjmp	.+4      	; 0x13be <SendByte+0x20>
    13ba:	04 e0       	ldi	r16, 0x04	; 4
    13bc:	15 e0       	ldi	r17, 0x05	; 5
			break;
	}		
	


	StartCodition(axisstep,axisdir);
    13be:	60 2f       	mov	r22, r16
    13c0:	81 2f       	mov	r24, r17
    13c2:	a4 df       	rcall	.-184    	; 0x130c <StartCodition>
	
	for(i=0; i<8; i++)
	{
		Set_Low(axisstep);
    13c4:	81 e0       	ldi	r24, 0x01	; 1
    13c6:	90 e0       	ldi	r25, 0x00	; 0
    13c8:	38 2f       	mov	r19, r24
    13ca:	01 c0       	rjmp	.+2      	; 0x13ce <SendByte+0x30>
    13cc:	33 0f       	add	r19, r19
    13ce:	1a 95       	dec	r17
    13d0:	ea f7       	brpl	.-6      	; 0x13cc <SendByte+0x2e>
    13d2:	93 2f       	mov	r25, r19
    13d4:	90 95       	com	r25
		DelayUsec();
		DelayUsec();

		if(inchar&0x01)
		{
			Set_High(axisdir);
    13d6:	68 2f       	mov	r22, r24
    13d8:	01 c0       	rjmp	.+2      	; 0x13dc <SendByte+0x3e>
    13da:	66 0f       	add	r22, r22
    13dc:	0a 95       	dec	r16
    13de:	ea f7       	brpl	.-6      	; 0x13da <SendByte+0x3c>
		}
		else
		{
			Set_Low(axisdir);
    13e0:	46 2f       	mov	r20, r22
    13e2:	40 95       	com	r20
    13e4:	20 e0       	ldi	r18, 0x00	; 0

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

		DelayUsec();//may be better to move this delay to after we modify 
    13ec:	00 00       	nop
    13ee:	00 00       	nop
    13f0:	00 00       	nop
    13f2:	00 00       	nop
    13f4:	00 00       	nop
    13f6:	00 00       	nop
    13f8:	00 00       	nop
    13fa:	00 00       	nop
		DelayUsec();
    13fc:	00 00       	nop
    13fe:	00 00       	nop
    1400:	00 00       	nop
    1402:	00 00       	nop
    1404:	00 00       	nop
    1406:	00 00       	nop
    1408:	00 00       	nop
    140a:	00 00       	nop
		DelayUsec();
    140c:	00 00       	nop
    140e:	00 00       	nop
    1410:	00 00       	nop
    1412:	00 00       	nop
    1414:	00 00       	nop
    1416:	00 00       	nop
    1418:	00 00       	nop
    141a:	00 00       	nop
		DelayUsec();
    141c:	00 00       	nop
    141e:	00 00       	nop
    1420:	00 00       	nop
    1422:	00 00       	nop
    1424:	00 00       	nop
    1426:	00 00       	nop
    1428:	00 00       	nop
    142a:	00 00       	nop
		DelayUsec();
    142c:	00 00       	nop
    142e:	00 00       	nop
    1430:	00 00       	nop
    1432:	00 00       	nop
    1434:	00 00       	nop
    1436:	00 00       	nop
    1438:	00 00       	nop
    143a:	00 00       	nop

		if(inchar&0x01)
    143c:	f0 fe       	sbrs	r15, 0
    143e:	03 c0       	rjmp	.+6      	; 0x1446 <SendByte+0xa8>
		{
			Set_High(axisdir);
    1440:	85 b1       	in	r24, 0x05	; 5
    1442:	86 2b       	or	r24, r22
    1444:	02 c0       	rjmp	.+4      	; 0x144a <SendByte+0xac>
		}
		else
		{
			Set_Low(axisdir);
    1446:	85 b1       	in	r24, 0x05	; 5
    1448:	84 23       	and	r24, r20
    144a:	85 b9       	out	0x05, r24	; 5
		}

		Set_High(axisstep);
    144c:	85 b1       	in	r24, 0x05	; 5
    144e:	83 2b       	or	r24, r19
    1450:	85 b9       	out	0x05, r24	; 5

		DelayUsec();
    1452:	00 00       	nop
    1454:	00 00       	nop
    1456:	00 00       	nop
    1458:	00 00       	nop
    145a:	00 00       	nop
    145c:	00 00       	nop
    145e:	00 00       	nop
    1460:	00 00       	nop
		DelayUsec();
    1462:	00 00       	nop
    1464:	00 00       	nop
    1466:	00 00       	nop
    1468:	00 00       	nop
    146a:	00 00       	nop
    146c:	00 00       	nop
    146e:	00 00       	nop
    1470:	00 00       	nop
		DelayUsec();
    1472:	00 00       	nop
    1474:	00 00       	nop
    1476:	00 00       	nop
    1478:	00 00       	nop
    147a:	00 00       	nop
    147c:	00 00       	nop
    147e:	00 00       	nop
    1480:	00 00       	nop
		DelayUsec();
    1482:	00 00       	nop
    1484:	00 00       	nop
    1486:	00 00       	nop
    1488:	00 00       	nop
    148a:	00 00       	nop
    148c:	00 00       	nop
    148e:	00 00       	nop
    1490:	00 00       	nop
		DelayUsec();
    1492:	00 00       	nop
    1494:	00 00       	nop
    1496:	00 00       	nop
    1498:	00 00       	nop
    149a:	00 00       	nop
    149c:	00 00       	nop
    149e:	00 00       	nop
    14a0:	00 00       	nop
	


	StartCodition(axisstep,axisdir);
	
	for(i=0; i<8; i++)
    14a2:	2f 5f       	subi	r18, 0xFF	; 255
    14a4:	28 30       	cpi	r18, 0x08	; 8
    14a6:	11 f0       	breq	.+4      	; 0x14ac <SendByte+0x10e>
		DelayUsec();
		DelayUsec();
		DelayUsec();
		DelayUsec();
		DelayUsec();
		inchar >>= 1;//shift the bits down
    14a8:	f6 94       	lsr	r15
    14aa:	9d cf       	rjmp	.-198    	; 0x13e6 <SendByte+0x48>
	}

	Set_Low(axisstep);
    14ac:	85 b1       	in	r24, 0x05	; 5
    14ae:	98 23       	and	r25, r24
    14b0:	95 b9       	out	0x05, r25	; 5
}
    14b2:	1f 91       	pop	r17
    14b4:	0f 91       	pop	r16
    14b6:	ff 90       	pop	r15
    14b8:	08 95       	ret

000014ba <Scheduler_SetTaskMode>:
	
	return false;
}

void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus)
{
    14ba:	9c 01       	movw	r18, r24
    14bc:	e2 e0       	ldi	r30, 0x02	; 2
    14be:	f1 e0       	ldi	r31, 0x01	; 1
    14c0:	08 c0       	rjmp	.+16     	; 0x14d2 <Scheduler_SetTaskMode+0x18>
	TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
	while (CurrTask != &Scheduler_TaskList[Scheduler_TotalTasks])
	{
		if (CurrTask->Task == Task)
    14c2:	80 81       	ld	r24, Z
    14c4:	91 81       	ldd	r25, Z+1	; 0x01
    14c6:	82 17       	cp	r24, r18
    14c8:	93 07       	cpc	r25, r19
    14ca:	11 f4       	brne	.+4      	; 0x14d0 <Scheduler_SetTaskMode+0x16>
		{
			CurrTask->TaskStatus = TaskStatus;
    14cc:	62 83       	std	Z+2, r22	; 0x02
    14ce:	08 95       	ret
			break;
		}
		
		CurrTask++;
    14d0:	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])
    14d2:	80 91 a9 01 	lds	r24, 0x01A9
    14d6:	90 e0       	ldi	r25, 0x00	; 0
    14d8:	88 0f       	add	r24, r24
    14da:	99 1f       	adc	r25, r25
    14dc:	88 0f       	add	r24, r24
    14de:	99 1f       	adc	r25, r25
    14e0:	8e 5f       	subi	r24, 0xFE	; 254
    14e2:	9e 4f       	sbci	r25, 0xFE	; 254
    14e4:	e8 17       	cp	r30, r24
    14e6:	f9 07       	cpc	r31, r25
    14e8:	61 f7       	brne	.-40     	; 0x14c2 <Scheduler_SetTaskMode+0x8>
    14ea:	08 95       	ret

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

void USB_SetupInterface(void)
{
    14ec:	df 93       	push	r29
    14ee:	cf 93       	push	r28
    14f0:	00 d0       	rcall	.+0      	; 0x14f2 <USB_SetupInterface+0x6>
    14f2:	00 d0       	rcall	.+0      	; 0x14f4 <USB_SetupInterface+0x8>
    14f4:	cd b7       	in	r28, 0x3d	; 61
    14f6:	de b7       	in	r29, 0x3e	; 62
	USB_INT_DisableAllInterrupts();
    14f8:	dc d2       	rcall	.+1464   	; 0x1ab2 <USB_INT_DisableAllInterrupts>
	USB_INT_ClearAllInterrupts();
    14fa:	de d2       	rcall	.+1468   	; 0x1ab8 <USB_INT_ClearAllInterrupts>

	USB_IsConnected         = false;
    14fc:	10 92 b0 01 	sts	0x01B0, r1
	#if defined(USB_CAN_BE_HOST)
	USB_HostState           = HOST_STATE_Unattached;
	#endif

	#if defined(USB_CAN_BE_DEVICE)
	USB_ConfigurationNumber  = 0;
    1500:	10 92 ae 01 	sts	0x01AE, r1
	USB_RemoteWakeupEnabled  = false;
    1504:	10 92 ad 01 	sts	0x01AD, r1
	USB_CurrentlySelfPowered = false;
    1508:	10 92 ac 01 	sts	0x01AC, 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();
    150c:	84 e0       	ldi	r24, 0x04	; 4
    150e:	89 bd       	out	0x29, r24	; 41
    1510:	89 b5       	in	r24, 0x29	; 41
    1512:	82 60       	ori	r24, 0x02	; 2
    1514:	89 bd       	out	0x29, r24	; 41
	#endif

	while (!(USB_PLL_IsReady()));
    1516:	09 b4       	in	r0, 0x29	; 41
    1518:	00 fe       	sbrs	r0, 0
    151a:	fd cf       	rjmp	.-6      	; 0x1516 <USB_SetupInterface+0x2a>
		
	USB_Interface_Reset();
    151c:	80 91 d8 00 	lds	r24, 0x00D8
    1520:	98 2f       	mov	r25, r24
    1522:	9f 77       	andi	r25, 0x7F	; 127
    1524:	90 93 d8 00 	sts	0x00D8, r25
    1528:	80 68       	ori	r24, 0x80	; 128
    152a:	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();
    152e:	80 91 63 00 	lds	r24, 0x0063
    1532:	8e 7f       	andi	r24, 0xFE	; 254
    1534:	80 93 63 00 	sts	0x0063, r24
	
	USB_CLK_Unfreeze();
    1538:	80 91 d8 00 	lds	r24, 0x00D8
    153c:	8f 7d       	andi	r24, 0xDF	; 223
    153e:	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)
    1542:	9e 01       	movw	r18, r28
    1544:	2d 5f       	subi	r18, 0xFD	; 253
    1546:	3f 4f       	sbci	r19, 0xFF	; 255
    1548:	ae 01       	movw	r20, r28
    154a:	4f 5f       	subi	r20, 0xFF	; 255
    154c:	5f 4f       	sbci	r21, 0xFF	; 255
    154e:	60 e0       	ldi	r22, 0x00	; 0
    1550:	80 e0       	ldi	r24, 0x00	; 0
    1552:	91 e0       	ldi	r25, 0x01	; 1
    1554:	ae db       	rcall	.-2212   	; 0xcb2 <USB_GetDescriptor>
    1556:	88 23       	and	r24, r24
    1558:	31 f0       	breq	.+12     	; 0x1566 <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);
    155a:	e9 81       	ldd	r30, Y+1	; 0x01
    155c:	fa 81       	ldd	r31, Y+2	; 0x02
    155e:	37 96       	adiw	r30, 0x07	; 7
    1560:	e4 91       	lpm	r30, Z+
    1562:	e0 93 1a 01 	sts	0x011A, r30
		#endif
	}
	#endif

	USB_Attach();
    1566:	80 91 e0 00 	lds	r24, 0x00E0
    156a:	8e 7f       	andi	r24, 0xFE	; 254
    156c:	80 93 e0 00 	sts	0x00E0, r24
	
	#if defined(USB_DEVICE_ONLY)	
	USB_INT_Enable(USB_INT_SUSPEND);
    1570:	80 91 e2 00 	lds	r24, 0x00E2
    1574:	81 60       	ori	r24, 0x01	; 1
    1576:	80 93 e2 00 	sts	0x00E2, r24
	USB_INT_Enable(USB_INT_EORSTI);	
    157a:	80 91 e2 00 	lds	r24, 0x00E2
    157e:	88 60       	ori	r24, 0x08	; 8
    1580:	80 93 e2 00 	sts	0x00E2, r24
	#endif
	
	#if defined(USB_CAN_BE_BOTH)
	USB_InitTaskPointer();
	#endif
}
    1584:	0f 90       	pop	r0
    1586:	0f 90       	pop	r0
    1588:	0f 90       	pop	r0
    158a:	0f 90       	pop	r0
    158c:	cf 91       	pop	r28
    158e:	df 91       	pop	r29
    1590:	08 95       	ret

00001592 <USB_ShutDown>:
	
	sei();
}

void USB_ShutDown(void)
{
    1592:	80 91 b0 01 	lds	r24, 0x01B0
    1596:	88 23       	and	r24, r24
    1598:	09 f0       	breq	.+2      	; 0x159c <USB_ShutDown+0xa>
	if (USB_IsConnected)
	  RAISE_EVENT(USB_Disconnect);
    159a:	56 d8       	rcall	.-3924   	; 0x648 <Event_USB_Disconnect>

	USB_INT_DisableAllInterrupts();
    159c:	8a d2       	rcall	.+1300   	; 0x1ab2 <USB_INT_DisableAllInterrupts>
	USB_INT_ClearAllInterrupts();
    159e:	8c d2       	rcall	.+1304   	; 0x1ab8 <USB_INT_ClearAllInterrupts>

	USB_IsConnected         = false;
    15a0:	10 92 b0 01 	sts	0x01B0, r1
	USB_IsInitialized       = false;
    15a4:	10 92 af 01 	sts	0x01AF, r1
	#if defined(USB_CAN_BE_HOST)
	USB_HostState           = HOST_STATE_Unattached;
	#endif

	#if defined(USB_CAN_BE_DEVICE)
	USB_ConfigurationNumber = 0;
    15a8:	10 92 ae 01 	sts	0x01AE, r1
	
	#if !defined(USE_STATIC_OPTIONS)
	USB_Options     = 0;
	#endif

	USB_Interface_Disable();
    15ac:	80 91 d8 00 	lds	r24, 0x00D8
    15b0:	8f 77       	andi	r24, 0x7F	; 127
    15b2:	80 93 d8 00 	sts	0x00D8, r24
	USB_PLL_Off();
    15b6:	19 bc       	out	0x29, r1	; 41
	#endif

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

000015ba <USB_Init>:
			   
               #if !defined(USE_STATIC_OPTIONS)
               const uint8_t Options
               #endif
               )
{
    15ba:	80 91 af 01 	lds	r24, 0x01AF
    15be:	88 23       	and	r24, r24
    15c0:	09 f0       	breq	.+2      	; 0x15c4 <USB_Init+0xa>
	if (USB_IsInitialized)
	  USB_ShutDown();
    15c2:	e7 df       	rcall	.-50     	; 0x1592 <USB_ShutDown>
	#endif

	#if defined(USB_CAN_BE_BOTH)
	USB_InitTaskPointer();
	#else
	USB_IsInitialized = true;
    15c4:	81 e0       	ldi	r24, 0x01	; 1
    15c6:	80 93 af 01 	sts	0x01AF, 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();
    15ca:	90 df       	rcall	.-224    	; 0x14ec <USB_SetupInterface>
	  USB_INT_Enable(USB_INT_VBUS);
	else
	  USB_SetupInterface();
	#endif
	
	sei();
    15cc:	78 94       	sei
}
    15ce:	08 95       	ret

000015d0 <Endpoint_ConfigureEndpoint_P>:

void Endpoint_ConfigureEndpoint_P(const uint8_t  EndpointNum,
                                  const uint16_t EndpointSize,
                                  const uint8_t  UECFG0Xdata,
                                  const uint8_t  UECFG1Xdata)
{
    15d0:	80 93 e9 00 	sts	0x00E9, r24
	Endpoint_SelectEndpoint(EndpointNum);
	Endpoint_EnableEndpoint();
    15d4:	80 91 eb 00 	lds	r24, 0x00EB
    15d8:	81 60       	ori	r24, 0x01	; 1
    15da:	80 93 eb 00 	sts	0x00EB, r24
	
	UECFG0X = UECFG0Xdata;
    15de:	40 93 ec 00 	sts	0x00EC, r20
	UECFG1X = ((UECFG1X & (1 << ALLOC)) | UECFG1Xdata | Endpoint_BytesToEPSizeMask(EndpointSize));
    15e2:	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;
    15e6:	77 70       	andi	r23, 0x07	; 7
			
				if (Bytes <= 8)
    15e8:	69 30       	cpi	r22, 0x09	; 9
    15ea:	71 05       	cpc	r23, r1
    15ec:	10 f4       	brcc	.+4      	; 0x15f2 <Endpoint_ConfigureEndpoint_P+0x22>
    15ee:	80 e0       	ldi	r24, 0x00	; 0
    15f0:	0b c0       	rjmp	.+22     	; 0x1608 <Endpoint_ConfigureEndpoint_P+0x38>
				  return (0 << EPSIZE0);
				else if (Bytes <= 16)
    15f2:	61 31       	cpi	r22, 0x11	; 17
    15f4:	71 05       	cpc	r23, r1
    15f6:	10 f4       	brcc	.+4      	; 0x15fc <Endpoint_ConfigureEndpoint_P+0x2c>
    15f8:	80 e1       	ldi	r24, 0x10	; 16
    15fa:	06 c0       	rjmp	.+12     	; 0x1608 <Endpoint_ConfigureEndpoint_P+0x38>
				  return (1 << EPSIZE0);
				else if (Bytes <= 32)
    15fc:	61 32       	cpi	r22, 0x21	; 33
    15fe:	71 05       	cpc	r23, r1
    1600:	10 f0       	brcs	.+4      	; 0x1606 <Endpoint_ConfigureEndpoint_P+0x36>
    1602:	80 e3       	ldi	r24, 0x30	; 48
    1604:	01 c0       	rjmp	.+2      	; 0x1608 <Endpoint_ConfigureEndpoint_P+0x38>
    1606:	80 e2       	ldi	r24, 0x20	; 32
    1608:	92 70       	andi	r25, 0x02	; 2
    160a:	92 2b       	or	r25, r18
    160c:	89 2b       	or	r24, r25
    160e:	80 93 ed 00 	sts	0x00ED, r24
	
	Endpoint_AllocateMemory();
    1612:	80 91 ed 00 	lds	r24, 0x00ED
    1616:	82 60       	ori	r24, 0x02	; 2
    1618:	80 93 ed 00 	sts	0x00ED, r24
}
    161c:	08 95       	ret

0000161e <Endpoint_Write_Control_Stream_LE>:
	
	return ENDPOINT_RWSTREAM_ERROR_NoError;
}

uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer, uint16_t Length)
{
    161e:	1f 93       	push	r17
    1620:	9c 01       	movw	r18, r24
    1622:	fb 01       	movw	r30, r22
	uint8_t* DataStream = (uint8_t*)Buffer;
	bool     SendZLP    = (!(Length % USB_ControlEndpointSize) || (Length == 0));
    1624:	10 91 1a 01 	lds	r17, 0x011A
    1628:	cb 01       	movw	r24, r22
    162a:	61 2f       	mov	r22, r17
    162c:	70 e0       	ldi	r23, 0x00	; 0
    162e:	ee d2       	rcall	.+1500   	; 0x1c0c <__udivmodhi4>
    1630:	89 2b       	or	r24, r25
    1632:	21 f0       	breq	.+8      	; 0x163c <Endpoint_Write_Control_Stream_LE+0x1e>
    1634:	40 e0       	ldi	r20, 0x00	; 0
    1636:	50 e0       	ldi	r21, 0x00	; 0
    1638:	30 97       	sbiw	r30, 0x00	; 0
    163a:	11 f4       	brne	.+4      	; 0x1640 <Endpoint_Write_Control_Stream_LE+0x22>
    163c:	41 e0       	ldi	r20, 0x01	; 1
    163e:	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;
    1640:	d9 01       	movw	r26, r18
    1642:	13 c0       	rjmp	.+38     	; 0x166a <Endpoint_Write_Control_Stream_LE+0x4c>
	bool     SendZLP    = (!(Length % USB_ControlEndpointSize) || (Length == 0));
	
	while (Length && !(Endpoint_IsSetupOUTReceived()))
	{
		while (!(Endpoint_IsSetupINReady()));
    1644:	80 91 e8 00 	lds	r24, 0x00E8
    1648:	80 ff       	sbrs	r24, 0
    164a:	fc cf       	rjmp	.-8      	; 0x1644 <Endpoint_Write_Control_Stream_LE+0x26>
    164c:	05 c0       	rjmp	.+10     	; 0x1658 <Endpoint_Write_Control_Stream_LE+0x3a>
		
		while (Length && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
		{
			Endpoint_Write_Byte(*(DataStream++));
    164e:	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;
    1650:	80 93 f1 00 	sts	0x00F1, r24
			
			Length--;
    1654:	31 97       	sbiw	r30, 0x01	; 1
	
	while (Length && !(Endpoint_IsSetupOUTReceived()))
	{
		while (!(Endpoint_IsSetupINReady()));
		
		while (Length && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
    1656:	21 f0       	breq	.+8      	; 0x1660 <Endpoint_Write_Control_Stream_LE+0x42>
    1658:	80 91 f2 00 	lds	r24, 0x00F2
    165c:	81 17       	cp	r24, r17
    165e:	b8 f3       	brcs	.-18     	; 0x164e <Endpoint_Write_Control_Stream_LE+0x30>
			Endpoint_Write_Byte(*(DataStream++));
			
			Length--;
		}
		
		Endpoint_ClearSetupIN();
    1660:	80 91 e8 00 	lds	r24, 0x00E8
    1664:	8e 7f       	andi	r24, 0xFE	; 254
    1666:	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()))
    166a:	30 97       	sbiw	r30, 0x00	; 0
    166c:	21 f0       	breq	.+8      	; 0x1676 <Endpoint_Write_Control_Stream_LE+0x58>
    166e:	80 91 e8 00 	lds	r24, 0x00E8
    1672:	82 ff       	sbrs	r24, 2
    1674:	e7 cf       	rjmp	.-50     	; 0x1644 <Endpoint_Write_Control_Stream_LE+0x26>
		}
		
		Endpoint_ClearSetupIN();
	}
	
	if (Endpoint_IsSetupOUTReceived())
    1676:	80 91 e8 00 	lds	r24, 0x00E8
    167a:	82 ff       	sbrs	r24, 2
    167c:	02 c0       	rjmp	.+4      	; 0x1682 <Endpoint_Write_Control_Stream_LE+0x64>
    167e:	81 e0       	ldi	r24, 0x01	; 1
    1680:	10 c0       	rjmp	.+32     	; 0x16a2 <Endpoint_Write_Control_Stream_LE+0x84>
	  return ENDPOINT_RWCSTREAM_ERROR_HostAborted;
	
	if (SendZLP)
    1682:	45 2b       	or	r20, r21
    1684:	49 f0       	breq	.+18     	; 0x1698 <Endpoint_Write_Control_Stream_LE+0x7a>
	{
		while (!(Endpoint_IsSetupINReady()));
    1686:	80 91 e8 00 	lds	r24, 0x00E8
    168a:	80 ff       	sbrs	r24, 0
    168c:	fc cf       	rjmp	.-8      	; 0x1686 <Endpoint_Write_Control_Stream_LE+0x68>
		Endpoint_ClearSetupIN();
    168e:	80 91 e8 00 	lds	r24, 0x00E8
    1692:	8e 7f       	andi	r24, 0xFE	; 254
    1694:	80 93 e8 00 	sts	0x00E8, r24
	}
	
	while (!(Endpoint_IsSetupOUTReceived()));
    1698:	80 91 e8 00 	lds	r24, 0x00E8
    169c:	82 ff       	sbrs	r24, 2
    169e:	fc cf       	rjmp	.-8      	; 0x1698 <Endpoint_Write_Control_Stream_LE+0x7a>
    16a0:	80 e0       	ldi	r24, 0x00	; 0

	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}
    16a2:	1f 91       	pop	r17
    16a4:	08 95       	ret

000016a6 <Endpoint_Read_Control_Stream_LE>:

	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}

uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length)
{
    16a6:	fc 01       	movw	r30, r24
    16a8:	14 c0       	rjmp	.+40     	; 0x16d2 <Endpoint_Read_Control_Stream_LE+0x2c>
	uint8_t* DataStream = (uint8_t*)Buffer;
	
	while (Length)
	{
		while (!(Endpoint_IsSetupOUTReceived()));
    16aa:	80 91 e8 00 	lds	r24, 0x00E8
    16ae:	82 ff       	sbrs	r24, 2
    16b0:	fc cf       	rjmp	.-8      	; 0x16aa <Endpoint_Read_Control_Stream_LE+0x4>
    16b2:	06 c0       	rjmp	.+12     	; 0x16c0 <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;
    16b4:	80 91 f1 00 	lds	r24, 0x00F1
		
		while (Length && Endpoint_BytesInEndpoint())
		{
			*(DataStream++) = Endpoint_Read_Byte();
    16b8:	81 93       	st	Z+, r24
			
			Length--;
    16ba:	61 50       	subi	r22, 0x01	; 1
    16bc:	70 40       	sbci	r23, 0x00	; 0
	
	while (Length)
	{
		while (!(Endpoint_IsSetupOUTReceived()));
		
		while (Length && Endpoint_BytesInEndpoint())
    16be:	21 f0       	breq	.+8      	; 0x16c8 <Endpoint_Read_Control_Stream_LE+0x22>
    16c0:	80 91 f2 00 	lds	r24, 0x00F2
    16c4:	88 23       	and	r24, r24
    16c6:	b1 f7       	brne	.-20     	; 0x16b4 <Endpoint_Read_Control_Stream_LE+0xe>
			*(DataStream++) = Endpoint_Read_Byte();
			
			Length--;
		}
		
		Endpoint_ClearSetupOUT();
    16c8:	80 91 e8 00 	lds	r24, 0x00E8
    16cc:	8b 7f       	andi	r24, 0xFB	; 251
    16ce:	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)
    16d2:	61 15       	cp	r22, r1
    16d4:	71 05       	cpc	r23, r1
    16d6:	49 f7       	brne	.-46     	; 0x16aa <Endpoint_Read_Control_Stream_LE+0x4>
		}
		
		Endpoint_ClearSetupOUT();
	}
	
	while (!(Endpoint_IsSetupINReady()));
    16d8:	80 91 e8 00 	lds	r24, 0x00E8
    16dc:	80 ff       	sbrs	r24, 0
    16de:	fc cf       	rjmp	.-8      	; 0x16d8 <Endpoint_Read_Control_Stream_LE+0x32>
	
	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}
    16e0:	80 e0       	ldi	r24, 0x00	; 0
    16e2:	08 95       	ret

000016e4 <USB_Device_ProcessControlPacket>:
uint8_t USB_ConfigurationNumber;
bool    USB_RemoteWakeupEnabled;
bool    USB_CurrentlySelfPowered;

void USB_Device_ProcessControlPacket(void)
{
    16e4:	ff 92       	push	r15
    16e6:	0f 93       	push	r16
    16e8:	1f 93       	push	r17
    16ea:	df 93       	push	r29
    16ec:	cf 93       	push	r28
    16ee:	cd b7       	in	r28, 0x3d	; 61
    16f0:	de b7       	in	r29, 0x3e	; 62
    16f2:	28 97       	sbiw	r28, 0x08	; 8
    16f4:	0f b6       	in	r0, 0x3f	; 63
    16f6:	f8 94       	cli
    16f8:	de bf       	out	0x3e, r29	; 62
    16fa:	0f be       	out	0x3f, r0	; 63
    16fc:	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;
    16fe:	60 91 f1 00 	lds	r22, 0x00F1
	uint8_t bmRequestType  = Endpoint_Read_Byte();
	uint8_t bRequest       = Endpoint_Read_Byte();
	bool    RequestHandled = false;
	
	switch (bRequest)
    1702:	40 91 f1 00 	lds	r20, 0x00F1
    1706:	45 30       	cpi	r20, 0x05	; 5
    1708:	09 f4       	brne	.+2      	; 0x170c <USB_Device_ProcessControlPacket+0x28>
    170a:	cb c0       	rjmp	.+406    	; 0x18a2 <USB_Device_ProcessControlPacket+0x1be>
    170c:	46 30       	cpi	r20, 0x06	; 6
    170e:	48 f4       	brcc	.+18     	; 0x1722 <USB_Device_ProcessControlPacket+0x3e>
    1710:	41 30       	cpi	r20, 0x01	; 1
    1712:	09 f4       	brne	.+2      	; 0x1716 <USB_Device_ProcessControlPacket+0x32>
    1714:	74 c0       	rjmp	.+232    	; 0x17fe <USB_Device_ProcessControlPacket+0x11a>
    1716:	41 30       	cpi	r20, 0x01	; 1
    1718:	70 f0       	brcs	.+28     	; 0x1736 <USB_Device_ProcessControlPacket+0x52>
    171a:	43 30       	cpi	r20, 0x03	; 3
    171c:	09 f0       	breq	.+2      	; 0x1720 <USB_Device_ProcessControlPacket+0x3c>
    171e:	9a c1       	rjmp	.+820    	; 0x1a54 <USB_Device_ProcessControlPacket+0x370>
    1720:	6e c0       	rjmp	.+220    	; 0x17fe <USB_Device_ProcessControlPacket+0x11a>
    1722:	48 30       	cpi	r20, 0x08	; 8
    1724:	09 f4       	brne	.+2      	; 0x1728 <USB_Device_ProcessControlPacket+0x44>
    1726:	48 c1       	rjmp	.+656    	; 0x19b8 <USB_Device_ProcessControlPacket+0x2d4>
    1728:	49 30       	cpi	r20, 0x09	; 9
    172a:	09 f4       	brne	.+2      	; 0x172e <USB_Device_ProcessControlPacket+0x4a>
    172c:	60 c1       	rjmp	.+704    	; 0x19ee <USB_Device_ProcessControlPacket+0x30a>
    172e:	46 30       	cpi	r20, 0x06	; 6
    1730:	09 f0       	breq	.+2      	; 0x1734 <USB_Device_ProcessControlPacket+0x50>
    1732:	90 c1       	rjmp	.+800    	; 0x1a54 <USB_Device_ProcessControlPacket+0x370>
    1734:	d6 c0       	rjmp	.+428    	; 0x18e2 <USB_Device_ProcessControlPacket+0x1fe>
	{
		case REQ_GetStatus:
			if (((bmRequestType & (CONTROL_REQTYPE_DIRECTION | CONTROL_REQTYPE_TYPE)) ==
    1736:	26 2f       	mov	r18, r22
    1738:	30 e0       	ldi	r19, 0x00	; 0
    173a:	c9 01       	movw	r24, r18
    173c:	80 7e       	andi	r24, 0xE0	; 224
    173e:	90 70       	andi	r25, 0x00	; 0
    1740:	80 38       	cpi	r24, 0x80	; 128
    1742:	91 05       	cpc	r25, r1
    1744:	09 f0       	breq	.+2      	; 0x1748 <USB_Device_ProcessControlPacket+0x64>
    1746:	86 c1       	rjmp	.+780    	; 0x1a54 <USB_Device_ProcessControlPacket+0x370>
    1748:	c9 01       	movw	r24, r18
    174a:	8f 71       	andi	r24, 0x1F	; 31
    174c:	90 70       	andi	r25, 0x00	; 0
    174e:	83 30       	cpi	r24, 0x03	; 3
    1750:	91 05       	cpc	r25, r1
    1752:	09 f4       	brne	.+2      	; 0x1756 <USB_Device_ProcessControlPacket+0x72>
    1754:	7f c1       	rjmp	.+766    	; 0x1a54 <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;
    1756:	20 91 f1 00 	lds	r18, 0x00F1
				Dummy = UEDATX;
    175a:	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;
    175e:	20 91 f1 00 	lds	r18, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    1762:	40 91 f1 00 	lds	r20, 0x00F1

	Endpoint_Discard_Word();

	uint16_t wIndex = Endpoint_Read_Word_LE();
	
	switch (bmRequestType & CONTROL_REQTYPE_RECIPIENT)
    1766:	81 30       	cpi	r24, 0x01	; 1
    1768:	91 05       	cpc	r25, r1
    176a:	31 f0       	breq	.+12     	; 0x1778 <USB_Device_ProcessControlPacket+0x94>
    176c:	82 30       	cpi	r24, 0x02	; 2
    176e:	91 05       	cpc	r25, r1
    1770:	f9 f0       	breq	.+62     	; 0x17b0 <USB_Device_ProcessControlPacket+0xcc>
    1772:	89 2b       	or	r24, r25
    1774:	21 f0       	breq	.+8      	; 0x177e <USB_Device_ProcessControlPacket+0x9a>
    1776:	70 c1       	rjmp	.+736    	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>
    1778:	20 e0       	ldi	r18, 0x00	; 0
    177a:	30 e0       	ldi	r19, 0x00	; 0
    177c:	2d c0       	rjmp	.+90     	; 0x17d8 <USB_Device_ProcessControlPacket+0xf4>
	{
		case REQREC_DEVICE:
			if (USB_GetDescriptor(((DTYPE_Configuration << 8) | USB_ConfigurationNumber), 0,
    177e:	80 91 ae 01 	lds	r24, 0x01AE
    1782:	90 e0       	ldi	r25, 0x00	; 0
    1784:	9e 01       	movw	r18, r28
    1786:	29 5f       	subi	r18, 0xF9	; 249
    1788:	3f 4f       	sbci	r19, 0xFF	; 255
    178a:	ae 01       	movw	r20, r28
    178c:	4f 5f       	subi	r20, 0xFF	; 255
    178e:	5f 4f       	sbci	r21, 0xFF	; 255
    1790:	60 e0       	ldi	r22, 0x00	; 0
    1792:	92 60       	ori	r25, 0x02	; 2
    1794:	8e da       	rcall	.-2788   	; 0xcb2 <USB_GetDescriptor>
    1796:	88 23       	and	r24, r24
    1798:	09 f4       	brne	.+2      	; 0x179c <USB_Device_ProcessControlPacket+0xb8>
    179a:	5e c1       	rjmp	.+700    	; 0x1a58 <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);
    179c:	80 91 ac 01 	lds	r24, 0x01AC
    17a0:	28 2f       	mov	r18, r24
    17a2:	30 e0       	ldi	r19, 0x00	; 0
#endif

			if (USB_CurrentlySelfPowered)
			  CurrentStatus |= FEATURE_SELFPOWERED_ENABLED;
			
			if (USB_RemoteWakeupEnabled)
    17a4:	80 91 ad 01 	lds	r24, 0x01AD
    17a8:	88 23       	and	r24, r24
    17aa:	b1 f0       	breq	.+44     	; 0x17d8 <USB_Device_ProcessControlPacket+0xf4>
			  CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED;
    17ac:	22 60       	ori	r18, 0x02	; 2
    17ae:	14 c0       	rjmp	.+40     	; 0x17d8 <USB_Device_ProcessControlPacket+0xf4>
		case REQREC_INTERFACE:
			// No bits set, all bits currently reserved
				
			break;
		case REQREC_ENDPOINT:
			Endpoint_SelectEndpoint(wIndex);
    17b0:	94 2f       	mov	r25, r20
    17b2:	80 e0       	ldi	r24, 0x00	; 0
    17b4:	30 e0       	ldi	r19, 0x00	; 0
    17b6:	82 2b       	or	r24, r18
    17b8:	93 2b       	or	r25, r19
    17ba:	80 93 e9 00 	sts	0x00E9, r24

			CurrentStatus = Endpoint_IsStalled();
    17be:	80 91 eb 00 	lds	r24, 0x00EB
    17c2:	28 2f       	mov	r18, r24
    17c4:	30 e0       	ldi	r19, 0x00	; 0
    17c6:	85 e0       	ldi	r24, 0x05	; 5
    17c8:	36 95       	lsr	r19
    17ca:	27 95       	ror	r18
    17cc:	8a 95       	dec	r24
    17ce:	e1 f7       	brne	.-8      	; 0x17c8 <USB_Device_ProcessControlPacket+0xe4>
    17d0:	21 70       	andi	r18, 0x01	; 1
    17d2:	30 70       	andi	r19, 0x00	; 0

			Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);			  
    17d4:	10 92 e9 00 	sts	0x00E9, r1
			break;
		default:
			return;
	}
	
	Endpoint_ClearSetupReceived();
    17d8:	80 91 e8 00 	lds	r24, 0x00E8
    17dc:	87 7f       	andi	r24, 0xF7	; 247
    17de:	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);
    17e2:	20 93 f1 00 	sts	0x00F1, r18
				UEDATX = (Word >> 8);
    17e6:	30 93 f1 00 	sts	0x00F1, r19
	
	Endpoint_Write_Word_LE(CurrentStatus);

	Endpoint_ClearSetupIN();
    17ea:	80 91 e8 00 	lds	r24, 0x00E8
    17ee:	8e 7f       	andi	r24, 0xFE	; 254
    17f0:	80 93 e8 00 	sts	0x00E8, r24
	
	while (!(Endpoint_IsSetupOUTReceived()));
    17f4:	80 91 e8 00 	lds	r24, 0x00E8
    17f8:	82 ff       	sbrs	r24, 2
    17fa:	fc cf       	rjmp	.-8      	; 0x17f4 <USB_Device_ProcessControlPacket+0x110>
    17fc:	f2 c0       	rjmp	.+484    	; 0x19e2 <USB_Device_ProcessControlPacket+0x2fe>
			}

			break;
		case REQ_ClearFeature:
		case REQ_SetFeature:
			if (((bmRequestType & (CONTROL_REQTYPE_DIRECTION | CONTROL_REQTYPE_TYPE)) ==
    17fe:	26 2f       	mov	r18, r22
    1800:	30 e0       	ldi	r19, 0x00	; 0
    1802:	86 2f       	mov	r24, r22
    1804:	80 7e       	andi	r24, 0xE0	; 224
    1806:	09 f0       	breq	.+2      	; 0x180a <USB_Device_ProcessControlPacket+0x126>
    1808:	25 c1       	rjmp	.+586    	; 0x1a54 <USB_Device_ProcessControlPacket+0x370>
    180a:	c9 01       	movw	r24, r18
    180c:	8f 71       	andi	r24, 0x1F	; 31
    180e:	90 70       	andi	r25, 0x00	; 0
    1810:	83 30       	cpi	r24, 0x03	; 3
    1812:	91 05       	cpc	r25, r1
    1814:	09 f4       	brne	.+2      	; 0x1818 <USB_Device_ProcessControlPacket+0x134>
    1816:	1e c1       	rjmp	.+572    	; 0x1a54 <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;
    1818:	20 91 f1 00 	lds	r18, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    181c:	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;
    1820:	70 91 f1 00 	lds	r23, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    1824:	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)
    1828:	02 97       	sbiw	r24, 0x02	; 2
    182a:	09 f0       	breq	.+2      	; 0x182e <USB_Device_ProcessControlPacket+0x14a>
    182c:	15 c1       	rjmp	.+554    	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>
	{
		case REQREC_ENDPOINT:
			if (wValue == FEATURE_ENDPOINT_HALT)
    182e:	95 2f       	mov	r25, r21
    1830:	80 e0       	ldi	r24, 0x00	; 0
    1832:	30 e0       	ldi	r19, 0x00	; 0
    1834:	82 2b       	or	r24, r18
    1836:	93 2b       	or	r25, r19
    1838:	89 2b       	or	r24, r25
    183a:	09 f0       	breq	.+2      	; 0x183e <USB_Device_ProcessControlPacket+0x15a>
    183c:	0d c1       	rjmp	.+538    	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>
			{
				uint8_t EndpointIndex = (wIndex & ENDPOINT_EPNUM_MASK);
    183e:	80 e0       	ldi	r24, 0x00	; 0
    1840:	27 2f       	mov	r18, r23
    1842:	28 2b       	or	r18, r24
    1844:	27 70       	andi	r18, 0x07	; 7
				
				if (EndpointIndex != ENDPOINT_CONTROLEP)
    1846:	09 f4       	brne	.+2      	; 0x184a <USB_Device_ProcessControlPacket+0x166>
    1848:	07 c1       	rjmp	.+526    	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>
				{
					Endpoint_SelectEndpoint(EndpointIndex);
    184a:	20 93 e9 00 	sts	0x00E9, r18

					if (Endpoint_IsEnabled())
    184e:	80 91 eb 00 	lds	r24, 0x00EB
    1852:	80 ff       	sbrs	r24, 0
    1854:	1b c0       	rjmp	.+54     	; 0x188c <USB_Device_ProcessControlPacket+0x1a8>
					{				
						if (bRequest == REQ_ClearFeature)
    1856:	41 30       	cpi	r20, 0x01	; 1
    1858:	a1 f4       	brne	.+40     	; 0x1882 <USB_Device_ProcessControlPacket+0x19e>
						{
							Endpoint_ClearStall();
    185a:	80 91 eb 00 	lds	r24, 0x00EB
    185e:	80 61       	ori	r24, 0x10	; 16
    1860:	80 93 eb 00 	sts	0x00EB, r24
							Endpoint_ResetFIFO(EndpointIndex);
    1864:	81 e0       	ldi	r24, 0x01	; 1
    1866:	90 e0       	ldi	r25, 0x00	; 0
    1868:	02 c0       	rjmp	.+4      	; 0x186e <USB_Device_ProcessControlPacket+0x18a>
    186a:	88 0f       	add	r24, r24
    186c:	99 1f       	adc	r25, r25
    186e:	2a 95       	dec	r18
    1870:	e2 f7       	brpl	.-8      	; 0x186a <USB_Device_ProcessControlPacket+0x186>
    1872:	80 93 ea 00 	sts	0x00EA, r24
    1876:	10 92 ea 00 	sts	0x00EA, r1
							Endpoint_ResetDataToggle();
    187a:	80 91 eb 00 	lds	r24, 0x00EB
    187e:	88 60       	ori	r24, 0x08	; 8
    1880:	03 c0       	rjmp	.+6      	; 0x1888 <USB_Device_ProcessControlPacket+0x1a4>
						}
						else
						{
							Endpoint_StallTransaction();						
    1882:	80 91 eb 00 	lds	r24, 0x00EB
    1886:	80 62       	ori	r24, 0x20	; 32
    1888:	80 93 eb 00 	sts	0x00EB, r24
						}
					}

					Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
    188c:	10 92 e9 00 	sts	0x00E9, r1
					Endpoint_ClearSetupReceived();
    1890:	80 91 e8 00 	lds	r24, 0x00E8
    1894:	87 7f       	andi	r24, 0xF7	; 247
    1896:	80 93 e8 00 	sts	0x00E8, r24
					Endpoint_ClearSetupIN();
    189a:	80 91 e8 00 	lds	r24, 0x00E8
    189e:	8e 7f       	andi	r24, 0xFE	; 254
    18a0:	a3 c0       	rjmp	.+326    	; 0x19e8 <USB_Device_ProcessControlPacket+0x304>
				RequestHandled = true;
			}

			break;
		case REQ_SetAddress:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
    18a2:	66 23       	and	r22, r22
    18a4:	09 f0       	breq	.+2      	; 0x18a8 <USB_Device_ProcessControlPacket+0x1c4>
    18a6:	d6 c0       	rjmp	.+428    	; 0x1a54 <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;
    18a8:	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));
    18ac:	80 91 e3 00 	lds	r24, 0x00E3
    18b0:	9f 77       	andi	r25, 0x7F	; 127
    18b2:	80 78       	andi	r24, 0x80	; 128
    18b4:	98 2b       	or	r25, r24
    18b6:	90 93 e3 00 	sts	0x00E3, r25

	Endpoint_ClearSetupReceived();
    18ba:	80 91 e8 00 	lds	r24, 0x00E8
    18be:	87 7f       	andi	r24, 0xF7	; 247
    18c0:	80 93 e8 00 	sts	0x00E8, r24

	Endpoint_ClearSetupIN();
    18c4:	80 91 e8 00 	lds	r24, 0x00E8
    18c8:	8e 7f       	andi	r24, 0xFE	; 254
    18ca:	80 93 e8 00 	sts	0x00E8, r24
	while (!(Endpoint_IsSetupINReady()));
    18ce:	80 91 e8 00 	lds	r24, 0x00E8
    18d2:	80 ff       	sbrs	r24, 0
    18d4:	fc cf       	rjmp	.-8      	; 0x18ce <USB_Device_ProcessControlPacket+0x1ea>
	
	UDADDR |= (1 << ADDEN);
    18d6:	80 91 e3 00 	lds	r24, 0x00E3
    18da:	80 68       	ori	r24, 0x80	; 128
    18dc:	80 93 e3 00 	sts	0x00E3, r24
    18e0:	bb c0       	rjmp	.+374    	; 0x1a58 <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;
    18e2:	e0 91 f1 00 	lds	r30, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    18e6:	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;
    18ea:	80 91 f1 00 	lds	r24, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    18ee:	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;
    18f2:	00 91 f1 00 	lds	r16, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    18f6:	10 91 f1 00 	lds	r17, 0x00F1
	void*    DescriptorPointer;
	uint16_t DescriptorSize;
	
	bool     SendZLP;
	
	if (!(USB_GetDescriptor(wValue, wIndex, &DescriptorPointer, &DescriptorSize)))
    18fa:	72 2f       	mov	r23, r18
    18fc:	60 e0       	ldi	r22, 0x00	; 0
    18fe:	90 e0       	ldi	r25, 0x00	; 0
    1900:	68 2b       	or	r22, r24
    1902:	79 2b       	or	r23, r25
    1904:	93 2f       	mov	r25, r19
    1906:	80 e0       	ldi	r24, 0x00	; 0
    1908:	f0 e0       	ldi	r31, 0x00	; 0
    190a:	9e 01       	movw	r18, r28
    190c:	29 5f       	subi	r18, 0xF9	; 249
    190e:	3f 4f       	sbci	r19, 0xFF	; 255
    1910:	ae 01       	movw	r20, r28
    1912:	4d 5f       	subi	r20, 0xFD	; 253
    1914:	5f 4f       	sbci	r21, 0xFF	; 255
    1916:	8e 2b       	or	r24, r30
    1918:	9f 2b       	or	r25, r31
    191a:	cb d9       	rcall	.-3178   	; 0xcb2 <USB_GetDescriptor>
    191c:	88 23       	and	r24, r24
    191e:	09 f4       	brne	.+2      	; 0x1922 <USB_Device_ProcessControlPacket+0x23e>
    1920:	9b c0       	rjmp	.+310    	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>
	  return;
	
	Endpoint_ClearSetupReceived();
    1922:	80 91 e8 00 	lds	r24, 0x00E8
    1926:	87 7f       	andi	r24, 0xF7	; 247
    1928:	80 93 e8 00 	sts	0x00E8, r24
    192c:	91 2f       	mov	r25, r17
    192e:	80 e0       	ldi	r24, 0x00	; 0
    1930:	40 2f       	mov	r20, r16
    1932:	50 e0       	ldi	r21, 0x00	; 0
    1934:	2f 81       	ldd	r18, Y+7	; 0x07
    1936:	38 85       	ldd	r19, Y+8	; 0x08
    1938:	48 2b       	or	r20, r24
    193a:	59 2b       	or	r21, r25
    193c:	24 17       	cp	r18, r20
    193e:	35 07       	cpc	r19, r21
    1940:	08 f4       	brcc	.+2      	; 0x1944 <USB_Device_ProcessControlPacket+0x260>
    1942:	a9 01       	movw	r20, r18
	
	if (wLength > DescriptorSize)
	  wLength = DescriptorSize;
	  
	SendZLP = !(wLength % USB_ControlEndpointSize);
    1944:	60 91 1a 01 	lds	r22, 0x011A
    1948:	ab 81       	ldd	r26, Y+3	; 0x03
    194a:	bc 81       	ldd	r27, Y+4	; 0x04
    194c:	9a 01       	movw	r18, r20
    194e:	16 c0       	rjmp	.+44     	; 0x197c <USB_Device_ProcessControlPacket+0x298>
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
	{
		while (!(Endpoint_IsSetupINReady()));
    1950:	80 91 e8 00 	lds	r24, 0x00E8
    1954:	80 ff       	sbrs	r24, 0
    1956:	fc cf       	rjmp	.-8      	; 0x1950 <USB_Device_ProcessControlPacket+0x26c>
    1958:	08 c0       	rjmp	.+16     	; 0x196a <USB_Device_ProcessControlPacket+0x286>
    195a:	fd 01       	movw	r30, r26
    195c:	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++));
    195e:	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;
    1960:	e0 93 f1 00 	sts	0x00F1, r30
			#endif
			
			wLength--;
    1964:	21 50       	subi	r18, 0x01	; 1
    1966:	30 40       	sbci	r19, 0x00	; 0
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
	{
		while (!(Endpoint_IsSetupINReady()));
		
		while (wLength && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
    1968:	21 f0       	breq	.+8      	; 0x1972 <USB_Device_ProcessControlPacket+0x28e>
    196a:	80 91 f2 00 	lds	r24, 0x00F2
    196e:	86 17       	cp	r24, r22
    1970:	a0 f3       	brcs	.-24     	; 0x195a <USB_Device_ProcessControlPacket+0x276>
			#endif
			
			wLength--;
		}
		
		Endpoint_ClearSetupIN();
    1972:	80 91 e8 00 	lds	r24, 0x00E8
    1976:	8e 7f       	andi	r24, 0xFE	; 254
    1978:	80 93 e8 00 	sts	0x00E8, r24
	if (wLength > DescriptorSize)
	  wLength = DescriptorSize;
	  
	SendZLP = !(wLength % USB_ControlEndpointSize);
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
    197c:	21 15       	cp	r18, r1
    197e:	31 05       	cpc	r19, r1
    1980:	21 f0       	breq	.+8      	; 0x198a <USB_Device_ProcessControlPacket+0x2a6>
    1982:	80 91 e8 00 	lds	r24, 0x00E8
    1986:	82 ff       	sbrs	r24, 2
    1988:	e3 cf       	rjmp	.-58     	; 0x1950 <USB_Device_ProcessControlPacket+0x26c>
		}
		
		Endpoint_ClearSetupIN();
	}
	
	if (Endpoint_IsSetupOUTReceived())
    198a:	80 91 e8 00 	lds	r24, 0x00E8
    198e:	82 fd       	sbrc	r24, 2
    1990:	28 c0       	rjmp	.+80     	; 0x19e2 <USB_Device_ProcessControlPacket+0x2fe>
	{
		Endpoint_ClearSetupOUT();
		return;
	}
	
	if (SendZLP)
    1992:	ca 01       	movw	r24, r20
    1994:	70 e0       	ldi	r23, 0x00	; 0
    1996:	3a d1       	rcall	.+628    	; 0x1c0c <__udivmodhi4>
    1998:	89 2b       	or	r24, r25
    199a:	49 f4       	brne	.+18     	; 0x19ae <USB_Device_ProcessControlPacket+0x2ca>
	{
		while (!(Endpoint_IsSetupINReady()));
    199c:	80 91 e8 00 	lds	r24, 0x00E8
    19a0:	80 ff       	sbrs	r24, 0
    19a2:	fc cf       	rjmp	.-8      	; 0x199c <USB_Device_ProcessControlPacket+0x2b8>
		Endpoint_ClearSetupIN();
    19a4:	80 91 e8 00 	lds	r24, 0x00E8
    19a8:	8e 7f       	andi	r24, 0xFE	; 254
    19aa:	80 93 e8 00 	sts	0x00E8, r24
	}

	while (!(Endpoint_IsSetupOUTReceived()));
    19ae:	80 91 e8 00 	lds	r24, 0x00E8
    19b2:	82 ff       	sbrs	r24, 2
    19b4:	fc cf       	rjmp	.-8      	; 0x19ae <USB_Device_ProcessControlPacket+0x2ca>
    19b6:	15 c0       	rjmp	.+42     	; 0x19e2 <USB_Device_ProcessControlPacket+0x2fe>
			USB_Device_GetDescriptor();
			RequestHandled = true;
			
			break;
		case REQ_GetConfiguration:
			if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE))
    19b8:	60 38       	cpi	r22, 0x80	; 128
    19ba:	09 f0       	breq	.+2      	; 0x19be <USB_Device_ProcessControlPacket+0x2da>
    19bc:	4b c0       	rjmp	.+150    	; 0x1a54 <USB_Device_ProcessControlPacket+0x370>
	RAISE_EVENT(USB_ConfigurationChanged);
}

void USB_Device_GetConfiguration(void)
{
	Endpoint_ClearSetupReceived();	
    19be:	80 91 e8 00 	lds	r24, 0x00E8
    19c2:	87 7f       	andi	r24, 0xF7	; 247
    19c4:	80 93 e8 00 	sts	0x00E8, r24

	Endpoint_Write_Byte(USB_ConfigurationNumber);
    19c8:	80 91 ae 01 	lds	r24, 0x01AE
    19cc:	80 93 f1 00 	sts	0x00F1, r24
	
	Endpoint_ClearSetupIN();
    19d0:	80 91 e8 00 	lds	r24, 0x00E8
    19d4:	8e 7f       	andi	r24, 0xFE	; 254
    19d6:	80 93 e8 00 	sts	0x00E8, r24

	while (!(Endpoint_IsSetupOUTReceived()));
    19da:	80 91 e8 00 	lds	r24, 0x00E8
    19de:	82 ff       	sbrs	r24, 2
    19e0:	fc cf       	rjmp	.-8      	; 0x19da <USB_Device_ProcessControlPacket+0x2f6>
	Endpoint_ClearSetupOUT();
    19e2:	80 91 e8 00 	lds	r24, 0x00E8
    19e6:	8b 7f       	andi	r24, 0xFB	; 251
    19e8:	80 93 e8 00 	sts	0x00E8, r24
    19ec:	35 c0       	rjmp	.+106    	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>
				RequestHandled = true;
			}

			break;
		case REQ_SetConfiguration:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
    19ee:	66 23       	and	r22, r22
    19f0:	89 f5       	brne	.+98     	; 0x1a54 <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;
    19f2:	00 91 f1 00 	lds	r16, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
    19f6:	10 91 f1 00 	lds	r17, 0x00F1
}

static void USB_Device_SetConfiguration(void)
{
	uint16_t                 wValue               = Endpoint_Read_Word_LE();
	bool                     NotAlreadyConfigured = !(USB_ConfigurationNumber);
    19fa:	f0 90 ae 01 	lds	r15, 0x01AE
	USB_Descriptor_Device_t* DevDescriptorPtr;
	uint16_t                 DevDescriptorSize;

	if ((USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DevDescriptorPtr, &DevDescriptorSize) == false) ||
    19fe:	9e 01       	movw	r18, r28
    1a00:	29 5f       	subi	r18, 0xF9	; 249
    1a02:	3f 4f       	sbci	r19, 0xFF	; 255
    1a04:	ae 01       	movw	r20, r28
    1a06:	4b 5f       	subi	r20, 0xFB	; 251
    1a08:	5f 4f       	sbci	r21, 0xFF	; 255
    1a0a:	80 e0       	ldi	r24, 0x00	; 0
    1a0c:	91 e0       	ldi	r25, 0x01	; 1
    1a0e:	51 d9       	rcall	.-3422   	; 0xcb2 <USB_GetDescriptor>
    1a10:	88 23       	and	r24, r24
    1a12:	11 f1       	breq	.+68     	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>
    1a14:	91 2f       	mov	r25, r17
    1a16:	80 e0       	ldi	r24, 0x00	; 0
    1a18:	20 2f       	mov	r18, r16
    1a1a:	30 e0       	ldi	r19, 0x00	; 0
    1a1c:	28 2b       	or	r18, r24
    1a1e:	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)))
    1a20:	ed 81       	ldd	r30, Y+5	; 0x05
    1a22:	fe 81       	ldd	r31, Y+6	; 0x06
    1a24:	71 96       	adiw	r30, 0x11	; 17
    1a26:	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) ||
    1a28:	8e 2f       	mov	r24, r30
    1a2a:	90 e0       	ldi	r25, 0x00	; 0
    1a2c:	82 17       	cp	r24, r18
    1a2e:	93 07       	cpc	r25, r19
    1a30:	98 f0       	brcs	.+38     	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>
#endif
	{
		return;
	}
	
	Endpoint_ClearSetupReceived();
    1a32:	80 91 e8 00 	lds	r24, 0x00E8
    1a36:	87 7f       	andi	r24, 0xF7	; 247
    1a38:	80 93 e8 00 	sts	0x00E8, r24

	USB_ConfigurationNumber = wValue;
    1a3c:	20 93 ae 01 	sts	0x01AE, r18

	Endpoint_ClearSetupIN();
    1a40:	80 91 e8 00 	lds	r24, 0x00E8
    1a44:	8e 7f       	andi	r24, 0xFE	; 254
    1a46:	80 93 e8 00 	sts	0x00E8, r24

	if (NotAlreadyConfigured)
    1a4a:	ff 20       	and	r15, r15
    1a4c:	09 f4       	brne	.+2      	; 0x1a50 <USB_Device_ProcessControlPacket+0x36c>
	  RAISE_EVENT(USB_DeviceEnumerationComplete);
    1a4e:	cb d0       	rcall	.+406    	; 0x1be6 <Event_USB_DeviceEnumerationComplete>

	RAISE_EVENT(USB_ConfigurationChanged);
    1a50:	e1 d8       	rcall	.-3646   	; 0xc14 <Event_USB_ConfigurationChanged>
    1a52:	02 c0       	rjmp	.+4      	; 0x1a58 <USB_Device_ProcessControlPacket+0x374>

			break;
	}

	if (!(RequestHandled))
	  RAISE_EVENT(USB_UnhandledControlPacket, bRequest, bmRequestType);
    1a54:	84 2f       	mov	r24, r20
    1a56:	99 d8       	rcall	.-3790   	; 0xb8a <Event_USB_UnhandledControlPacket>
	  
	if (Endpoint_IsSetupReceived())
    1a58:	80 91 e8 00 	lds	r24, 0x00E8
    1a5c:	83 ff       	sbrs	r24, 3
    1a5e:	0a c0       	rjmp	.+20     	; 0x1a74 <USB_Device_ProcessControlPacket+0x390>
	{
		Endpoint_StallTransaction();
    1a60:	80 91 eb 00 	lds	r24, 0x00EB
    1a64:	80 62       	ori	r24, 0x20	; 32
    1a66:	80 93 eb 00 	sts	0x00EB, r24
		Endpoint_ClearSetupReceived();		
    1a6a:	80 91 e8 00 	lds	r24, 0x00E8
    1a6e:	87 7f       	andi	r24, 0xF7	; 247
    1a70:	80 93 e8 00 	sts	0x00E8, r24
	}
}
    1a74:	28 96       	adiw	r28, 0x08	; 8
    1a76:	0f b6       	in	r0, 0x3f	; 63
    1a78:	f8 94       	cli
    1a7a:	de bf       	out	0x3e, r29	; 62
    1a7c:	0f be       	out	0x3f, r0	; 63
    1a7e:	cd bf       	out	0x3d, r28	; 61
    1a80:	cf 91       	pop	r28
    1a82:	df 91       	pop	r29
    1a84:	1f 91       	pop	r17
    1a86:	0f 91       	pop	r16
    1a88:	ff 90       	pop	r15
    1a8a:	08 95       	ret

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

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

#if defined(USB_CAN_BE_DEVICE)
static void USB_DeviceTask(void)
{
	if (USB_IsConnected)
    1a8e:	80 91 b0 01 	lds	r24, 0x01B0
    1a92:	88 23       	and	r24, r24
    1a94:	61 f0       	breq	.+24     	; 0x1aae <USB_USBTask+0x22>
	{
		uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
    1a96:	10 91 e9 00 	lds	r17, 0x00E9
	
		Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
    1a9a:	10 92 e9 00 	sts	0x00E9, r1

		if (Endpoint_IsSetupReceived())
    1a9e:	80 91 e8 00 	lds	r24, 0x00E8
    1aa2:	83 ff       	sbrs	r24, 3
    1aa4:	01 c0       	rjmp	.+2      	; 0x1aa8 <USB_USBTask+0x1c>
		  USB_Device_ProcessControlPacket();
    1aa6:	1e de       	rcall	.-964    	; 0x16e4 <USB_Device_ProcessControlPacket>
#if defined(USB_CAN_BE_DEVICE)
static void USB_DeviceTask(void)
{
	if (USB_IsConnected)
	{
		uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
    1aa8:	17 70       	andi	r17, 0x07	; 7
		Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);

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

00001ab2 <USB_INT_DisableAllInterrupts>:

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

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

00001ab8 <USB_INT_ClearAllInterrupts>:

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

00001abe <__vector_11>:

ISR(USB_GEN_vect)
{
    1abe:	1f 92       	push	r1
    1ac0:	0f 92       	push	r0
    1ac2:	0f b6       	in	r0, 0x3f	; 63
    1ac4:	0f 92       	push	r0
    1ac6:	11 24       	eor	r1, r1
    1ac8:	2f 93       	push	r18
    1aca:	3f 93       	push	r19
    1acc:	4f 93       	push	r20
    1ace:	5f 93       	push	r21
    1ad0:	6f 93       	push	r22
    1ad2:	7f 93       	push	r23
    1ad4:	8f 93       	push	r24
    1ad6:	9f 93       	push	r25
    1ad8:	af 93       	push	r26
    1ada:	bf 93       	push	r27
    1adc:	ef 93       	push	r30
    1ade:	ff 93       	push	r31
			USB_IsConnected = false;
		}
	}
	#endif

	if (USB_INT_HasOccurred(USB_INT_SUSPEND) && USB_INT_IsEnabled(USB_INT_SUSPEND))
    1ae0:	80 91 e1 00 	lds	r24, 0x00E1
    1ae4:	80 ff       	sbrs	r24, 0
    1ae6:	1e c0       	rjmp	.+60     	; 0x1b24 <__vector_11+0x66>
    1ae8:	80 91 e2 00 	lds	r24, 0x00E2
    1aec:	80 ff       	sbrs	r24, 0
    1aee:	1a c0       	rjmp	.+52     	; 0x1b24 <__vector_11+0x66>
	{
		USB_INT_Clear(USB_INT_SUSPEND);
    1af0:	80 91 e1 00 	lds	r24, 0x00E1
    1af4:	8e 7f       	andi	r24, 0xFE	; 254
    1af6:	80 93 e1 00 	sts	0x00E1, r24

		USB_INT_Disable(USB_INT_SUSPEND);
    1afa:	80 91 e2 00 	lds	r24, 0x00E2
    1afe:	8e 7f       	andi	r24, 0xFE	; 254
    1b00:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_WAKEUP);
    1b04:	80 91 e2 00 	lds	r24, 0x00E2
    1b08:	80 61       	ori	r24, 0x10	; 16
    1b0a:	80 93 e2 00 	sts	0x00E2, r24
		
		USB_CLK_Freeze();
    1b0e:	80 91 d8 00 	lds	r24, 0x00D8
    1b12:	80 62       	ori	r24, 0x20	; 32
    1b14:	80 93 d8 00 	sts	0x00D8, r24
		#if !defined(MANUAL_PLL_CONTROL)
		USB_PLL_Off();
    1b18:	19 bc       	out	0x29, r1	; 41
		#endif

		RAISE_EVENT(USB_Suspend);
    1b1a:	65 d0       	rcall	.+202    	; 0x1be6 <Event_USB_DeviceEnumerationComplete>

		#if defined(USB_LIMITED_CONTROLLER)
		USB_IsConnected = false;
    1b1c:	10 92 b0 01 	sts	0x01B0, r1
		RAISE_EVENT(USB_Disconnect);
    1b20:	0e 94 24 03 	call	0x648	; 0x648 <Event_USB_Disconnect>
		#endif
	}

	if (USB_INT_HasOccurred(USB_INT_WAKEUP) && USB_INT_IsEnabled(USB_INT_WAKEUP))
    1b24:	80 91 e1 00 	lds	r24, 0x00E1
    1b28:	84 ff       	sbrs	r24, 4
    1b2a:	26 c0       	rjmp	.+76     	; 0x1b78 <__vector_11+0xba>
    1b2c:	80 91 e2 00 	lds	r24, 0x00E2
    1b30:	84 ff       	sbrs	r24, 4
    1b32:	22 c0       	rjmp	.+68     	; 0x1b78 <__vector_11+0xba>
	{
		#if !defined(MANUAL_PLL_CONTROL)
		USB_PLL_On();
    1b34:	84 e0       	ldi	r24, 0x04	; 4
    1b36:	89 bd       	out	0x29, r24	; 41
    1b38:	89 b5       	in	r24, 0x29	; 41
    1b3a:	82 60       	ori	r24, 0x02	; 2
    1b3c:	89 bd       	out	0x29, r24	; 41
		#endif
		while (!(USB_PLL_IsReady()));
    1b3e:	09 b4       	in	r0, 0x29	; 41
    1b40:	00 fe       	sbrs	r0, 0
    1b42:	fd cf       	rjmp	.-6      	; 0x1b3e <__vector_11+0x80>

		USB_CLK_Unfreeze();
    1b44:	80 91 d8 00 	lds	r24, 0x00D8
    1b48:	8f 7d       	andi	r24, 0xDF	; 223
    1b4a:	80 93 d8 00 	sts	0x00D8, r24

		USB_INT_Clear(USB_INT_WAKEUP);
    1b4e:	80 91 e1 00 	lds	r24, 0x00E1
    1b52:	8f 7e       	andi	r24, 0xEF	; 239
    1b54:	80 93 e1 00 	sts	0x00E1, r24

		USB_INT_Disable(USB_INT_WAKEUP);
    1b58:	80 91 e2 00 	lds	r24, 0x00E2
    1b5c:	8f 7e       	andi	r24, 0xEF	; 239
    1b5e:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_SUSPEND);
    1b62:	80 91 e2 00 	lds	r24, 0x00E2
    1b66:	81 60       	ori	r24, 0x01	; 1
    1b68:	80 93 e2 00 	sts	0x00E2, r24
		
		#if defined(USB_LIMITED_CONTROLLER)
		USB_IsConnected = true;
    1b6c:	81 e0       	ldi	r24, 0x01	; 1
    1b6e:	80 93 b0 01 	sts	0x01B0, r24
		RAISE_EVENT(USB_Connect);
    1b72:	0e 94 2c 03 	call	0x658	; 0x658 <Event_USB_Connect>
		#endif

		RAISE_EVENT(USB_WakeUp);
    1b76:	37 d0       	rcall	.+110    	; 0x1be6 <Event_USB_DeviceEnumerationComplete>
	}
   
	if (USB_INT_HasOccurred(USB_INT_EORSTI) && USB_INT_IsEnabled(USB_INT_EORSTI))
    1b78:	80 91 e1 00 	lds	r24, 0x00E1
    1b7c:	83 ff       	sbrs	r24, 3
    1b7e:	22 c0       	rjmp	.+68     	; 0x1bc4 <__vector_11+0x106>
    1b80:	80 91 e2 00 	lds	r24, 0x00E2
    1b84:	83 ff       	sbrs	r24, 3
    1b86:	1e c0       	rjmp	.+60     	; 0x1bc4 <__vector_11+0x106>
	{
		USB_INT_Clear(USB_INT_EORSTI);
    1b88:	80 91 e1 00 	lds	r24, 0x00E1
    1b8c:	87 7f       	andi	r24, 0xF7	; 247
    1b8e:	80 93 e1 00 	sts	0x00E1, r24

		USB_ConfigurationNumber = 0;
    1b92:	10 92 ae 01 	sts	0x01AE, r1

		USB_INT_Clear(USB_INT_SUSPEND);
    1b96:	80 91 e1 00 	lds	r24, 0x00E1
    1b9a:	8e 7f       	andi	r24, 0xFE	; 254
    1b9c:	80 93 e1 00 	sts	0x00E1, r24
		USB_INT_Disable(USB_INT_SUSPEND);
    1ba0:	80 91 e2 00 	lds	r24, 0x00E2
    1ba4:	8e 7f       	andi	r24, 0xFE	; 254
    1ba6:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_WAKEUP);
    1baa:	80 91 e2 00 	lds	r24, 0x00E2
    1bae:	80 61       	ori	r24, 0x10	; 16
    1bb0:	80 93 e2 00 	sts	0x00E2, r24

		Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
    1bb4:	60 91 1a 01 	lds	r22, 0x011A
    1bb8:	20 e0       	ldi	r18, 0x00	; 0
    1bba:	40 e0       	ldi	r20, 0x00	; 0
    1bbc:	70 e0       	ldi	r23, 0x00	; 0
    1bbe:	80 e0       	ldi	r24, 0x00	; 0
    1bc0:	07 dd       	rcall	.-1522   	; 0x15d0 <Endpoint_ConfigureEndpoint_P>
		                           ENDPOINT_DIR_OUT, USB_ControlEndpointSize,
		                           ENDPOINT_BANK_SINGLE);

		RAISE_EVENT(USB_Reset);
    1bc2:	11 d0       	rcall	.+34     	; 0x1be6 <Event_USB_DeviceEnumerationComplete>
		USB_OTGPAD_On();

		USB_SetupInterface();	
	}
	#endif
}
    1bc4:	ff 91       	pop	r31
    1bc6:	ef 91       	pop	r30
    1bc8:	bf 91       	pop	r27
    1bca:	af 91       	pop	r26
    1bcc:	9f 91       	pop	r25
    1bce:	8f 91       	pop	r24
    1bd0:	7f 91       	pop	r23
    1bd2:	6f 91       	pop	r22
    1bd4:	5f 91       	pop	r21
    1bd6:	4f 91       	pop	r20
    1bd8:	3f 91       	pop	r19
    1bda:	2f 91       	pop	r18
    1bdc:	0f 90       	pop	r0
    1bde:	0f be       	out	0x3f, r0	; 63
    1be0:	0f 90       	pop	r0
    1be2:	1f 90       	pop	r1
    1be4:	18 95       	reti

00001be6 <Event_USB_DeviceEnumerationComplete>:

#define INCLUDE_FROM_EVENTS_C
#include "Events.h"

static void __stub(void)
{
    1be6:	08 95       	ret

00001be8 <__mulhi3>:
    1be8:	55 27       	eor	r21, r21
    1bea:	00 24       	eor	r0, r0

00001bec <__mulhi3_loop>:
    1bec:	80 ff       	sbrs	r24, 0
    1bee:	02 c0       	rjmp	.+4      	; 0x1bf4 <__mulhi3_skip1>
    1bf0:	06 0e       	add	r0, r22
    1bf2:	57 1f       	adc	r21, r23

00001bf4 <__mulhi3_skip1>:
    1bf4:	66 0f       	add	r22, r22
    1bf6:	77 1f       	adc	r23, r23
    1bf8:	61 15       	cp	r22, r1
    1bfa:	71 05       	cpc	r23, r1
    1bfc:	21 f0       	breq	.+8      	; 0x1c06 <__mulhi3_exit>
    1bfe:	96 95       	lsr	r25
    1c00:	87 95       	ror	r24
    1c02:	00 97       	sbiw	r24, 0x00	; 0
    1c04:	99 f7       	brne	.-26     	; 0x1bec <__mulhi3_loop>

00001c06 <__mulhi3_exit>:
    1c06:	95 2f       	mov	r25, r21
    1c08:	80 2d       	mov	r24, r0
    1c0a:	08 95       	ret

00001c0c <__udivmodhi4>:
    1c0c:	aa 1b       	sub	r26, r26
    1c0e:	bb 1b       	sub	r27, r27
    1c10:	51 e1       	ldi	r21, 0x11	; 17
    1c12:	07 c0       	rjmp	.+14     	; 0x1c22 <__udivmodhi4_ep>

00001c14 <__udivmodhi4_loop>:
    1c14:	aa 1f       	adc	r26, r26
    1c16:	bb 1f       	adc	r27, r27
    1c18:	a6 17       	cp	r26, r22
    1c1a:	b7 07       	cpc	r27, r23
    1c1c:	10 f0       	brcs	.+4      	; 0x1c22 <__udivmodhi4_ep>
    1c1e:	a6 1b       	sub	r26, r22
    1c20:	b7 0b       	sbc	r27, r23

00001c22 <__udivmodhi4_ep>:
    1c22:	88 1f       	adc	r24, r24
    1c24:	99 1f       	adc	r25, r25
    1c26:	5a 95       	dec	r21
    1c28:	a9 f7       	brne	.-22     	; 0x1c14 <__udivmodhi4_loop>
    1c2a:	80 95       	com	r24
    1c2c:	90 95       	com	r25
    1c2e:	bc 01       	movw	r22, r24
    1c30:	cd 01       	movw	r24, r26
    1c32:	08 95       	ret

00001c34 <__udivmodsi4>:
    1c34:	a1 e2       	ldi	r26, 0x21	; 33
    1c36:	1a 2e       	mov	r1, r26
    1c38:	aa 1b       	sub	r26, r26
    1c3a:	bb 1b       	sub	r27, r27
    1c3c:	fd 01       	movw	r30, r26
    1c3e:	0d c0       	rjmp	.+26     	; 0x1c5a <__udivmodsi4_ep>

00001c40 <__udivmodsi4_loop>:
    1c40:	aa 1f       	adc	r26, r26
    1c42:	bb 1f       	adc	r27, r27
    1c44:	ee 1f       	adc	r30, r30
    1c46:	ff 1f       	adc	r31, r31
    1c48:	a2 17       	cp	r26, r18
    1c4a:	b3 07       	cpc	r27, r19
    1c4c:	e4 07       	cpc	r30, r20
    1c4e:	f5 07       	cpc	r31, r21
    1c50:	20 f0       	brcs	.+8      	; 0x1c5a <__udivmodsi4_ep>
    1c52:	a2 1b       	sub	r26, r18
    1c54:	b3 0b       	sbc	r27, r19
    1c56:	e4 0b       	sbc	r30, r20
    1c58:	f5 0b       	sbc	r31, r21

00001c5a <__udivmodsi4_ep>:
    1c5a:	66 1f       	adc	r22, r22
    1c5c:	77 1f       	adc	r23, r23
    1c5e:	88 1f       	adc	r24, r24
    1c60:	99 1f       	adc	r25, r25
    1c62:	1a 94       	dec	r1
    1c64:	69 f7       	brne	.-38     	; 0x1c40 <__udivmodsi4_loop>
    1c66:	60 95       	com	r22
    1c68:	70 95       	com	r23
    1c6a:	80 95       	com	r24
    1c6c:	90 95       	com	r25
    1c6e:	9b 01       	movw	r18, r22
    1c70:	ac 01       	movw	r20, r24
    1c72:	bd 01       	movw	r22, r26
    1c74:	cf 01       	movw	r24, r30
    1c76:	08 95       	ret

00001c78 <_exit>:
    1c78:	f8 94       	cli

00001c7a <__stop_program>:
    1c7a:	ff cf       	rjmp	.-2      	; 0x1c7a <__stop_program>
