mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 05:38:33 +03:00
ensure USB config numbers always start from 1
Depending on which features (and thus USB configurations) are included in the firmware, we need to re-define the ordering of the configuration numbers, as the Atmel USBD driver simply assumes that configurations are numbered 1..N without any gaps in the sequence.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#define TRACE_LEVEL 5
|
||||
|
||||
#include "board.h"
|
||||
#include "simtrace.h"
|
||||
#include "utils.h"
|
||||
#include "req_ctx.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "board.h"
|
||||
#include "simtrace.h"
|
||||
#include "ringbuffer.h"
|
||||
#include "card_emu.h"
|
||||
#include "iso7816_fidi.h"
|
||||
#include "utils.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define SIMTRACE_H
|
||||
|
||||
#include "ringbuffer.h"
|
||||
#include "board.h"
|
||||
|
||||
/* Endpoint numbers */
|
||||
#define DATAOUT 1
|
||||
@@ -37,7 +38,20 @@ extern volatile uint32_t char_stat;
|
||||
extern const Pin pinPhoneRST;
|
||||
|
||||
enum confNum {
|
||||
CFG_NUM_SNIFF = 1, CFG_NUM_CCID, CFG_NUM_PHONE, CFG_NUM_MITM, NUM_CONF
|
||||
CFG_NUM_NONE = 0,
|
||||
#ifdef HAVE_SNIFFER
|
||||
CFG_NUM_SNIFF,
|
||||
#endif
|
||||
#ifdef HAVE_CCID
|
||||
CFG_NUM_CCID,
|
||||
#endif
|
||||
#ifdef HAVE_CARDEM
|
||||
CFG_NUM_PHONE,
|
||||
#endif
|
||||
#ifdef HAVE_MITM
|
||||
CFG_NUM_MITM,
|
||||
#endif
|
||||
NUM_CONF
|
||||
};
|
||||
|
||||
/// CCIDDriverConfiguration Descriptors
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
*------------------------------------------------------------------------------*/
|
||||
|
||||
#include "board.h"
|
||||
#include "simtrace.h"
|
||||
#include "ringbuffer.h"
|
||||
#include "iso7816_fidi.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "board.h"
|
||||
#include "simtrace.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <cciddriverdescriptors.h>
|
||||
|
||||
Reference in New Issue
Block a user