您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vQueueAddToRegistry函数代码示例

51自学网 2021-06-03 09:31:03
  C++
这篇教程C++ vQueueAddToRegistry函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vQueueAddToRegistry函数的典型用法代码示例。如果您正苦于以下问题:C++ vQueueAddToRegistry函数的具体用法?C++ vQueueAddToRegistry怎么用?C++ vQueueAddToRegistry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vQueueAddToRegistry函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: vStartCountingSemaphoreTasks

void vStartCountingSemaphoreTasks( void ){	/* Create the semaphores that we are going to use for the test/demo.  The	first should be created such that it starts at its maximum count value,	the second should be created such that it starts with a count value of zero. */	xParameters[ 0 ].xSemaphore = xSemaphoreCreateCounting( countMAX_COUNT_VALUE, countMAX_COUNT_VALUE );	xParameters[ 0 ].uxExpectedStartCount = countSTART_AT_MAX_COUNT;	xParameters[ 0 ].uxLoopCounter = 0;	xParameters[ 1 ].xSemaphore = xSemaphoreCreateCounting( countMAX_COUNT_VALUE, 0 );	xParameters[ 1 ].uxExpectedStartCount = 0;	xParameters[ 1 ].uxLoopCounter = 0;	/* Were the semaphores created? */	if( ( xParameters[ 0 ].xSemaphore != NULL ) || ( xParameters[ 1 ].xSemaphore != NULL ) )	{		/* vQueueAddToRegistry() adds the semaphore to the registry, if one is		in use.  The registry is provided as a means for kernel aware		debuggers to locate semaphores and has no purpose if a kernel aware		debugger is not being used.  The call to vQueueAddToRegistry() will be		removed by the pre-processor if configQUEUE_REGISTRY_SIZE is not		defined or is defined to be less than 1. */		vQueueAddToRegistry( ( QueueHandle_t ) xParameters[ 0 ].xSemaphore, "Counting_Sem_1" );		vQueueAddToRegistry( ( QueueHandle_t ) xParameters[ 1 ].xSemaphore, "Counting_Sem_2" );		/* Create the demo tasks, passing in the semaphore to use as the parameter. */		xTaskCreate( prvCountingSemaphoreTask, "CNT1", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 0 ] ), tskIDLE_PRIORITY, NULL );		xTaskCreate( prvCountingSemaphoreTask, "CNT2", configMINIMAL_STACK_SIZE, ( void * ) &( xParameters[ 1 ] ), tskIDLE_PRIORITY, NULL );	}}
开发者ID:bryanclark90,项目名称:Autonomous-Car,代码行数:30,


示例2: vStartSemaphoreTasks

void vStartSemaphoreTasks( UBaseType_t uxPriority ){xSemaphoreParameters *pxFirstSemaphoreParameters, *pxSecondSemaphoreParameters;const TickType_t xBlockTime = ( TickType_t ) 100;	/* Create the structure used to pass parameters to the first two tasks. */	pxFirstSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) );	if( pxFirstSemaphoreParameters != NULL )	{		/* Create the semaphore used by the first two tasks. */		pxFirstSemaphoreParameters->xSemaphore = xSemaphoreCreateBinary();		xSemaphoreGive( pxFirstSemaphoreParameters->xSemaphore );		if( pxFirstSemaphoreParameters->xSemaphore != NULL )		{			/* Create the variable which is to be shared by the first two tasks. */			pxFirstSemaphoreParameters->pulSharedVariable = ( uint32_t * ) pvPortMalloc( sizeof( uint32_t ) );			/* Initialise the share variable to the value the tasks expect. */			*( pxFirstSemaphoreParameters->pulSharedVariable ) = semtstNON_BLOCKING_EXPECTED_VALUE;			/* The first two tasks do not block on semaphore calls. */			pxFirstSemaphoreParameters->xBlockTime = ( TickType_t ) 0;			/* Spawn the first two tasks.  As they poll they operate at the idle priority. */			xTaskCreate( prvSemaphoreTest, "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );			xTaskCreate( prvSemaphoreTest, "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters, tskIDLE_PRIORITY, ( TaskHandle_t * ) NULL );		}	}	/* Do exactly the same to create the second set of tasks, only this time 	provide a block time for the semaphore calls. */	pxSecondSemaphoreParameters = ( xSemaphoreParameters * ) pvPortMalloc( sizeof( xSemaphoreParameters ) );	if( pxSecondSemaphoreParameters != NULL )	{		pxSecondSemaphoreParameters->xSemaphore = xSemaphoreCreateBinary();		xSemaphoreGive( pxSecondSemaphoreParameters->xSemaphore );		if( pxSecondSemaphoreParameters->xSemaphore != NULL )		{			pxSecondSemaphoreParameters->pulSharedVariable = ( uint32_t * ) pvPortMalloc( sizeof( uint32_t ) );			*( pxSecondSemaphoreParameters->pulSharedVariable ) = semtstBLOCKING_EXPECTED_VALUE;			pxSecondSemaphoreParameters->xBlockTime = xBlockTime / portTICK_PERIOD_MS;			xTaskCreate( prvSemaphoreTest, "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL );			xTaskCreate( prvSemaphoreTest, "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters, uxPriority, ( TaskHandle_t * ) NULL );		}	}	/* vQueueAddToRegistry() adds the semaphore to the registry, if one is	in use.  The registry is provided as a means for kernel aware 	debuggers to locate semaphores and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is 	defined to be less than 1. */	vQueueAddToRegistry( ( QueueHandle_t ) pxFirstSemaphoreParameters->xSemaphore, "Counting_Sem_1" );	vQueueAddToRegistry( ( QueueHandle_t ) pxSecondSemaphoreParameters->xSemaphore, "Counting_Sem_2" );}
开发者ID:UTAT-SpaceSystems,项目名称:CDH-OBC_PhaseI,代码行数:59,


