|
sc-hsm-embedded
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "ctapi.h"#include <ctbcs.h>#include "scr.h"Functions | |
| int | ccidT1Term (struct scr *ctx) |
| signed char | CT_init (unsigned short ctn, unsigned short pn) |
| signed char | CT_close (unsigned short ctn) |
| signed char | CT_data (unsigned short ctn, unsigned char *dad, unsigned char *sad, unsigned short lc, unsigned char *cmd, unsigned short *lr, unsigned char *rsp) |
Variables | |
| scr_t * | readerTable [MAX_READER] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } |
| int ccidT1Term | ( | struct scr * | ctx | ) |
Terminate driver module and release memory
| ctx | Reader context |
| signed char CT_close | ( | unsigned short | ctn | ) |
Close the interface and free all allocated resources
| ctn | Card terminal number |
| signed char CT_data | ( | unsigned short | ctn, |
| unsigned char * | dad, | ||
| unsigned char * | sad, | ||
| unsigned short | lc, | ||
| unsigned char * | cmd, | ||
| unsigned short * | lr, | ||
| unsigned char * | rsp | ||
| ) |
Pass a command to the reader driver and receive the response
| ctn | Card terminal number |
| dad | Destination address |
| sad | Source address |
| lc | Length of command data |
| cmd | Command data |
| lr | Size of response data buffer |
| rsp | Response data |
| signed char CT_init | ( | unsigned short | ctn, |
| unsigned short | pn | ||
| ) |
Initialize the interface to the card reader ctn attached to the port number specified in pn
| ctn | Card terminal number |
| pn | Port number |
| scr_t* readerTable[MAX_READER] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } |