
USB10.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .data         00000010  00800100  00000d22  00000d96  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  1 .text         00000d22  00000000  00000000  00000074  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .bss          00000113  00800110  00000d32  00000da6  2**0
                  ALLOC
  3 .debug_aranges 00000268  00000000  00000000  00000da6  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_pubnames 000006a3  00000000  00000000  0000100e  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_info   00002c38  00000000  00000000  000016b1  2**0
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_abbrev 00001021  00000000  00000000  000042e9  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_line   000022f9  00000000  00000000  0000530a  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_frame  00000350  00000000  00000000  00007604  2**2
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_str    00001339  00000000  00000000  00007954  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_loc    00000c04  00000000  00000000  00008c8d  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_ranges 000002e0  00000000  00000000  00009891  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:

volatile SchedulerDelayCounter_t Scheduler_TickCounter;
volatile uint8_t                 Scheduler_TotalTasks;

bool Scheduler_HasDelayElapsed(const uint16_t Delay, SchedulerDelayCounter_t* const DelayCounter)
{
   0:	89 c0       	rjmp	.+274    	; 0x114 <__ctors_end>
	
	Endpoint_AllocateMemory();
}

void Endpoint_ClearEndpoints(void)
{
   2:	00 00       	nop
   4:	a2 c0       	rjmp	.+324    	; 0x14a <__bad_interrupt>
   6:	00 00       	nop
   8:	a0 c0       	rjmp	.+320    	; 0x14a <__bad_interrupt>
   a:	00 00       	nop
   c:	9e c0       	rjmp	.+316    	; 0x14a <__bad_interrupt>
   e:	00 00       	nop
  10:	9c c0       	rjmp	.+312    	; 0x14a <__bad_interrupt>
  12:	00 00       	nop
  14:	9a c0       	rjmp	.+308    	; 0x14a <__bad_interrupt>
  16:	00 00       	nop
  18:	98 c0       	rjmp	.+304    	; 0x14a <__bad_interrupt>
  1a:	00 00       	nop
  1c:	96 c0       	rjmp	.+300    	; 0x14a <__bad_interrupt>
  1e:	00 00       	nop
  20:	94 c0       	rjmp	.+296    	; 0x14a <__bad_interrupt>
  22:	00 00       	nop
  24:	92 c0       	rjmp	.+292    	; 0x14a <__bad_interrupt>
  26:	00 00       	nop
  28:	90 c0       	rjmp	.+288    	; 0x14a <__bad_interrupt>
  2a:	00 00       	nop
  2c:	af c5       	rjmp	.+2910   	; 0xb8c <__vector_11>
  2e:	00 00       	nop
  30:	8c c0       	rjmp	.+280    	; 0x14a <__bad_interrupt>
  32:	00 00       	nop
  34:	8a c0       	rjmp	.+276    	; 0x14a <__bad_interrupt>
  36:	00 00       	nop
  38:	88 c0       	rjmp	.+272    	; 0x14a <__bad_interrupt>
  3a:	00 00       	nop
  3c:	86 c0       	rjmp	.+268    	; 0x14a <__bad_interrupt>
  3e:	00 00       	nop
  40:	84 c0       	rjmp	.+264    	; 0x14a <__bad_interrupt>
  42:	00 00       	nop
  44:	82 c0       	rjmp	.+260    	; 0x14a <__bad_interrupt>
  46:	00 00       	nop
  48:	80 c0       	rjmp	.+256    	; 0x14a <__bad_interrupt>
  4a:	00 00       	nop
  4c:	7e c0       	rjmp	.+252    	; 0x14a <__bad_interrupt>
  4e:	00 00       	nop
  50:	7c c0       	rjmp	.+248    	; 0x14a <__bad_interrupt>
  52:	00 00       	nop
  54:	7a c0       	rjmp	.+244    	; 0x14a <__bad_interrupt>
  56:	00 00       	nop
  58:	78 c0       	rjmp	.+240    	; 0x14a <__bad_interrupt>
  5a:	00 00       	nop
  5c:	ae c0       	rjmp	.+348    	; 0x1ba <__vector_23>
  5e:	00 00       	nop
  60:	74 c0       	rjmp	.+232    	; 0x14a <__bad_interrupt>
  62:	00 00       	nop
  64:	d1 c0       	rjmp	.+418    	; 0x208 <__vector_25>
  66:	00 00       	nop
  68:	70 c0       	rjmp	.+224    	; 0x14a <__bad_interrupt>
  6a:	00 00       	nop
  6c:	6e c0       	rjmp	.+220    	; 0x14a <__bad_interrupt>
  6e:	00 00       	nop
  70:	6c c0       	rjmp	.+216    	; 0x14a <__bad_interrupt>
  72:	00 00       	nop

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

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

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

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

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

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

00000120 <__do_copy_data>:
 120:	11 e0       	ldi	r17, 0x01	; 1
 122:	a0 e0       	ldi	r26, 0x00	; 0
 124:	b1 e0       	ldi	r27, 0x01	; 1
 126:	e2 e2       	ldi	r30, 0x22	; 34
 128:	fd e0       	ldi	r31, 0x0D	; 13
 12a:	02 c0       	rjmp	.+4      	; 0x130 <.do_copy_data_start>

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

00000130 <.do_copy_data_start>:
 130:	a0 31       	cpi	r26, 0x10	; 16
 132:	b1 07       	cpc	r27, r17
 134:	d9 f7       	brne	.-10     	; 0x12c <.do_copy_data_loop>

00000136 <__do_clear_bss>:
 136:	12 e0       	ldi	r17, 0x02	; 2
 138:	a0 e1       	ldi	r26, 0x10	; 16
 13a:	b1 e0       	ldi	r27, 0x01	; 1
 13c:	01 c0       	rjmp	.+2      	; 0x140 <.do_clear_bss_start>

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

00000140 <.do_clear_bss_start>:
 140:	a3 32       	cpi	r26, 0x23	; 35
 142:	b1 07       	cpc	r27, r17
 144:	e1 f7       	brne	.-8      	; 0x13e <.do_clear_bss_loop>
 146:	43 d1       	rcall	.+646    	; 0x3ce <main>
 148:	ea c5       	rjmp	.+3028   	; 0xd1e <_exit>

0000014a <__bad_interrupt>:
 14a:	5a cf       	rjmp	.-332    	; 0x0 <__vectors>

0000014c <ReconfigureUSART>:


}

void ReconfigureUSART(void)
{
 14c:	80 91 0d 01 	lds	r24, 0x010D
 150:	81 30       	cpi	r24, 0x01	; 1
 152:	11 f4       	brne	.+4      	; 0x158 <ReconfigureUSART+0xc>
 154:	90 e3       	ldi	r25, 0x30	; 48
 156:	05 c0       	rjmp	.+10     	; 0x162 <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)
 158:	82 30       	cpi	r24, 0x02	; 2
 15a:	11 f4       	brne	.+4      	; 0x160 <ReconfigureUSART+0x14>
 15c:	90 e2       	ldi	r25, 0x20	; 32
 15e:	01 c0       	rjmp	.+2      	; 0x162 <ReconfigureUSART+0x16>
 160:	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)
 162:	80 91 0c 01 	lds	r24, 0x010C
 166:	82 30       	cpi	r24, 0x02	; 2
 168:	09 f4       	brne	.+2      	; 0x16c <ReconfigureUSART+0x20>
	  ConfigMask |= (1 << USBS1);
 16a:	98 60       	ori	r25, 0x08	; 8

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

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

	/* Set the USART mode to the mask generated by the Line Coding options */
	UCSR1C = ConfigMask;
 192:	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);
 196:	20 91 08 01 	lds	r18, 0x0108
 19a:	30 91 09 01 	lds	r19, 0x0109
 19e:	40 e0       	ldi	r20, 0x00	; 0
 1a0:	50 e0       	ldi	r21, 0x00	; 0
 1a2:	60 e4       	ldi	r22, 0x40	; 64
 1a4:	72 e4       	ldi	r23, 0x42	; 66
 1a6:	8f e0       	ldi	r24, 0x0F	; 15
 1a8:	90 e0       	ldi	r25, 0x00	; 0
 1aa:	97 d5       	rcall	.+2862   	; 0xcda <__udivmodsi4>
 1ac:	21 50       	subi	r18, 0x01	; 1
 1ae:	30 40       	sbci	r19, 0x00	; 0
 1b0:	30 93 cd 00 	sts	0x00CD, r19
 1b4:	20 93 cc 00 	sts	0x00CC, r18
}
 1b8:	08 95       	ret

000001ba <__vector_23>:

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

ISR(USART1_RX_vect)
{
 1ba:	1f 92       	push	r1
 1bc:	0f 92       	push	r0
 1be:	0f b6       	in	r0, 0x3f	; 63
 1c0:	0f 92       	push	r0
 1c2:	11 24       	eor	r1, r1
 1c4:	2f 93       	push	r18
 1c6:	3f 93       	push	r19
 1c8:	4f 93       	push	r20
 1ca:	5f 93       	push	r21
 1cc:	6f 93       	push	r22
 1ce:	7f 93       	push	r23
 1d0:	8f 93       	push	r24
 1d2:	9f 93       	push	r25
 1d4:	af 93       	push	r26
 1d6:	bf 93       	push	r27
 1d8:	ef 93       	push	r30
 1da:	ff 93       	push	r31
//	if (ok)
//	{
	/* Character recieved, store it into the buffer */
	Buffer_StoreElement(&Tx_Buffer, UDR1);
 1dc:	60 91 ce 00 	lds	r22, 0x00CE
 1e0:	81 e1       	ldi	r24, 0x11	; 17
 1e2:	91 e0       	ldi	r25, 0x01	; 1
 1e4:	74 d1       	rcall	.+744    	; 0x4ce <Buffer_StoreElement>
//	{
//	volatile char temp = UDR1;
//	}


}
 1e6:	ff 91       	pop	r31
 1e8:	ef 91       	pop	r30
 1ea:	bf 91       	pop	r27
 1ec:	af 91       	pop	r26
 1ee:	9f 91       	pop	r25
 1f0:	8f 91       	pop	r24
 1f2:	7f 91       	pop	r23
 1f4:	6f 91       	pop	r22
 1f6:	5f 91       	pop	r21
 1f8:	4f 91       	pop	r20
 1fa:	3f 91       	pop	r19
 1fc:	2f 91       	pop	r18
 1fe:	0f 90       	pop	r0
 200:	0f be       	out	0x3f, r0	; 63
 202:	0f 90       	pop	r0
 204:	1f 90       	pop	r1
 206:	18 95       	reti

00000208 <__vector_25>:

	}
}

ISR(USART1_TX_vect)
{
 208:	1f 92       	push	r1
 20a:	0f 92       	push	r0
 20c:	0f b6       	in	r0, 0x3f	; 63
 20e:	0f 92       	push	r0
 210:	11 24       	eor	r1, r1
 212:	2f 93       	push	r18
 214:	3f 93       	push	r19
 216:	4f 93       	push	r20
 218:	5f 93       	push	r21
 21a:	6f 93       	push	r22
 21c:	7f 93       	push	r23
 21e:	8f 93       	push	r24
 220:	9f 93       	push	r25
 222:	af 93       	push	r26
 224:	bf 93       	push	r27
 226:	ef 93       	push	r30
 228:	ff 93       	push	r31
	/* Send next character if avaliable */
	if (Rx_Buffer.Elements)
 22a:	80 91 1a 02 	lds	r24, 0x021A
 22e:	88 23       	and	r24, r24
 230:	31 f0       	breq	.+12     	; 0x23e <__vector_25+0x36>
	  UDR1 = Buffer_GetElement(&Rx_Buffer);
 232:	86 e9       	ldi	r24, 0x96	; 150
 234:	91 e0       	ldi	r25, 0x01	; 1
 236:	82 d1       	rcall	.+772    	; 0x53c <Buffer_GetElement>
 238:	80 93 ce 00 	sts	0x00CE, r24
 23c:	02 c0       	rjmp	.+4      	; 0x242 <__vector_25+0x3a>
	else
	  Transmitting = false;
 23e:	10 92 10 01 	sts	0x0110, r1
}
 242:	ff 91       	pop	r31
 244:	ef 91       	pop	r30
 246:	bf 91       	pop	r27
 248:	af 91       	pop	r26
 24a:	9f 91       	pop	r25
 24c:	8f 91       	pop	r24
 24e:	7f 91       	pop	r23
 250:	6f 91       	pop	r22
 252:	5f 91       	pop	r21
 254:	4f 91       	pop	r20
 256:	3f 91       	pop	r19
 258:	2f 91       	pop	r18
 25a:	0f 90       	pop	r0
 25c:	0f be       	out	0x3f, r0	; 63
 25e:	0f 90       	pop	r0
 260:	1f 90       	pop	r1
 262:	18 95       	reti

00000264 <CDC_Task>:
			break;
	}
}

