command to change fidi send by host

This commit is contained in:
Christina Quast
2015-05-03 14:21:26 +02:00
parent 6246000b3a
commit cb646bc729
5 changed files with 79 additions and 252 deletions

View File

@@ -58,36 +58,8 @@ typedef struct {
extern const USBConfigurationDescriptor *configurationDescriptorsArr[];
/*** PTS parsing ***/
/* detailed sub-states of ISO7816_S_IN_PTS */
enum pts_state {
PTS_S_WAIT_REQ_PTSS,
PTS_S_WAIT_REQ_PTS0,
PTS_S_WAIT_REQ_PTS1,
PTS_S_WAIT_REQ_PTS2,
PTS_S_WAIT_REQ_PTS3,
PTS_S_WAIT_REQ_PCK,
PTS_S_WAIT_RESP_PTSS = PTS_S_WAIT_REQ_PTSS | 0x10,
PTS_S_WAIT_RESP_PTS0 = PTS_S_WAIT_REQ_PTS0 | 0x10,
PTS_S_WAIT_RESP_PTS1 = PTS_S_WAIT_REQ_PTS1 | 0x10,
PTS_S_WAIT_RESP_PTS2 = PTS_S_WAIT_REQ_PTS2 | 0x10,
PTS_S_WAIT_RESP_PTS3 = PTS_S_WAIT_REQ_PTS3 | 0x10,
PTS_S_WAIT_RESP_PCK = PTS_S_WAIT_REQ_PCK | 0x10,
PTS_END
};
struct iso7816_3_handle {
uint8_t fi;
uint8_t di;
enum pts_state pts_state;
uint8_t pts_req[6];
uint8_t pts_resp[6];
uint8_t pts_bytes_processed;
};
int check_data_from_phone();
enum pts_state process_byte_pts(struct iso7816_3_handle *ih, uint8_t byte);
void update_fidi(uint8_t fidi);
void ISR_PhoneRST( const Pin *pPin);