Source

rfid / avrfid2.c

Diff from to

File avrfid2.c

 	const uint8_t n
 )
 {
-	if (n % 2 == 1)
-		asm("nop");
-
 	switch (n/2)
 	{
 	case 8: asm("rjmp .+0");
 	case 1: asm("rjmp .+0");
 	case 0: break;
 	}
+
+	if (n % 2 == 1)
+		asm("nop");
 }
 
 
 )
 {
 	//if (startloop)
-		toggle(2);
+		//toggle(2);
 	//else
-		//toggle(4);
+		toggle(4);
 
 	toggle(4); // 8
 	toggle(4); // 12
 )
 {
 	//if (startloop)
-		toggle(2);
+		//toggle(2);
 	//else
-		//toggle(5);
+		toggle(5);
 
 	toggle(5); // 10
 	toggle(5); // 15
 	baseband_0();
 	baseband_0();
 	baseband_0();
-	baseband_0();
-	baseband_1();
 	baseband_1();
 	baseband_1();
 	baseband_1();
 main(void)
 {
 	r16 = 0;
-	r17 = 3;
+	r17 = _BV(PINB3) | _BV(PINB4);
 
 	while (1)
 		hid_output();