TASK(CDC_Task)
{
 264:	80 91 22 02 	lds	r24, 0x0222
 268:	88 23       	and	r24, r24
 26a:	09 f4       	brne	.+2      	; 0x26e <CDC_Task+0xa>
 26c:	55 c0       	rjmp	.+170    	; 0x318 <__stack+0x19>
	if (USB_IsConnected)
	{
//	ok = true;
		/* Select the Serial Rx Endpoint */
		Endpoint_SelectEndpoint(CDC_RX_EPNUM);
 26e:	84 e0       	ldi	r24, 0x04	; 4
 270:	80 93 e9 00 	sts	0x00E9, r24

		if (Endpoint_ReadWriteAllowed())
 274:	80 91 e8 00 	lds	r24, 0x00E8
 278:	85 fd       	sbrc	r24, 5
 27a:	0a c0       	rjmp	.+20     	; 0x290 <CDC_Task+0x2c>
 27c:	12 c0       	rjmp	.+36     	; 0x2a2 <CDC_Task+0x3e>
		{
			/* Read the recieved data endpoint into the transmission buffer */
			while (Endpoint_BytesInEndpoint())
			{
				/* Wait until the buffer has space for a new character */
				while (!((BUFF_STATICSIZE - Rx_Buffer.Elements)));
 27e:	80 91 1a 02 	lds	r24, 0x021A
 282:	80 38       	cpi	r24, 0x80	; 128
 284:	e1 f3       	breq	.-8      	; 0x27e <CDC_Task+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;
 286:	60 91 f1 00 	lds	r22, 0x00F1

				/* Store each character from the endpoint */
				Buffer_StoreElement(&Rx_Buffer, Endpoint_Read_Byte());
 28a:	86 e9       	ldi	r24, 0x96	; 150
 28c:	91 e0       	ldi	r25, 0x01	; 1
 28e:	1f d1       	rcall	.+574    	; 0x4ce <Buffer_StoreElement>
		Endpoint_SelectEndpoint(CDC_RX_EPNUM);

		if (Endpoint_ReadWriteAllowed())
		{
			/* Read the recieved data endpoint into the transmission buffer */
			while (Endpoint_BytesInEndpoint())
 290:	80 91 f2 00 	lds	r24, 0x00F2
 294:	88 23       	and	r24, r24
 296:	99 f7       	brne	.-26     	; 0x27e <CDC_Task+0x1a>
				/* Store each character from the endpoint */
				Buffer_StoreElement(&Rx_Buffer, Endpoint_Read_Byte());
			}

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

		/* Check if Rx buffer contains data */
		if (Rx_Buffer.Elements)
 2a2:	80 91 1a 02 	lds	r24, 0x021A
 2a6:	88 23       	and	r24, r24
 2a8:	89 f0       	breq	.+34     	; 0x2cc <CDC_Task+0x68>
		{
			/* Initiate the transmission of the buffer contents if USART idle */
			if (!(Transmitting))
 2aa:	80 91 10 01 	lds	r24, 0x0110
 2ae:	88 23       	and	r24, r24
 2b0:	69 f4       	brne	.+26     	; 0x2cc <CDC_Task+0x68>
			{
				Transmitting = true;
 2b2:	81 e0       	ldi	r24, 0x01	; 1
 2b4:	80 93 10 01 	sts	0x0110, r24
				Serial_TxByte(Buffer_GetElement(&Rx_Buffer));
 2b8:	86 e9       	ldi	r24, 0x96	; 150
 2ba:	91 e0       	ldi	r25, 0x01	; 1
 2bc:	3f d1       	rcall	.+638    	; 0x53c <Buffer_GetElement>
 2be:	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)));
 2c0:	80 91 c8 00 	lds	r24, 0x00C8
 2c4:	85 ff       	sbrs	r24, 5
 2c6:	fc cf       	rjmp	.-8      	; 0x2c0 <CDC_Task+0x5c>
				UDR1 = DataByte;
 2c8:	90 93 ce 00 	sts	0x00CE, r25
			}
		}

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


		/* Write the Data to the Endpoint */
		if(Tx_Buffer.Elements)
 2d2:	80 91 95 01 	lds	r24, 0x0195
 2d6:	88 23       	and	r24, r24
 2d8:	f9 f0       	breq	.+62     	; 0x318 <__stack+0x19>
		{

			do{
				/* Wait until Serial Tx Endpoint Ready for Read/Write */
				while (!(Endpoint_ReadWriteAllowed()));
 2da:	80 91 e8 00 	lds	r24, 0x00E8
 2de:	85 ff       	sbrs	r24, 5
 2e0:	fc cf       	rjmp	.-8      	; 0x2da <CDC_Task+0x76>

				Endpoint_Write_Byte(Buffer_GetElement(&Tx_Buffer));
 2e2:	81 e1       	ldi	r24, 0x11	; 17
 2e4:	91 e0       	ldi	r25, 0x01	; 1
 2e6:	2a d1       	rcall	.+596    	; 0x53c <Buffer_GetElement>
			}

			/** 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;
 2e8:	80 93 f1 00 	sts	0x00F1, r24

				/* Check if the endpoint is full */
				if (Endpoint_BytesInEndpoint() == CDC_TXRX_EPSIZE)
 2ec:	80 91 f2 00 	lds	r24, 0x00F2
 2f0:	80 31       	cpi	r24, 0x10	; 16
 2f2:	49 f4       	brne	.+18     	; 0x306 <__stack+0x7>
				{
					/* Send the data */
					Endpoint_ClearCurrentBank();
 2f4:	80 91 e8 00 	lds	r24, 0x00E8
 2f8:	8f 77       	andi	r24, 0x7F	; 127
 2fa:	80 93 e8 00 	sts	0x00E8, r24

					/* Wait until Serial Tx Endpoint Ready for Read/Write */
					while (!(Endpoint_ReadWriteAllowed()));
 2fe:	80 91 e8 00 	lds	r24, 0x00E8
 302:	85 ff       	sbrs	r24, 5
 304:	fc cf       	rjmp	.-8      	; 0x2fe <CDC_Task+0x9a>
				}
			}while (Tx_Buffer.Elements);
 306:	80 91 95 01 	lds	r24, 0x0195
 30a:	88 23       	and	r24, r24
 30c:	31 f7       	brne	.-52     	; 0x2da <CDC_Task+0x76>

			/* Send the last packet of the transfer to the host */
			Endpoint_ClearCurrentBank();
 30e:	80 91 e8 00 	lds	r24, 0x00E8
 312:	8f 77       	andi	r24, 0x7F	; 127
 314:	80 93 e8 00 	sts	0x00E8, r24
 318:	08 95       	ret

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

EVENT_HANDLER(USB_UnhandledControlPacket)
{
 31a:	81 32       	cpi	r24, 0x21	; 33
 31c:	29 f0       	breq	.+10     	; 0x328 <Event_USB_UnhandledControlPacket+0xe>
 31e:	82 32       	cpi	r24, 0x22	; 34
 320:	39 f1       	breq	.+78     	; 0x370 <Event_USB_UnhandledControlPacket+0x56>
 322:	80 32       	cpi	r24, 0x20	; 32
 324:	89 f5       	brne	.+98     	; 0x388 <Event_USB_UnhandledControlPacket+0x6e>
 326:	12 c0       	rjmp	.+36     	; 0x34c <Event_USB_UnhandledControlPacket+0x32>

	/* Process CDC specific control requests */
	switch (bRequest)
	{
		case GET_LINE_CODING:
			if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
 328:	61 3a       	cpi	r22, 0xA1	; 161
 32a:	71 f5       	brne	.+92     	; 0x388 <Event_USB_UnhandledControlPacket+0x6e>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
 32c:	80 91 e8 00 	lds	r24, 0x00E8
 330:	87 7f       	andi	r24, 0xF7	; 247
 332:	80 93 e8 00 	sts	0x00E8, r24

				/* Write the line coding data to the control endpoint */
				Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(LineCoding));
 336:	67 e0       	ldi	r22, 0x07	; 7
 338:	70 e0       	ldi	r23, 0x00	; 0
 33a:	88 e0       	ldi	r24, 0x08	; 8
 33c:	91 e0       	ldi	r25, 0x01	; 1
 33e:	d6 d1       	rcall	.+940    	; 0x6ec <Endpoint_Write_Control_Stream_LE>

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

			break;
		case SET_LINE_CODING:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
 34c:	61 32       	cpi	r22, 0x21	; 33
 34e:	e1 f4       	brne	.+56     	; 0x388 <Event_USB_UnhandledControlPacket+0x6e>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
 350:	80 91 e8 00 	lds	r24, 0x00E8
 354:	87 7f       	andi	r24, 0xF7	; 247
 356:	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));
 35a:	67 e0       	ldi	r22, 0x07	; 7
 35c:	70 e0       	ldi	r23, 0x00	; 0
 35e:	88 e0       	ldi	r24, 0x08	; 8
 360:	91 e0       	ldi	r25, 0x01	; 1
 362:	08 d2       	rcall	.+1040   	; 0x774 <Endpoint_Read_Control_Stream_LE>

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

				/* Reconfigure the USART with the new settings */
				ReconfigureUSART();
 36e:	ee ce       	rjmp	.-548    	; 0x14c <ReconfigureUSART>
			}

			break;
		case SET_CONTROL_LINE_STATE:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
 370:	61 32       	cpi	r22, 0x21	; 33
 372:	51 f4       	brne	.+20     	; 0x388 <Event_USB_UnhandledControlPacket+0x6e>
			{
				/* Acknowedge the SETUP packet, ready for data transfer */
				Endpoint_ClearSetupReceived();
 374:	80 91 e8 00 	lds	r24, 0x00E8
 378:	87 7f       	andi	r24, 0xF7	; 247
 37a:	80 93 e8 00 	sts	0x00E8, r24

				/* Send an empty packet to acknowedge the command (currently unused) */
				Endpoint_ClearSetupIN();
 37e:	80 91 e8 00 	lds	r24, 0x00E8
 382:	8e 7f       	andi	r24, 0xFE	; 254
 384:	80 93 e8 00 	sts	0x00E8, r24
 388:	08 95       	ret

0000038a <Event_USB_ConfigurationChanged>:
	Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);

}

EVENT_HANDLER(USB_ConfigurationChanged)
{
 38a:	20 e0       	ldi	r18, 0x00	; 0
 38c:	41 ec       	ldi	r20, 0xC1	; 193
 38e:	68 e0       	ldi	r22, 0x08	; 8
 390:	70 e0       	ldi	r23, 0x00	; 0
 392:	82 e0       	ldi	r24, 0x02	; 2
 394:	84 d1       	rcall	.+776    	; 0x69e <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,
 396:	24 e0       	ldi	r18, 0x04	; 4
 398:	41 e8       	ldi	r20, 0x81	; 129
 39a:	60 e1       	ldi	r22, 0x10	; 16
 39c:	70 e0       	ldi	r23, 0x00	; 0
 39e:	83 e0       	ldi	r24, 0x03	; 3
 3a0:	7e d1       	rcall	.+764    	; 0x69e <Endpoint_ConfigureEndpoint_P>
		                       ENDPOINT_DIR_IN, CDC_TXRX_EPSIZE,
	                           ENDPOINT_BANK_DOUBLE);

	Endpoint_ConfigureEndpoint(CDC_RX_EPNUM, EP_TYPE_BULK,
 3a2:	24 e0       	ldi	r18, 0x04	; 4
 3a4:	40 e8       	ldi	r20, 0x80	; 128
 3a6:	60 e1       	ldi	r22, 0x10	; 16
 3a8:	70 e0       	ldi	r23, 0x00	; 0
 3aa:	84 e0       	ldi	r24, 0x04	; 4
 3ac:	78 d1       	rcall	.+752    	; 0x69e <Endpoint_ConfigureEndpoint_P>
		                       ENDPOINT_DIR_OUT, CDC_TXRX_EPSIZE,
	                           ENDPOINT_BANK_DOUBLE);


	/* Start CDC task */
	Scheduler_SetTaskMode(CDC_Task, TASK_RUN);
 3ae:	61 e0       	ldi	r22, 0x01	; 1
 3b0:	82 e3       	ldi	r24, 0x32	; 50
 3b2:	91 e0       	ldi	r25, 0x01	; 1
}
 3b4:	e9 c0       	rjmp	.+466    	; 0x588 <Scheduler_SetTaskMode>

000003b6 <Event_USB_Disconnect>:
	Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);

}

EVENT_HANDLER(USB_Disconnect)
{
 3b6:	60 e0       	ldi	r22, 0x00	; 0
 3b8:	82 e3       	ldi	r24, 0x32	; 50
 3ba:	91 e0       	ldi	r25, 0x01	; 1
 3bc:	e5 d0       	rcall	.+458    	; 0x588 <Scheduler_SetTaskMode>
	/* Stop running CDC and USB management tasks */
	Scheduler_SetTaskMode(CDC_Task, TASK_STOP);
	Scheduler_SetTaskMode(USB_USBTask, TASK_STOP);
 3be:	60 e0       	ldi	r22, 0x00	; 0
 3c0:	8d ea       	ldi	r24, 0xAD	; 173
 3c2:	95 e0       	ldi	r25, 0x05	; 5

}
 3c4:	e1 c0       	rjmp	.+450    	; 0x588 <Scheduler_SetTaskMode>

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

EVENT_HANDLER(USB_Connect)
{
 3c6:	61 e0       	ldi	r22, 0x01	; 1
 3c8:	8d ea       	ldi	r24, 0xAD	; 173
 3ca:	95 e0       	ldi	r25, 0x05	; 5
	/* Start USB management task */
	Scheduler_SetTaskMode(USB_USBTask, TASK_RUN);

}
 3cc:	dd c0       	rjmp	.+442    	; 0x588 <Scheduler_SetTaskMode>

000003ce <main>:

volatile bool     Transmitting = false;
//volatile bool     ok = false;

int main(void)
{
 3ce:	1f 93       	push	r17
 3d0:	cf 93       	push	r28
 3d2:	df 93       	push	r29
	
	/* Disable watchdog if enabled by bootloader/fuses */
	MCUSR &= ~(1 << WDRF);
 3d4:	84 b7       	in	r24, 0x34	; 52
 3d6:	87 7f       	andi	r24, 0xF7	; 247
 3d8:	84 bf       	out	0x34, r24	; 52
	wdt_disable();
 3da:	88 e1       	ldi	r24, 0x18	; 24
 3dc:	0f b6       	in	r0, 0x3f	; 63
 3de:	f8 94       	cli
 3e0:	80 93 60 00 	sts	0x0060, r24
 3e4:	10 92 60 00 	sts	0x0060, r1
 3e8:	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__ (
 3ea:	91 e0       	ldi	r25, 0x01	; 1
 3ec:	80 e8       	ldi	r24, 0x80	; 128
 3ee:	0f b6       	in	r0, 0x3f	; 63
 3f0:	f8 94       	cli
 3f2:	80 93 61 00 	sts	0x0061, r24
 3f6:	90 93 61 00 	sts	0x0061, r25
 3fa:	0f be       	out	0x3f, r0	; 63
	SetSystemClockPrescaler(1);

	

	/* Ringbuffer Initialization */
	Buffer_Initialize(&Rx_Buffer);
 3fc:	86 e9       	ldi	r24, 0x96	; 150
 3fe:	91 e0       	ldi	r25, 0x01	; 1
 400:	52 d0       	rcall	.+164    	; 0x4a6 <Buffer_Initialize>
	Buffer_Initialize(&Tx_Buffer);
 402:	81 e1       	ldi	r24, 0x11	; 17
 404:	91 e0       	ldi	r25, 0x01	; 1
 406:	4f d0       	rcall	.+158    	; 0x4a6 <Buffer_Initialize>
			#define MAX_DELAYCTR_COUNT                0xFFFF

		/* Inline Functions: */
			static inline void Scheduler_InitScheduler(const uint8_t TotalTasks)
			{
				Scheduler_TotalTasks = TotalTasks;
 408:	12 e0       	ldi	r17, 0x02	; 2
 40a:	10 93 1b 02 	sts	0x021B, r17

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

	/* Initialize USB Subsystem */
	USB_Init();
 40e:	3c d1       	rcall	.+632    	; 0x688 <USB_Init>
 410:	10 93 1b 02 	sts	0x021B, r17
 414:	c0 e0       	ldi	r28, 0x00	; 0
 416:	d1 e0       	ldi	r29, 0x01	; 1
				{
					TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
					while (CurrTask != &Scheduler_TaskList[TotalTasks])
					{
						if (CurrTask->TaskStatus == TASK_RUN)
 418:	8a 81       	ldd	r24, Y+2	; 0x02
 41a:	88 23       	and	r24, r24
 41c:	19 f0       	breq	.+6      	; 0x424 <main+0x56>
						  CurrTask->Task();
 41e:	e8 81       	ld	r30, Y
 420:	f9 81       	ldd	r31, Y+1	; 0x01
 422:	09 95       	icall

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

				for (;;)
				{
					TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
					while (CurrTask != &Scheduler_TaskList[TotalTasks])
 426:	81 e0       	ldi	r24, 0x01	; 1
 428:	c8 30       	cpi	r28, 0x08	; 8
 42a:	d8 07       	cpc	r29, r24
 42c:	a9 f7       	brne	.-22     	; 0x418 <main+0x4a>
 42e:	28 97       	sbiw	r28, 0x08	; 8
 430:	f3 cf       	rjmp	.-26     	; 0x418 <main+0x4a>

00000432 <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)
{
 432:	cf 93       	push	r28
 434:	df 93       	push	r29
 436:	da 01       	movw	r26, r20
 438:	e9 01       	movw	r28, r18
	void*    Address = NULL;
	uint16_t Size    = 0;

	switch (wValue >> 8)
 43a:	29 2f       	mov	r18, r25
 43c:	33 27       	eor	r19, r19
 43e:	22 30       	cpi	r18, 0x02	; 2
 440:	31 05       	cpc	r19, r1
 442:	39 f0       	breq	.+14     	; 0x452 <USB_GetDescriptor+0x20>
 444:	23 30       	cpi	r18, 0x03	; 3
 446:	31 05       	cpc	r19, r1
 448:	49 f0       	breq	.+18     	; 0x45c <USB_GetDescriptor+0x2a>
 44a:	21 30       	cpi	r18, 0x01	; 1
 44c:	31 05       	cpc	r19, r1
 44e:	e9 f4       	brne	.+58     	; 0x48a <USB_GetDescriptor+0x58>
 450:	20 c0       	rjmp	.+64     	; 0x492 <USB_GetDescriptor+0x60>
 452:	e6 e8       	ldi	r30, 0x86	; 134
 454:	f0 e0       	ldi	r31, 0x00	; 0
 456:	83 e4       	ldi	r24, 0x43	; 67
 458:	90 e0       	ldi	r25, 0x00	; 0
 45a:	1f c0       	rjmp	.+62     	; 0x49a <USB_GetDescriptor+0x68>
		case DTYPE_Configuration:
			Address = DESCRIPTOR_ADDRESS(ConfigurationDescriptor);
			Size    = sizeof(USB_Descriptor_Configuration_t);
			break;
		case DTYPE_String:
			switch (wValue & 0xFF)
 45c:	90 70       	andi	r25, 0x00	; 0
 45e:	81 30       	cpi	r24, 0x01	; 1
 460:	91 05       	cpc	r25, r1
 462:	51 f0       	breq	.+20     	; 0x478 <USB_GetDescriptor+0x46>
 464:	81 30       	cpi	r24, 0x01	; 1
 466:	91 05       	cpc	r25, r1
 468:	18 f0       	brcs	.+6      	; 0x470 <USB_GetDescriptor+0x3e>
 46a:	02 97       	sbiw	r24, 0x02	; 2
 46c:	71 f4       	brne	.+28     	; 0x48a <USB_GetDescriptor+0x58>
 46e:	08 c0       	rjmp	.+16     	; 0x480 <USB_GetDescriptor+0x4e>
			{
				case 0x00:
					Address = DESCRIPTOR_ADDRESS(LanguageString);
					Size    = pgm_read_byte(&LanguageString.Header.Size);
 470:	e9 ec       	ldi	r30, 0xC9	; 201
 472:	f0 e0       	ldi	r31, 0x00	; 0
 474:	84 91       	lpm	r24, Z+
 476:	07 c0       	rjmp	.+14     	; 0x486 <USB_GetDescriptor+0x54>
					break;
				case 0x01:
					Address = DESCRIPTOR_ADDRESS(ManufacturerString);
					Size    = pgm_read_byte(&ManufacturerString.Header.Size);
 478:	ed ec       	ldi	r30, 0xCD	; 205
 47a:	f0 e0       	ldi	r31, 0x00	; 0
 47c:	84 91       	lpm	r24, Z+
 47e:	03 c0       	rjmp	.+6      	; 0x486 <USB_GetDescriptor+0x54>
					break;
				case 0x02:
					Address = DESCRIPTOR_ADDRESS(ProductString);
					Size    = pgm_read_byte(&ProductString.Header.Size);
 480:	e7 ee       	ldi	r30, 0xE7	; 231
 482:	f0 e0       	ldi	r31, 0x00	; 0
 484:	84 91       	lpm	r24, Z+
 486:	90 e0       	ldi	r25, 0x00	; 0
 488:	08 c0       	rjmp	.+16     	; 0x49a <USB_GetDescriptor+0x68>
 48a:	80 e0       	ldi	r24, 0x00	; 0

		return true;
	}
		
	return false;
}
 48c:	df 91       	pop	r29
 48e:	cf 91       	pop	r28
 490:	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);
 492:	e4 e7       	ldi	r30, 0x74	; 116
 494:	f0 e0       	ldi	r31, 0x00	; 0
 496:	82 e1       	ldi	r24, 0x12	; 18
 498:	90 e0       	ldi	r25, 0x00	; 0
			break;
	}
	
	if (Address != NULL)
	{
		*DescriptorAddress = Address;
 49a:	ed 93       	st	X+, r30
 49c:	fc 93       	st	X, r31
		*DescriptorSize    = Size;
 49e:	99 83       	std	Y+1, r25	; 0x01
 4a0:	88 83       	st	Y, r24
 4a2:	81 e0       	ldi	r24, 0x01	; 1
 4a4:	f3 cf       	rjmp	.-26     	; 0x48c <USB_GetDescriptor+0x5a>

000004a6 <Buffer_Initialize>:
*/

#include "RingBuff.h"

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

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
 4aa:	f8 94       	cli
	{
		Buffer->InPtr    = (RingBuff_Data_t*)&Buffer->Buffer;
 4ac:	df 01       	movw	r26, r30
 4ae:	a0 58       	subi	r26, 0x80	; 128
 4b0:	bf 4f       	sbci	r27, 0xFF	; 255
 4b2:	11 96       	adiw	r26, 0x01	; 1
 4b4:	fc 93       	st	X, r31
 4b6:	ee 93       	st	-X, r30
		Buffer->OutPtr   = (RingBuff_Data_t*)&Buffer->Buffer;
 4b8:	df 01       	movw	r26, r30
 4ba:	ae 57       	subi	r26, 0x7E	; 126
 4bc:	bf 4f       	sbci	r27, 0xFF	; 255
 4be:	11 96       	adiw	r26, 0x01	; 1
 4c0:	fc 93       	st	X, r31
 4c2:	ee 93       	st	-X, r30
		Buffer->Elements = 0;
 4c4:	ec 57       	subi	r30, 0x7C	; 124
 4c6:	ff 4f       	sbci	r31, 0xFF	; 255
 4c8:	10 82       	st	Z, r1
    (void)__s;
}

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

000004ce <Buffer_StoreElement>:
	}
}

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

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
 4d2:	f8 94       	cli
	{
	#if defined(BUFF_DROPOLD)
		if (Buffer->Elements == BUFF_LENGTH)
 4d4:	fc 01       	movw	r30, r24
 4d6:	ec 57       	subi	r30, 0x7C	; 124
 4d8:	ff 4f       	sbci	r31, 0xFF	; 255
 4da:	80 81       	ld	r24, Z
 4dc:	80 38       	cpi	r24, 0x80	; 128
 4de:	99 f4       	brne	.+38     	; 0x506 <Buffer_StoreElement+0x38>
		{
			Buffer->OutPtr++;
 4e0:	fa 01       	movw	r30, r20
 4e2:	ee 57       	subi	r30, 0x7E	; 126
 4e4:	ff 4f       	sbci	r31, 0xFF	; 255
 4e6:	80 81       	ld	r24, Z
 4e8:	91 81       	ldd	r25, Z+1	; 0x01
 4ea:	01 96       	adiw	r24, 0x01	; 1
 4ec:	91 83       	std	Z+1, r25	; 0x01
 4ee:	80 83       	st	Z, r24
	
			if (Buffer->OutPtr == &Buffer->Buffer[BUFF_LENGTH])
 4f0:	20 81       	ld	r18, Z
 4f2:	31 81       	ldd	r19, Z+1	; 0x01
 4f4:	ca 01       	movw	r24, r20
 4f6:	80 58       	subi	r24, 0x80	; 128
 4f8:	9f 4f       	sbci	r25, 0xFF	; 255
 4fa:	28 17       	cp	r18, r24
 4fc:	39 07       	cpc	r19, r25
 4fe:	31 f4       	brne	.+12     	; 0x50c <Buffer_StoreElement+0x3e>
			  Buffer->OutPtr = (RingBuff_Data_t*)&Buffer->Buffer;
 500:	51 83       	std	Z+1, r21	; 0x01
 502:	40 83       	st	Z, r20
 504:	03 c0       	rjmp	.+6      	; 0x50c <Buffer_StoreElement+0x3e>
		}
		else
		{
			Buffer->Elements++;
 506:	80 81       	ld	r24, Z
 508:	8f 5f       	subi	r24, 0xFF	; 255
 50a:	80 83       	st	Z, r24
		  Buffer->Elements++;
	#elif defined(BUFF_NODROPCHECK)
		  Buffer->Elements++;
	#endif
	
		*(Buffer->InPtr) = Data;
 50c:	da 01       	movw	r26, r20
 50e:	a0 58       	subi	r26, 0x80	; 128
 510:	bf 4f       	sbci	r27, 0xFF	; 255
 512:	ed 91       	ld	r30, X+
 514:	fc 91       	ld	r31, X
 516:	11 97       	sbiw	r26, 0x01	; 1
 518:	60 83       	st	Z, r22
		Buffer->InPtr++;
 51a:	8d 91       	ld	r24, X+
 51c:	9c 91       	ld	r25, X
 51e:	11 97       	sbiw	r26, 0x01	; 1
 520:	01 96       	adiw	r24, 0x01	; 1
 522:	11 96       	adiw	r26, 0x01	; 1
 524:	9c 93       	st	X, r25
 526:	8e 93       	st	-X, r24
	
		if (Buffer->InPtr == &Buffer->Buffer[BUFF_LENGTH])
 528:	ed 91       	ld	r30, X+
 52a:	fc 91       	ld	r31, X
 52c:	11 97       	sbiw	r26, 0x01	; 1
 52e:	ea 17       	cp	r30, r26
 530:	fb 07       	cpc	r31, r27
 532:	11 f4       	brne	.+4      	; 0x538 <Buffer_StoreElement+0x6a>
		  Buffer->InPtr = (RingBuff_Data_t*)&Buffer->Buffer;
 534:	51 83       	std	Z+1, r21	; 0x01
 536:	40 83       	st	Z, r20
    (void)__s;
}

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

0000053c <Buffer_GetElement>:
	}
}

RingBuff_Data_t Buffer_GetElement(RingBuff_t* Buffer)
{
 53c:	ac 01       	movw	r20, r24
	RingBuff_Data_t BuffData;
	
	BUFF_ATOMIC_BLOCK
 53e:	7f b7       	in	r23, 0x3f	; 63
    return 1;
}

static __inline__ uint8_t __iCliRetVal(void)
{
    cli();
 540:	f8 94       	cli
		  return 0;
#elif !defined(BUFF_NOEMPTYCHECK)
	#error No empty buffer check behaviour specified.
#endif

		BuffData = *(Buffer->OutPtr);
 542:	dc 01       	movw	r26, r24
 544:	ae 57       	subi	r26, 0x7E	; 126
 546:	bf 4f       	sbci	r27, 0xFF	; 255
 548:	ed 91       	ld	r30, X+
 54a:	fc 91       	ld	r31, X
 54c:	11 97       	sbiw	r26, 0x01	; 1
 54e:	60 81       	ld	r22, Z
	
		Buffer->OutPtr++;
 550:	8d 91       	ld	r24, X+
 552:	9c 91       	ld	r25, X
 554:	11 97       	sbiw	r26, 0x01	; 1
 556:	01 96       	adiw	r24, 0x01	; 1
 558:	11 96       	adiw	r26, 0x01	; 1
 55a:	9c 93       	st	X, r25
 55c:	8e 93       	st	-X, r24
		Buffer->Elements--;
 55e:	fa 01       	movw	r30, r20
 560:	ec 57       	subi	r30, 0x7C	; 124
 562:	ff 4f       	sbci	r31, 0xFF	; 255
 564:	80 81       	ld	r24, Z
 566:	81 50       	subi	r24, 0x01	; 1
 568:	80 83       	st	Z, r24
	
		if (Buffer->OutPtr == &Buffer->Buffer[BUFF_LENGTH])
 56a:	2d 91       	ld	r18, X+
 56c:	3c 91       	ld	r19, X
 56e:	11 97       	sbiw	r26, 0x01	; 1
 570:	ca 01       	movw	r24, r20
 572:	80 58       	subi	r24, 0x80	; 128
 574:	9f 4f       	sbci	r25, 0xFF	; 255
 576:	28 17       	cp	r18, r24
 578:	39 07       	cpc	r19, r25
 57a:	19 f4       	brne	.+6      	; 0x582 <Buffer_GetElement+0x46>
		  Buffer->OutPtr = (RingBuff_Data_t*)&Buffer->Buffer;
 57c:	11 96       	adiw	r26, 0x01	; 1
 57e:	5c 93       	st	X, r21
 580:	4e 93       	st	-X, r20
    (void)__s;
}

static __inline__ void __iRestore(const  uint8_t *__s)
{
    SREG = *__s;
 582:	7f bf       	out	0x3f, r23	; 63
    __asm__ volatile ("" ::: "memory");
 584:	86 2f       	mov	r24, r22
 586:	08 95       	ret

00000588 <Scheduler_SetTaskMode>:
	
	return false;
}

void Scheduler_SetTaskMode(const TaskPtr_t Task, const bool TaskStatus)
{
 588:	9c 01       	movw	r18, r24
 58a:	e0 e0       	ldi	r30, 0x00	; 0
 58c:	f1 e0       	ldi	r31, 0x01	; 1
 58e:	08 c0       	rjmp	.+16     	; 0x5a0 <Scheduler_SetTaskMode+0x18>
	TaskEntry_t* CurrTask = &Scheduler_TaskList[0];
					
	while (CurrTask != &Scheduler_TaskList[Scheduler_TotalTasks])
	{
		if (CurrTask->Task == Task)
 590:	80 81       	ld	r24, Z
 592:	91 81       	ldd	r25, Z+1	; 0x01
 594:	82 17       	cp	r24, r18
 596:	93 07       	cpc	r25, r19
 598:	11 f4       	brne	.+4      	; 0x59e <Scheduler_SetTaskMode+0x16>
		{
			CurrTask->TaskStatus = TaskStatus;
 59a:	62 83       	std	Z+2, r22	; 0x02
 59c:	08 95       	ret
			break;
		}
		
		CurrTask++;
 59e:	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])
 5a0:	80 91 1b 02 	lds	r24, 0x021B
 5a4:	90 e0       	ldi	r25, 0x00	; 0
 5a6:	88 0f       	add	r24, r24
 5a8:	99 1f       	adc	r25, r25
 5aa:	88 0f       	add	r24, r24
 5ac:	99 1f       	adc	r25, r25
 5ae:	80 50       	subi	r24, 0x00	; 0
 5b0:	9f 4f       	sbci	r25, 0xFF	; 255
 5b2:	e8 17       	cp	r30, r24
 5b4:	f9 07       	cpc	r31, r25
 5b6:	61 f7       	brne	.-40     	; 0x590 <Scheduler_SetTaskMode+0x8>
 5b8:	08 95       	ret

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

void USB_SetupInterface(void)
{
 5ba:	df 93       	push	r29
 5bc:	cf 93       	push	r28
 5be:	00 d0       	rcall	.+0      	; 0x5c0 <USB_SetupInterface+0x6>
 5c0:	00 d0       	rcall	.+0      	; 0x5c2 <USB_SetupInterface+0x8>
 5c2:	cd b7       	in	r28, 0x3d	; 61
 5c4:	de b7       	in	r29, 0x3e	; 62
	USB_INT_DisableAllInterrupts();
 5c6:	dc d2       	rcall	.+1464   	; 0xb80 <USB_INT_DisableAllInterrupts>
	USB_INT_ClearAllInterrupts();
 5c8:	de d2       	rcall	.+1468   	; 0xb86 <USB_INT_ClearAllInterrupts>

	USB_IsConnected         = false;
 5ca:	10 92 22 02 	sts	0x0222, r1
	#if defined(USB_CAN_BE_HOST)
	USB_HostState           = HOST_STATE_Unattached;
	#endif

	#if defined(USB_CAN_BE_DEVICE)
	USB_ConfigurationNumber  = 0;
 5ce:	10 92 20 02 	sts	0x0220, r1
	USB_RemoteWakeupEnabled  = false;
 5d2:	10 92 1f 02 	sts	0x021F, r1
	USB_CurrentlySelfPowered = false;
 5d6:	10 92 1e 02 	sts	0x021E, 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();
 5da:	84 e0       	ldi	r24, 0x04	; 4
 5dc:	89 bd       	out	0x29, r24	; 41
 5de:	89 b5       	in	r24, 0x29	; 41
 5e0:	82 60       	ori	r24, 0x02	; 2
 5e2:	89 bd       	out	0x29, r24	; 41
	#endif

	while (!(USB_PLL_IsReady()));
 5e4:	09 b4       	in	r0, 0x29	; 41
 5e6:	00 fe       	sbrs	r0, 0
 5e8:	fd cf       	rjmp	.-6      	; 0x5e4 <USB_SetupInterface+0x2a>
		
	USB_Interface_Reset();
 5ea:	80 91 d8 00 	lds	r24, 0x00D8
 5ee:	98 2f       	mov	r25, r24
 5f0:	9f 77       	andi	r25, 0x7F	; 127
 5f2:	90 93 d8 00 	sts	0x00D8, r25
 5f6:	80 68       	ori	r24, 0x80	; 128
 5f8:	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();
 5fc:	80 91 63 00 	lds	r24, 0x0063
 600:	8e 7f       	andi	r24, 0xFE	; 254
 602:	80 93 63 00 	sts	0x0063, r24
	
	USB_CLK_Unfreeze();
 606:	80 91 d8 00 	lds	r24, 0x00D8
 60a:	8f 7d       	andi	r24, 0xDF	; 223
 60c:	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)
 610:	9e 01       	movw	r18, r28
 612:	2d 5f       	subi	r18, 0xFD	; 253
 614:	3f 4f       	sbci	r19, 0xFF	; 255
 616:	ae 01       	movw	r20, r28
 618:	4f 5f       	subi	r20, 0xFF	; 255
 61a:	5f 4f       	sbci	r21, 0xFF	; 255
 61c:	60 e0       	ldi	r22, 0x00	; 0
 61e:	80 e0       	ldi	r24, 0x00	; 0
 620:	91 e0       	ldi	r25, 0x01	; 1
 622:	07 df       	rcall	.-498    	; 0x432 <USB_GetDescriptor>
 624:	88 23       	and	r24, r24
 626:	31 f0       	breq	.+12     	; 0x634 <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);
 628:	e9 81       	ldd	r30, Y+1	; 0x01
 62a:	fa 81       	ldd	r31, Y+2	; 0x02
 62c:	37 96       	adiw	r30, 0x07	; 7
 62e:	e4 91       	lpm	r30, Z+
 630:	e0 93 0f 01 	sts	0x010F, r30
		#endif
	}
	#endif

	USB_Attach();
 634:	80 91 e0 00 	lds	r24, 0x00E0
 638:	8e 7f       	andi	r24, 0xFE	; 254
 63a:	80 93 e0 00 	sts	0x00E0, r24
	
	#if defined(USB_DEVICE_ONLY)	
	USB_INT_Enable(USB_INT_SUSPEND);
 63e:	80 91 e2 00 	lds	r24, 0x00E2
 642:	81 60       	ori	r24, 0x01	; 1
 644:	80 93 e2 00 	sts	0x00E2, r24
	USB_INT_Enable(USB_INT_EORSTI);	
 648:	80 91 e2 00 	lds	r24, 0x00E2
 64c:	88 60       	ori	r24, 0x08	; 8
 64e:	80 93 e2 00 	sts	0x00E2, r24
	#endif
	
	#if defined(USB_CAN_BE_BOTH)
	USB_InitTaskPointer();
	#endif
}
 652:	0f 90       	pop	r0
 654:	0f 90       	pop	r0
 656:	0f 90       	pop	r0
 658:	0f 90       	pop	r0
 65a:	cf 91       	pop	r28
 65c:	df 91       	pop	r29
 65e:	08 95       	ret

