mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-24 09:18:33 +03:00
phone.c: Callback routine for reenabling RST interrupt
This commit is contained in:
@@ -131,6 +131,11 @@ static uint8_t host_to_sim_buf[BUFLEN];
|
|||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* Interrupt routines
|
* Interrupt routines
|
||||||
*-----------------------------------------------------------------------------*/
|
*-----------------------------------------------------------------------------*/
|
||||||
|
void Callback_PhoneRST_ISR( uint8_t *pArg, uint8_t status, uint32_t transferred, uint32_t remaining)
|
||||||
|
{
|
||||||
|
printf("rstCB\n\r");
|
||||||
|
PIO_EnableIt( &pinPhoneRST ) ;
|
||||||
|
}
|
||||||
static void ISR_PhoneRST( const Pin *pPin)
|
static void ISR_PhoneRST( const Pin *pPin)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -145,13 +150,13 @@ static void ISR_PhoneRST( const Pin *pPin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = USBD_Write( PHONE_INT, "R", 1, 0, 0 )) != USBD_STATUS_SUCCESS) {
|
if ((ret = USBD_Write( PHONE_INT, "R", 1, (TransferCallback)&Callback_PhoneRST_ISR, 0 )) != USBD_STATUS_SUCCESS) {
|
||||||
TRACE_ERROR("USB err status: %d (%s)\n", ret, __FUNCTION__);
|
TRACE_ERROR("USB err status: %d (%s)\n", ret, __FUNCTION__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Interrupt enabled after ATR is sent to phone */
|
/* Interrupt enabled after ATR is sent to phone */
|
||||||
// PIO_DisableIt( &pinPhoneRST ) ;
|
PIO_DisableIt( &pinPhoneRST ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void receive_from_host( void );
|
void receive_from_host( void );
|
||||||
|
|||||||
Reference in New Issue
Block a user