-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathimp_control_util.h
47 lines (35 loc) · 981 Bytes
/
imp_control_util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef IMP_CONTROL_UTIL_H
#define IMP_CONTROL_UTIL_H
#include <stdint.h>
#define MAX_INFO_LEN 1024
#define TAG "LIBIMP_CONTROL"
#ifdef DEBUG
#define RESULT(RES, P) ((RES) ? "error" : (P))
#else
#define RESULT(RES, P) NULL
#endif
#ifdef DEBUG
#define DEBUG_TEXT(text) (text)
#else
#define DEBUG_TEXT(text) ""
#endif
static char response[MAX_INFO_LEN]; // Buffer for response message
typedef union {
char chr[MAX_INFO_LEN];
uint8_t hex[MAX_INFO_LEN];
} SUDevID;
typedef struct {
char chr[MAX_INFO_LEN];
} SUModelNum;
typedef struct {
char chr[MAX_INFO_LEN];
} SUVersion;
extern int SU_Base_GetDevID(SUDevID *devID);
extern int SU_Base_GetModelNumber(SUModelNum *modelNum);
extern int SU_Base_GetVersion(SUVersion *version);
typedef struct {
char aVersion[64];
} IMPVersion;
extern int IMP_System_GetVersion(IMPVersion *pstVersion);
extern const char* (*original_IMP_System_GetCPUInfo)(void);
#endif // IMP_CONTROL_UTIL_H