示例3: NFC_APP_Initialize

void NFC_APP_Initialize ( void ){    nfc_appData.inQ = xQueueCreate(8, sizeof(char));    vQueueAddToRegistry(nfc_appData.inQ, nfc_receive_q);    nfc_appData.rxQ = xQueueCreate(32, sizeof(char));    vQueueAddToRegistry(nfc_appData.rxQ, nfc_uart_rx_q);    nfc_appData.txBufferQ = xQueueCreate(TX_BUF_SIZE, sizeof(char));    vQueueAddToRegistry(nfc_appData.txBufferQ, nfc_uart_tx_q);}
开发者ID:mlevy94,项目名称:ECE4534-Team1,代码行数:9,


示例4: localInstantCmdInterpreter

SimpleMotionComm::SimpleMotionComm( Serial *port, System *parent, int nodeAddress )/*:	localInstantCmdInterpreter(parent),	localBufferedCmdInterpreter(parent)*/{	parentSystem=parent;	//physicalIO=&parent->physIO;	comm = port;	userCmds.allocate( CMDBUFSIZE );	userCmdRets.allocate( CMDBUFSIZE );	myAddress = nodeAddress;	cmdClock = 0;	setBusTimeout(1000);//default 0.1sec	setBusBufferedCmdPeriod(100);//default 1/100s	bufferedCmdStatus=SM_BUFCMD_STAT_IDLE;	setBusBaudRate(460800);	setBusMode(1);	resetReceiverState();	receptionBeginTime=0;	//create queue	localInstantCmdDelayQueue = xQueueCreate( 4, sizeof( SMPayloadCommandForQueue ) );	//localInstantCmdDelayQueue = xQueueCreate( 10, sizeof( SMPayloadCommandForQueue ) );	//set Q naming for kernel aware debugging, otherwise useless:	vQueueAddToRegistry(localInstantCmdDelayQueue,(signed char*)"485InstDlyQ");	//create queue	localBufferedCmdDelayQueue= xQueueCreate( 10, sizeof( SMPayloadCommandForQueue ) );	//set Q naming for kernel aware debugging, otherwise useless:	vQueueAddToRegistry(localBufferedCmdDelayQueue,(signed char*)"485BufDlyQ");    payloadIn.allocate(PAYLOAD_BUFSIZE);    payloadOut.allocate(PAYLOAD_BUFSIZE);    mutex = xSemaphoreCreateMutex();    if( mutex == NULL )    {    	parentSystem->setFault(FLT_SM485_ERROR|FLT_FIRMWARE|FLT_ALLOC,480101);    }    bufferMutex = xSemaphoreCreateMutex();    if(bufferMutex==NULL)    {    	parentSystem->setFault( FLT_SM485_ERROR|FLT_FIRMWARE|FLT_ALLOC,480102);    }    vSemaphoreCreateBinary( SimpleMotionBufferedTaskSemaphore );    if(SimpleMotionBufferedTaskSemaphore==NULL)    {    	parentSystem->setFault( FLT_SM485_ERROR|FLT_FIRMWARE|FLT_ALLOC,480103);    }    //xSemaphoreGive( mutex );}
开发者ID:CaseyHsu,项目名称:ArgonServoDriveFirmware,代码行数:56,


示例5: APP_Init

void APP_Init(void) {  //DbgConsole_Printf("hello world./r/n");#if PL_CONFIG_HAS_SHELL_QUEUE  SQUEUE_Init();#endif  semSW2 = xSemaphoreCreateBinary();  if (semSW2==NULL) { /* semaphore creation failed */    for(;;){} /* error */  }  vQueueAddToRegistry(semSW2, "Sem_SW2");  semSW3 = xSemaphoreCreateBinary();  if (semSW3==NULL) { /* semaphore creation failed */    for(;;){} /* error */  }  vQueueAddToRegistry(semSW3, "Sem_SW3");  semLED = xSemaphoreCreateBinary();  if (semLED==NULL) { /* semaphore creation failed */    for(;;){} /* error */  }  vQueueAddToRegistry(semLED, "Sem_LED");  semMouse = xSemaphoreCreateBinary();  if (semMouse==NULL) { /* semaphore creation failed */    for(;;){} /* error */  }  vQueueAddToRegistry(semMouse, "Sem_Mouse");  semKbd = xSemaphoreCreateBinary();  if (semKbd==NULL) { /* semaphore creation failed */    for(;;){} /* error */  }  vQueueAddToRegistry(semKbd, "Sem_Kbd");#if 0  /*! /todo 1 Increase stack size by 50 */  if (xTaskCreate(ButtonTask, "Buttons", configMINIMAL_STACK_SIZE+50, NULL, tskIDLE_PRIORITY+2, NULL) != pdPASS) { /*! /todo 1 Increase stack size by 50 */#else    if (xTaskCreate(ButtonTask, "Buttons", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+2, NULL) != pdPASS) {#endif    for(;;){} /* error */  }  if (xTaskCreate(AppTask, "App", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {    for(;;){} /* error */  }#if configUSE_TRACE_HOOKS  vTraceSetISRProperties("ISR_USB", TRACE_PRIO_ISR_USB);#endif}
开发者ID:SISommer,项目名称:mcuoneclipse,代码行数:48,


示例6: vCreatePrintfSemaphore

/*-----------------------------------------------------------------------  * Debug serial port display update functions  *------------------------------------------------------------------------  */ static void vCreatePrintfSemaphore( void ) {	if (semPrintfGate == 0)	{		semPrintfGate = xSemaphoreCreateRecursiveMutex();		vQueueAddToRegistry( ( QueueHandle_t ) semPrintfGate, "g_printf_Mutex" );	} }
开发者ID:AlexShiLucky,项目名称:freertos,代码行数:12,


示例7: MPU_vQueueAddToRegistry

	void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName )	{	BaseType_t xRunningPrivileged = xPortRaisePrivilege();		vQueueAddToRegistry( xQueue, pcName );		vPortResetPrivilege( xRunningPrivileged );	}
开发者ID:sean93park,项目名称:freertos,代码行数:8,


示例8: MPU_vQueueAddToRegistry

	void MPU_vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName )	{	portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();		vQueueAddToRegistry( xQueue, pcName );		portRESET_PRIVILEGE( xRunningPrivileged );	}
