asyinterface.cpp

来自「基于Nuleus操作系统和s3c4510的编写的EFC。已经包含了该EFC的设计」· C++ 代码 · 共 87 行

CPP
87
字号
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2003, Ulink Telecom Equipment Co., Ltd. All rights reserved.
//
// File:
//
//    AsyInterface.cpp
//
// Abstract:
//
//    implementation of the CAsyInterface class.
//
// History:
//
//    V1.0	2003-04-08	Alex Duan	Original version.
//    V1.1	2003-11-12	Alex Duan	Replace >>/<< with OnSaveData/OnLoadData
//
///////////////////////////////////////////////////////////////////////////////

#include "AsyInterface.h"
#include "APPCORE.H"

///////////////////////////////////////////////////////////////////////////////
// CAsyInterface

IMPLEMENT_DYNAMIC(CAsyInterface, CInterface)

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

CAsyInterface::CAsyInterface()
{
	m_nBaudRate = 9600;
	m_uDataBits = 8;
	m_uParity   = 0;
	m_uStopBits = 1;
}

CAsyInterface::~CAsyInterface()
{

}

///////////////////////////////////////////////////////////////////////////////
// Return Value:
//		A value indicating the Loopback mode which is defined in CInterface
// Remarks:
//		Gets current loopback mode of the ASY interface.
int CAsyInterface::GetLoopbackMode() const
{
	return LOOPBACK_OFF;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		nMode	Loopback mode defined in CInterface class
// Return Value:
//		TRUE if successful, otherwise FALSE.
// Remarks:
//		Sets current loopback mode of the ASY interface
BOOL CAsyInterface::SetLoopbackMode(int nMode)
{
	UNUSED(nMode);
	return FALSE;
}

// load parameters
void CAsyInterface::OnLoadData()
{
	CInterface::OnLoadData();
	LOAD_INT(m_nBaudRate);
	LOAD_INT(m_uDataBits);
	LOAD_INT(m_uParity);
	LOAD_INT(m_uStopBits);
}

// save parameters
void CAsyInterface::OnSaveData()
{
	CInterface::OnSaveData();
	SAVE_INT(m_nBaudRate);
	SAVE_INT(m_uDataBits);
	SAVE_INT(m_uParity);
	SAVE_INT(m_uStopBits);
}

⌨️ 快捷键说明

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