这篇教程C++ vTaskIncrementTick函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中vTaskIncrementTick函数的典型用法代码示例。如果您正苦于以下问题:C++ vTaskIncrementTick函数的具体用法?C++ vTaskIncrementTick怎么用?C++ vTaskIncrementTick使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了vTaskIncrementTick函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: vPortTickInterrupt/* * RTOS tick interrupt service routine. If the cooperative scheduler is * being used then this simply increments the tick count. If the * preemptive scheduler is being used a context switch can occur. */void interrupt vPortTickInterrupt( void ){ #if configUSE_PREEMPTION == 1 { /* A context switch might happen so save the context. */ portSAVE_CONTEXT(); /* Increment the tick ... */ vTaskIncrementTick(); /* ... then see if the new tick value has necessitated a context switch. */ vTaskSwitchContext(); TFLG1 = 1; /* Restore the context of a task - which may be a different task to that interrupted. */ portRESTORE_CONTEXT(); } #else { vTaskIncrementTick(); TFLG1 = 1; } #endif}
开发者ID:AnselZhangGit,项目名称:stm32_p103_demos,代码行数:32,
示例2: prvTickISRvoid prvTickISR( void ){ /* Increment the tick, and perform any processing the new tick value necessitates. */ set_ipl( configMAX_SYSCALL_INTERRUPT_PRIORITY ); { vTaskIncrementTick(); } set_ipl( configKERNEL_INTERRUPT_PRIORITY ); /* Only select a new task if the preemptive scheduler is being used. */ #if( configUSE_PREEMPTION == 1 ) { taskYIELD(); } #endif #if configUSE_TICKLESS_IDLE == 1 { /* The CPU woke because of a tick. */ ulTickFlag = pdTRUE; /* If this is the first tick since exiting tickless mode then the CMT compare match value needs resetting. */ CMT0.CMCOR = ( unsigned short ) ulMatchValueForOneTick; } #endif}
开发者ID:CausticUC,项目名称:STM32-Bootloader,代码行数:28,
示例3: vPortTickISR/* * Handler for the timer interrupt. This is the handler that the application * defined callback function vApplicationSetupTimerInterrupt() should install. */void vPortTickISR( void *pvUnused ){extern void vApplicationClearTimerInterrupt( void ); /* Ensure the unused parameter does not generate a compiler warning. */ ( void ) pvUnused; /* This port uses an application defined callback function to clear the tick interrupt because the kernel will run on lots of different MicroBlaze and FPGA configurations - not all of which will have the same timer peripherals defined or available. An example definition of vApplicationClearTimerInterrupt() is provided in the official demo application that accompanies this port. */ vApplicationClearTimerInterrupt(); /* Increment the RTOS tick - this might cause a task to unblock. */ vTaskIncrementTick(); /* If the preemptive scheduler is being used then a context switch should be requested in case incrementing the tick unblocked a task, or a time slice should cause another task to enter the Running state. */ #if configUSE_PREEMPTION == 1 /* Force vTaskSwitchContext() to be called as the interrupt exits. */ ulTaskSwitchRequested = 1; #endif}
开发者ID:GIPdA,项目名称:Hexapode,代码行数:30,
示例4: ISROsTick /* * Tick ISR for preemptive scheduler. We can use a naked attribute as * the context is saved at the start of vPortYieldFromTick(). The tick * count is incremented after the context is saved. */ void ISROsTick( void ) { /* Increment the tick count then switch to the highest priority task that is ready to run. */ vTaskIncrementTick(); vTaskSwitchContext(); }
开发者ID:kdurant,项目名称:freertos,代码行数:12,
示例5: prvNonPreemptiveTick static void __interrupt __far prvNonPreemptiveTick( void ) { /* Same as preemptive tick, but the cooperative scheduler is being used so we don't have to switch in the context of the next task. */ vTaskIncrementTick(); prvPortResetPIC(); }
开发者ID:school510587,项目名称:freertos,代码行数:7,
示例6: xPortSysTickHandlervoid xPortSysTickHandler( void ){ /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; #endif /* Only reset the systick load register if configUSE_TICKLESS_IDLE is set to 1. If it is set to 0 tickless idle is not being used. If it is set to a value other than 0 or 1 then a timer other than the SysTick is being used to generate the tick interrupt. */ #if configUSE_TICKLESS_IDLE == 1 portNVIC_SYSTICK_LOAD_REG = ulTimerReloadValueForOneTick; #endif ( void ) portSET_INTERRUPT_MASK_FROM_ISR(); { vTaskIncrementTick(); // wrzucam tutaj obsluge licznika dla HAL HAL_IncTick(); } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 );}
开发者ID:houzhenggang,项目名称:stm32_rtos_lwip,代码行数:27,
示例7: prvNonPreemptiveTick static void __interrupt __far prvNonPreemptiveTick( void ) { /* Same as preemptive tick, but the cooperative scheduler is being used so we don't have to switch in the context of the next task. */ vTaskIncrementTick(); /* Reset interrupt. */ outport( portEIO_REGISTER, portCLEAR_INTERRUPT ); }
开发者ID:school510587,项目名称:freertos,代码行数:8,
示例8: vPortNonPreemptiveTickvoid vPortNonPreemptiveTick( void ){ vTaskIncrementTick(); /* Clear the interrupt in the watchdog and EIC. */ WDG->SR = 0x0000; /* clear current interrupt pending flag for interupt source. */ EIC->IPR |= 1 << EIC_CurrentIRQChannelValue();}
开发者ID:alexrayne,项目名称:freemodbus,代码行数:9,
示例9: vPortYieldFromTickvoid vPortYieldFromTick( void ){ portSAVE_CONTEXT(); vTaskIncrementTick(); vTaskSwitchContext(); portRESTORE_CONTEXT(); asm volatile ( "ret" );}
开发者ID:AdrianHuang,项目名称:freertos-plus,代码行数:9,
示例10: vPortNonPreemptiveTick /* The cooperative scheduler requires a normal IRQ service routine to * simply increment the system tick. */ __interrupt void vPortNonPreemptiveTick( void ) { /* clear clock interrupt flag */ RTI->INTFLAG = 0x00000001; /* Increment the tick count - this may make a delaying task ready to run - but a context switch is not performed. */ vTaskIncrementTick(); }
开发者ID:Dzenik,项目名称:FreeRTOS_TEST,代码行数:11,
示例11: vTickISR/* * This is the TICK interrupt service routine, note. no SAVE/RESTORE_CONTEXT here * as thats done in the bottom-half of the ISR. * * See bt_interrupts.c in the RaspberryPi Drivers folder. */void vTickISR (unsigned int nIRQ, void *pParam){ vTaskIncrementTick(); #if configUSE_PREEMPTION == 1 vTaskSwitchContext(); #endif pRegs->CLI = 0; // Acknowledge the timer interrupt.}
开发者ID:AlexShiLucky,项目名称:RaspberryPi-FreeRTOS,代码行数:16,
示例12: prvPortPreemptiveTick/* * The ISR used for the scheduler tick depends on whether the cooperative or * the preemptive scheduler is being used. */static voidprvPortPreemptiveTick ( void ){ /* The cooperative scheduler requires a normal IRQ service routine to * simply increment the system tick. */ vTaskIncrementTick( ); MCF_PIT_PCSR0 |= MCF_PIT_PCSR_PIF;}
开发者ID:alexrayne,项目名称:freemodbus,代码行数:14,
示例13: prvPreemptiveTick static void __interrupt __far prvPreemptiveTick( void ) { /* Get the scheduler to update the task states following the tick. */ vTaskIncrementTick(); /* Switch in the context of the next task to be run. */ portSWITCH_CONTEXT(); /* Reset interrupt. */ outport( portEIO_REGISTER, portCLEAR_INTERRUPT ); }
开发者ID:school510587,项目名称:freertos,代码行数:11,
示例14: vPortNonPreemptiveTick/* The cooperative scheduler requires a normal IRQ service routine tosimply increment the system tick. */__arm __irq void vPortNonPreemptiveTick( void ){ /* Increment the tick count - which may wake some tasks but as the preemptive scheduler is not being used any woken task is not given processor time no matter what its priority. */ vTaskIncrementTick(); /* Clear the interrupt in the watchdog and EIC. */ WDG->SR = 0x0000; portCLEAR_EIC(); }
开发者ID:felipepipe18,项目名称:openesc,代码行数:13,
示例15: __attribute__void __attribute__((__interrupt__, auto_psv)) _T1Interrupt( void ){ /* Clear the timer interrupt. */ IFS0bits.T1IF = 0; vTaskIncrementTick(); #if configUSE_PREEMPTION == 1 portYIELD(); #endif}
开发者ID:gaschmidt1,项目名称:strain-logger,代码行数:11,
示例16: prvPreemptiveTick static void __interrupt __far prvPreemptiveTick( void ) { /* Get the scheduler to update the task states following the tick. */ vTaskIncrementTick(); /* Switch in the context of the next task to be run. */ portSWITCH_CONTEXT(); /* Reset the PIC ready for the next time. */ prvPortResetPIC(); }
开发者ID:school510587,项目名称:freertos,代码行数:11,
示例17: vPortNonPreemptiveTick static __arm __irq void vPortNonPreemptiveTick( void ) { /* Increment the tick count - which may wake some tasks but as the preemptive scheduler is not being used any woken task is not given processor time no matter what its priority. */ vTaskIncrementTick(); /* Ready for the next interrupt. */ T0IR = portTIMER_MATCH_ISR_BIT; VICVectAddr = portCLEAR_VIC_INTERRUPT; }
开发者ID:Carrotman42,项目名称:cs4534,代码行数:11,
示例18: prvProcessTickstatic void prvProcessTick( void ){ vTaskIncrementTick(); #if configUSE_PREEMPTION == 1 vTaskSwitchContext(); #endif /* Clear the Tick Interrupt. */ counter1->expired = 0;}
开发者ID:bengelbert,项目名称:ifsc,代码行数:11,
示例19: RT_VECTvoid RT_VECT (void){ // For the preemptive scheduler, enable a context switch #if configUSE_PREEMPTION == 1 vPortYieldFromTick (); asm volatile ( "reti" ); #else // For the cooperative scheduler, all this does is increment the tick count. // We don't need to switch context; that's done by manual calls to taskYIELD() vTaskIncrementTick (); #endif}
开发者ID:HamboLagos,项目名称:automated_wheel_truing_machine,代码行数:12,
示例20: vTickISR/* * The ISR used for the scheduler tick. */void vTickISR( XScuTimer *Timer ){ /* Increment the RTOS tick count, then look for the highest priority task that is ready to run. */ vTaskIncrementTick(); #if configUSE_PREEMPTION == 1 vTaskSwitchContext(); #endif XScuTimer_ClearInterruptStatus(Timer);}
开发者ID:ThePotatoGroup,项目名称:TCP-Embedded-Audio,代码行数:15,
示例21: ISRISR (TCC0_OVF_vect, ISR_NAKED) { /* * Context switch function used by the tick. This must be identical to * vPortYield() from the call to vTaskSwitchContext() onwards. The only * difference from vPortYield() is the tick count is incremented as the * call comes from the tick ISR. */ portSAVE_CONTEXT(); vTaskIncrementTick(); vTaskSwitchContext(); portRESTORE_CONTEXT(); asm volatile ( "reti" );}
开发者ID:klaxalk,项目名称:FreeRTOS-on-ATxmega128a4u,代码行数:13,
示例22: SysTick_Handler/*-----------------------------------------------------------*/void SysTick_Handler( void ) /* ATMEL */{ /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; #endif (void)portSET_INTERRUPT_MASK_FROM_ISR(); { vTaskIncrementTick(); } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 );}
开发者ID:thegeek82000,项目名称:asf,代码行数:14,
示例23: prvTimerInterruptstatic void prvTimerInterrupt(unsigned int intrLevel, void *pContext){ Timer_t *pISRTimer = (Timer_t *)pContext; #if configUSE_PREEMPTION == 1 /* * Tick ISR for preemptive scheduler. */ vTaskIncrementTick(); vTaskSwitchContext(); #else /* * Tick ISR for the cooperative scheduler. All this does is increment the * tick count. We don't need to switch context, this can only be done by * manual calls to taskYIELD(); */ vTaskIncrementTick(); #endif /* Clear Timer Status */ pISRTimer->Status = 0; }
开发者ID:fmorel,项目名称:SoC,代码行数:22,
示例24: vPortSysTickHandlervoid vPortSysTickHandler( void * context, alt_u32 id ){ /* Increment the Kernel Tick. */ vTaskIncrementTick(); /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 vTaskSwitchContext(); #endif /* Clear the interrupt. */ IOWR_ALTERA_AVALON_TIMER_STATUS( SYS_CLK_BASE, ~ALTERA_AVALON_TIMER_STATUS_TO_MSK );}
开发者ID:bengelbert,项目名称:ifsc,代码行数:13,
示例25: vPortPreemptiveTick void vPortPreemptiveTick( void ) { /* Increment the tick counter. */ vTaskIncrementTick(); /* The new tick value might unblock a task. Ensure the highest task that is ready to execute is the task that will execute when the tick ISR exits. */ vTaskSwitchContext(); /* Ready for the next interrupt. */ T0IR = portTIMER_MATCH_ISR_BIT; VICVectAddr = portCLEAR_VIC_INTERRUPT; }
开发者ID:Carrotman42,项目名称:cs4534,代码行数:14,
示例26: xPortSysTickHandlervoid xPortSysTickHandler( void ){unsigned long ulDummy; /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 *(portNVIC_INT_CTRL) = portNVIC_PENDSVSET; #endif ulDummy = portSET_INTERRUPT_MASK_FROM_ISR(); { vTaskIncrementTick(); } portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy );}
开发者ID:no111u3,项目名称:freertos,代码行数:14,
示例27: vPortPreemptiveTick/* This function is called from an asm wrapper, so does not require the __irqkeyword. */void vPortPreemptiveTick( void ){ /* Increment the tick counter. */ vTaskIncrementTick(); /* The new tick value might unblock a task. Ensure the highest task that is ready to execute is the task that will execute when the tick ISR exits. */ vTaskSwitchContext(); /* Clear the interrupt in the watchdog and EIC. */ WDG->SR = 0x0000; portCLEAR_EIC(); }
开发者ID:felipepipe18,项目名称:openesc,代码行数:16,
示例28: vPortPreemptiveTick__arm void vPortPreemptiveTick( void ){ /* Increment the tick counter. */ vTaskIncrementTick(); /* The new tick value might unblock a task. Ensure the highest task that is ready to execute is the task that will execute when the tick ISR exits. */ #if configUSE_PREEMPTION == 1 vTaskSwitchContext(); #endif TB_ClearITPendingBit( TB_IT_Update );}
开发者ID:voloviq,项目名称:Laboratory_Power_Supply,代码行数:14,
注:本文中的vTaskIncrementTick函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ vTaskList函数代码示例 C++ vTaskDelete函数代码示例 |