当前位置: 首页>>代码示例>>C++>>正文


C++ prvSetupTimerInterrupt函数代码示例

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


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

示例1: xPortStartScheduler

BaseType_t xPortStartScheduler( void )
{
	/* Setup the hardware to generate the tick. */
	prvSetupTimerInterrupt();

	/* Restore the context of the first task that is going to run.
	Normally we would just call portRESTORE_CONTEXT() here, but as the IAR
	compiler does not fully support inline assembler we have to make a call.*/
	vPortStart();

	/* Should not get here! */
	return pdTRUE;
}
开发者ID:AldenHiggins,项目名称:ELEC424-Lab06-Scheduling-with-FreeRTOS,代码行数:13,代码来源:port.c

示例2: xPortStartScheduler

portBASE_TYPE
xPortStartScheduler( void )
{
    /* Start the timer that generates the tick ISR.  Interrupts are disabled
       here already. */
    prvSetupTimerInterrupt(  );

    /* Start the first task. */
    vPortISRStartFirstTask(  );

    /* Should not get here! */
    return 0;
}
开发者ID:alexrayne,项目名称:freemodbus,代码行数:13,代码来源:port.c

示例3: xPortStartScheduler

/* 
 * See header file for description. 
 */
portBASE_TYPE xPortStartScheduler( void )
{
	/* Start the timer that generates the tick ISR.  Interrupts are disabled
	here already. */
	prvSetupTimerInterrupt();
	
	/* Start the first task. */
    asm volatile (  " movia r2, restore_sp_from_pxCurrentTCB        \n"
                    " jmp r2                                          " );

	/* Should not get here! */
	return 0;
}
开发者ID:SamPovilus,项目名称:FreeRTOS-on-the-OMLEX-MSP430-169LCD-board,代码行数:16,代码来源:port.c

示例4: xPortStartScheduler

portBASE_TYPE xPortStartScheduler( void )
{
	/* Start the timer that generates the tick ISR.  Interrupts are disabled
	here already. */

	prvSetupTimerInterrupt();
	//loop_led();	 			// simpan sini LANCAR
	/* Start the first task. */
	vPortISRStartFirstTask();	//	--> portRESTORE_CONTEXT();
		// ada di file source/portable/GCC/ARM7_LPC23xx/portISR.c
	//loop_led();		 	// simpan sini MATI
	/* Should not get here! */
	return 0;
}
开发者ID:afrendybayu,项目名称:kapalselam,代码行数:14,代码来源:port.c

示例5: xPortStartScheduler

BaseType_t xPortStartScheduler( void )
{
extern void ( __FreeRTOS_interrupt_handler )( void );
extern void ( vStartFirstTask )( void );


	/* Setup the FreeRTOS interrupt handler.   */
/*
	__asm__ volatile ( 	"la	r6, r0, __FreeRTOS_interrupt_handler	\n\t" \
					"swi  r6, r1, 4 								\n\t" \
					"lhui r7, r1, 4 								\n\t" \
					"ori  r7, r7, 0xB0000000						\n\t" \
					"swi  r7, r0, 0x10								\n\t" \
					"swi  r7, r0, 0x18								\n\t" \
					"andi r6, r6, 0xFFFF							\n\t" \
					"ori  r6, r6, 0xB8080000						\n\t" \
					"swi  r6, r0, 0x14 								\n\t" \
					"swi  r6, r0, 0x1C " );
*/
	volatile uint32_t *p = (volatile uint32_t *)0x10;
	uint32_t addr = (uint32_t)__FreeRTOS_interrupt_handler;
	*p++ = (0xB0000000 | (addr >> 16));
	*p++ = (0xB8080000 | (addr & 0xFFFF));
	*p++ = (0xB0000000 | (addr >> 16));
	*p++ = (0xB8080000 | (addr & 0xFFFF));


	/* Setup the hardware to generate the tick.  Interrupts are disabled when
	this function is called. */
	prvSetupTimerInterrupt();

	/* Allocate the stack to be used by the interrupt handler. */
	pulISRStack = ( uint32_t * ) pvPortMalloc( configMINIMAL_STACK_SIZE * sizeof( StackType_t ) );

	/* Restore the context of the first task that is going to run. */
	if( pulISRStack != NULL )
	{
		/* Fill the ISR stack with a known value to facilitate debugging. */
		memset( pulISRStack, portISR_STACK_FILL_VALUE, configMINIMAL_STACK_SIZE * sizeof( StackType_t ) );
		pulISRStack += ( configMINIMAL_STACK_SIZE - 1 );

		portENABLE_INTERRUPTS();

		/* Kick off the first task. */
		vStartFirstTask();
	}

	/* Should not get here as the tasks are now running! */
	return pdFALSE;
}
开发者ID:svn2github,项目名称:1541UltimateII,代码行数:50,代码来源:port.c

