<p><b>@mxgxw</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/12217#discussion_r328399090">drivers/wiegand/wiegand.c</a>:</p>
<pre style='color:#555'>> +  {
+    // shift value to high bits
+    dev->wg_card_temp_high |= ((0x80000000 & dev->wg_card_temp)>>31);
+    dev->wg_card_temp_high <<= 1;
+    dev->wg_card_temp |= 1;
+    dev->wg_card_temp <<=1;
+  }
+  else
+  {
+    // D1 represent binary 1, so OR card data with 1 then
+    dev->wg_card_temp |= 1;
+    // left shift card data
+    dev->wg_card_temp <<= 1;
+  }
+  // Keep track of last wiegand bit received
+  dev->wg_last_wiegand = xtimer_now_usec64();
</pre>
<p>Yes. We can use only one 64 bit integer. I suppose that the original author of the algorithm wanted to make the code a little bit more readable when decoding the Mifare 34 format.</p>
<p>Let me do this little change.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12217?email_source=notifications&email_token=ABE7WYGLNICIOEWNMMFLMLTQLQDN3A5CNFSM4IWLHU2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCF6YIPI#discussion_r328399090">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDN7TUXH7PSBVSTEI3QLQDN3ANCNFSM4IWLHU2A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYEX75OVTF2O3ZNWXRLQLQDN3A5CNFSM4IWLHU2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCF6YIPI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12217?email_source=notifications\u0026email_token=ABE7WYGLNICIOEWNMMFLMLTQLQDN3A5CNFSM4IWLHU2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCF6YIPI#discussion_r328399090",
"url": "https://github.com/RIOT-OS/RIOT/pull/12217?email_source=notifications\u0026email_token=ABE7WYGLNICIOEWNMMFLMLTQLQDN3A5CNFSM4IWLHU2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCF6YIPI#discussion_r328399090",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>