mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
Problematic check for smartcard pin in ISR
This is a bug and should be fixed: The smartcard insertion detection does not work if we uncomment the check. But on the other hand, pcscd detects a lot of erroneous smartcard insertion and removal events.
This commit is contained in:
@@ -178,7 +178,7 @@ Output:
|
||||
printf("Interrupt!!\n\r");
|
||||
/* Check all pending interrupts */
|
||||
// FIXME: this if condition is not always true...
|
||||
if ( (pinSmartCard.pio->PIO_ISR & pinSmartCard.mask) != 0 )
|
||||
// if ( (pinSmartCard.pio->PIO_ISR & pinSmartCard.mask) != 0 )
|
||||
{
|
||||
/* Check current level on pin */
|
||||
if ( PIO_Get( &pinSmartCard ) == 0 )
|
||||
@@ -279,6 +279,11 @@ extern int main( void )
|
||||
/* Configure IT on Smart Card */
|
||||
ConfigureCardDetection() ;
|
||||
|
||||
/* Configure Phone SIM connection*/
|
||||
/* Pin phone_sim_connect[] = {PIN_SC_SW, PIN_IO_SW};
|
||||
PIO_Configure( phone_sim_connect, PIO_LISTSIZE(phone_sim_connect) );
|
||||
*/
|
||||
|
||||
/* Configure ISO7816 driver */
|
||||
PIO_Configure( pinsISO7816, PIO_LISTSIZE( pinsISO7816 ) ) ;
|
||||
PIO_Configure(pPwr, PIO_LISTSIZE(pPwr));
|
||||
|
||||
Reference in New Issue
Block a user