00000660 <USB_ShutDown>:
	
	sei();
}

void USB_ShutDown(void)
{
 660:	80 91 22 02 	lds	r24, 0x0222
 664:	88 23       	and	r24, r24
 666:	09 f0       	breq	.+2      	; 0x66a <USB_ShutDown+0xa>
	if (USB_IsConnected)
	  RAISE_EVENT(USB_Disconnect);
 668:	a6 de       	rcall	.-692    	; 0x3b6 <Event_USB_Disconnect>

	USB_INT_DisableAllInterrupts();
 66a:	8a d2       	rcall	.+1300   	; 0xb80 <USB_INT_DisableAllInterrupts>
	USB_INT_ClearAllInterrupts();
 66c:	8c d2       	rcall	.+1304   	; 0xb86 <USB_INT_ClearAllInterrupts>

	USB_IsConnected         = false;
 66e:	10 92 22 02 	sts	0x0222, r1
	USB_IsInitialized       = false;
 672:	10 92 21 02 	sts	0x0221, r1
	#if defined(USB_CAN_BE_HOST)
	USB_HostState           = HOST_STATE_Unattached;
	#endif

	#if defined(USB_CAN_BE_DEVICE)
	USB_ConfigurationNumber = 0;
 676:	10 92 20 02 	sts	0x0220, r1
	
	#if !defined(USE_STATIC_OPTIONS)
	USB_Options     = 0;
	#endif

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

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

00000688 <USB_Init>:
			   
               #if !defined(USE_STATIC_OPTIONS)
               const uint8_t Options
               #endif
               )
{
 688:	80 91 21 02 	lds	r24, 0x0221
 68c:	88 23       	and	r24, r24
 68e:	09 f0       	breq	.+2      	; 0x692 <USB_Init+0xa>
	if (USB_IsInitialized)
	  USB_ShutDown();
 690:	e7 df       	rcall	.-50     	; 0x660 <USB_ShutDown>
	#endif

	#if defined(USB_CAN_BE_BOTH)
	USB_InitTaskPointer();
	#else
	USB_IsInitialized = true;
 692:	81 e0       	ldi	r24, 0x01	; 1
 694:	80 93 21 02 	sts	0x0221, 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();
 698:	90 df       	rcall	.-224    	; 0x5ba <USB_SetupInterface>
	  USB_INT_Enable(USB_INT_VBUS);
	else
	  USB_SetupInterface();
	#endif
	
	sei();
 69a:	78 94       	sei
}
 69c:	08 95       	ret

0000069e <Endpoint_ConfigureEndpoint_P>:

void Endpoint_ConfigureEndpoint_P(const uint8_t  EndpointNum,
                                  const uint16_t EndpointSize,
                                  const uint8_t  UECFG0Xdata,
                                  const uint8_t  UECFG1Xdata)
{
 69e:	80 93 e9 00 	sts	0x00E9, r24
	Endpoint_SelectEndpoint(EndpointNum);
	Endpoint_EnableEndpoint();
 6a2:	80 91 eb 00 	lds	r24, 0x00EB
 6a6:	81 60       	ori	r24, 0x01	; 1
 6a8:	80 93 eb 00 	sts	0x00EB, r24
	
	UECFG0X = UECFG0Xdata;
 6ac:	40 93 ec 00 	sts	0x00EC, r20
	UECFG1X = ((UECFG1X & (1 << ALLOC)) | UECFG1Xdata | Endpoint_BytesToEPSizeMask(EndpointSize));
 6b0:	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;
 6b4:	77 70       	andi	r23, 0x07	; 7
			
				if (Bytes <= 8)
 6b6:	69 30       	cpi	r22, 0x09	; 9
 6b8:	71 05       	cpc	r23, r1
 6ba:	10 f4       	brcc	.+4      	; 0x6c0 <Endpoint_ConfigureEndpoint_P+0x22>
 6bc:	80 e0       	ldi	r24, 0x00	; 0
 6be:	0b c0       	rjmp	.+22     	; 0x6d6 <Endpoint_ConfigureEndpoint_P+0x38>
				  return (0 << EPSIZE0);
				else if (Bytes <= 16)
 6c0:	61 31       	cpi	r22, 0x11	; 17
 6c2:	71 05       	cpc	r23, r1
 6c4:	10 f4       	brcc	.+4      	; 0x6ca <Endpoint_ConfigureEndpoint_P+0x2c>
 6c6:	80 e1       	ldi	r24, 0x10	; 16
 6c8:	06 c0       	rjmp	.+12     	; 0x6d6 <Endpoint_ConfigureEndpoint_P+0x38>
				  return (1 << EPSIZE0);
				else if (Bytes <= 32)
 6ca:	61 32       	cpi	r22, 0x21	; 33
 6cc:	71 05       	cpc	r23, r1
 6ce:	10 f0       	brcs	.+4      	; 0x6d4 <Endpoint_ConfigureEndpoint_P+0x36>
 6d0:	80 e3       	ldi	r24, 0x30	; 48
 6d2:	01 c0       	rjmp	.+2      	; 0x6d6 <Endpoint_ConfigureEndpoint_P+0x38>
 6d4:	80 e2       	ldi	r24, 0x20	; 32
 6d6:	92 70       	andi	r25, 0x02	; 2
 6d8:	92 2b       	or	r25, r18
 6da:	89 2b       	or	r24, r25
 6dc:	80 93 ed 00 	sts	0x00ED, r24
	
	Endpoint_AllocateMemory();
 6e0:	80 91 ed 00 	lds	r24, 0x00ED
 6e4:	82 60       	ori	r24, 0x02	; 2
 6e6:	80 93 ed 00 	sts	0x00ED, r24
}
 6ea:	08 95       	ret

