blob: cda42d4cf5a91ce213528349a5cc4962262170bc [file] [log] [blame]
xf.libdd93d52023-05-12 07:10:14 -07001#ifndef _DEFINE_H_
2#define _DEFINE_H_
3
4#define FALSE (0)
5#define TRUE (1)
6
7#define FOLDER_PATH_LENGTH_MAX (256)
8#define FILE_NAME_LENGTH_MAX (128)
9#define FILE_PATH_LENGTH_MAX (512)
10
11typedef unsigned char BYTE;
12typedef unsigned int DWORD;
13typedef unsigned long ULONG;
14typedef int BOOL;
15typedef unsigned short WORD;
16typedef enum
17{
18 Download_OK = 0,//下载成功
19 Download_NOT_ROOT,//非root权限执行下载应用
20 Download_ERROR_INPUT_ARGC,//参数错误,比如没有带参数执行下载应用
21 Download_CHECK_BIN_FAIL,//校验传入参数的bin文件是否合法
22 Download_FIND_AT_FAIL,//找不到AT口
23 Download_SAME_VERSION_NONEED_DL,//下载前读取软件版本,如果相同则不下载,此功能视用户需求可有可无,但是枚举值保留
24 Download_AT_OPEN_DL_FAIL,//下载前发AT指令打开DL下载端口失败,此功能视用户需求可有可无,但是枚举值保留
25 Download_OPENDLPORT_FAIL,//打开下载端口失败,openport失败
26 Download_DOWNLOAD_IMAGE_FAIL,//下载版本文件失败
27 Download_CHECK_VERSION_FAIL,//下载完成后,校验版本失败,此功能视用户需求可有可无,但是枚举值保留
28 Download_AT_CLOSE_DL_FAIL,
29 Download_NONE//未定义
30}enERRORCODE;
31
32char g_log_path[FOLDER_PATH_LENGTH_MAX];
33
34#endif