mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 05:38:33 +03:00
iso7816_4.c: CLK div differs for Master and Slave
Attention: Each init function has to enable and disable receiver and transmitter on its own!
This commit is contained in:
@@ -128,6 +128,8 @@ void CCID_configure ( void ) {
|
||||
|
||||
void CCID_exit ( void ) {
|
||||
PIO_DisableIt( &pinSmartCard ) ;
|
||||
USART_SetTransmitterEnabled(usart_info.base, 0);
|
||||
USART_SetReceiverEnabled(usart_info.base, 0);
|
||||
}
|
||||
|
||||
void CCID_init( void )
|
||||
@@ -150,6 +152,9 @@ void CCID_init( void )
|
||||
// PIO_Set(&pinsPower[0]);
|
||||
|
||||
ISO7816_Init(&usart_info, CLK_MASTER);
|
||||
USART_SetTransmitterEnabled(usart_info.base, 1);
|
||||
USART_SetReceiverEnabled(usart_info.base, 1);
|
||||
|
||||
ISO7816_Set_Reset_Pin(&pinIso7816RstMC);
|
||||
/* Read ATR */
|
||||
ISO7816_warm_reset() ;
|
||||
|
||||
@@ -117,7 +117,6 @@ void USART1_IrqHandler( void )
|
||||
/* Fill char into buffer */
|
||||
rbuf_write(&sim_rcv_buf, c);
|
||||
} else {
|
||||
rbuf_write(&sim_rcv_buf, c);
|
||||
PR("e %x st: %x\n", c, stat);
|
||||
} /* else: error occured */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user