Go to the source code of this file.
Defines | |
#define | CLA ioheader[0] |
#define | INS ioheader[1] |
#define | P1 ioheader[2] |
#define | P2 ioheader[3] |
#define | P3 ioheader[4] |
#define | T0_DIR_IN TRUE |
Data from IFD to ICC. More... | |
#define | T0_DIR_OUT FALSE |
Data from ICC to IFD. More... | |
Functions | |
void | t0_init (void) |
Initialize T=0 data. More... | |
void | t0_recBlock (iu8 *dst, iu16 len) |
Receive multiple bytes. More... | |
void | t0_wtx (void) |
Send a WTX. More... | |
bool | t0_dir (bool in) |
Set IN/OUT direction if command. More... | |
void | t0_exchApdu (void) |
Exchanged APDUs with IFD. More... | |
void | t0_getResponse (void) |
Get Response command. More... | |
bool | t0_testP1P2 (iu16 p1p2) |
Test P1P2 for correct content. More... | |
bool | t0_testP3 (iu8 p3) |
Test P3 for correct content. More... | |
Variables | |
bool | ioin |
iu8 | ioheader [5] |
iu8 | iodata [CONF_IODATA_SIZE] |
iu16 | iodatalen |
T=0 is not implemented fully as library, but must be partly done in the commands itself. This reduces the RAM requirements. E.g. when doing an Update Binary the data must not be received in total before writing, but can be received and written in single bytes.
|
|
|
|
|
|
|
|
|
|
|
Data from IFD to ICC.
|
|
Data from ICC to IFD.
|
|
Set IN/OUT direction if command. This should be called by each command to set the command case. With IN commands the command data is only available after this function has been called. Only in an error case, where only a status word is to be returned this command doesn't have to be called.
|
|
Exchanged APDUs with IFD. This function handles also the Get Response case. |
|
Get Response command. Is called from t0_exchApdu. |
|
Initialize T=0 data. Must be called before the first t0_exchApdu. |
|
Receive multiple bytes. Receive len bytes and write them to dst.
|
|
Test P1P2 for correct content. Compares the values of P1 and P2 in header to p1p2. If they differ, sw is set to SW_WRONG_P1P2 and FALSE is returned.
|
|
Test P3 for correct content. Compares the value of P3 in header to p3. If they differ, sw is set to SW_WRONG_P1P2 and FALSE is returned.
|
|
Send a WTX.
|
|
|
|
|
|
|
|
|