1 /* CM5121 backend for 'internal' CCID driver */
6 #include <rfid/rfid_asic.h>
8 #include "ccid/ccid-driver.h"
10 /* FIXME: remove ugly global variables */
11 static ccid_driver_t h;
13 /* this is the sole function required by rfid_reader_cm5121.c */
15 PC_to_RDR_Escape(void *handle,
16 const unsigned char *tx_buf, unsigned int tx_len,
17 unsigned char *rx_buf, unsigned int *rx_len)
20 ccid_driver_t ch = handle;
21 size_t maxrxlen = *rx_len;
23 rc = ccid_transceive_escape (ch, tx_buf, tx_len,
24 rx_buf, maxrxlen, rx_len);
29 int cm5121_source_init(struct rfid_asic_transport_handle *rath)
33 rc = ccid_open_reader (&h, NULL);
35 fprintf (stderr, "failed to open CCID reader: %#x\n", rc);