示例6: xPortStartScheduler

BaseType_t xPortStartScheduler( void )
{
	/* Set-up the timer interrupt. */
	prvSetupTimerInterrupt();

	/* Integrated Interrupt Controller: Enable all interrupts. */
	ic->ien = 1;

	/* Restore callee saved registers. */
	portRESTORE_CONTEXT();

	/* Should not get here. */
	return 0;
}
开发者ID:ccccjason,项目名称:amass,代码行数:14,代码来源:port.c

示例7: xPortStartScheduler

portBASE_TYPE xPortStartScheduler( void )
{
	/* Setup a timer for the tick ISR is using the preemptive scheduler. */
	prvSetupTimerInterrupt(); 

	/* Restore the context of the first task to run. */
	portRESTORE_CONTEXT();

	/* Should not get here.  Use the function name to stop compiler warnings. */
	( void ) prvLowInterrupt;
	( void ) prvTickISR;

	return pdTRUE;
}
开发者ID:davidadkins1,项目名称:RoboDetector,代码行数:14,代码来源:port.c

示例8: xPortStartScheduler

BaseType_t xPortStartScheduler( void )
{
extern void vPortStartFirstTask( void );

	/* Start the timer that generates the tick ISR.  Interrupts are disabled
	here already. */
	prvSetupTimerInterrupt();

	/* Start the first task. */
	vPortStartFirstTask();	

	/* Should not get here! */
	return 0;
}
开发者ID:Darma,项目名称:freertos,代码行数:14,代码来源:port.c

示例9: xPortStartScheduler

portBASE_TYPE xPortStartScheduler( void )
{
	/* Setup a timer for the tick ISR. */
	prvSetupTimerInterrupt(); 

	/* Restore the context of the first task to run. */
	portRESTORE_CONTEXT();

	/* Simulate the end of the yield function. */
	asm volatile ( "return" );

	/* Should not reach here. */
	return pdTRUE;
}
开发者ID:gaschmidt1,项目名称:strain-logger,代码行数:14,代码来源:port.c

示例10: xPortStartScheduler

BaseType_t xPortStartScheduler( void )
{
extern void vPortStartFirstTask( void );

	ulCriticalNesting = 0UL;

	/* Configure a timer to generate the tick interrupt. */
	prvSetupTimerInterrupt();

	/* Start the first task executing. */
	vPortStartFirstTask();

	return pdFALSE;
}
开发者ID:RGassmann,项目名称:FRDM,代码行数:14,代码来源:port.c

示例11: xPortStartScheduler

/*
 * See header file for description.
 */
BaseType_t xPortStartScheduler(void)
{
	/* Start the timer that generates the tick ISR. */
	prvSetupTimerInterrupt();

	/* Reset the critical section nesting count read to execute the first task. */
	ulCriticalNesting = 0;

	/* Start the first task.  This is done from portASM.asm as ARM mode must be
	used. */
	vPortStartFirstTask();

	/* Should not get here! */
	return pdFAIL;
}
开发者ID:DanielKristofKiss,项目名称:FreeRTOS,代码行数:18,代码来源:port.c

