CCID config, init, run
Switching to config 1 and 2 works, but to 3 and 4 usb_enum.py is
hanging for some reason. Switching the USB config from Sniffer to
CCID reader was not tested yet.
diff --git a/sam3s_example/simtrace/simtrace.h b/sam3s_example/simtrace/simtrace.h
index c564563..585f7a1 100644
--- a/sam3s_example/simtrace/simtrace.h
+++ b/sam3s_example/simtrace/simtrace.h
@@ -15,15 +15,38 @@
enum confNum {
- CFG_NUM_SNIFF = 1, CFG_NUM_PHONE, CFG_NUM_MITM, NUM_CONF
+ CFG_NUM_SNIFF = 1, CFG_NUM_CCID, CFG_NUM_PHONE, CFG_NUM_MITM, NUM_CONF
};
+/// CCIDDriverConfiguration Descriptors
+/// List of descriptors that make up the configuration descriptors of a
+/// device using the CCID driver.
+typedef struct {
+
+ /// Configuration descriptor
+ USBConfigurationDescriptor configuration;
+ /// Interface descriptor
+ USBInterfaceDescriptor interface;
+ /// CCID descriptor
+ CCIDDescriptor ccid;
+ /// Bulk OUT endpoint descriptor
+ USBEndpointDescriptor bulkOut;
+ /// Bulk IN endpoint descriptor
+ USBEndpointDescriptor bulkIn;
+ /// Interrupt OUT endpoint descriptor
+ USBEndpointDescriptor interruptIn;
+} __attribute__ ((packed)) CCIDDriverConfigurationDescriptors;
+
+/* Helper functions */
+USBConfigurationDescriptor *getConfigDesc(uint8_t idx);
+
// FIXME: static function definitions
extern uint32_t _ISO7816_GetChar( uint8_t *pCharToReceive );
extern uint32_t _ISO7816_SendChar( uint8_t CharToSend );
/* Init functions */
extern void Phone_Master_Init( void );
+extern void CCID_init( void );
extern void Sniffer_Init( void );
extern void MITM_init( void );
@@ -32,7 +55,7 @@
/* Run functions */
extern void Sniffer_run( void );
-// extern void CCID_run( void );
+extern void CCID_run( void );
extern void Phone_run( void );
extern void MITM_run( void );