000006ec <Endpoint_Write_Control_Stream_LE>:
	
	return ENDPOINT_RWSTREAM_ERROR_NoError;
}

uint8_t Endpoint_Write_Control_Stream_LE(const void* Buffer, uint16_t Length)
{
 6ec:	1f 93       	push	r17
 6ee:	9c 01       	movw	r18, r24
 6f0:	fb 01       	movw	r30, r22
	uint8_t* DataStream = (uint8_t*)Buffer;
	bool     SendZLP    = (!(Length % USB_ControlEndpointSize) || (Length == 0));
 6f2:	10 91 0f 01 	lds	r17, 0x010F
 6f6:	cb 01       	movw	r24, r22
 6f8:	61 2f       	mov	r22, r17
 6fa:	70 e0       	ldi	r23, 0x00	; 0
 6fc:	da d2       	rcall	.+1460   	; 0xcb2 <__udivmodhi4>
 6fe:	89 2b       	or	r24, r25
 700:	21 f0       	breq	.+8      	; 0x70a <Endpoint_Write_Control_Stream_LE+0x1e>
 702:	40 e0       	ldi	r20, 0x00	; 0
 704:	50 e0       	ldi	r21, 0x00	; 0
 706:	30 97       	sbiw	r30, 0x00	; 0
 708:	11 f4       	brne	.+4      	; 0x70e <Endpoint_Write_Control_Stream_LE+0x22>
 70a:	41 e0       	ldi	r20, 0x01	; 1
 70c:	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;
 70e:	d9 01       	movw	r26, r18
 710:	13 c0       	rjmp	.+38     	; 0x738 <Endpoint_Write_Control_Stream_LE+0x4c>
	bool     SendZLP    = (!(Length % USB_ControlEndpointSize) || (Length == 0));
	
	while (Length && !(Endpoint_IsSetupOUTReceived()))
	{
		while (!(Endpoint_IsSetupINReady()));
 712:	80 91 e8 00 	lds	r24, 0x00E8
 716:	80 ff       	sbrs	r24, 0
 718:	fc cf       	rjmp	.-8      	; 0x712 <Endpoint_Write_Control_Stream_LE+0x26>
 71a:	05 c0       	rjmp	.+10     	; 0x726 <Endpoint_Write_Control_Stream_LE+0x3a>
		
		while (Length && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
		{
			Endpoint_Write_Byte(*(DataStream++));
 71c:	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;
 71e:	80 93 f1 00 	sts	0x00F1, r24
			
			Length--;
 722:	31 97       	sbiw	r30, 0x01	; 1
	
	while (Length && !(Endpoint_IsSetupOUTReceived()))
	{
		while (!(Endpoint_IsSetupINReady()));
		
		while (Length && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
 724:	21 f0       	breq	.+8      	; 0x72e <Endpoint_Write_Control_Stream_LE+0x42>
 726:	80 91 f2 00 	lds	r24, 0x00F2
 72a:	81 17       	cp	r24, r17
 72c:	b8 f3       	brcs	.-18     	; 0x71c <Endpoint_Write_Control_Stream_LE+0x30>
			Endpoint_Write_Byte(*(DataStream++));
			
			Length--;
		}
		
		Endpoint_ClearSetupIN();
 72e:	80 91 e8 00 	lds	r24, 0x00E8
 732:	8e 7f       	andi	r24, 0xFE	; 254
 734:	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()))
 738:	30 97       	sbiw	r30, 0x00	; 0
 73a:	21 f0       	breq	.+8      	; 0x744 <Endpoint_Write_Control_Stream_LE+0x58>
 73c:	80 91 e8 00 	lds	r24, 0x00E8
 740:	82 ff       	sbrs	r24, 2
 742:	e7 cf       	rjmp	.-50     	; 0x712 <Endpoint_Write_Control_Stream_LE+0x26>
		}
		
		Endpoint_ClearSetupIN();
	}
	
	if (Endpoint_IsSetupOUTReceived())
 744:	80 91 e8 00 	lds	r24, 0x00E8
 748:	82 ff       	sbrs	r24, 2
 74a:	02 c0       	rjmp	.+4      	; 0x750 <Endpoint_Write_Control_Stream_LE+0x64>
 74c:	81 e0       	ldi	r24, 0x01	; 1
 74e:	10 c0       	rjmp	.+32     	; 0x770 <Endpoint_Write_Control_Stream_LE+0x84>
	  return ENDPOINT_RWCSTREAM_ERROR_HostAborted;
	
	if (SendZLP)
 750:	45 2b       	or	r20, r21
 752:	49 f0       	breq	.+18     	; 0x766 <Endpoint_Write_Control_Stream_LE+0x7a>
	{
		while (!(Endpoint_IsSetupINReady()));
 754:	80 91 e8 00 	lds	r24, 0x00E8
 758:	80 ff       	sbrs	r24, 0
 75a:	fc cf       	rjmp	.-8      	; 0x754 <Endpoint_Write_Control_Stream_LE+0x68>
		Endpoint_ClearSetupIN();
 75c:	80 91 e8 00 	lds	r24, 0x00E8
 760:	8e 7f       	andi	r24, 0xFE	; 254
 762:	80 93 e8 00 	sts	0x00E8, r24
	}
	
	while (!(Endpoint_IsSetupOUTReceived()));
 766:	80 91 e8 00 	lds	r24, 0x00E8
 76a:	82 ff       	sbrs	r24, 2
 76c:	fc cf       	rjmp	.-8      	; 0x766 <Endpoint_Write_Control_Stream_LE+0x7a>
 76e:	80 e0       	ldi	r24, 0x00	; 0

	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}
 770:	1f 91       	pop	r17
 772:	08 95       	ret

00000774 <Endpoint_Read_Control_Stream_LE>:

	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}

uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length)
{
 774:	fc 01       	movw	r30, r24
 776:	14 c0       	rjmp	.+40     	; 0x7a0 <Endpoint_Read_Control_Stream_LE+0x2c>
	uint8_t* DataStream = (uint8_t*)Buffer;
	
	while (Length)
	{
		while (!(Endpoint_IsSetupOUTReceived()));
 778:	80 91 e8 00 	lds	r24, 0x00E8
 77c:	82 ff       	sbrs	r24, 2
 77e:	fc cf       	rjmp	.-8      	; 0x778 <Endpoint_Read_Control_Stream_LE+0x4>
 780:	06 c0       	rjmp	.+12     	; 0x78e <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;
 782:	80 91 f1 00 	lds	r24, 0x00F1
		
		while (Length && Endpoint_BytesInEndpoint())
		{
			*(DataStream++) = Endpoint_Read_Byte();
 786:	81 93       	st	Z+, r24
			
			Length--;
 788:	61 50       	subi	r22, 0x01	; 1
 78a:	70 40       	sbci	r23, 0x00	; 0
	
	while (Length)
	{
		while (!(Endpoint_IsSetupOUTReceived()));
		
		while (Length && Endpoint_BytesInEndpoint())
 78c:	21 f0       	breq	.+8      	; 0x796 <Endpoint_Read_Control_Stream_LE+0x22>
 78e:	80 91 f2 00 	lds	r24, 0x00F2
 792:	88 23       	and	r24, r24
 794:	b1 f7       	brne	.-20     	; 0x782 <Endpoint_Read_Control_Stream_LE+0xe>
			*(DataStream++) = Endpoint_Read_Byte();
			
			Length--;
		}
		
		Endpoint_ClearSetupOUT();
 796:	80 91 e8 00 	lds	r24, 0x00E8
 79a:	8b 7f       	andi	r24, 0xFB	; 251
 79c:	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)
 7a0:	61 15       	cp	r22, r1
 7a2:	71 05       	cpc	r23, r1
 7a4:	49 f7       	brne	.-46     	; 0x778 <Endpoint_Read_Control_Stream_LE+0x4>
		}
		
		Endpoint_ClearSetupOUT();
	}
	
	while (!(Endpoint_IsSetupINReady()));
 7a6:	80 91 e8 00 	lds	r24, 0x00E8
 7aa:	80 ff       	sbrs	r24, 0
 7ac:	fc cf       	rjmp	.-8      	; 0x7a6 <Endpoint_Read_Control_Stream_LE+0x32>
	
	return ENDPOINT_RWCSTREAM_ERROR_NoError;
}
 7ae:	80 e0       	ldi	r24, 0x00	; 0
 7b0:	08 95       	ret

000007b2 <USB_Device_ProcessControlPacket>:
uint8_t USB_ConfigurationNumber;
bool    USB_RemoteWakeupEnabled;
bool    USB_CurrentlySelfPowered;

