亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? board.cpp

?? 基于Nuleus操作系統(tǒng)和s3c4510的編寫的EFC。已經(jīng)包含了該EFC的設(shè)計(jì)說明。這是個(gè)實(shí)際產(chǎn)品的代碼
?? CPP
字號(hào):
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2003, Ulink Telecom Equipment Co., Ltd. All rights reserved.
//
// File:
//
//    Board.cpp
//
// Abstract:
//
//    implementation of the CBoard class. CBoard class is an enwrapping of the 
//	  hardware board.
//
// History:
//
//    V1.0	2003-03-18	Alex Duan	Original version.
//    V1.1	2003-11-06	Alex Duan	Replace EBoardType enum with macros
//    V1.2	2003-11-12	Alex Duan	Replace >>/<< with OnSaveData/OnLoadData
//
///////////////////////////////////////////////////////////////////////////////

#include "Board.h"
#include "APPCORE.H"
#include "LiuInterface.h"
#include "AsyInterface.h"
#include "SynInterface.h"
#include "LanInterface.h"
#include "OptInterface.h"

///////////////////////////////////////////////////////////////////////////////
// CBoard

IMPLEMENT_DYNAMIC(CBoard, CRTObject)

CBoard::CBoard()
{
	m_nSynMode = 0;
	m_wIndex = 0;
	m_wType = BOARD_TYPE_MCU;
	SetSectionString("Boards(0)"); // default section string
}