示例12: xBankedStartScheduler

static portBASE_TYPE xBankedStartScheduler( void )
{
	/* Configure the timer that will generate the RTOS tick.  Interrupts are
	disabled when this function is called. */
	prvSetupTimerInterrupt();

	/* Restore the context of the first task. */
	portRESTORE_CONTEXT();

	/* Simulate the end of an interrupt to start the scheduler off. */
	__asm( "rti" );

	/* Should not get here! */
	return pdFALSE;
}
开发者ID:AnselZhangGit,项目名称:stm32_p103_demos,代码行数:15,代码来源:port.c

示例13: xPortStartScheduler

portBASE_TYPE xPortStartScheduler( void )
{
	/* Setup the hardware to generate the tick. */
	prvSetupTimerInterrupt();

	/* Restore the context of the first task that is going to run. */
	portRESTORE_CONTEXT();

	/* Simulate a function call end as generated by the compiler.  We will now
	jump to the start of the task the context of which we have just restored. */
	asm volatile ( "ret" );

	/* Should not get here. */
	return pdTRUE;
}
开发者ID:AdrianHuang,项目名称:freertos-plus,代码行数:15,代码来源:port.c

示例14: xPortStartScheduler

/*
 * See header file for description.
 */
portBASE_TYPE xPortStartScheduler( void )
{
portBASE_TYPE xResult;
int iSignal;
sigset_t xSignals;
sigset_t xSignalToBlock;
sigset_t xSignalsBlocked;
portLONG lIndex;

	/* Establish the signals to block before they are needed. */
	sigfillset( &xSignalToBlock );

	/* Block until the end */
	(void)pthread_sigmask( SIG_SETMASK, &xSignalToBlock, &xSignalsBlocked );

	for ( lIndex = 0; lIndex < MAX_NUMBER_OF_TASKS; lIndex++ )
	{
		pxThreads[ lIndex ].uxCriticalNesting = 0;
	}

	/* Start the timer that generates the tick ISR.  Interrupts are disabled
	here already. */
	prvSetupTimerInterrupt();

	/* Start the first task. Will not return unless all threads are killed. */
	vPortStartFirstTask();

	/* This is the end signal we are looking for. */
	sigemptyset( &xSignals );
	sigaddset( &xSignals, SIG_RESUME );

	while ( pdTRUE != xSchedulerEnd )
	{
		if ( 0 != sigwait( &xSignals, &iSignal ) )
		{
			printf( "Main thread spurious signal: %d\n", iSignal );
		}
	}

	printf( "Cleaning Up, Exiting.\n" );
	/* Cleanup the mutexes */
	xResult = pthread_mutex_destroy( &xSuspendResumeThreadMutex );
	xResult = pthread_mutex_destroy( &xSingleThreadMutex );
	vPortFree( (void *)pxThreads );

	/* Should not get here! */
	return 0;
}
开发者ID:ICRS,项目名称:OpenPilot-Clone,代码行数:51,代码来源:port.c

示例15: xPortStartScheduler

/*
 * See header file for description.
 */
BaseType_t xPortStartScheduler( void )
{
    /* Setup timer 2 to generate the RTOS tick. */
    prvSetupTimerInterrupt();

    /* Make sure we start with the expected SFR page.  This line should not
    really be required. */
    SFRPAGE = 0;

    /* Copy the stack for the first task to execute from XRAM into the stack,
    restore the task context from the new stack, then start running the task. */
    portCOPY_XRAM_TO_STACK();
    portRESTORE_CONTEXT();

    /* Should never get here! */
    return pdTRUE;
}
开发者ID:trigrass2,项目名称:STM32491_CPLR,代码行数:20,代码来源:port.c


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