void USB_Device_ProcessControlPacket(void)
{
 7b2:	ff 92       	push	r15
 7b4:	0f 93       	push	r16
 7b6:	1f 93       	push	r17
 7b8:	df 93       	push	r29
 7ba:	cf 93       	push	r28
 7bc:	cd b7       	in	r28, 0x3d	; 61
 7be:	de b7       	in	r29, 0x3e	; 62
 7c0:	28 97       	sbiw	r28, 0x08	; 8
 7c2:	0f b6       	in	r0, 0x3f	; 63
 7c4:	f8 94       	cli
 7c6:	de bf       	out	0x3e, r29	; 62
 7c8:	0f be       	out	0x3f, r0	; 63
 7ca:	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;
 7cc:	60 91 f1 00 	lds	r22, 0x00F1
	uint8_t bmRequestType  = Endpoint_Read_Byte();
	uint8_t bRequest       = Endpoint_Read_Byte();
	bool    RequestHandled = false;
	
	switch (bRequest)
 7d0:	40 91 f1 00 	lds	r20, 0x00F1
 7d4:	45 30       	cpi	r20, 0x05	; 5
 7d6:	09 f4       	brne	.+2      	; 0x7da <USB_Device_ProcessControlPacket+0x28>
 7d8:	cb c0       	rjmp	.+406    	; 0x970 <USB_Device_ProcessControlPacket+0x1be>
 7da:	46 30       	cpi	r20, 0x06	; 6
 7dc:	48 f4       	brcc	.+18     	; 0x7f0 <USB_Device_ProcessControlPacket+0x3e>
 7de:	41 30       	cpi	r20, 0x01	; 1
 7e0:	09 f4       	brne	.+2      	; 0x7e4 <USB_Device_ProcessControlPacket+0x32>
 7e2:	74 c0       	rjmp	.+232    	; 0x8cc <USB_Device_ProcessControlPacket+0x11a>
 7e4:	41 30       	cpi	r20, 0x01	; 1
 7e6:	70 f0       	brcs	.+28     	; 0x804 <USB_Device_ProcessControlPacket+0x52>
 7e8:	43 30       	cpi	r20, 0x03	; 3
 7ea:	09 f0       	breq	.+2      	; 0x7ee <USB_Device_ProcessControlPacket+0x3c>
 7ec:	9a c1       	rjmp	.+820    	; 0xb22 <USB_Device_ProcessControlPacket+0x370>
 7ee:	6e c0       	rjmp	.+220    	; 0x8cc <USB_Device_ProcessControlPacket+0x11a>
 7f0:	48 30       	cpi	r20, 0x08	; 8
 7f2:	09 f4       	brne	.+2      	; 0x7f6 <USB_Device_ProcessControlPacket+0x44>
 7f4:	48 c1       	rjmp	.+656    	; 0xa86 <USB_Device_ProcessControlPacket+0x2d4>
 7f6:	49 30       	cpi	r20, 0x09	; 9
 7f8:	09 f4       	brne	.+2      	; 0x7fc <USB_Device_ProcessControlPacket+0x4a>
 7fa:	60 c1       	rjmp	.+704    	; 0xabc <USB_Device_ProcessControlPacket+0x30a>
 7fc:	46 30       	cpi	r20, 0x06	; 6
 7fe:	09 f0       	breq	.+2      	; 0x802 <USB_Device_ProcessControlPacket+0x50>
 800:	90 c1       	rjmp	.+800    	; 0xb22 <USB_Device_ProcessControlPacket+0x370>
 802:	d6 c0       	rjmp	.+428    	; 0x9b0 <USB_Device_ProcessControlPacket+0x1fe>
	{
		case REQ_GetStatus:
			if (((bmRequestType & (CONTROL_REQTYPE_DIRECTION | CONTROL_REQTYPE_TYPE)) ==
 804:	26 2f       	mov	r18, r22
 806:	30 e0       	ldi	r19, 0x00	; 0
 808:	c9 01       	movw	r24, r18
 80a:	80 7e       	andi	r24, 0xE0	; 224
 80c:	90 70       	andi	r25, 0x00	; 0
 80e:	80 38       	cpi	r24, 0x80	; 128
 810:	91 05       	cpc	r25, r1
 812:	09 f0       	breq	.+2      	; 0x816 <USB_Device_ProcessControlPacket+0x64>
 814:	86 c1       	rjmp	.+780    	; 0xb22 <USB_Device_ProcessControlPacket+0x370>
 816:	c9 01       	movw	r24, r18
 818:	8f 71       	andi	r24, 0x1F	; 31
 81a:	90 70       	andi	r25, 0x00	; 0
 81c:	83 30       	cpi	r24, 0x03	; 3
 81e:	91 05       	cpc	r25, r1
 820:	09 f4       	brne	.+2      	; 0x824 <USB_Device_ProcessControlPacket+0x72>
 822:	7f c1       	rjmp	.+766    	; 0xb22 <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;
 824:	20 91 f1 00 	lds	r18, 0x00F1
				Dummy = UEDATX;
 828:	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;
 82c:	20 91 f1 00 	lds	r18, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
 830:	40 91 f1 00 	lds	r20, 0x00F1

	Endpoint_Discard_Word();

	uint16_t wIndex = Endpoint_Read_Word_LE();
	
	switch (bmRequestType & CONTROL_REQTYPE_RECIPIENT)
 834:	81 30       	cpi	r24, 0x01	; 1
 836:	91 05       	cpc	r25, r1
 838:	31 f0       	breq	.+12     	; 0x846 <USB_Device_ProcessControlPacket+0x94>
 83a:	82 30       	cpi	r24, 0x02	; 2
 83c:	91 05       	cpc	r25, r1
 83e:	f9 f0       	breq	.+62     	; 0x87e <USB_Device_ProcessControlPacket+0xcc>
 840:	89 2b       	or	r24, r25
 842:	21 f0       	breq	.+8      	; 0x84c <USB_Device_ProcessControlPacket+0x9a>
 844:	70 c1       	rjmp	.+736    	; 0xb26 <USB_Device_ProcessControlPacket+0x374>
 846:	20 e0       	ldi	r18, 0x00	; 0
 848:	30 e0       	ldi	r19, 0x00	; 0
 84a:	2d c0       	rjmp	.+90     	; 0x8a6 <USB_Device_ProcessControlPacket+0xf4>
	{
		case REQREC_DEVICE:
			if (USB_GetDescriptor(((DTYPE_Configuration << 8) | USB_ConfigurationNumber), 0,
 84c:	80 91 20 02 	lds	r24, 0x0220
 850:	90 e0       	ldi	r25, 0x00	; 0
 852:	9e 01       	movw	r18, r28
 854:	29 5f       	subi	r18, 0xF9	; 249
 856:	3f 4f       	sbci	r19, 0xFF	; 255
 858:	ae 01       	movw	r20, r28
 85a:	4f 5f       	subi	r20, 0xFF	; 255
 85c:	5f 4f       	sbci	r21, 0xFF	; 255
 85e:	60 e0       	ldi	r22, 0x00	; 0
 860:	92 60       	ori	r25, 0x02	; 2
 862:	e7 dd       	rcall	.-1074   	; 0x432 <USB_GetDescriptor>
 864:	88 23       	and	r24, r24
 866:	09 f4       	brne	.+2      	; 0x86a <USB_Device_ProcessControlPacket+0xb8>
 868:	5e c1       	rjmp	.+700    	; 0xb26 <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);
 86a:	80 91 1e 02 	lds	r24, 0x021E
 86e:	28 2f       	mov	r18, r24
 870:	30 e0       	ldi	r19, 0x00	; 0
#endif

			if (USB_CurrentlySelfPowered)
			  CurrentStatus |= FEATURE_SELFPOWERED_ENABLED;
			
			if (USB_RemoteWakeupEnabled)
 872:	80 91 1f 02 	lds	r24, 0x021F
 876:	88 23       	and	r24, r24
 878:	b1 f0       	breq	.+44     	; 0x8a6 <USB_Device_ProcessControlPacket+0xf4>
			  CurrentStatus |= FEATURE_REMOTE_WAKEUP_ENABLED;
 87a:	22 60       	ori	r18, 0x02	; 2
 87c:	14 c0       	rjmp	.+40     	; 0x8a6 <USB_Device_ProcessControlPacket+0xf4>
		case REQREC_INTERFACE:
			// No bits set, all bits currently reserved
				
			break;
		case REQREC_ENDPOINT:
			Endpoint_SelectEndpoint(wIndex);
 87e:	94 2f       	mov	r25, r20
 880:	80 e0       	ldi	r24, 0x00	; 0
 882:	30 e0       	ldi	r19, 0x00	; 0
 884:	82 2b       	or	r24, r18
 886:	93 2b       	or	r25, r19
 888:	80 93 e9 00 	sts	0x00E9, r24

			CurrentStatus = Endpoint_IsStalled();
 88c:	80 91 eb 00 	lds	r24, 0x00EB
 890:	28 2f       	mov	r18, r24
 892:	30 e0       	ldi	r19, 0x00	; 0
 894:	85 e0       	ldi	r24, 0x05	; 5
 896:	36 95       	lsr	r19
 898:	27 95       	ror	r18
 89a:	8a 95       	dec	r24
 89c:	e1 f7       	brne	.-8      	; 0x896 <USB_Device_ProcessControlPacket+0xe4>
 89e:	21 70       	andi	r18, 0x01	; 1
 8a0:	30 70       	andi	r19, 0x00	; 0

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

	Endpoint_ClearSetupIN();
 8b8:	80 91 e8 00 	lds	r24, 0x00E8
 8bc:	8e 7f       	andi	r24, 0xFE	; 254
 8be:	80 93 e8 00 	sts	0x00E8, r24
	
	while (!(Endpoint_IsSetupOUTReceived()));
 8c2:	80 91 e8 00 	lds	r24, 0x00E8
 8c6:	82 ff       	sbrs	r24, 2
 8c8:	fc cf       	rjmp	.-8      	; 0x8c2 <USB_Device_ProcessControlPacket+0x110>
 8ca:	f2 c0       	rjmp	.+484    	; 0xab0 <USB_Device_ProcessControlPacket+0x2fe>
			}

			break;
		case REQ_ClearFeature:
		case REQ_SetFeature:
			if (((bmRequestType & (CONTROL_REQTYPE_DIRECTION | CONTROL_REQTYPE_TYPE)) ==
 8cc:	26 2f       	mov	r18, r22
 8ce:	30 e0       	ldi	r19, 0x00	; 0
 8d0:	86 2f       	mov	r24, r22
 8d2:	80 7e       	andi	r24, 0xE0	; 224
 8d4:	09 f0       	breq	.+2      	; 0x8d8 <USB_Device_ProcessControlPacket+0x126>
 8d6:	25 c1       	rjmp	.+586    	; 0xb22 <USB_Device_ProcessControlPacket+0x370>
 8d8:	c9 01       	movw	r24, r18
 8da:	8f 71       	andi	r24, 0x1F	; 31
 8dc:	90 70       	andi	r25, 0x00	; 0
 8de:	83 30       	cpi	r24, 0x03	; 3
 8e0:	91 05       	cpc	r25, r1
 8e2:	09 f4       	brne	.+2      	; 0x8e6 <USB_Device_ProcessControlPacket+0x134>
 8e4:	1e c1       	rjmp	.+572    	; 0xb22 <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;
 8e6:	20 91 f1 00 	lds	r18, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
 8ea:	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;
 8ee:	70 91 f1 00 	lds	r23, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
 8f2:	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)
 8f6:	02 97       	sbiw	r24, 0x02	; 2
 8f8:	09 f0       	breq	.+2      	; 0x8fc <USB_Device_ProcessControlPacket+0x14a>
 8fa:	15 c1       	rjmp	.+554    	; 0xb26 <USB_Device_ProcessControlPacket+0x374>
	{
		case REQREC_ENDPOINT:
			if (wValue == FEATURE_ENDPOINT_HALT)
 8fc:	95 2f       	mov	r25, r21
 8fe:	80 e0       	ldi	r24, 0x00	; 0
 900:	30 e0       	ldi	r19, 0x00	; 0
 902:	82 2b       	or	r24, r18
 904:	93 2b       	or	r25, r19
 906:	89 2b       	or	r24, r25
 908:	09 f0       	breq	.+2      	; 0x90c <USB_Device_ProcessControlPacket+0x15a>
 90a:	0d c1       	rjmp	.+538    	; 0xb26 <USB_Device_ProcessControlPacket+0x374>
			{
				uint8_t EndpointIndex = (wIndex & ENDPOINT_EPNUM_MASK);
 90c:	80 e0       	ldi	r24, 0x00	; 0
 90e:	27 2f       	mov	r18, r23
 910:	28 2b       	or	r18, r24
 912:	27 70       	andi	r18, 0x07	; 7
				
				if (EndpointIndex != ENDPOINT_CONTROLEP)
 914:	09 f4       	brne	.+2      	; 0x918 <USB_Device_ProcessControlPacket+0x166>
 916:	07 c1       	rjmp	.+526    	; 0xb26 <USB_Device_ProcessControlPacket+0x374>
				{
					Endpoint_SelectEndpoint(EndpointIndex);
 918:	20 93 e9 00 	sts	0x00E9, r18

					if (Endpoint_IsEnabled())
 91c:	80 91 eb 00 	lds	r24, 0x00EB
 920:	80 ff       	sbrs	r24, 0
 922:	1b c0       	rjmp	.+54     	; 0x95a <USB_Device_ProcessControlPacket+0x1a8>
					{				
						if (bRequest == REQ_ClearFeature)
 924:	41 30       	cpi	r20, 0x01	; 1
 926:	a1 f4       	brne	.+40     	; 0x950 <USB_Device_ProcessControlPacket+0x19e>
						{
							Endpoint_ClearStall();
 928:	80 91 eb 00 	lds	r24, 0x00EB
 92c:	80 61       	ori	r24, 0x10	; 16
 92e:	80 93 eb 00 	sts	0x00EB, r24
							Endpoint_ResetFIFO(EndpointIndex);
 932:	81 e0       	ldi	r24, 0x01	; 1
 934:	90 e0       	ldi	r25, 0x00	; 0
 936:	02 c0       	rjmp	.+4      	; 0x93c <USB_Device_ProcessControlPacket+0x18a>
 938:	88 0f       	add	r24, r24
 93a:	99 1f       	adc	r25, r25
 93c:	2a 95       	dec	r18
 93e:	e2 f7       	brpl	.-8      	; 0x938 <USB_Device_ProcessControlPacket+0x186>
 940:	80 93 ea 00 	sts	0x00EA, r24
 944:	10 92 ea 00 	sts	0x00EA, r1
							Endpoint_ResetDataToggle();
 948:	80 91 eb 00 	lds	r24, 0x00EB
 94c:	88 60       	ori	r24, 0x08	; 8
 94e:	03 c0       	rjmp	.+6      	; 0x956 <USB_Device_ProcessControlPacket+0x1a4>
						}
						else
						{
							Endpoint_StallTransaction();						
 950:	80 91 eb 00 	lds	r24, 0x00EB
 954:	80 62       	ori	r24, 0x20	; 32
 956:	80 93 eb 00 	sts	0x00EB, r24
						}
					}

					Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
 95a:	10 92 e9 00 	sts	0x00E9, r1
					Endpoint_ClearSetupReceived();
 95e:	80 91 e8 00 	lds	r24, 0x00E8
 962:	87 7f       	andi	r24, 0xF7	; 247
 964:	80 93 e8 00 	sts	0x00E8, r24
					Endpoint_ClearSetupIN();
 968:	80 91 e8 00 	lds	r24, 0x00E8
 96c:	8e 7f       	andi	r24, 0xFE	; 254
 96e:	a3 c0       	rjmp	.+326    	; 0xab6 <USB_Device_ProcessControlPacket+0x304>
				RequestHandled = true;
			}

			break;
		case REQ_SetAddress:
			if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE))
 970:	66 23       	and	r22, r22
 972:	09 f0       	breq	.+2      	; 0x976 <USB_Device_ProcessControlPacket+0x1c4>
 974:	d6 c0       	rjmp	.+428    	; 0xb22 <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;
 976:	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));
 97a:	80 91 e3 00 	lds	r24, 0x00E3
 97e:	9f 77       	andi	r25, 0x7F	; 127
 980:	80 78       	andi	r24, 0x80	; 128
 982:	98 2b       	or	r25, r24
 984:	90 93 e3 00 	sts	0x00E3, r25

	Endpoint_ClearSetupReceived();
 988:	80 91 e8 00 	lds	r24, 0x00E8
 98c:	87 7f       	andi	r24, 0xF7	; 247
 98e:	80 93 e8 00 	sts	0x00E8, r24

	Endpoint_ClearSetupIN();
 992:	80 91 e8 00 	lds	r24, 0x00E8
 996:	8e 7f       	andi	r24, 0xFE	; 254
 998:	80 93 e8 00 	sts	0x00E8, r24
	while (!(Endpoint_IsSetupINReady()));
 99c:	80 91 e8 00 	lds	r24, 0x00E8
 9a0:	80 ff       	sbrs	r24, 0
 9a2:	fc cf       	rjmp	.-8      	; 0x99c <USB_Device_ProcessControlPacket+0x1ea>
	
	UDADDR |= (1 << ADDEN);
 9a4:	80 91 e3 00 	lds	r24, 0x00E3
 9a8:	80 68       	ori	r24, 0x80	; 128
 9aa:	80 93 e3 00 	sts	0x00E3, r24
 9ae:	bb c0       	rjmp	.+374    	; 0xb26 <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;
 9b0:	e0 91 f1 00 	lds	r30, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
 9b4:	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;
 9b8:	80 91 f1 00 	lds	r24, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
 9bc:	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;
 9c0:	00 91 f1 00 	lds	r16, 0x00F1
				Data |= (((uint16_t)UEDATX) << 8);
 9c4:	10 91 f1 00 	lds	r17, 0x00F1
	void*    DescriptorPointer;
	uint16_t DescriptorSize;
	
	bool     SendZLP;
	
	if (!(USB_GetDescriptor(wValue, wIndex, &DescriptorPointer, &DescriptorSize)))
 9c8:	72 2f       	mov	r23, r18
 9ca:	60 e0       	ldi	r22, 0x00	; 0
 9cc:	90 e0       	ldi	r25, 0x00	; 0
 9ce:	68 2b       	or	r22, r24
 9d0:	79 2b       	or	r23, r25
 9d2:	93 2f       	mov	r25, r19
 9d4:	80 e0       	ldi	r24, 0x00	; 0
 9d6:	f0 e0       	ldi	r31, 0x00	; 0
 9d8:	9e 01       	movw	r18, r28
 9da:	29 5f       	subi	r18, 0xF9	; 249
 9dc:	3f 4f       	sbci	r19, 0xFF	; 255
 9de:	ae 01       	movw	r20, r28
 9e0:	4d 5f       	subi	r20, 0xFD	; 253
 9e2:	5f 4f       	sbci	r21, 0xFF	; 255
 9e4:	8e 2b       	or	r24, r30
 9e6:	9f 2b       	or	r25, r31
 9e8:	24 dd       	rcall	.-1464   	; 0x432 <USB_GetDescriptor>
 9ea:	88 23       	and	r24, r24
 9ec:	09 f4       	brne	.+2      	; 0x9f0 <USB_Device_ProcessControlPacket+0x23e>
 9ee:	9b c0       	rjmp	.+310    	; 0xb26 <USB_Device_ProcessControlPacket+0x374>
	  return;
	
	Endpoint_ClearSetupReceived();
 9f0:	80 91 e8 00 	lds	r24, 0x00E8
 9f4:	87 7f       	andi	r24, 0xF7	; 247
 9f6:	80 93 e8 00 	sts	0x00E8, r24
 9fa:	91 2f       	mov	r25, r17
 9fc:	80 e0       	ldi	r24, 0x00	; 0
 9fe:	40 2f       	mov	r20, r16
 a00:	50 e0       	ldi	r21, 0x00	; 0
 a02:	2f 81       	ldd	r18, Y+7	; 0x07
 a04:	38 85       	ldd	r19, Y+8	; 0x08
 a06:	48 2b       	or	r20, r24
 a08:	59 2b       	or	r21, r25
 a0a:	24 17       	cp	r18, r20
 a0c:	35 07       	cpc	r19, r21
 a0e:	08 f4       	brcc	.+2      	; 0xa12 <USB_Device_ProcessControlPacket+0x260>
 a10:	a9 01       	movw	r20, r18
	
	if (wLength > DescriptorSize)
	  wLength = DescriptorSize;
	  
	SendZLP = !(wLength % USB_ControlEndpointSize);
 a12:	60 91 0f 01 	lds	r22, 0x010F
 a16:	ab 81       	ldd	r26, Y+3	; 0x03
 a18:	bc 81       	ldd	r27, Y+4	; 0x04
 a1a:	9a 01       	movw	r18, r20
 a1c:	16 c0       	rjmp	.+44     	; 0xa4a <USB_Device_ProcessControlPacket+0x298>
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
	{
		while (!(Endpoint_IsSetupINReady()));
 a1e:	80 91 e8 00 	lds	r24, 0x00E8
 a22:	80 ff       	sbrs	r24, 0
 a24:	fc cf       	rjmp	.-8      	; 0xa1e <USB_Device_ProcessControlPacket+0x26c>
 a26:	08 c0       	rjmp	.+16     	; 0xa38 <USB_Device_ProcessControlPacket+0x286>
 a28:	fd 01       	movw	r30, r26
 a2a:	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++));
 a2c:	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;
 a2e:	e0 93 f1 00 	sts	0x00F1, r30
			#endif
			
			wLength--;
 a32:	21 50       	subi	r18, 0x01	; 1
 a34:	30 40       	sbci	r19, 0x00	; 0
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
	{
		while (!(Endpoint_IsSetupINReady()));
		
		while (wLength && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
 a36:	21 f0       	breq	.+8      	; 0xa40 <USB_Device_ProcessControlPacket+0x28e>
 a38:	80 91 f2 00 	lds	r24, 0x00F2
 a3c:	86 17       	cp	r24, r22
 a3e:	a0 f3       	brcs	.-24     	; 0xa28 <USB_Device_ProcessControlPacket+0x276>
			#endif
			
			wLength--;
		}
		
		Endpoint_ClearSetupIN();
 a40:	80 91 e8 00 	lds	r24, 0x00E8
 a44:	8e 7f       	andi	r24, 0xFE	; 254
 a46:	80 93 e8 00 	sts	0x00E8, r24
	if (wLength > DescriptorSize)
	  wLength = DescriptorSize;
	  
	SendZLP = !(wLength % USB_ControlEndpointSize);
	
	while (wLength && (!(Endpoint_IsSetupOUTReceived())))
 a4a:	21 15       	cp	r18, r1
 a4c:	31 05       	cpc	r19, r1
 a4e:	21 f0       	breq	.+8      	; 0xa58 <USB_Device_ProcessControlPacket+0x2a6>
 a50:	80 91 e8 00 	lds	r24, 0x00E8
 a54:	82 ff       	sbrs	r24, 2
 a56:	e3 cf       	rjmp	.-58     	; 0xa1e <USB_Device_ProcessControlPacket+0x26c>
		}
		
		Endpoint_ClearSetupIN();
	}
	
	if (Endpoint_IsSetupOUTReceived())
 a58:	80 91 e8 00 	lds	r24, 0x00E8
 a5c:	82 fd       	sbrc	r24, 2
 a5e:	28 c0       	rjmp	.+80     	; 0xab0 <USB_Device_ProcessControlPacket+0x2fe>
	{
		Endpoint_ClearSetupOUT();
		return;
	}
	
	if (SendZLP)
 a60:	ca 01       	movw	r24, r20
 a62:	70 e0       	ldi	r23, 0x00	; 0
 a64:	26 d1       	rcall	.+588    	; 0xcb2 <__udivmodhi4>
 a66:	89 2b       	or	r24, r25
 a68:	49 f4       	brne	.+18     	; 0xa7c <USB_Device_ProcessControlPacket+0x2ca>
	{
		while (!(Endpoint_IsSetupINReady()));
 a6a:	80 91 e8 00 	lds	r24, 0x00E8
 a6e:	80 ff       	sbrs	r24, 0
 a70:	fc cf       	rjmp	.-8      	; 0xa6a <USB_Device_ProcessControlPacket+0x2b8>
		Endpoint_ClearSetupIN();
 a72:	80 91 e8 00 	lds	r24, 0x00E8
 a76:	8e 7f       	andi	r24, 0xFE	; 254
 a78:	80 93 e8 00 	sts	0x00E8, r24
	}

	while (!(Endpoint_IsSetupOUTReceived()));
 a7c:	80 91 e8 00 	lds	r24, 0x00E8
 a80:	82 ff       	sbrs	r24, 2
 a82:	fc cf       	rjmp	.-8      	; 0xa7c <USB_Device_ProcessControlPacket+0x2ca>
 a84:	15 c0       	rjmp	.+42     	; 0xab0 <USB_Device_ProcessControlPacket+0x2fe>
			USB_Device_GetDescriptor();
			RequestHandled = true;
			
			break;
		case REQ_GetConfiguration:
			if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE))
 a86:	60 38       	cpi	r22, 0x80	; 128
 a88:	09 f0       	breq	.+2      	; 0xa8c <USB_Device_ProcessControlPacket+0x2da>
 a8a:	4b c0       	rjmp	.+150    	; 0xb22 <USB_Device_ProcessControlPacket+0x370>
	RAISE_EVENT(USB_ConfigurationChanged);
}

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

	Endpoint_Write_Byte(USB_ConfigurationNumber);
 a96:	80 91 20 02 	lds	r24, 0x0220
 a9a:	80 93 f1 00 	sts	0x00F1, r24
	
	Endpoint_ClearSetupIN();
 a9e:	80 91 e8 00 	lds	r24, 0x00E8
 aa2:	8e 7f       	andi	r24, 0xFE	; 254
 aa4:	80 93 e8 00 	sts	0x00E8, r24

	while (!(Endpoint_IsSetupOUTReceived()));
 aa8:	80 91 e8 00 	lds	r24, 0x00E8
 aac:	82 ff       	sbrs	r24, 2
 aae:	fc cf       	rjmp	.-8      	; 0xaa8 <USB_Device_ProcessControlPacket+0x2f6>
	Endpoint_ClearSetupOUT();
 ab0:	80 91 e8 00 	lds	r24, 0x00E8
 ab4:	8b 7f       	andi	r24, 0xFB	; 251
 ab6:	80 93 e8 00 	sts	0x00E8, r24
 aba:	35 c0       	rjmp	.+106    	; 0xb26 <USB_Device_ProcessControlPacket+0x374>
				RequestHandled = true;
			}

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

