This commit is contained in:
iceman1001 2019-10-11 23:14:57 +02:00
commit 76f7763893
2 changed files with 7 additions and 2 deletions

View file

@ -23,8 +23,10 @@ Default LF config is set to:
averaging = YES averaging = YES
divisor = 95 (125kHz) divisor = 95 (125kHz)
trigger_threshold = 0 trigger_threshold = 0
samples_to_skip = 0
verbose = YES
*/ */
sample_config config = { 1, 8, 1, LF_DIVISOR_125, 0, 0 } ; sample_config config = { 1, 8, 1, LF_DIVISOR_125, 0, 0, 1} ;
void printConfig() { void printConfig() {
uint32_t d = config.divisor; uint32_t d = config.divisor;
@ -59,7 +61,8 @@ void setSamplingConfig(sample_config *sc) {
config.averaging = sc->averaging; config.averaging = sc->averaging;
if (config.bits_per_sample > 8) config.bits_per_sample = 8; if (config.bits_per_sample > 8) config.bits_per_sample = 8;
printConfig(); if (sc->verbose)
printConfig();
} }
sample_config *getSamplingConfig() { sample_config *getSamplingConfig() {

View file

@ -119,6 +119,7 @@ typedef struct {
int divisor; int divisor;
int trigger_threshold; int trigger_threshold;
uint32_t samples_to_skip; uint32_t samples_to_skip;
bool verbose;
} PACKED sample_config; } PACKED sample_config;
/* /*
typedef struct { typedef struct {
@ -488,6 +489,7 @@ typedef struct {
#define CMD_HF_MIFARE_CHKKEYS_FAST 0x0625 #define CMD_HF_MIFARE_CHKKEYS_FAST 0x0625
#define CMD_HF_MIFARE_SNIFF 0x0630 #define CMD_HF_MIFARE_SNIFF 0x0630
#define CMD_HF_MIFARE_MFKEY 0x0631
//ultralightC //ultralightC
#define CMD_HF_MIFAREUC_AUTH 0x0724 #define CMD_HF_MIFAREUC_AUTH 0x0724
//0x0725 and 0x0726 no longer used //0x0725 and 0x0726 no longer used