Trammell Hudson avatar Trammell Hudson committed 14238f8 Draft

manchester coding works! all bits correct

Comments (0)

Files changed (1)

 	const uint8_t n
 )
 {
-	delay(n-2);
 	asm(
 		"eor r16, r17\n"
 		"out 0x17, r16\n"
 	);
+
+	if (n > 2)
+		delay(n-2);
 }
 
 
 	//uint8_t startloop
 )
 {
-	//if (startloop)
-		//toggle(2);
-	//else
-		toggle(4);
-
+	toggle(4); // 4
 	toggle(4); // 8
 	toggle(4); // 12
 	toggle(4); // 16
 	//uint8_t startloop
 )
 {
-	//if (startloop)
-		//toggle(2);
-	//else
-		toggle(5);
-
+	toggle(5); //  5
 	toggle(5); // 10
 	toggle(5); // 15
 	toggle(5); // 20
 	const uint8_t x
 )
 {
-	if (x)
+	if (x & 1)
 	{
 		baseband_1();
 		baseband_0();
 hid_output(void)
 {
 	header();
+	asm("/* hid_mfg_code */\n");
 	manchester(HID_MFG_CODE, 20);
+	asm("/* hid_site_code */\n");
 	manchester(HID_SITE_CODE, 8);
+	asm("/* hid_unique_id */\n");
 	manchester(HID_UNIQUE_ID, 16);
+	asm("/* hid_parity */\n");
 	manchester(0, 1);
 }
 
 	while (1)
 		hid_output();
 }
-
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.