CBoard::~CBoard()
{
	// free memory
	DWORD key;
	CInterface* pciInterface = NULL;
	POSITION pos = m_mapInterfaces.GetStartPosition();
	while (pos != NULL)
	{
		m_mapInterfaces.GetNextAssoc(pos, key, pciInterface);
		if (pciInterface != NULL)
		{
			delete pciInterface;
			pciInterface = NULL;
		}
	}
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		wInterfaceType	Interface type defined in the file interface.h
//		wInterfaceIndex	Zero-based index of the specified interface in the board
// Return Value:
//		Zero if installed succesfully, otherwise nonzero.
//		error code: -1	Interface exists, -2 failed to install interface
// Remarks:
//		Install an interface to the board.
int CBoard::Install(WORD wInterfaceType, WORD wInterfaceIndex)
{
	int nRetVal = -1;
	CInterface* pci = NULL;
	CString strSection;
	DWORD key = MAKELONG(wInterfaceIndex, wInterfaceType);

	if (!m_mapInterfaces.Lookup(key, pci))
	{// Install new interface
		pci = OnCreateInterface(wInterfaceType); // create interface
		if (pci != NULL)
		{// create successfully.
			pci->SetIndex(wInterfaceIndex); // set index
			strSection.Format("Interfaces(%d,%d)",
				GetIndex(), m_mapInterfaces.GetCount());
			pci->SetSectionString(strSection);
			pci->OnLoadData();
			VERIFY(pci->OnInitInterface()); // initialize interface
			m_mapInterfaces.SetAt(key, pci);
			nRetVal = 0;
		}
		else
		{// failed to create
			nRetVal = -2;
		}
	}
	return nRetVal;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		wInterfaceType	Interface type
//		wInterfaceIndex	Zero-based index of the specified interface in the board
// Remarks:
//		Uninstall an interface from the board.
void CBoard::Uninstall(WORD wInterfaceType, WORD wInterfaceIndex)
{
	DWORD key = MAKELONG(wInterfaceIndex, wInterfaceType);
	CInterface* pciInterface = NULL;
	m_mapInterfaces.Lookup(key, pciInterface);
	if (pciInterface)
		delete pciInterface; // free memory
	m_mapInterfaces.RemoveKey(key);
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		wInterfaceType	Interface type
//		wInterfaceIndex	Zero-based index of the specified interface in the board
// Return Value:
//		A pointer to the CInterface object if interface exists, else NULL.
// Remarks:
//		Get interface information by type and index
CInterface* CBoard::GetInterface(WORD wInterfaceType, WORD wInterfaceIndex) const
{
	CInterface* pciRetVal = NULL;
	DWORD key = MAKELONG(wInterfaceIndex, wInterfaceType);
	if (!m_mapInterfaces.Lookup(key, pciRetVal))
		pciRetVal = NULL;
	return pciRetVal;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		viInfo	[in][out]Contains the version information
// Return Value:
//		TRUE if such version type exists, else FALSE
// Remarks:
//		Get the version of the specified type.
BOOL CBoard::GetVersionInfo(VERSIONINFO& viInfo) const
{
	return m_mapVersions.Lookup(viInfo.eType, viInfo);
}

///////////////////////////////////////////////////////////////////////////////
// Return Value:
//		The value of every two bits shows the status of one interface
//		BITn-BITn-1 : 00 - ok, 01 - not in use, 11 - self test error
// Remarks:
//		Get configuration of the user interface
// NOTE: temporary code, must be modified
WORD CBoard::GetConfig() const
{
	WORD wRetVal = 0xFFFF;
	DWORD key;
	CInterface* pciInterface = NULL;

	POSITION pos = m_mapInterfaces.GetStartPosition();
	while (pos != NULL)
	{
		m_mapInterfaces.GetNextAssoc(pos, key, pciInterface);
		ASSERT(pciInterface);
		if (pciInterface->GetType() == INTERFACE_TYPE_LIU)
		{
			SetBitVal(wRetVal, pciInterface->GetIndex() * 2, 0);
			SetBitVal(wRetVal, pciInterface->GetIndex() * 2 + 1, 0);
		}
		else
		{
			SetBitVal(wRetVal, pciInterface->GetIndex() * 2 + 8, 0);
			SetBitVal(wRetVal, pciInterface->GetIndex() * 2 + 9, 0);
		}
	}
	return wRetVal;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		wInterfaceType	Type of the interface
// Return Value:
//		Interface count
// Remarks:
//		Gets the count of the specified interface type.
UINT CBoard::GetInterfaceCount(WORD wInterfaceType) const
{
	UINT nRetVal = 0;
	DWORD key;
	CInterface* pciInterface = NULL;

	POSITION pos = m_mapInterfaces.GetStartPosition();
	while (pos != NULL)
	{
		m_mapInterfaces.GetNextAssoc(pos, key, pciInterface);
		ASSERT(pciInterface);
		ASSERT(HIWORD(key) == pciInterface->GetType());
		if (HIWORD(key) == wInterfaceType)
			nRetVal++;
	}
	return nRetVal;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		nMode	Synchronization mode (clock mode)
//				For LIU (0:Internal mode, 0x00FF:External mode, other:line rec)
//				For SD2010 (Low byte: mode, high byte: other parameter)
// Remarks:
//		Set system synchronization mode (clock mode)
void CBoard::SetSynMode(WORD nMode)
{
	m_nSynMode = nMode;
//	GetApp()->SetModifiedFlag();
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		bReadFromHardware	TRUE: read clock mode from hardware, else read the
//							variable setted last time.
// Return Value:
//		The system or board's sync mode(clock mode)
// Remarks:
//		Get synchronization mode from hardware
WORD CBoard::GetSynMode(BOOL bReadFromHardware) const
{
	UNUSED(bReadFromHardware);
	return m_nSynMode;
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		WType	Type of the board
// Remarks:
//		Set the type of the board.
void CBoard::SetType(WORD wType)
{
	m_wType = wType;
//	GetApp()->SetModifiedFlag();
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		wIndex	Zero-based index of the board in the device.
// Remarks:
//		Set index of the board.
void CBoard::SetIndex(WORD wIndex)
{ 
	m_wIndex = wIndex;
//	GetApp()->SetModifiedFlag();
}

///////////////////////////////////////////////////////////////////////////////
// Parameters:
//		dwBaseAddr	32-bits absolute base address of the board.
// Remarks:
//		Set base address of the board
void CBoard::SetBaseAddr(DWORD dwBaseAddr)
{
	m_dwBaseAddr = dwBaseAddr;
//	GetApp()->SetModifiedFlag();
}

// Framework call this to initialize the board.
BOOL CBoard::OnInitBoard()
{
	return TRUE;
}

// create a new interface
CInterface* CBoard::OnCreateInterface(WORD wInterfaceType)
{
	CInterface *pci = NULL;
	switch (wInterfaceType)
	{
	case INTERFACE_TYPE_LIU:
		pci = new CLiuInterface();
		break;
	case INTERFACE_TYPE_SYN:
		pci = new CSynInterface();
		break;
	case INTERFACE_TYPE_ASY:
		pci = new CAsyInterface();
		break;
	case INTERFACE_TYPE_OPT:
		pci = new COptInterface();
		break;
	case INTERFACE_TYPE_LAN:
		pci = new CLanInterface();
		break;
	default:
		break;
	}
	return pci;
}

// load parameters
void CBoard::OnLoadData()
{
	LOAD_INT(m_wType);
	LOAD_INT(m_wIndex);
	LOAD_INT(m_dwBaseAddr);
	LOAD_INT(m_nSynMode);
	LOAD_STRING(m_strSerialNumber);

	// load interfaces
	WORD wType, wIndex;
	CString strSection;
	for (int i = 0; ;i++) 
	{
		strSection.Format("Interfaces(%d,%d)", GetIndex(), i);
		wType  = GetApp()->GetProfileInt(strSection, "Type", -1);
		wIndex = GetApp()->GetProfileInt(strSection, "m_wIndex", -1);
		if (wType == (WORD)-1 || wIndex == (WORD)-1)
			break;
		VERIFY(Install(wType, wIndex) != -2);
	}
}

// save parameters
void CBoard::OnSaveData()
{
	SAVE_INT(m_wType);
	SAVE_INT(m_wIndex);
	SAVE_INT(m_dwBaseAddr);
	SAVE_INT(m_nSynMode);
	SAVE_STRING(m_strSerialNumber);

	// Save Interfaces
	DWORD key;
	CInterface *pciInterface = NULL;
	POSITION pos = m_mapInterfaces.GetStartPosition();
	while (pos != NULL) 
	{
		m_mapInterfaces.GetNextAssoc(pos, key, pciInterface);
		ASSERT(pciInterface);
		pciInterface->OnSaveData();
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
18成人在线观看| 一区二区三区在线不卡| 95精品视频在线| 日本伊人色综合网| 国产精品三级电影| 日韩欧美国产综合一区| 成人激情黄色小说| 精品一区二区免费在线观看| 亚洲免费大片在线观看| 久久蜜臀中文字幕| 日韩免费视频一区| 欧美色电影在线| 不卡的av网站| 成人丝袜18视频在线观看| 久久国产人妖系列| 午夜视黄欧洲亚洲| 一区二区三区中文字幕电影| 国产日本欧美一区二区| 欧美一级生活片| 欧美男人的天堂一二区| 色8久久人人97超碰香蕉987| 高清国产午夜精品久久久久久| 男人的j进女人的j一区| 亚洲成人免费视频| 亚洲国产日韩av| 亚洲一区二区在线视频| 亚洲三级电影全部在线观看高清| 久久精品视频一区二区三区| 欧美成人r级一区二区三区| 91精品国产综合久久精品图片| 欧美视频你懂的| 在线观看日产精品| 欧美体内she精视频| 欧洲一区在线电影| 欧美中文字幕亚洲一区二区va在线| 成人在线综合网| www.欧美.com| av成人动漫在线观看| 国产99久久久国产精品免费看| 国产麻豆一精品一av一免费 | 依依成人精品视频| 中文字幕亚洲成人| ...xxx性欧美| 亚洲精品免费看| 亚洲一区在线视频观看| 亚洲国产日韩一级| 青青草97国产精品免费观看| 男人的天堂亚洲一区| 久久爱另类一区二区小说| 国产专区欧美精品| 丁香激情综合国产| 91丨porny丨国产入口| 91麻豆福利精品推荐| 在线观看三级视频欧美| 在线成人午夜影院| 欧美大黄免费观看| 久久久亚洲午夜电影| 国产精品久久毛片a| 亚洲精品久久嫩草网站秘色| 亚洲影视在线播放| 日韩不卡在线观看日韩不卡视频| 精品一区二区在线播放| 国产老女人精品毛片久久| 高清beeg欧美| 欧日韩精品视频| 日韩一区二区三区精品视频 | 亚洲成人免费视频| 久久99国产精品尤物| 成人av电影免费观看| 日本精品视频一区二区三区| 欧美一区二区啪啪| 久久久99精品免费观看不卡| 亚洲视频在线观看一区| 同产精品九九九| 国产成人在线网站| 91精彩视频在线观看| 欧美电影免费观看高清完整版在线 | 久久99久久99小草精品免视看| 国产成人自拍网| 欧美私人免费视频| 久久丝袜美腿综合| 亚洲精品视频免费看| 日韩精品成人一区二区三区| 国产精品一区二区久久精品爱涩| 色域天天综合网| 欧美一二区视频| 国产精品久久久久三级| 视频在线观看一区| 成人一区在线看| 在线电影一区二区三区| 中文子幕无线码一区tr| 视频一区在线播放| 成人sese在线| 日韩欧美一级特黄在线播放| 国产精品精品国产色婷婷| 日韩精品一级二级| 成人v精品蜜桃久久一区| 91精品国产福利在线观看| 国产精品不卡在线观看| 裸体在线国模精品偷拍| 在线观看亚洲专区| 国产精品国产三级国产aⅴ入口| 免费看日韩精品| 日本高清成人免费播放| 国产午夜精品美女毛片视频| 天堂蜜桃91精品| 91久久人澡人人添人人爽欧美| 久久久久亚洲综合| 久久疯狂做爰流白浆xx| 欧美日本在线看| 亚洲免费在线视频| 成人激情文学综合网| 久久青草国产手机看片福利盒子| 日韩中文字幕亚洲一区二区va在线| 99精品偷自拍| 国产欧美日产一区| 黄色日韩三级电影| 在线观看91精品国产麻豆| 亚洲一区二区三区四区的| 99久久精品免费观看| 国产欧美精品日韩区二区麻豆天美| 奇米精品一区二区三区在线观看 | 国产成人在线视频免费播放| 欧美精品一区在线观看| 日本va欧美va欧美va精品| 欧洲在线/亚洲| 一区二区三区日韩精品| 91免费国产在线| 亚洲情趣在线观看| 不卡欧美aaaaa| 亚洲欧美怡红院| 99这里只有精品| 国产精品久99| 91丨九色丨尤物| 1区2区3区欧美| 99精品一区二区| 亚洲女同ⅹxx女同tv| 色综合久久88色综合天天免费| 国产精品卡一卡二| 91香蕉视频在线| 一区av在线播放| 欧美影院一区二区| 午夜国产精品影院在线观看| 欧美日韩午夜精品| 日韩成人免费看| 精品国产一区久久| 国产精品一级片在线观看| 国产清纯在线一区二区www| 成人午夜视频网站| 日韩码欧中文字| 91福利在线播放| 日韩激情一区二区| 精品嫩草影院久久| 懂色av一区二区三区免费观看| 国产精品久久毛片a| 一本久道中文字幕精品亚洲嫩| 一区二区三区在线观看网站| 欧美日韩国产一二三| 美女一区二区视频| 日本一区二区视频在线| 色老综合老女人久久久| 琪琪一区二区三区| 中文字幕免费在线观看视频一区| 91最新地址在线播放| 亚洲国产中文字幕| 精品国产凹凸成av人网站| 成人18精品视频| 午夜激情久久久| 国产欧美日韩三级| 欧美日韩国产另类一区| 久久69国产一区二区蜜臀| 国产精品日产欧美久久久久| 欧美性欧美巨大黑白大战| 美女视频免费一区| 亚洲欧洲成人精品av97| 欧美另类z0zxhd电影| 国产成人亚洲精品狼色在线| 亚洲激情欧美激情| 日韩免费性生活视频播放| 99久久国产免费看| 蜜臀av一区二区三区| 国产精品久久久久久久岛一牛影视| 在线欧美一区二区| 国产精品91一区二区| 一区二区三区四区在线免费观看| 日韩一级完整毛片| 91麻豆swag| 国产精品一级二级三级| 亚洲国产精品久久人人爱蜜臀| 精品成人在线观看| 欧美三级资源在线| 国产福利精品一区| 午夜精品久久久久久不卡8050| 亚洲国产精品成人综合 | 国产欧美一区二区精品忘忧草| 欧美亚洲动漫制服丝袜| 国产成人在线网站| 奇米色一区二区三区四区| 一区二区三区四区五区视频在线观看| 337p粉嫩大胆噜噜噜噜噜91av|