mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
Android platform adaptation(dxl)
This commit is contained in:
parent
d118ba9e06
commit
78ee43c9c4
4 changed files with 715 additions and 0 deletions
40
client/android/jni_tools.h
Normal file
40
client/android/jni_tools.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
//
|
||||
// Created by dell on 2017/9/1.
|
||||
//
|
||||
|
||||
#ifndef DXL_TOOLS_H
|
||||
#define DXL_TOOLS_H
|
||||
|
||||
#include <jni.h>
|
||||
#include <android/log.h>
|
||||
#include <string.h>
|
||||
|
||||
//JNI LOG
|
||||
#define TAG "DXL BlUESPP_PN532"
|
||||
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE,TAG,__VA_ARGS__)
|
||||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG,__VA_ARGS__)
|
||||
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,TAG,__VA_ARGS__)
|
||||
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,TAG,__VA_ARGS__)
|
||||
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG,__VA_ARGS__)
|
||||
|
||||
//全局的环境变量定义
|
||||
JavaVM *g_JavaVM;
|
||||
|
||||
//线程环境指针获取函数
|
||||
JNIEnv *getJniEnv();
|
||||
|
||||
//子线程释放函数,必须是native层创建的线程才可以调用
|
||||
void deatchThread();
|
||||
|
||||
typedef struct {
|
||||
char **cmd;
|
||||
int len;
|
||||
} CMD;
|
||||
|
||||
//命令行解析函数
|
||||
CMD *parse_command_line(const char *commandStr);
|
||||
|
||||
//解析结果释放函数!
|
||||
void free_command_line(CMD *);
|
||||
|
||||
#endif //DXL_TOOLS_H
|
Loading…
Add table
Add a link
Reference in a new issue