⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m16cflsh.h

📁 M16C Flash Starter Software Ver.2.0.0.46 Source Files.zip是瑞萨的M16C系列单片机的flash烧写程序。
💻 H
字号:
//It is M16Cflsh.h: the main header file of a M16CFLSH application.  
//
// This software can be offered for free and used as necessary to aid 
// in your program developments.
//
// RENESAS TECHNOLOGY CORPORATION, RENESAS SOLUTIONS CORPORATION,
// and related original software developers assume no responsibility 
// for any damage or infringement of any third-party's rights, originating 
// in the use of the following software.
// Please use this software under the agreement and acceptance of these conditions. 
//
// Copyright(C)1998(2003) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION
// ALL RIGHTS RESERVED
//

#if !defined(AFX_M16CFLSH_H__0A9FB305_1726_11D2_B2D1_00C04FCA7493__INCLUDED_)
#define AFX_M16CFLSH_H__0A9FB305_1726_11D2_B2D1_00C04FCA7493__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 simbol
#include	"SerialComm.h"
#include	"MotFile.h"

#include "defining.h"
/////////////////////////////////////////////////////////////////////////////
// CM16CflshApp:
//Please refer to M16Cflsh.cpp file regarding the definition of the action of this class.  
//

class CM16CflshApp : public CWinApp
{
public:
	CM16CflshApp();

// override
	// Class Wizard makes ovreride of virtual function.ClassWizard.
	//{{AFX_VIRTUAL(CM16CflshApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// implementation

	//{{AFX_MSG(CM16CflshApp)

	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Serial communication object
private: CSerialComm	m_objSerial;									// Serial communication object
public:	 CSerialComm&	GetSerialComm(void){ return m_objSerial; }		// Get communication object.
public:  void			SetFirstSerialState(CSerialComm& objSerialComm,
												DWORD dwBaudrate, BYTE btByteSize,	
												BYTE btParity, BYTE btStopBits);
public:	 DWORD			SetSerialState(CSerialComm& objSerialComm,		// Setting communication palameter.
												DWORD dwBaudrate, BYTE btByteSize,	
												BYTE btParity, BYTE btStopBits, int msgID);
public:	 void			SetLastSerialState(CSerialComm& objSerialComm);

/*private: enum { //DEFAULT_BAUDRATE	= CBR_38400,		// Default  communication setting parameter
				DEFAULT_BAUDRATE = CBR_9600,		// for test
				DEFAULT_BYTESIZE	= 8,
				DEFAULT_PARITY		= NOPARITY,
				DEFAULT_STOPBITS	= ONESTOPBIT };
*/
public:	 DWORD			SetDefaultSerialState(CSerialComm& objSerialComm) {		// Serial default setting
							return SetSerialState(objSerialComm, DEF_BAUDRATE, DEF_BYTE_SIZE,
											DEF_PARITY, DEF_STOP_BITS, IDS_SET_BAUDRATE_DEF); }

////////////////////////////////////////////////////////////////////////////////////

//Flags and access functions for ID check. 
private: BOOL m_acceptedID;
public: void SetAcceptedID(BOOL bID) { m_acceptedID = bID; }
public: const BOOL GetAcceptedID(void) { return m_acceptedID; }

////////////////////////////////////////////////////////////////////////////////////
private: HANDLE	m_hMutex;
public: const HANDLE GetMutex(void) { return m_hMutex; }

// Flags and access functions for communication check.
private: BOOL m_acceptedComm;
public: void SetAcceptedComm(BOOL bComm) { m_acceptedComm = bComm; }
public: const BOOL GetAcceptedComm(void) { return m_acceptedComm; }

////////////////////////////////////////////////////////////////////////////////////

//A Hex file transformation object   
private: CMotFile m_objMotFile;
public: BOOL MakeImage(CString strFilePath) { return m_objMotFile.MakeImage(strFilePath); }
public: CLineImage* GetPage(BYTE* byteData, int nPage) { return m_objMotFile.GetPage(byteData, nPage); }

////////////////////////////////////////////////////////////////////////////////////
//Flash Type
private: BOOL m_FlashType;
public: const BOOL GetFlashType(void) { return m_FlashType; }

//transform baudrate into transmission data.  
//private: const BYTE baudrateToSendStyle(DWORD dwBaudrate);
public: const BYTE baudrateToSendStyle(DWORD dwBaudrate);

// Change baudrate
protected: BOOL ChengeBaudrate(DWORD dwNowB, DWORD dwNewB);

// The processing when error.
public: DWORD CommError(void);
// exit program.
public: void Exit_prg(void);

};

//It is the function for resource definition letter line acquisition.  

inline CString GetResString(DWORD strID) { return CString((LPCSTR)strID); }

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
//Microsoft Developer Studio inserts the declaration of addition immediately before some front line.  

#endif // !defined(AFX_M16CFLSH_H__0A9FB305_1726_11D2_B2D1_00C04FCA7493__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -