fix: g_debugMode - client side global debugvariable, moved to util.c

This commit is contained in:
iceman1001 2018-02-21 15:54:13 +01:00
commit a29b2328db
6 changed files with 12 additions and 8 deletions

View file

@ -8,6 +8,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Main binary // Main binary
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include "proxmark3.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -16,8 +17,6 @@
#include <unistd.h> #include <unistd.h>
#include <readline/readline.h> #include <readline/readline.h>
#include <readline/history.h> #include <readline/history.h>
#include "proxmark3.h"
#include "proxgui.h" #include "proxgui.h"
#include "cmdmain.h" #include "cmdmain.h"
#include "uart.h" #include "uart.h"

View file

@ -16,6 +16,7 @@
#include "cmdscript.h" // CmdScriptRun #include "cmdscript.h" // CmdScriptRun
#define PROXPROMPT "pm3 --> " #define PROXPROMPT "pm3 --> "
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View file

@ -24,7 +24,6 @@
#include "util.h" #include "util.h"
#include "cmdmain.h" #include "cmdmain.h"
#include "proxgui.h"
#ifndef M_PI #ifndef M_PI
#define M_PI 3.14159265358979323846264338327 #define M_PI 3.14159265358979323846264338327
@ -47,6 +46,8 @@ extern int flushAfterWrite; //buzzy
extern bool GridLocked; extern bool GridLocked;
extern bool showDemod; extern bool showDemod;
//extern uint8_t g_debugMode;
extern pthread_mutex_t print_lock; extern pthread_mutex_t print_lock;
extern void iceIIR_Butterworth(int * data, const size_t len); extern void iceIIR_Butterworth(int * data, const size_t len);

View file

@ -9,6 +9,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include "util.h" #include "util.h"
// global client debug variable
uint8_t g_debugMode = 0;
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#endif #endif

View file

@ -25,7 +25,6 @@
#include <endian.h> #include <endian.h>
#endif #endif
#ifndef BITMASK #ifndef BITMASK
# define BITMASK(X) (1 << (X)) # define BITMASK(X) (1 << (X))
#endif #endif
@ -162,13 +161,14 @@
# define _YELLOW_(s) #s # define _YELLOW_(s) #s
#endif #endif
#ifndef DropField #ifndef DropField
#define DropField() { \ #define DropField() { \
UsbCommand c = {CMD_READER_ISO_14443a, {0,0,0}}; clearCommandBuffer(); SendCommand(&c); \ UsbCommand c = {CMD_READER_ISO_14443a, {0,0,0}}; clearCommandBuffer(); SendCommand(&c); \
} }
#endif #endif
extern uint8_t g_debugMode;
extern int ukbhit(void); extern int ukbhit(void);
extern void AddLogLine(char *fileName, char *extData, char *c); extern void AddLogLine(char *fileName, char *extData, char *c);
extern void AddLogHex(char *fileName, char *extData, const uint8_t * data, const size_t len); extern void AddLogHex(char *fileName, char *extData, const uint8_t * data, const size_t len);

View file

@ -29,8 +29,8 @@
* @file uart.h * @file uart.h
*/ */
#ifndef _PM3_UART_H_ #ifndef _UART_H_
#define _PM3_UART_H_ #define _UART_H_
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -94,5 +94,5 @@ bool uart_set_speed(serial_port sp, const uint32_t uiPortSpeed);
*/ */
uint32_t uart_get_speed(const serial_port sp); uint32_t uart_get_speed(const serial_port sp);
#endif // _PM3_UART_H_ #endif // _UART_H_