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

📄 senddata.cpp

📁 通过PC端的串口调试工具
💻 CPP
字号:
// SendData.cpp: implementation of the CSendData class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "mctmis.h"
#include "SendData.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CSendData::CSendData()
{
	n_PageSize=0;
}

CSendData::~CSendData()
{

}

BOOL CSendData::Conversion()
{
	BYTE temp;
	int i;
	m_SendBuf.RemoveAll();
	m_SendBuf.Add(0x76);	
	m_SendBuf.Add(0x76);	
	m_SendBuf.Add(0x76);		
	switch(m_Type)
	{
		case 0x11://写入页
			m_SendBuf.Add(0x11);
			m_SendBuf.Add(m_HexPage.GetAt(n_PageSize));
			for (i=0;i<64;i++)
			m_SendBuf.Add(m_HexData.GetAt(n_PageSize*64+i));			
			break;
		case 0x12://读出页	
			m_SendBuf.Add(0x12);	
			m_SendBuf.Add(m_HexPage.GetAt(n_PageSize));
			break;
	}
	return TRUE;
}

⌨️ 快捷键说明

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