mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-08 14:06:11 +02:00
Fix chained responses in other interfaces.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -130,7 +130,7 @@ uint16_t apdu_process(uint8_t itf, const uint8_t *buffer, uint16_t buffer_size)
|
|||||||
#ifndef ENABLE_EMULATION
|
#ifndef ENABLE_EMULATION
|
||||||
#ifdef USB_ITF_HID
|
#ifdef USB_ITF_HID
|
||||||
if (itf == ITF_HID) {
|
if (itf == ITF_HID) {
|
||||||
driver_exec_finished_cont_hid(apdu.rlen + 2, rdata_gr - (usb_get_tx(itf) + 34));
|
driver_exec_finished_cont_hid(apdu.rlen + 2, rdata_gr - (usb_get_tx(itf)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USB_ITF_CCID
|
#ifdef USB_ITF_CCID
|
||||||
@@ -139,7 +139,7 @@ uint16_t apdu_process(uint8_t itf, const uint8_t *buffer, uint16_t buffer_size)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
driver_exec_finished_cont_emul(itf, apdu.rlen + 2, (uint16_t)(rdata_gr - (usb_get_tx(itf)) + 34));
|
driver_exec_finished_cont_emul(itf, apdu.rlen + 2, (uint16_t)(rdata_gr - (usb_get_tx(itf))));
|
||||||
#endif
|
#endif
|
||||||
//Prepare next RAPDU
|
//Prepare next RAPDU
|
||||||
apdu.sw = 0;
|
apdu.sw = 0;
|
||||||
@@ -159,7 +159,7 @@ uint16_t apdu_process(uint8_t itf, const uint8_t *buffer, uint16_t buffer_size)
|
|||||||
#ifndef ENABLE_EMULATION
|
#ifndef ENABLE_EMULATION
|
||||||
#ifdef USB_ITF_HID
|
#ifdef USB_ITF_HID
|
||||||
if (itf == ITF_HID) {
|
if (itf == ITF_HID) {
|
||||||
driver_exec_finished_cont_hid(apdu.ne + 2, rdata_gr - apdu.ne - (usb_get_tx(itf) + 34));
|
driver_exec_finished_cont_hid(apdu.ne + 2, rdata_gr - apdu.ne - (usb_get_tx(itf)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USB_ITF_CCID
|
#ifdef USB_ITF_CCID
|
||||||
@@ -168,7 +168,7 @@ uint16_t apdu_process(uint8_t itf, const uint8_t *buffer, uint16_t buffer_size)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
driver_exec_finished_cont_emul(itf, (uint16_t)(apdu.ne + 2), (uint16_t)(rdata_gr - apdu.ne - (usb_get_tx(itf) + 34)));
|
driver_exec_finished_cont_emul(itf, (uint16_t)(apdu.ne + 2), (uint16_t)(rdata_gr - apdu.ne - (usb_get_tx(itf))));
|
||||||
#endif
|
#endif
|
||||||
apdu.rlen -= (uint16_t)apdu.ne;
|
apdu.rlen -= (uint16_t)apdu.ne;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user