aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/CCID
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/CCID')
-rw-r--r--Demos/Device/ClassDriver/CCID/CCID.c22
-rw-r--r--Demos/Device/ClassDriver/CCID/CCID.h25
-rw-r--r--Demos/Device/ClassDriver/CCID/Lib/Iso7816.c4
-rw-r--r--Demos/Device/ClassDriver/CCID/Lib/Iso7816.h4
4 files changed, 35 insertions, 20 deletions
diff --git a/Demos/Device/ClassDriver/CCID/CCID.c b/Demos/Device/ClassDriver/CCID/CCID.c
index 916306505..9059ad40d 100644
--- a/Demos/Device/ClassDriver/CCID/CCID.c
+++ b/Demos/Device/ClassDriver/CCID/CCID.c
@@ -157,10 +157,11 @@ void EVENT_USB_Device_ControlRequest(void)
* whenever an application at the host wants to send a power off signal to a slot.
* THe slot must reply back with a recognizable ATR (answer to reset)
*/
-uint8_t CALLBACK_CCID_IccPowerOn(uint8_t slot,
- uint8_t* atr,
- uint8_t* attrSize,
- uint8_t* error)
+uint8_t CALLBACK_CCID_IccPowerOn(USB_ClassInfo_CCID_Device_t* const CCIDInterfaceInfo,
+ uint8_t slot,
+ uint8_t* const atr,
+ uint8_t* const attrSize,
+ uint8_t* const error)
{
if (slot < CCID_Interface.Config.TotalSlots)
{
@@ -176,7 +177,9 @@ uint8_t CALLBACK_CCID_IccPowerOn(uint8_t slot,
/** Event handler for the CCID_PC_to_RDR_IccPowerOff message. This message is sent to the device
* whenever an application at the host wants to send a power off signal to a slot.
*/
-uint8_t CALLBACK_CCID_IccPowerOff(uint8_t slot, uint8_t* error)
+uint8_t CALLBACK_CCID_IccPowerOff(USB_ClassInfo_CCID_Device_t* const CCIDInterfaceInfo,
+ uint8_t slot,
+ uint8_t* const error)
{
if (slot < CCID_Interface.Config.TotalSlots)
{
@@ -194,7 +197,9 @@ uint8_t CALLBACK_CCID_IccPowerOff(uint8_t slot, uint8_t* error)
* whenever an application at the host wants to the get the current slot status
*
*/
-uint8_t CALLBACK_CCID_GetSlotStatus(uint8_t slot, uint8_t* error)
+uint8_t CALLBACK_CCID_GetSlotStatus(USB_ClassInfo_CCID_Device_t* const CCIDInterfaceInfo,
+ uint8_t slot,
+ uint8_t* const error)
{
if (slot < CCID_Interface.Config.TotalSlots)
{
@@ -208,9 +213,10 @@ uint8_t CALLBACK_CCID_GetSlotStatus(uint8_t slot, uint8_t* error)
}
}
-uint8_t CALLBACK_CCID_Abort(uint8_t slot,
+uint8_t CALLBACK_CCID_Abort(USB_ClassInfo_CCID_Device_t* const CCIDInterfaceInfo,
+ uint8_t slot,
uint8_t seq,
- uint8_t* error)
+ uint8_t* const error)
{
if (CCID_Interface.State.Aborted && slot == 0 && CCID_Interface.State.AbortedSeq == seq)
{
diff --git a/Demos/Device/ClassDriver/CCID/CCID.h b/Demos/Device/ClassDriver/CCID/CCID.h
index 608fb7801..f6dd4adf5 100644
--- a/Demos/Device/ClassDriver/CCID/CCID.h
+++ b/Demos/Device/ClassDriver/CCID/CCID.h
@@ -75,16 +75,21 @@
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_ControlRequest(void);
- uint8_t CALLBACK_CCID_IccPowerOn(uint8_t slot,
- uint8_t* atr,
- uint8_t* atrSize,
- uint8_t* error);
- uint8_t CALLBACK_CCID_IccPowerOff(uint8_t slot, uint8_t* error);
- uint8_t CALLBACK_CCID_GetSlotStatus(uint8_t slot, uint8_t* error);
- uint8_t CALLBACK_CCID_Abort(uint8_t slot,
- uint8_t seq,
- uint8_t *error);
-
+ uint8_t CALLBACK_CCID_IccPowerOn(USB_ClassInfo_CCID_Device_t* const CCIDInterfaceInfo,
+ uint8_t slot,
+ uint8_t* const atr,
+ uint8_t* const atrSize,
+ uint8_t* const error);
+ uint8_t CALLBACK_CCID_IccPowerOff(USB_ClassInfo_CCID_Device_t* const CCIDInterfaceInfo,
+ uint8_t slot,
+ uint8_t* const error);
+ uint8_t CALLBACK_CCID_GetSlotStatus(USB_ClassInfo_CCID_Device_t* const CCIDInterfaceInfo,
+ uint8_t slot,
+ uint8_t* const error);
+ uint8_t CALLBACK_CCID_Abort(USB_ClassInfo_CCID_Device_t* const CCIDInterfaceInfo,
+ uint8_t slot,
+ uint8_t seq,
+ uint8_t* const error);
#endif
diff --git a/Demos/Device/ClassDriver/CCID/Lib/Iso7816.c b/Demos/Device/ClassDriver/CCID/Lib/Iso7816.c
index 1f9391d72..ec6e1f323 100644
--- a/Demos/Device/ClassDriver/CCID/Lib/Iso7816.c
+++ b/Demos/Device/ClassDriver/CCID/Lib/Iso7816.c
@@ -31,7 +31,9 @@
#include "Iso7816.h"
-void Iso7816_CreateSimpleAtr(uint8_t* attr, uint8_t* attrLength)
+
+void Iso7816_CreateSimpleAtr(uint8_t* const attr,
+ uint8_t* const attrLength)
{
attr[0] = 0x3B; //TS: direct convention
diff --git a/Demos/Device/ClassDriver/CCID/Lib/Iso7816.h b/Demos/Device/ClassDriver/CCID/Lib/Iso7816.h
index f5fc1d70a..2a5570629 100644
--- a/Demos/Device/ClassDriver/CCID/Lib/Iso7816.h
+++ b/Demos/Device/ClassDriver/CCID/Lib/Iso7816.h
@@ -36,7 +36,9 @@
#include <avr/power.h>
#include <avr/interrupt.h>
#include <stdlib.h>
+ #include <string.h>
/* Function Prototypes: */
- void Iso7816_CreateSimpleAtr(uint8_t* attr, uint8_t* attrLength);
+ void Iso7816_CreateSimpleAtr(uint8_t* const attr,
+ uint8_t* const attrLength);
#endif