static void USB_Device_SetConfiguration(void)
{
	uint16_t                 wValue               = Endpoint_Read_Word_LE();
	bool                     NotAlreadyConfigured = !(USB_ConfigurationNumber);
 ac8:	f0 90 20 02 	lds	r15, 0x0220
	USB_Descriptor_Device_t* DevDescriptorPtr;
	uint16_t                 DevDescriptorSize;

	if ((USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DevDescriptorPtr, &DevDescriptorSize) == false) ||
 acc:	9e 01       	movw	r18, r28
 ace:	29 5f       	subi	r18, 0xF9	; 249
 ad0:	3f 4f       	sbci	r19, 0xFF	; 255
 ad2:	ae 01       	movw	r20, r28
 ad4:	4b 5f       	subi	r20, 0xFB	; 251
 ad6:	5f 4f       	sbci	r21, 0xFF	; 255
 ad8:	80 e0       	ldi	r24, 0x00	; 0
 ada:	91 e0       	ldi	r25, 0x01	; 1
 adc:	aa dc       	rcall	.-1708   	; 0x432 <USB_GetDescriptor>
 ade:	88 23       	and	r24, r24
 ae0:	11 f1       	breq	.+68     	; 0xb26 <USB_Device_ProcessControlPacket+0x374>
 ae2:	91 2f       	mov	r25, r17
 ae4:	80 e0       	ldi	r24, 0x00	; 0
 ae6:	20 2f       	mov	r18, r16
 ae8:	30 e0       	ldi	r19, 0x00	; 0
 aea:	28 2b       	or	r18, r24
 aec:	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)))
 aee:	ed 81       	ldd	r30, Y+5	; 0x05
 af0:	fe 81       	ldd	r31, Y+6	; 0x06
 af2:	71 96       	adiw	r30, 0x11	; 17
 af4:	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) ||
 af6:	8e 2f       	mov	r24, r30
 af8:	90 e0       	ldi	r25, 0x00	; 0
 afa:	82 17       	cp	r24, r18
 afc:	93 07       	cpc	r25, r19
 afe:	98 f0       	brcs	.+38     	; 0xb26 <USB_Device_ProcessControlPacket+0x374>
#endif
	{
		return;
	}
	
	Endpoint_ClearSetupReceived();
 b00:	80 91 e8 00 	lds	r24, 0x00E8
 b04:	87 7f       	andi	r24, 0xF7	; 247
 b06:	80 93 e8 00 	sts	0x00E8, r24

	USB_ConfigurationNumber = wValue;
 b0a:	20 93 20 02 	sts	0x0220, r18

	Endpoint_ClearSetupIN();
 b0e:	80 91 e8 00 	lds	r24, 0x00E8
 b12:	8e 7f       	andi	r24, 0xFE	; 254
 b14:	80 93 e8 00 	sts	0x00E8, r24

	if (NotAlreadyConfigured)
 b18:	ff 20       	and	r15, r15
 b1a:	09 f4       	brne	.+2      	; 0xb1e <USB_Device_ProcessControlPacket+0x36c>
	  RAISE_EVENT(USB_DeviceEnumerationComplete);
 b1c:	c9 d0       	rcall	.+402    	; 0xcb0 <Event_USB_DeviceEnumerationComplete>

	RAISE_EVENT(USB_ConfigurationChanged);
 b1e:	35 dc       	rcall	.-1942   	; 0x38a <Event_USB_ConfigurationChanged>
 b20:	02 c0       	rjmp	.+4      	; 0xb26 <USB_Device_ProcessControlPacket+0x374>

			break;
	}

	if (!(RequestHandled))
	  RAISE_EVENT(USB_UnhandledControlPacket, bRequest, bmRequestType);
 b22:	84 2f       	mov	r24, r20
 b24:	fa db       	rcall	.-2060   	; 0x31a <Event_USB_UnhandledControlPacket>
	  
	if (Endpoint_IsSetupReceived())
 b26:	80 91 e8 00 	lds	r24, 0x00E8
 b2a:	83 ff       	sbrs	r24, 3
 b2c:	0a c0       	rjmp	.+20     	; 0xb42 <USB_Device_ProcessControlPacket+0x390>
	{
		Endpoint_StallTransaction();
 b2e:	80 91 eb 00 	lds	r24, 0x00EB
 b32:	80 62       	ori	r24, 0x20	; 32
 b34:	80 93 eb 00 	sts	0x00EB, r24
		Endpoint_ClearSetupReceived();		
 b38:	80 91 e8 00 	lds	r24, 0x00E8
 b3c:	87 7f       	andi	r24, 0xF7	; 247
 b3e:	80 93 e8 00 	sts	0x00E8, r24
	}
}
 b42:	28 96       	adiw	r28, 0x08	; 8
 b44:	0f b6       	in	r0, 0x3f	; 63
 b46:	f8 94       	cli
 b48:	de bf       	out	0x3e, r29	; 62
 b4a:	0f be       	out	0x3f, r0	; 63
 b4c:	cd bf       	out	0x3d, r28	; 61
 b4e:	cf 91       	pop	r28
 b50:	df 91       	pop	r29
 b52:	1f 91       	pop	r17
 b54:	0f 91       	pop	r16
 b56:	ff 90       	pop	r15
 b58:	08 95       	ret

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

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

