Beispiel #1
0
void logTask(void * prm)
{
	crtpInitTaskQueue(CRTP_PORT_LOG);
	
	while(1) {
		crtpReceivePacketBlock(CRTP_PORT_LOG, &p);
		
		xSemaphoreTake(logLock, portMAX_DELAY);
		if (p.crtp_channel==TOC_CH)
		  logTOCProcess(p.crtp_data[0]);
		if (p.crtp_channel==CONTROL_CH)
		  logControlProcess();
		xSemaphoreGive(logLock);
	}
}
Beispiel #2
0
void logTask(void * prm)
{
	crtpInitTaskQueue(CRTP_PORT_LOG);
	
	while(1) {
		crtpReceivePacketBlock(CRTP_PORT_LOG, &p);
		
		//xSemaphoreTake(logLock, portMAX_DELAY);
		rt_mutex_take(logLock, RT_WAITING_FOREVER);
		if (p.channel==TOC_CH)
		  logTOCProcess(p.data[0]);
		if (p.channel==CONTROL_CH)
		  logControlProcess();
		//xSemaphoreGive(logLock);
		rt_mutex_release(logLock);
	}
}