| #ifndef _DEFINE_H_ |
| #define _DEFINE_H_ |
| |
| #define FALSE (0) |
| #define TRUE (1) |
| |
| #define FOLDER_PATH_LENGTH_MAX (256) |
| #define FILE_NAME_LENGTH_MAX (128) |
| #define FILE_PATH_LENGTH_MAX (512) |
| |
| typedef unsigned char BYTE; |
| typedef unsigned int DWORD; |
| typedef unsigned long ULONG; |
| typedef int BOOL; |
| typedef unsigned short WORD; |
| typedef enum |
| { |
| Download_OK = 0,//下载成功 |
| Download_NOT_ROOT,//非root权限执行下载应用 |
| Download_ERROR_INPUT_ARGC,//参数错误,比如没有带参数执行下载应用 |
| Download_CHECK_BIN_FAIL,//校验传入参数的bin文件是否合法 |
| Download_FIND_AT_FAIL,//找不到AT口 |
| Download_SAME_VERSION_NONEED_DL,//下载前读取软件版本,如果相同则不下载,此功能视用户需求可有可无,但是枚举值保留 |
| Download_AT_OPEN_DL_FAIL,//下载前发AT指令打开DL下载端口失败,此功能视用户需求可有可无,但是枚举值保留 |
| Download_OPENDLPORT_FAIL,//打开下载端口失败,openport失败 |
| Download_DOWNLOAD_IMAGE_FAIL,//下载版本文件失败 |
| Download_CHECK_VERSION_FAIL,//下载完成后,校验版本失败,此功能视用户需求可有可无,但是枚举值保留 |
| Download_AT_CLOSE_DL_FAIL, |
| Download_NONE//未定义 |
| }enERRORCODE; |
| |
| char g_log_path[FOLDER_PATH_LENGTH_MAX]; |
| |
| #endif |