From e03630f5932a12626dc372533ce16f949567f22e Mon Sep 17 00:00:00 2001 From: Christina Quast Date: Tue, 10 Mar 2015 15:55:56 +0100 Subject: [PATCH] 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. --- sam3s_example/mains/at91lib_based_ccid_example.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sam3s_example/mains/at91lib_based_ccid_example.c b/sam3s_example/mains/at91lib_based_ccid_example.c index 755c7fca..bbf319fa 100644 --- a/sam3s_example/mains/at91lib_based_ccid_example.c +++ b/sam3s_example/mains/at91lib_based_ccid_example.c @@ -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));