Pass ISO7816_GetChar return val to higher layers

The return value of ISO7816_GetChar is 0 in case of a timeout
when trying to retrieve values, and status of US_CSR otherwise.

Proper handling of this return value is not yet implemented though.
With the naive approach of just not sending the ATR if it could not
be read the simtrace firmware did not work together with pcsc_scan
AT ALL.
This commit is contained in:
Christina Quast
2015-01-15 14:53:38 +01:00
parent 99de4e5753
commit 8d0f4a6675
3 changed files with 19 additions and 9 deletions

View File

@@ -76,7 +76,7 @@ extern void ISO7816_Escape( void );
extern void ISO7816_RestartClock(void);
extern void ISO7816_StopClock( void );
extern void ISO7816_toAPDU( void );
extern void ISO7816_Datablock_ATR( uint8_t* pAtr, uint8_t* pLength );
extern uint32_t ISO7816_Datablock_ATR( uint8_t* pAtr, uint8_t* pLength );
extern void ISO7816_SetDataRateandClockFrequency( uint32_t dwClockFrequency, uint32_t dwDataRate );
extern uint8_t ISO7816_StatusReset( void );
extern void ISO7816_cold_reset( void );