VOID DUCTx_Start(DUCTx *pThis)
{
	memset(&oTxPacket[0], 0, sizeof(oTxPacket));

	Timer_Start(&pThis->oTmrProcessJob);
	Task_Start(&pThis->oTskReceiveJob);
	Task_Start(&pThis->oTskProcessJob);

}
VOID GSML1Mgr_Start( GSML1Mgr *pThis)
{
	UINT8 nRxMgr, nTxMgr;
	
	for(nRxMgr = 0; nRxMgr < MAX_RX_MGR; nRxMgr++)
	{
		RxMgr_Start(&pThis->oRxMgr[nRxMgr]);
		RxMgr_SetCore(&pThis->oRxMgr[nRxMgr], pThis->eCore);

	}	

	for(nTxMgr = 0; nTxMgr < MAX_TX_MGR; nTxMgr++)
	{
		TxMgr_Start(&pThis->oTxMgr[nTxMgr]);
		TxMgr_SetCore(&pThis->oTxMgr[nTxMgr], pThis->eCore);
		Task_Start(&pThis->oTxMgrDataTask[nTxMgr]);
	}	


	Task_Start(&pThis->oCommandTask);
	Task_Start(&pThis->oDataTask);

	
}
VOID IpuToDsp_Start(IpuToDsp *pThis)
{
	if (Srio_IsInitialized() == TRUE)
	{
		Srio_InitDBCallBack(Srio_GetHandle(), DB_CALLBACK1 ,IpuToDsp_DoorbellCb );
		Task_Start(&pThis->IPURx_Tsk);
		ICoreQ_Start(pThis->pL1TxC1, SEG_ICOREQ_BURST_TO_FPGA_ID, ETY1);
	//	ICoreQ_Start(pThis->pL1TxC2, SEG_ICOREQ_BURST_TO_FPGA_ID, ETY1);
	}
	else
	{
		// Exception
	//	LOG_FATAL("IpuToDsp: Srio not initialized");
		LOG_FATAL0("IpuToDsp: Srio not initialized");
	}
	
}
Ejemplo n.º 4
0
int CProcService::Start()
{
	if (!Task_Start())
		return -1;
	return 0;
}
Ejemplo n.º 5
0
//---------------------------------------------------------------------------
int main(void)
{
	Task_Init();									// Initialize the RTOS
	
	//-----------------------------------------------------------------------	
	// Create three application tasks at the same priority
	//-----------------------------------------------------------------------
	Task_CreateTask(&(stTask1.stTask), 				// Pointer to the task
					"RR Task1",						// Task name
					(UCHAR*)(stTask1.ausStack),		// Task stack pointer
					64,								// Task Size
					1,								// Task Priority
					(void*)Task1Func);				// Task function pointer

	Task_CreateTask(&(stTask2.stTask), 				// Pointer to the task
					"RR Task2",						// Task name
					(UCHAR*)(stTask2.ausStack),		// Task stack pointer
					64,								// Task Size
					1,								// Task Priority
					(void*)Task2Func);				// Task function pointer
	
	Task_CreateTask(&(stTask3.stTask), 				// Pointer to the task
					"RR Task3",						// Task name
					(UCHAR*)(stTask3.ausStack),		// Task stack pointer
					64,								// Task Size
					1,								// Task Priority
					(void*)Task3Func);				// Task function pointer
	
					
	// Create the idle task - always need this
	Task_CreateTask(&(stIdleTask.stTask), 
					"Idle Task",
					(UCHAR*)(stIdleTask.ausStack),
					64,
					0,								// !! Task priority is 0 for idle task !!
					(void*)IdleTask);	

	Task_Add((TASK_STRUCT*)&stTask1);				// Add the tasks to the scheduler
	Task_Add((TASK_STRUCT*)&stTask2);				// Add the tasks to the scheduler
	Task_Add((TASK_STRUCT*)&stTask3);				// Add the tasks to the scheduler	
	Task_Add((TASK_STRUCT*)&stIdleTask);
	
	
	//-----------------------------------------------------------------------	
	// Set the time quantum for each task:
	//
	// Each task will get a fixed % of CPU time based on the quantum values
	// set here, assuming that tasks aren't sleeping or pending.
	// The portion of CPU time given to each task is the ratio of the task's
	// quantum over the sum of each task's quantum.
	//
	// In this example Task 1 will get 5/(5 + 10 + 20) = 5/35 = 14.28% CPU Time
	// Similarly, Task 2 will get 10/35 = 28.57%, and Task 3 will get 20/35 =
	// 57.14% CPU time.  
	//
	// Note that these times do not take into account events like interrupts
	// or other IO operations that eat cycles or switch contexts outside of 
	// the tasks.  
	//-----------------------------------------------------------------------
		
	Task_SetQuantum((TASK_STRUCT)&stTask1, 5);		// Execute continuously for 5 ticks
	Task_SetQuantum((TASK_STRUCT)&stTask2, 10);		// Execute continuously for 10 ticks
	Task_SetQuantum((TASK_STRUCT)&stTask3, 20);		// Execute continuously for 20 ticks
		
	Task_Start((TASK_STRUCT*)&stTask1);				// Start the tasks
	Task_Start((TASK_STRUCT*)&stTask2);				// Start the tasks
	Task_Start((TASK_STRUCT*)&stTask3);				// Start the tasks	
	Task_Start((TASK_STRUCT*)&stIdleTask);
	
	Task_StartTasks();								// Start the scheduler 
	
	//--------------------------------------
	// Scheduler takes over - never returns
	//--------------------------------------
	
	return 0;
}
void EthConfig_Start(void)
{
	Task_Start(&oDiagIfd);
}