mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-06-09 03:23:42 +02:00
Use BE/LE functions for packing uint16.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -221,8 +221,7 @@ done: ;
|
|||||||
}
|
}
|
||||||
|
|
||||||
void apdu_finish() {
|
void apdu_finish() {
|
||||||
apdu.rdata[apdu.rlen] = apdu.sw >> 8;
|
put_uint16_t_be(apdu.sw, apdu.rdata + apdu.rlen);
|
||||||
apdu.rdata[apdu.rlen + 1] = apdu.sw & 0xff;
|
|
||||||
// timeout_stop();
|
// timeout_stop();
|
||||||
#ifndef ENABLE_EMULATION
|
#ifndef ENABLE_EMULATION
|
||||||
if ((apdu.rlen + 2 + 10) % 64 == 0) { // FIX for strange behaviour with PSCS and multiple of 64
|
if ((apdu.rlen + 2 + 10) % 64 == 0) { // FIX for strange behaviour with PSCS and multiple of 64
|
||||||
|
|||||||
Reference in New Issue
Block a user