Пример #1
0
//--------------------------------
void ssi_peripheral::UnloadRxFIFO() {
	int32_t nResult = 1;
	m_nRxCount = 0;
	for (int nIndex = 0; nResult && (BufferSize > nIndex); nIndex++) {
		nResult = SSIDataGetNonBlocking(m_rSpecification.m_nSSIBase,
				&m_nDataRx[nIndex]);
		m_nRxCount += nResult;
	}
	if (m_nRxCount) {
		OnRx();
	}
}
Пример #2
0
long CNetCom::OnNetMsg(WPARAM wParam, LPARAM lParam)
{_STT();

	// Is it a message from the receiver?
	if ( wParam == CNetMsg::eRx && lParam == (LPARAM)m_prx ) 
		return OnRx();

	// Handle tx messages
	else if ( wParam == CNetMsg::eTx && lParam == (LPARAM)m_ptx ) 
		return OnTx();

	return FALSE;
}