コード例 #1
0
ファイル: comm.c プロジェクト: tusimbe/battery
/**
 * @brief  Sends data to selected serial port.
 * @param  pMsg - pointer to COMM message structure to be sent.
 * @return none.
 */
static void CommSendSerialData(const PMessage pMsg)
{
    /* Sends message header and actual data if any. */
    CommWrite((uint8_t *)pMsg, pMsg->size - COMM_MSG_CRC_SIZE);
    /* Sends cyclic redundancy checksum. */
    CommWrite((uint8_t *)&pMsg->crc, COMM_MSG_CRC_SIZE);
}
コード例 #2
0
ファイル: ATIO.CPP プロジェクト: cdaffara/symbiandump-os1
void CATIO::Write(CATBase* aCompletionClass, const TDesC8& aString)
	{
	if (iPortAccess==EPortAccessAllowed)
		{
		ClearBuffer();	// assume previous responses fully processed
		iWriteCommand=aCompletionClass;
		iWritePending=ETrue;
		CommWrite(aString);
		if (aString.Length() > 350)
			{	
			LOGTEXT2(_L8("CATIO:\taString too big! Length:%d"), aString.Length());
			}	
		else
			{
			LOGTEXTREL2(_L8("Tx:\t%S"),&aString);
			}
		LOGTEXT(_L8("Queued a Transmission"));
		}
	}