diff options
author | Christina Quast <chrysh.ng+git@gmail.com> | 2015-04-13 22:20:12 +0200 |
---|---|---|
committer | Christina Quast <chrysh.ng+git@gmail.com> | 2015-04-13 22:20:12 +0200 |
commit | dcce4c32441753827186a1f8e815ef0fd7f4ccb7 (patch) | |
tree | a7d20eff1619714d252deccda880d9817d780352 /firmware | |
parent | c63da3f6d59eed3d2abec2d94d76f0aa3012913e (diff) |
phone.c: Callback routine for reenabling RST interrupt
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/src_simtrace/phone.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/src_simtrace/phone.c b/firmware/src_simtrace/phone.c index 861129c..092c8af 100644 --- a/firmware/src_simtrace/phone.c +++ b/firmware/src_simtrace/phone.c @@ -131,6 +131,11 @@ static uint8_t host_to_sim_buf[BUFLEN]; /*----------------------------------------------------------------------------- * 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) { 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__); return; } /* Interrupt enabled after ATR is sent to phone */ - // PIO_DisableIt( &pinPhoneRST ) ; + PIO_DisableIt( &pinPhoneRST ) ; } void receive_from_host( void ); |