#if defined(USB_CAN_BE_DEVICE)
static void USB_DeviceTask(void)
{
	if (USB_IsConnected)
 b5c:	80 91 22 02 	lds	r24, 0x0222
 b60:	88 23       	and	r24, r24
 b62:	61 f0       	breq	.+24     	; 0xb7c <USB_USBTask+0x22>
	{
		uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
 b64:	10 91 e9 00 	lds	r17, 0x00E9
	
		Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
 b68:	10 92 e9 00 	sts	0x00E9, r1

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

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

00000b80 <USB_INT_DisableAllInterrupts>:

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

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

00000b86 <USB_INT_ClearAllInterrupts>:

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

00000b8c <__vector_11>:

ISR(USB_GEN_vect)
{
 b8c:	1f 92       	push	r1
 b8e:	0f 92       	push	r0
 b90:	0f b6       	in	r0, 0x3f	; 63
 b92:	0f 92       	push	r0
 b94:	11 24       	eor	r1, r1
 b96:	2f 93       	push	r18
 b98:	3f 93       	push	r19
 b9a:	4f 93       	push	r20
 b9c:	5f 93       	push	r21
 b9e:	6f 93       	push	r22
 ba0:	7f 93       	push	r23
 ba2:	8f 93       	push	r24
 ba4:	9f 93       	push	r25
 ba6:	af 93       	push	r26
 ba8:	bf 93       	push	r27
 baa:	ef 93       	push	r30
 bac:	ff 93       	push	r31
			USB_IsConnected = false;
		}
	}
	#endif

	if (USB_INT_HasOccurred(USB_INT_SUSPEND) && USB_INT_IsEnabled(USB_INT_SUSPEND))
 bae:	80 91 e1 00 	lds	r24, 0x00E1
 bb2:	80 ff       	sbrs	r24, 0
 bb4:	1d c0       	rjmp	.+58     	; 0xbf0 <__vector_11+0x64>
 bb6:	80 91 e2 00 	lds	r24, 0x00E2
 bba:	80 ff       	sbrs	r24, 0
 bbc:	19 c0       	rjmp	.+50     	; 0xbf0 <__vector_11+0x64>
	{
		USB_INT_Clear(USB_INT_SUSPEND);
 bbe:	80 91 e1 00 	lds	r24, 0x00E1
 bc2:	8e 7f       	andi	r24, 0xFE	; 254
 bc4:	80 93 e1 00 	sts	0x00E1, r24

		USB_INT_Disable(USB_INT_SUSPEND);
 bc8:	80 91 e2 00 	lds	r24, 0x00E2
 bcc:	8e 7f       	andi	r24, 0xFE	; 254
 bce:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_WAKEUP);
 bd2:	80 91 e2 00 	lds	r24, 0x00E2
 bd6:	80 61       	ori	r24, 0x10	; 16
 bd8:	80 93 e2 00 	sts	0x00E2, r24
		
		USB_CLK_Freeze();
 bdc:	80 91 d8 00 	lds	r24, 0x00D8
 be0:	80 62       	ori	r24, 0x20	; 32
 be2:	80 93 d8 00 	sts	0x00D8, r24
		#if !defined(MANUAL_PLL_CONTROL)
		USB_PLL_Off();
 be6:	19 bc       	out	0x29, r1	; 41
		#endif

		RAISE_EVENT(USB_Suspend);
 be8:	63 d0       	rcall	.+198    	; 0xcb0 <Event_USB_DeviceEnumerationComplete>

		#if defined(USB_LIMITED_CONTROLLER)
		USB_IsConnected = false;
 bea:	10 92 22 02 	sts	0x0222, r1
		RAISE_EVENT(USB_Disconnect);
 bee:	e3 db       	rcall	.-2106   	; 0x3b6 <Event_USB_Disconnect>
		#endif
	}

	if (USB_INT_HasOccurred(USB_INT_WAKEUP) && USB_INT_IsEnabled(USB_INT_WAKEUP))
 bf0:	80 91 e1 00 	lds	r24, 0x00E1
 bf4:	84 ff       	sbrs	r24, 4
 bf6:	25 c0       	rjmp	.+74     	; 0xc42 <__vector_11+0xb6>
 bf8:	80 91 e2 00 	lds	r24, 0x00E2
 bfc:	84 ff       	sbrs	r24, 4
 bfe:	21 c0       	rjmp	.+66     	; 0xc42 <__vector_11+0xb6>
	{
		#if !defined(MANUAL_PLL_CONTROL)
		USB_PLL_On();
 c00:	84 e0       	ldi	r24, 0x04	; 4
 c02:	89 bd       	out	0x29, r24	; 41
 c04:	89 b5       	in	r24, 0x29	; 41
 c06:	82 60       	ori	r24, 0x02	; 2
 c08:	89 bd       	out	0x29, r24	; 41
		#endif
		while (!(USB_PLL_IsReady()));
 c0a:	09 b4       	in	r0, 0x29	; 41
 c0c:	00 fe       	sbrs	r0, 0
 c0e:	fd cf       	rjmp	.-6      	; 0xc0a <__vector_11+0x7e>

		USB_CLK_Unfreeze();
 c10:	80 91 d8 00 	lds	r24, 0x00D8
 c14:	8f 7d       	andi	r24, 0xDF	; 223
 c16:	80 93 d8 00 	sts	0x00D8, r24

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

		USB_INT_Disable(USB_INT_WAKEUP);
 c24:	80 91 e2 00 	lds	r24, 0x00E2
 c28:	8f 7e       	andi	r24, 0xEF	; 239
 c2a:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_SUSPEND);
 c2e:	80 91 e2 00 	lds	r24, 0x00E2
 c32:	81 60       	ori	r24, 0x01	; 1
 c34:	80 93 e2 00 	sts	0x00E2, r24
		
		#if defined(USB_LIMITED_CONTROLLER)
		USB_IsConnected = true;
 c38:	81 e0       	ldi	r24, 0x01	; 1
 c3a:	80 93 22 02 	sts	0x0222, r24
		RAISE_EVENT(USB_Connect);
 c3e:	c3 db       	rcall	.-2170   	; 0x3c6 <Event_USB_Connect>
		#endif

		RAISE_EVENT(USB_WakeUp);
 c40:	37 d0       	rcall	.+110    	; 0xcb0 <Event_USB_DeviceEnumerationComplete>
	}
   
	if (USB_INT_HasOccurred(USB_INT_EORSTI) && USB_INT_IsEnabled(USB_INT_EORSTI))
 c42:	80 91 e1 00 	lds	r24, 0x00E1
 c46:	83 ff       	sbrs	r24, 3
 c48:	22 c0       	rjmp	.+68     	; 0xc8e <__vector_11+0x102>
 c4a:	80 91 e2 00 	lds	r24, 0x00E2
 c4e:	83 ff       	sbrs	r24, 3
 c50:	1e c0       	rjmp	.+60     	; 0xc8e <__vector_11+0x102>
	{
		USB_INT_Clear(USB_INT_EORSTI);
 c52:	80 91 e1 00 	lds	r24, 0x00E1
 c56:	87 7f       	andi	r24, 0xF7	; 247
 c58:	80 93 e1 00 	sts	0x00E1, r24

		USB_ConfigurationNumber = 0;
 c5c:	10 92 20 02 	sts	0x0220, r1

		USB_INT_Clear(USB_INT_SUSPEND);
 c60:	80 91 e1 00 	lds	r24, 0x00E1
 c64:	8e 7f       	andi	r24, 0xFE	; 254
 c66:	80 93 e1 00 	sts	0x00E1, r24
		USB_INT_Disable(USB_INT_SUSPEND);
 c6a:	80 91 e2 00 	lds	r24, 0x00E2
 c6e:	8e 7f       	andi	r24, 0xFE	; 254
 c70:	80 93 e2 00 	sts	0x00E2, r24
		USB_INT_Enable(USB_INT_WAKEUP);
 c74:	80 91 e2 00 	lds	r24, 0x00E2
 c78:	80 61       	ori	r24, 0x10	; 16
 c7a:	80 93 e2 00 	sts	0x00E2, r24

		Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
 c7e:	60 91 0f 01 	lds	r22, 0x010F
 c82:	20 e0       	ldi	r18, 0x00	; 0
 c84:	40 e0       	ldi	r20, 0x00	; 0
 c86:	70 e0       	ldi	r23, 0x00	; 0
 c88:	80 e0       	ldi	r24, 0x00	; 0
 c8a:	09 dd       	rcall	.-1518   	; 0x69e <Endpoint_ConfigureEndpoint_P>
		                           ENDPOINT_DIR_OUT, USB_ControlEndpointSize,
		                           ENDPOINT_BANK_SINGLE);

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

		USB_SetupInterface();	
	}
	#endif
}
 c8e:	ff 91       	pop	r31
 c90:	ef 91       	pop	r30
 c92:	bf 91       	pop	r27
 c94:	af 91       	pop	r26
 c96:	9f 91       	pop	r25
 c98:	8f 91       	pop	r24
 c9a:	7f 91       	pop	r23
 c9c:	6f 91       	pop	r22
 c9e:	5f 91       	pop	r21
 ca0:	4f 91       	pop	r20
 ca2:	3f 91       	pop	r19
 ca4:	2f 91       	pop	r18
 ca6:	0f 90       	pop	r0
 ca8:	0f be       	out	0x3f, r0	; 63
 caa:	0f 90       	pop	r0
 cac:	1f 90       	pop	r1
 cae:	18 95       	reti

00000cb0 <Event_USB_DeviceEnumerationComplete>:

#define INCLUDE_FROM_EVENTS_C
#include "Events.h"

static void __stub(void)
{
 cb0:	08 95       	ret

00000cb2 <__udivmodhi4>:
 cb2:	aa 1b       	sub	r26, r26
 cb4:	bb 1b       	sub	r27, r27
 cb6:	51 e1       	ldi	r21, 0x11	; 17
 cb8:	07 c0       	rjmp	.+14     	; 0xcc8 <__udivmodhi4_ep>

00000cba <__udivmodhi4_loop>:
 cba:	aa 1f       	adc	r26, r26
 cbc:	bb 1f       	adc	r27, r27
 cbe:	a6 17       	cp	r26, r22
 cc0:	b7 07       	cpc	r27, r23
 cc2:	10 f0       	brcs	.+4      	; 0xcc8 <__udivmodhi4_ep>
 cc4:	a6 1b       	sub	r26, r22
 cc6:	b7 0b       	sbc	r27, r23

00000cc8 <__udivmodhi4_ep>:
 cc8:	88 1f       	adc	r24, r24
 cca:	99 1f       	adc	r25, r25
 ccc:	5a 95       	dec	r21
 cce:	a9 f7       	brne	.-22     	; 0xcba <__udivmodhi4_loop>
 cd0:	80 95       	com	r24
 cd2:	90 95       	com	r25
 cd4:	bc 01       	movw	r22, r24
 cd6:	cd 01       	movw	r24, r26
 cd8:	08 95       	ret

00000cda <__udivmodsi4>:
 cda:	a1 e2       	ldi	r26, 0x21	; 33
 cdc:	1a 2e       	mov	r1, r26
 cde:	aa 1b       	sub	r26, r26
 ce0:	bb 1b       	sub	r27, r27
 ce2:	fd 01       	movw	r30, r26
 ce4:	0d c0       	rjmp	.+26     	; 0xd00 <__udivmodsi4_ep>

00000ce6 <__udivmodsi4_loop>:
 ce6:	aa 1f       	adc	r26, r26
 ce8:	bb 1f       	adc	r27, r27
 cea:	ee 1f       	adc	r30, r30
 cec:	ff 1f       	adc	r31, r31
 cee:	a2 17       	cp	r26, r18
 cf0:	b3 07       	cpc	r27, r19
 cf2:	e4 07       	cpc	r30, r20
 cf4:	f5 07       	cpc	r31, r21
 cf6:	20 f0       	brcs	.+8      	; 0xd00 <__udivmodsi4_ep>
 cf8:	a2 1b       	sub	r26, r18
 cfa:	b3 0b       	sbc	r27, r19
 cfc:	e4 0b       	sbc	r30, r20
 cfe:	f5 0b       	sbc	r31, r21

00000d00 <__udivmodsi4_ep>:
 d00:	66 1f       	adc	r22, r22
 d02:	77 1f       	adc	r23, r23
 d04:	88 1f       	adc	r24, r24
 d06:	99 1f       	adc	r25, r25
 d08:	1a 94       	dec	r1
 d0a:	69 f7       	brne	.-38     	; 0xce6 <__udivmodsi4_loop>
 d0c:	60 95       	com	r22
 d0e:	70 95       	com	r23
 d10:	80 95       	com	r24
 d12:	90 95       	com	r25
 d14:	9b 01       	movw	r18, r22
 d16:	ac 01       	movw	r20, r24
 d18:	bd 01       	movw	r22, r26
 d1a:	cf 01       	movw	r24, r30
 d1c:	08 95       	ret

00000d1e <_exit>:
 d1e:	f8 94       	cli

00000d20 <__stop_program>:
 d20:	ff cf       	rjmp	.-2      	; 0xd20 <__stop_program>
