1 /* CM5121 backend for 'internal' CCID driver */
6 #include <librfid/rfid.h>
8 #ifndef LIBRFID_FIRMWARE
10 #include <librfid/rfid_asic.h>
12 #include "ccid-driver.h"
14 /* this is the sole function required by rfid_reader_cm5121.c */
16 PC_to_RDR_Escape(void *handle,
17 const unsigned char *tx_buf, size_t tx_len,
18 unsigned char *rx_buf, size_t *rx_len)
21 ccid_driver_t ch = handle;
22 size_t maxrxlen = *rx_len;
24 rc = ccid_transceive_escape (ch, tx_buf, tx_len,
25 rx_buf, maxrxlen, rx_len);
30 int cm5121_source_init(struct rfid_asic_transport_handle *rath)
34 rc = ccid_open_reader(&rath->data, NULL);
36 fprintf (stderr, "failed to open CCID reader: %#x\n", rc);
42 #endif /* LIBRFID_FIRMWARE */