mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-08 05:56:11 +02:00
Added a major refactoring to include Emulated interface.
It works in combination with virtualsmarcard module (vpcd). It properly installed, it creates a virtual reader that can be interfaced via PCSC+vcpd. At user app level, it has no difference of having a physical smart card. At this moment, it only works emulating a CCID interface. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -142,6 +142,7 @@ uint16_t set_res_sw(uint8_t sw1, uint8_t sw2) {
|
||||
return make_uint16_t(sw1, sw2);
|
||||
}
|
||||
|
||||
#ifndef ENABLE_EMULATION
|
||||
void apdu_thread() {
|
||||
card_init_core1();
|
||||
while (1) {
|
||||
@@ -171,6 +172,7 @@ void apdu_thread() {
|
||||
current_app = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void apdu_finish() {
|
||||
apdu.rdata[apdu.rlen] = apdu.sw >> 8;
|
||||
|
||||
Reference in New Issue
Block a user