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:
Christina Quast
2015-03-10 15:55:56 +01:00
parent 0757fff70b
commit e03630f593

View File

@@ -178,7 +178,7 @@ Output:
printf("Interrupt!!\n\r"); printf("Interrupt!!\n\r");
/* Check all pending interrupts */ /* Check all pending interrupts */
// FIXME: this if condition is not always true... // 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 */ /* Check current level on pin */
if ( PIO_Get( &pinSmartCard ) == 0 ) if ( PIO_Get( &pinSmartCard ) == 0 )
@@ -279,6 +279,11 @@ extern int main( void )
/* Configure IT on Smart Card */ /* Configure IT on Smart Card */
ConfigureCardDetection() ; 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 */ /* Configure ISO7816 driver */
PIO_Configure( pinsISO7816, PIO_LISTSIZE( pinsISO7816 ) ) ; PIO_Configure( pinsISO7816, PIO_LISTSIZE( pinsISO7816 ) ) ;
PIO_Configure(pPwr, PIO_LISTSIZE(pPwr)); PIO_Configure(pPwr, PIO_LISTSIZE(pPwr));