mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-30 19:40:37 -07:00
rework C includes in C++
This commit is contained in:
parent
19be62f7e6
commit
ed1fb14f5f
7 changed files with 39 additions and 8 deletions
|
@ -13,6 +13,10 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
//#include <stdlib.h> //size_t
|
//#include <stdlib.h> //size_t
|
||||||
|
|
||||||
int CmdData(const char *Cmd);
|
int CmdData(const char *Cmd);
|
||||||
|
@ -82,4 +86,7 @@ extern size_t DemodBufferLen;
|
||||||
extern int g_DemodClock;
|
extern int g_DemodClock;
|
||||||
extern size_t g_DemodStartIdx;
|
extern size_t g_DemodStartIdx;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
#include "pm3_cmd.h" // Packet structs
|
#include "pm3_cmd.h" // Packet structs
|
||||||
#include "util.h" // FILE_PATH_SIZE
|
#include "util.h" // FILE_PATH_SIZE
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef DropField
|
#ifndef DropField
|
||||||
#define DropField() { \
|
#define DropField() { \
|
||||||
clearCommandBuffer(); SendCommandNG(CMD_HF_DROPFIELD, NULL, 0); \
|
clearCommandBuffer(); SendCommandNG(CMD_HF_DROPFIELD, NULL, 0); \
|
||||||
|
@ -83,6 +87,9 @@ bool WaitForResponse(uint32_t cmd, PacketResponseNG *response);
|
||||||
//bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint32_t start_index, PacketResponseNG *response, size_t ms_timeout, bool show_warning);
|
//bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint32_t start_index, PacketResponseNG *response, size_t ms_timeout, bool show_warning);
|
||||||
bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint32_t start_index, uint8_t *data, uint32_t datalen, PacketResponseNG *response, size_t ms_timeout, bool show_warning);
|
bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint32_t start_index, uint8_t *data, uint32_t datalen, PacketResponseNG *response, size_t ms_timeout, bool show_warning);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,10 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
void AppendGraph(bool redraw, uint16_t clock, int bit);
|
void AppendGraph(bool redraw, uint16_t clock, int bit);
|
||||||
size_t ClearGraph(bool redraw);
|
size_t ClearGraph(bool redraw);
|
||||||
bool HasGraphData(void);
|
bool HasGraphData(void);
|
||||||
|
@ -38,4 +42,7 @@ extern int GraphBuffer[MAX_GRAPH_TRACE_LEN];
|
||||||
extern size_t GraphTraceLen;
|
extern size_t GraphTraceLen;
|
||||||
extern int s_Buff[MAX_GRAPH_TRACE_LEN];
|
extern int s_Buff[MAX_GRAPH_TRACE_LEN];
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,7 +18,6 @@ extern "C" {
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
//#include "comms.h"
|
|
||||||
|
|
||||||
void ShowGraphWindow(void);
|
void ShowGraphWindow(void);
|
||||||
void HideGraphWindow(void);
|
void HideGraphWindow(void);
|
||||||
|
|
|
@ -24,18 +24,15 @@
|
||||||
#include <QSlider>
|
#include <QSlider>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "proxgui.h"
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
#include "proxgui.h"
|
||||||
extern "C" int preferences_save(void);
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
#include "comms.h"
|
#include "comms.h"
|
||||||
#include "graph.h"
|
#include "graph.h"
|
||||||
#include "cmddata.h"
|
#include "cmddata.h"
|
||||||
#include "util_darwin.h"
|
#include "util_darwin.h"
|
||||||
}
|
|
||||||
|
extern "C" int preferences_save(void);
|
||||||
|
|
||||||
bool g_useOverlays = false;
|
bool g_useOverlays = false;
|
||||||
int g_absVMax = 0;
|
int g_absVMax = 0;
|
||||||
|
|
|
@ -11,10 +11,14 @@
|
||||||
#ifndef UI_H__
|
#ifndef UI_H__
|
||||||
#define UI_H__
|
#define UI_H__
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#include "common.h"
|
||||||
#include "ansi.h"
|
#include "ansi.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
|
|
||||||
typedef enum logLevel {NORMAL, SUCCESS, INFO, FAILED, WARNING, ERR, DEBUG, INPLACE, HINT} logLevel_t;
|
typedef enum logLevel {NORMAL, SUCCESS, INFO, FAILED, WARNING, ERR, DEBUG, INPLACE, HINT} logLevel_t;
|
||||||
|
@ -60,4 +64,7 @@ extern pthread_mutex_t print_lock;
|
||||||
|
|
||||||
void iceIIR_Butterworth(int *data, const size_t len);
|
void iceIIR_Butterworth(int *data, const size_t len);
|
||||||
void iceSimple_Filter(int *data, const size_t len, uint8_t k);
|
void iceSimple_Filter(int *data, const size_t len, uint8_t k);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,9 +11,16 @@
|
||||||
#ifndef UTIL_DARWIN_H__
|
#ifndef UTIL_DARWIN_H__
|
||||||
#define UTIL_DARWIN_H__
|
#define UTIL_DARWIN_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
void disableAppNap(const char *reason);
|
void disableAppNap(const char *reason);
|
||||||
void enableAppNap(void);
|
void enableAppNap(void);
|
||||||
void makeUnfocusable(void);
|
void makeUnfocusable(void);
|
||||||
void makeFocusable(void);
|
void makeFocusable(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue