Remove PR define, replace with TRACE_DEBUG

The define PR was introduced to switch quickly between TRACE levels
for specific debug print messages.

Now, it all became debug output, since it is not needed in normal
operation.
This commit is contained in:
Christina Quast 2015-05-08 15:34:25 +02:00
parent 9dbf1c90ac
commit 4a30a3700b
3 changed files with 9 additions and 17 deletions

View File

@ -59,8 +59,6 @@
#define DFU_NUM_STRINGS 0
#define DFU_STRING_DESCRIPTORS
#define PR TRACE_INFO
//------------------------------------------------------------------------------
// Local definition
//------------------------------------------------------------------------------
@ -428,11 +426,11 @@ static void PCtoRDRXfrBlock( void )
uint16_t msglen = 0;
uint32_t ret;
PR("PCtoRDRXfrBlock\n");
TRACE_DEBUG("PCtoRDRXfrBlock\n");
// Check the block length
if ( ccidDriver.sCcidCommand.wLength > (configurationDescriptorsFS->ccid.dwMaxCCIDMessageLength-10) ) {
PR("Err block/msg len");
TRACE_DEBUG("Err block/msg len");
ccidDriver.sCcidMessage.bStatus = 1;
ccidDriver.sCcidMessage.bError = 0;
}
@ -449,7 +447,7 @@ static void PCtoRDRXfrBlock( void )
case CCID_FEATURES_EXC_TPDU:
if (ccidDriver.ProtocolDataStructure[1] == PROTOCOL_TO) {
PR("APDU cmd: %x %x %x ..", ccidDriver.sCcidCommand.APDU[0], ccidDriver.sCcidCommand.APDU[1],ccidDriver.sCcidCommand.APDU[2] );
TRACE_DEBUG("APDU cmd: %x %x %x ..", ccidDriver.sCcidCommand.APDU[0], ccidDriver.sCcidCommand.APDU[1],ccidDriver.sCcidCommand.APDU[2] );
// Send commande APDU
ret = ISO7816_XfrBlockTPDU_T0( ccidDriver.sCcidCommand.APDU ,
@ -463,16 +461,16 @@ static void PCtoRDRXfrBlock( void )
}
else {
if (ccidDriver.ProtocolDataStructure[1] == PROTOCOL_T1) {
PR("Not supported T=1\n\r");
TRACE_DEBUG("Not supported T=1\n\r");
}
else {
PR("Not supported 0x%x\n\r", ccidDriver.ProtocolDataStructure[1]);
TRACE_DEBUG("Not supported 0x%x\n\r", ccidDriver.ProtocolDataStructure[1]);
}
}
break;
case CCID_FEATURES_EXC_APDU:
PR("Not supported CCID_FEATURES_EXC_APDU\n\r");
TRACE_DEBUG("Not supported CCID_FEATURES_EXC_APDU\n\r");
break;
default:

View File

@ -108,8 +108,6 @@ const Pin pinPhoneRST = PIN_ISO7816_RST_PHONE;
static struct Usart_info usart_info = {.base = USART_PHONE, .id = ID_USART_PHONE, .state = USART_RCV};
#define PR TRACE_INFO
/* ===================================================*/
/* Taken from iso7816_4.c */
/* ===================================================*/
@ -131,8 +129,8 @@ void sendResponse_to_phone( uint8_t *pArg, uint8_t status, uint32_t transferred,
TRACE_ERROR("USB err status: %d (%s)\n", __FUNCTION__, status);
return;
}
PR("sendResp, stat: %X, trnsf: %x, rem: %x\n\r", status, transferred, remaining);
PR("Resp: %x %x %x .. %x\n", host_to_sim_buf[0], host_to_sim_buf[1], host_to_sim_buf[2], host_to_sim_buf[transferred-1]);
TRACE_DEBUG("sendResp, stat: %X, trnsf: %x, rem: %x\n\r", status, transferred, remaining);
TRACE_DEBUG("Resp: %x %x %x .. %x\n", host_to_sim_buf[0], host_to_sim_buf[1], host_to_sim_buf[2], host_to_sim_buf[transferred-1]);
USART_SetReceiverEnabled(USART_PHONE, 0);
USART_SetTransmitterEnabled(USART_PHONE, 1);

View File

@ -38,10 +38,6 @@
volatile uint32_t char_stat;
// FIXME: Remove:
#define PR TRACE_INFO
//#define PR printf
volatile ringbuf sim_rcv_buf = { {0}, 0, 0 };
/*-----------------------------------------------------------------------------
@ -105,7 +101,7 @@ void USART1_IrqHandler( void )
/* Fill char into buffer */
rbuf_write(&sim_rcv_buf, c);
} else {
PR("e %x st: %x\n", c, stat);
TRACE_DEBUG("e %x st: %x\n", c, stat);
} /* else: error occured */
char_stat = stat;