Atmel lib bug fixed: param position off by one
Furthermore the debug output level is INFO instead of DEBUG now.
diff --git a/sam3s_example/atmel_softpack_libraries/libboard_sam3s-ek/source/iso7816_4.c b/sam3s_example/atmel_softpack_libraries/libboard_sam3s-ek/source/iso7816_4.c
index 0e7ef00..7a746a0 100644
--- a/sam3s_example/atmel_softpack_libraries/libboard_sam3s-ek/source/iso7816_4.c
+++ b/sam3s_example/atmel_softpack_libraries/libboard_sam3s-ek/source/iso7816_4.c
@@ -201,13 +201,13 @@
uint8_t procByte;
uint8_t cmdCase;
- TRACE_DEBUG("pAPDU[0]=0x%X\n\r",pAPDU[0]);
- TRACE_DEBUG("pAPDU[1]=0x%X\n\r",pAPDU[1]);
- TRACE_DEBUG("pAPDU[2]=0x%X\n\r",pAPDU[2]);
- TRACE_DEBUG("pAPDU[3]=0x%X\n\r",pAPDU[3]);
- TRACE_DEBUG("pAPDU[4]=0x%X\n\r",pAPDU[4]);
- TRACE_DEBUG("pAPDU[5]=0x%X\n\r",pAPDU[5]);
- TRACE_DEBUG("wlength=%d\n\r",wLength);
+ TRACE_INFO("pAPDU[0]=0x%X\n\r",pAPDU[0]);
+ TRACE_INFO("pAPDU[1]=0x%X\n\r",pAPDU[1]);
+ TRACE_INFO("pAPDU[2]=0x%X\n\r",pAPDU[2]);
+ TRACE_INFO("pAPDU[3]=0x%X\n\r",pAPDU[3]);
+ TRACE_INFO("pAPDU[4]=0x%X\n\r",pAPDU[4]);
+ TRACE_INFO("pAPDU[5]=0x%X\n\r",pAPDU[5]);
+ TRACE_INFO("wlength=%d\n\r",wLength);
ISO7816_SendChar( pAPDU[0] ); /* CLA */
ISO7816_SendChar( pAPDU[1] ); /* INS */
@@ -216,7 +216,7 @@
ISO7816_SendChar( pAPDU[4] ); /* P3 */
/* Handle the four structures of command APDU */
- indexApdu = 4;
+ indexApdu = 5;
if( wLength == 4 ) {
cmdCase = CASE1;
@@ -282,6 +282,7 @@
else {
/* Send data */
do {
+ TRACE_INFO("Send %X", pAPDU[indexApdu]);
ISO7816_SendChar(pAPDU[indexApdu++]);
} while( 0 != --NeNc );
}