BlueFlashTool.h
2.46 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// BlueFlashTool.h : main header file for the BLUEFLASHTOOL application
//
#if !defined(AFX_BLUEFLASHTOOL_H__4BF81738_BBD5_4BEA_BCA8_BB0255AFF8C2__INCLUDED_)
#define AFX_BLUEFLASHTOOL_H__4BF81738_BBD5_4BEA_BCA8_BB0255AFF8C2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
#include "IniFile.h"
/////////////////////////////////////////////////////////////////////////////
// CBlueFlashToolApp:
// See BlueFlashTool.cpp for the implementation of this class
//
#define MAX_PATH 260
#define WM_UPDATEPOS WM_USER + 1000
typedef enum
{
BLUE_TYPE_EAR,
BLUE_TYPE_USB,
BLUE_TYPE_MAX
}BLUE_DEVICE_TYPE;
typedef struct
{
int aBandrate;
char bcheck;
char cdatabit;
char dstopbit;
char estreambit;
}com_config_struct;
typedef struct
{
short ary_myComPort[BLUE_TYPE_MAX][10];
//short ary_myComPort[BLUE_TYPE_USB][10];
BOOL if_flash[BLUE_TYPE_MAX][10];
//BOOL if_flash[BLUE_TYPE_USB][10];
short int_myComPortDebug;
com_config_struct com_config;
BOOL if_same_sn;
CString SN_head;
int SN_start;
int SN_end;
int SN_cur;
int int_ResendTime;
CString FilePathUsb;
CString FilePathEar;
}app_main_data_struct;
extern app_main_data_struct g_AppMainData;
extern CIniFile g_globalini;
BOOL QuerySingleSerialPortEx(int nPort);
void QuerySerialPortStatusEx(CStringArray& cStrAryExistPort, CStringArray& cStrAryNoneOpenedPort,CStringArray& cStrAryAlreadyOpenedPort, CStringArray& cStrAryNotExistPort,int nStartPort,int nLastPort);
bool IsExistFile(CString strAbsolutefilePath);
class CBlueFlashToolApp : public CWinApp
{
public:
CBlueFlashToolApp();
bool LoadConfigs(void);
bool SaveConfigs(void);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CBlueFlashToolApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CBlueFlashToolApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// ¼ÓÔØ³ÌÐòĬÈÏÅäÖÃ
};
extern CBlueFlashToolApp *g_pmainapp;
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_BLUEFLASHTOOL_H__4BF81738_BBD5_4BEA_BCA8_BB0255AFF8C2__INCLUDED_)