BlueFlashTool.h 2.14 KB
// 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

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;


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_)