Skip to content

Commit

Permalink
Cleanup rebase results
Browse files Browse the repository at this point in the history
  • Loading branch information
szszszsz committed Jun 19, 2021
1 parent c6d4139 commit 290aadb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
15 changes: 4 additions & 11 deletions src/ccid/CcidLocalAccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,9 @@
*******************************************************************************/


typedef struct
{
unsigned char cAPDULength;
unsigned short cAPDUAnswerStatus;
unsigned short cAPDUAnswerLength;
unsigned char cTPDUSequence;
unsigned char cTPDULength;
unsigned char cAPDU[CCID_TRANSFER_BUFFER_MAX];
unsigned char cTPDU[CCID_TRANSFER_BUFFER_MAX + CCID_TPDU_OVERHEAD];
} typeSmartcardTransfer;
uint32_t min(const uint32_t a, const uint32_t b);
uint16_t send_data_no_response(uint8_t *data, uint8_t data_length);
int tag_callback(TLV *tlv, uint16_t depth);

static typeSmartcardTransfer tSCT;

Expand Down Expand Up @@ -231,7 +224,7 @@ unsigned short SendAPDU (typeSmartcardTransfer * _tSCT)
SendTPDU (_tSCT);

if (APDU_ANSWER_RECEIVE_INCORRECT == _tSCT->cAPDUAnswerStatus
&& APDU_EOF != tSCT->cAPDUAnswerStatus)
&& APDU_EOF != _tSCT->cAPDUAnswerStatus)
{
return (_tSCT->cAPDUAnswerStatus);
}
Expand Down
1 change: 1 addition & 0 deletions src/hw_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ typedef struct {
uint8_t right:4;
} hexbyte;


char HexToAscii2 (uint8_t nHex, uint8_t byte_part)
{
if (byte_part==1)
Expand Down
16 changes: 8 additions & 8 deletions src/inc/CcidLocalAccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ uint8_t testSendUserPW2 (unsigned char* pcPW);

unsigned int CcidReset (void);

#define CCID_TRANSFER_BUFFER_MAX 256
#define CCID_TRANSFER_BUFFER_MAX 512

#define CCID_TPDU_OVERHEAD 4
#define CCID_TPDU_PROLOG 3
Expand Down Expand Up @@ -125,13 +125,13 @@ unsigned int CcidReset (void);

typedef struct
{
unsigned char cAPDULength;
unsigned short cAPDUAnswerStatus;
unsigned char cAPDUAnswerLength;
unsigned char cTPDUSequence;
unsigned char cTPDULength;
unsigned char cAPDU[CCID_TRANSFER_BUFFER_MAX];
unsigned char cTPDU[CCID_TRANSFER_BUFFER_MAX + CCID_TPDU_OVERHEAD];
unsigned char cAPDULength;
unsigned short cAPDUAnswerStatus;
unsigned short cAPDUAnswerLength;
unsigned char cTPDUSequence;
unsigned char cTPDULength;
unsigned char cAPDU[CCID_TRANSFER_BUFFER_MAX];
unsigned char cTPDU[CCID_TRANSFER_BUFFER_MAX + CCID_TPDU_OVERHEAD];
} typeSmartcardTransfer;

void InitSCTStruct (typeSmartcardTransfer * _tSCT);
Expand Down
1 change: 1 addition & 0 deletions src/inc/hw_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ extern Blink blinkVerifyCorrect;
extern void Blink_init_all(void);
void EnableTimer2 (void);
void init_blinking(void);
char HexToAscii2 (uint8_t nHex, uint8_t byte_part);
void reset_to_bootloader(void);
void exec_bootloader_if_wrong_hardware(void);

Expand Down

0 comments on commit 290aadb

Please sign in to comment.