开发者ID:ADTL,项目名称:ARMWork,代码行数:8,


示例9: MPU_vQueueAddToRegistry

void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, char *pcName ){    BaseType_t xRunningPrivileged = prvRaisePrivilege();    vQueueAddToRegistry( xQueue, pcName );    portRESET_PRIVILEGE( xRunningPrivileged );}
开发者ID:RitikaGupta1207,项目名称:freertos,代码行数:8,


示例10: xNetworkBuffersInitialise

BaseType_t xNetworkBuffersInitialise( void ){BaseType_t xReturn, x;	/* Only initialise the buffers and their associated kernel objects if they	have not been initialised before. */	if( xNetworkBufferSemaphore == NULL )	{		xNetworkBufferSemaphore = xSemaphoreCreateCounting( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS, ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS );		configASSERT( xNetworkBufferSemaphore );		#if ( configQUEUE_REGISTRY_SIZE > 0 )		{			vQueueAddToRegistry( xNetworkBufferSemaphore, "NetBufSem" );		}		#endif /* configQUEUE_REGISTRY_SIZE */		/* If the trace recorder code is included name the semaphore for viewing		in FreeRTOS+Trace.  */		#if( ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 )		{			extern QueueHandle_t xNetworkEventQueue;			vTraceSetQueueName( xNetworkEventQueue, "IPStackEvent" );			vTraceSetQueueName( xNetworkBufferSemaphore, "NetworkBufferCount" );		}		#endif /*  ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 */		if( xNetworkBufferSemaphore != NULL )		{			vListInitialise( &xFreeBuffersList );			/* Initialise all the network buffers.  No storage is allocated to			the buffers yet. */			for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ )			{				/* Initialise and set the owner of the buffer list items. */				xNetworkBufferDescriptors[ x ].pucEthernetBuffer = NULL;				vListInitialiseItem( &( xNetworkBufferDescriptors[ x ].xBufferListItem ) );				listSET_LIST_ITEM_OWNER( &( xNetworkBufferDescriptors[ x ].xBufferListItem ), &xNetworkBufferDescriptors[ x ] );				/* Currently, all buffers are available for use. */				vListInsert( &xFreeBuffersList, &( xNetworkBufferDescriptors[ x ].xBufferListItem ) );			}			uxMinimumFreeNetworkBuffers = ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS;		}	}	if( xNetworkBufferSemaphore == NULL )	{		xReturn = pdFAIL;	}	else	{		xReturn = pdPASS;	}	return xReturn;}
开发者ID:ttzeng,项目名称:lpcopen,代码行数:58,


示例11: RFID_Init

void RFID_Init(void) {  rfidSem = xSemaphoreCreateRecursiveMutex();  if (rfidSem==NULL) { /* creation failed? */    for(;;);  }  vQueueAddToRegistry(rfidSem, "rfidSem");  if (xTaskCreate(RfidTask, "RFID", 600/sizeof(StackType_t), NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {    for(;;){} /* error */  }}
开发者ID:jeffyoon,项目名称:mcuoneclipse,代码行数:10,


示例12: vStartGenericQueueTasks

void vStartGenericQueueTasks( UBaseType_t uxPriority ){QueueHandle_t xQueue;SemaphoreHandle_t xMutex;	/* Create the queue that we are going to use for the	prvSendFrontAndBackTest demo. */	xQueue = xQueueCreate( genqQUEUE_LENGTH, sizeof( uint32_t ) );	/* vQueueAddToRegistry() adds the queue to the queue registry, if one is	in use.  The queue registry is provided as a means for kernel aware	debuggers to locate queues and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is	defined to be less than 1. */	vQueueAddToRegistry( xQueue, "Gen_Queue_Test" );	/* Create the demo task and pass it the queue just created.  We are	passing the queue handle by value so it does not matter that it is	declared on the stack here. */	xTaskCreate( prvSendFrontAndBackTest, "GenQ", configMINIMAL_STACK_SIZE, ( void * ) xQueue, uxPriority, NULL );	/* Create the mutex used by the prvMutexTest task. */	xMutex = xSemaphoreCreateMutex();	/* vQueueAddToRegistry() adds the mutex to the registry, if one is	in use.  The registry is provided as a means for kernel aware	debuggers to locate mutexes and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is	defined to be less than 1. */	vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Gen_Queue_Mutex" );	/* Create the mutex demo tasks and pass it the mutex just created.  We are	passing the mutex handle by value so it does not matter that it is declared	on the stack here. */	xTaskCreate( prvLowPriorityMutexTask, "MuLow", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_LOW_PRIORITY, NULL );	xTaskCreate( prvMediumPriorityMutexTask, "MuMed", configMINIMAL_STACK_SIZE, NULL, genqMUTEX_MEDIUM_PRIORITY, &xMediumPriorityMutexTask );	xTaskCreate( prvHighPriorityMutexTask, "MuHigh", configMINIMAL_STACK_SIZE, ( void * ) xMutex, genqMUTEX_HIGH_PRIORITY, &xHighPriorityMutexTask );}
开发者ID:LukasWoodtli,项目名称:QFreeRTOS,代码行数:41,


示例13: InitSockets

void InitSockets(void){    for(int i=0; i<NUM_SOCKETS; i++){        if(!socket_state[i].initialized){            if(socket_state[i].buf_access == NULL){                socket_state[i].buf_access = xSemaphoreCreateMutex();                vQueueAddToRegistry(socket_state[i].buf_access, buf_access_mutex_names[i]);                socket_state[i].tx_buf_full = xSemaphoreCreateMutex();                vQueueAddToRegistry(socket_state[i].tx_buf_full, tx_buf_full_names[i]);                socket_state[i].rx_buf_empty = xSemaphoreCreateMutex();                vQueueAddToRegistry(socket_state[i].rx_buf_empty, rx_buf_empty_names[i]);                //take send/receive semaphores so that other threads cannot send/receive                //before sockets connect                xSemaphoreTake(socket_state[i].tx_buf_full, portMAX_DELAY);                xSemaphoreTake(socket_state[i].rx_buf_empty, portMAX_DELAY);            }            socket_state[i].initialized = 1;        }    }}
开发者ID:Mindtribe,项目名称:Leash-Debugger,代码行数:21,


示例14: vCDCCommandConsoleStart

void vCDCCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPriority ){	/* Create the semaphores and mutexes used by the CDC to task interface. */	xCDCMutex = xSemaphoreCreateMutex();	vSemaphoreCreateBinary( xNewDataSemaphore );	configASSERT( xCDCMutex );	configASSERT( xNewDataSemaphore );	/* Add the semaphore and mutex to the queue registry for viewing in the	kernel aware state viewer. */	vQueueAddToRegistry( xCDCMutex, "CDCMu" );	vQueueAddToRegistry( xNewDataSemaphore, "CDCDat" );	/* Create that task that handles the console itself. */	xTaskCreate( 	prvCDCCommandConsoleTask,	/* The task that implements the command console. */					"CDCCmd",					/* Text name assigned to the task.  This is just to assist debugging.  The kernel does not use this name itself. */					usStackSize,				/* The size of the stack allocated to the task. */					NULL,						/* The parameter is not used, so NULL is passed. */					uxPriority,					/* The priority allocated to the task. */					NULL );						/* A handle is not required, so just pass NULL. */}
开发者ID:jbalcerz,项目名称:Stm32Discovery_FreeRTOS,代码行数:21,


示例15: prvCheckForValidListAndQueue

static void prvCheckForValidListAndQueue( void ){	/* Check that the list from which active timers are referenced, and the	queue used to communicate with the timer service, have been	initialised. */	taskENTER_CRITICAL();	{		if( xTimerQueue == NULL )		{			vListInitialise( &xActiveTimerList1 );			vListInitialise( &xActiveTimerList2 );			pxCurrentTimerList = &xActiveTimerList1;			pxOverflowTimerList = &xActiveTimerList2;			#if( configSUPPORT_STATIC_ALLOCATION == 1 )			{				/* The timer queue is allocated statically in case				configSUPPORT_DYNAMIC_ALLOCATION is 0. */				static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */				static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */				xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );			}			#else			{				xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) );			}			#endif			#if ( configQUEUE_REGISTRY_SIZE > 0 )			{				if( xTimerQueue != NULL )				{					vQueueAddToRegistry( xTimerQueue, "TmrQ" );				}				else				{					mtCOVERAGE_TEST_MARKER();				}			}			#endif /* configQUEUE_REGISTRY_SIZE */		}		else		{			mtCOVERAGE_TEST_MARKER();		}	}	taskEXIT_CRITICAL();}
开发者ID:bensinghbeno,项目名称:design-engine,代码行数:49,


示例16: POSE_Initialize

void POSE_Initialize(void) {  poseData.state = POSE_STATE_INIT;  poseData.poseQueue = xQueueCreate(POSE_QUEUE_SIZE, sizeof(POSE_QUEUE_TYPE));  if (poseData.poseQueue == 0) {    errorCheck(POSE_IDENTIFIER, __LINE__);  }  vQueueAddToRegistry(poseData.poseQueue, "Pose Queue");  poseData.x = 0;  poseData.y = 0;  poseData.yaw = 0;  memset(&poseData.prev_counts, 0, sizeof(poseData.prev_counts));  registerEncodersCallback(pose_encoder_counts_callback);  registerUartReceiverCallback(pose_uart_rx_pose_override_Callback);}
开发者ID:jamesr66a,项目名称:EmbeddedCapstoneRoverSoftware,代码行数:16,


示例17: vFullDemoIdleFunction

/* Called from vApplicationIdleHook(), which is defined in main.c. */void vFullDemoIdleFunction( void ){const unsigned long ulMSToSleep = 15;void *pvAllocated;	/* Sleep to reduce CPU load, but don't sleep indefinitely in case there are	tasks waiting to be terminated by the idle task. */	Sleep( ulMSToSleep );	/* Demonstrate a few utility functions that are not demonstrated by any of	the standard demo tasks. */	prvDemonstrateTaskStateAndHandleGetFunctions();	/* Demonstrate the use of xTimerPendFunctionCall(), which is not	demonstrated by any of the standard demo tasks. */	prvDemonstratePendingFunctionCall();	/* Demonstrate the use of functions that query information about a software	timer. */	prvDemonstrateTimerQueryFunctions();	/* If xMutexToDelete has not already been deleted, then delete it now.	This is done purely to demonstrate the use of, and test, the	vSemaphoreDelete() macro.  Care must be taken not to delete a semaphore	that has tasks blocked on it. */	if( xMutexToDelete != NULL )	{		/* For test purposes, add the mutex to the registry, then remove it		again, before it is deleted - checking its name is as expected before		and after the assertion into the registry and its removal from the		registry. */		configASSERT( pcQueueGetName( xMutexToDelete ) == NULL );		vQueueAddToRegistry( xMutexToDelete, "Test_Mutex" );		configASSERT( strcmp( pcQueueGetName( xMutexToDelete ), "Test_Mutex" ) == 0 );		vQueueUnregisterQueue( xMutexToDelete );		configASSERT( pcQueueGetName( xMutexToDelete ) == NULL );		vSemaphoreDelete( xMutexToDelete );		xMutexToDelete = NULL;	}	/* Exercise heap_5 a bit.  The malloc failed hook will trap failed	allocations so there is no need to test here. */	pvAllocated = pvPortMalloc( ( rand() % 500 ) + 1 );	vPortFree( pvAllocated );}
开发者ID:AlexShiLucky,项目名称:freertos,代码行数:48,


示例18: vCreateBlockTimeTasks

void vCreateBlockTimeTasks( void ){	/* Create the queue on which the two tasks block. */    xTestQueue = xQueueCreate( bktQUEUE_LENGTH, sizeof( portBASE_TYPE ) );	/* vQueueAddToRegistry() adds the queue to the queue registry, if one is	in use.  The queue registry is provided as a means for kernel aware	debuggers to locate queues and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is	defined to be less than 1. */	vQueueAddToRegistry( xTestQueue, "Block_Time_Queue" );	/* Create the two test tasks. */	xTaskCreate( vPrimaryBlockTimeTestTask, "BTest1", configMINIMAL_STACK_SIZE, NULL, bktPRIMARY_PRIORITY, NULL );	xTaskCreate( vSecondaryBlockTimeTestTask, "BTest2", configMINIMAL_STACK_SIZE, NULL, bktSECONDARY_PRIORITY, &xSecondary );}
开发者ID:MecatronicaUncu,项目名称:FreeRTOS_SAM7H256,代码行数:17,


示例19: taskCommunicationTXInit

/** * /fn		taskCommunicationTXInit * /brief	creates the communication TX task */void taskCommunicationTXInit(){	/* create task */	xTaskCreate(taskCommunicationTX, COMMUNICATION_TX_TASK_NAME,			COMMUNICATION_TX_TASK_STACK_SIZE, NULL, COMMUNICATION_TX_TASK_PRIORITY, NULL );	/* create queue with 64 char space per item */	gq_tx_message = xQueueCreate(COMMUNICATION_TX_QUEUE_LENGHT, sizeof(char[64]));	/* create mutex */	gm_tx_rinbuffer = xSemaphoreCreateMutex();	xSemaphoreGive(gm_tx_rinbuffer);	vQueueAddToRegistry(gm_tx_rinbuffer, "tx_ringbuffer");	/* Send hello text */	CircularBufferStringPut("Welcome/r/n", 9);}
开发者ID:gaerber,项目名称:Echtzeitmodell,代码行数:21,


示例20: vStartDynamicPriorityTasks

/* * Start the three tasks as described at the top of the file. * Note that the limited count task is given a higher priority. */void vStartDynamicPriorityTasks( void ){	xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( uint32_t ) );	/* vQueueAddToRegistry() adds the queue to the queue registry, if one is	in use.  The queue registry is provided as a means for kernel aware	debuggers to locate queues and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is	defined to be less than 1. */	vQueueAddToRegistry( xSuspendedTestQueue, "Suspended_Test_Queue" );	xTaskCreate( vContinuousIncrementTask, "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinuousIncrementHandle );	xTaskCreate( vLimitedIncrementTask, "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle );	xTaskCreate( vCounterControlTask, "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( vQueueSendWhenSuspendedTask, "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( vQueueReceiveWhenSuspendedTask, "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );}
开发者ID:pcsrule,项目名称:zybo-audio,代码行数:22,


示例21: HostInterface_RxInit

/** * initialize RX tasks and queues * @return  task initialization status */osa_status_t HostInterface_RxInit(){  osa_status_t    status;  // install the callback  UART_DRV_InstallRxCallback( gHostInterface_instance, HostInterface_RxCallback, (uint8_t*)&hostInterface_rxPacket, NULL, true );  // Create Rx Message Queue  hostInterface_rxQueueHnd = OSA_MsgQCreate (                                              hostInterface_rxQueue,                                              gHostInterface_msgNum,                                              sizeof(hostInterface_packet_t) / sizeof(uint32_t)                                            );  if ( NULL == hostInterface_rxQueueHnd )  {    catch(3);  }#if defined( HEXIWEAR_DEBUG )  vQueueAddToRegistry( hostInterface_rxQueueHnd, (const char*)"RxQueue" );#endif  // Create Rx Task  status = OSA_TaskCreate (                            HostInterface_RxTask,                            (uint8_t*)"HostInterface_RxTask",                            gHostInterfaceRxTaskStackSize_c,                            NULL,                            gHostInterfaceRxPriority_c,                            (task_param_t)NULL,                            false,                            &hexiwear_intf_RX_handler                          );  if  ( kStatus_OSA_Success != status )  {    catch(3);  }  return (osa_status_t)status;}
开发者ID:jordonwu,项目名称:HEXIWEAR,代码行数:47,


示例22: gui_sensorTag_Init

/** * initialize sensor tag mode structures and tasks * @param param optional parameter */void gui_sensorTag_Init( void* param ){    // create pedometer packet queue    gui_sensorTag_queueHnd = OSA_MsgQCreate (                                                gui_sensorTag_queue,                                                1,                                                sizeof(uint32_t) / sizeof(uint32_t)                                            );#if defined( HEXIWEAR_DEBUG )  vQueueAddToRegistry( gui_sensorTag_queueHnd, (char*)"SensorTag Queue" );#endif    GuiDriver_ImageAddToScr( &gui_sensorTag_icon );    screen_labelEnter.textProperties.fontColor = GUI_COLOR_WHITE;    GuiDriver_RegisterForNavigation( GUI_NAVIGATION_RIGHT );    GuiDriver_LabelAddToScr(&screen_labelEnter);}
开发者ID:Btar,项目名称:HEXIWEAR,代码行数:23,


示例23: vStartPolledQueueTasks

void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority ){static xQueueHandle xPolledQueue;	/* Create the queue used by the producer and consumer. */	xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );	/* vQueueAddToRegistry() adds the queue to the queue registry, if one is	in use.  The queue registry is provided as a means for kernel aware 	debuggers to locate queues and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is 	defined to be less than 1. */	vQueueAddToRegistry( xPolledQueue, ( signed char * ) "Poll_Test_Queue" );	/* Spawn the producer and consumer. */	xTaskCreate( vPolledQueueConsumer, ( signed char * ) "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );	xTaskCreate( vPolledQueueProducer, ( signed char * ) "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( xTaskHandle * ) NULL );}
开发者ID:DonjetaE,项目名称:FreeRTOS,代码行数:19,


示例24: vStartAltPolledQueueTasks

void vStartAltPolledQueueTasks( UBaseType_t uxPriority ){static QueueHandle_t xPolledQueue;	/* Create the queue used by the producer and consumer. */	xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( UBaseType_t ) sizeof( uint16_t ) );	/* vQueueAddToRegistry() adds the queue to the queue registry, if one is	in use.  The queue registry is provided as a means for kernel aware 	debuggers to locate queues and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is 	defined to be less than 1. */	vQueueAddToRegistry( xPolledQueue, "AltPollQueue" );	/* Spawn the producer and consumer. */	xTaskCreate( vPolledQueueConsumer, "QConsNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL );	xTaskCreate( vPolledQueueProducer, "QProdNB", pollqSTACK_SIZE, ( void * ) &xPolledQueue, uxPriority, ( TaskHandle_t * ) NULL );}
开发者ID:beattie,项目名称:FreeRTOS-Nucleo-f091rc,代码行数:20,


示例25: vStartDynamicPriorityTasks

/* * Start the three tasks as described at the top of the file. * Note that the limited count task is given a higher priority. */void vStartDynamicPriorityTasks( void ){    char str[64];    sprintf( str, "[%s]: %d/r/n", __func__, __LINE__ );    vSerialPutString(configUART_PORT, str, strlen(str) );	xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( unsigned long ) );	/* vQueueAddToRegistry() adds the queue to the queue registry, if one is	in use.  The queue registry is provided as a means for kernel aware 	debuggers to locate queues and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is 	defined to be less than 1. */	vQueueAddToRegistry( xSuspendedTestQueue, ( signed char * ) "Suspended_Test_Queue" );	xTaskCreate( vContinuousIncrementTask, ( signed char * ) "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinousIncrementHandle );	xTaskCreate( vLimitedIncrementTask, ( signed char * ) "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle );	xTaskCreate( vCounterControlTask, ( signed char * ) "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( vQueueSendWhenSuspendedTask, ( signed char * ) "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( vQueueReceiveWhenSuspendedTask, ( signed char * ) "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );}
开发者ID:Wonseok,项目名称:FreeRTOS_FVP_VE_Cortex-A15,代码行数:25,


示例26: gmac_dev_init

/** * /brief Initialize the GMAC driver. * * /param p_gmac   Pointer to the GMAC instance. * /param p_gmac_dev Pointer to the GMAC device instance. * /param p_opt GMAC configure options. */void gmac_dev_init(Gmac* p_gmac, gmac_device_t* p_gmac_dev,		gmac_options_t* p_opt){	/* Disable TX & RX and more */	gmac_network_control(p_gmac, 0);	gmac_disable_interrupt(p_gmac, ~0u);	gmac_clear_statistics(p_gmac);	/* Clear all status bits in the receive status register. */	gmac_clear_rx_status(p_gmac, GMAC_RSR_RXOVR | GMAC_RSR_REC | GMAC_RSR_BNA			| GMAC_RSR_HNO);	/* Clear all status bits in the transmit status register */	gmac_clear_tx_status(p_gmac, GMAC_TSR_UBR | GMAC_TSR_COL | GMAC_TSR_RLE            | GMAC_TSR_TXGO | GMAC_TSR_TFC | GMAC_TSR_TXCOMP | GMAC_TSR_HRESP );	/* Enable the copy of data into the buffers	   ignore broadcasts, and not copy FCS. */	gmac_set_config(p_gmac, gmac_get_config(p_gmac) |			GMAC_NCFGR_FD | GMAC_NCFGR_DBW(0) | GMAC_NCFGR_MAXFS |			GMAC_NCFGR_RFCS | GMAC_NCFGR_PEN);	gmac_enable_copy_all(p_gmac, p_opt->uc_copy_all_frame);	gmac_disable_broadcast(p_gmac, p_opt->uc_no_boardcast);	gmac_init_queue(p_gmac, p_gmac_dev);	gmac_set_address(p_gmac, 0, p_opt->uc_mac_addr);#ifdef FREERTOS_USED	/* Asynchronous operation requires a notification semaphore.  First,	 * create the semaphore. */	vSemaphoreCreateBinary(netif_notification_semaphore);	vQueueAddToRegistry(netif_notification_semaphore, "GMAC Sem");	/* Then set the semaphore into the correct initial state. */	xSemaphoreTake(netif_notification_semaphore, 0);#endif}
开发者ID:thegeek82000,项目名称:asf,代码行数:46,


示例27: vStartRecursiveMutexTasks

void vStartRecursiveMutexTasks( void ){	/* Just creates the mutex and the three tasks. */	xMutex = xSemaphoreCreateRecursiveMutex();	/* vQueueAddToRegistry() adds the mutex to the registry, if one is	in use.  The registry is provided as a means for kernel aware	debuggers to locate mutex and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is	defined to be less than 1. */	vQueueAddToRegistry( ( QueueHandle_t ) xMutex, "Recursive_Mutex" );	if( xMutex != NULL )	{		xTaskCreate( prvRecursiveMutexControllingTask, "Rec1", configMINIMAL_STACK_SIZE, NULL, recmuCONTROLLING_TASK_PRIORITY, &xControllingTaskHandle );        xTaskCreate( prvRecursiveMutexBlockingTask, "Rec2", configMINIMAL_STACK_SIZE, NULL, recmuBLOCKING_TASK_PRIORITY, &xBlockingTaskHandle );        xTaskCreate( prvRecursiveMutexPollingTask, "Rec3", configMINIMAL_STACK_SIZE, NULL, recmuPOLLING_TASK_PRIORITY, NULL );	}}
开发者ID:AldenHiggins,项目名称:ELEC424-Lab06-Scheduling-with-FreeRTOS,代码行数:22,


示例28: vStartQueuePeekTasks

void vStartQueuePeekTasks( void ){xQueueHandle xQueue;	/* Create the queue that we are going to use for the test/demo. */	xQueue = xQueueCreate( qpeekQUEUE_LENGTH, sizeof( unsigned portLONG ) );	/* vQueueAddToRegistry() adds the queue to the queue registry, if one is	in use.  The queue registry is provided as a means for kernel aware 	debuggers to locate queues and has no purpose if a kernel aware debugger	is not being used.  The call to vQueueAddToRegistry() will be removed	by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is 	defined to be less than 1. */	vQueueAddToRegistry( xQueue, ( signed portCHAR * ) "QPeek_Test_Queue" );	/* Create the demo tasks and pass it the queue just created.  We are	passing the queue handle by value so it does not matter that it is declared	on the stack here. */	xTaskCreate( prvLowPriorityPeekTask, ( signed portCHAR * )"PeekL", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekLOW_PRIORITY, NULL );	xTaskCreate( prvMediumPriorityPeekTask, ( signed portCHAR * )"PeekM", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekMEDIUM_PRIORITY, &xMediumPriorityTask );	xTaskCreate( prvHighPriorityPeekTask, ( signed portCHAR * )"PeekH1", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGH_PRIORITY, &xHighPriorityTask );	xTaskCreate( prvHighestPriorityPeekTask, ( signed portCHAR * )"PeekH2", configMINIMAL_STACK_SIZE, ( void * ) xQueue, qpeekHIGHEST_PRIORITY, &xHighestPriorityTask );}
开发者ID:darknesmonk,项目名称:freertos-5.1.2-lpc23xx,代码行数:23,



注:本文中的vQueueAddToRegistry函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vSemaphoreCreateBinary函数代码示例
C++ vPrintDisplayMessage函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。