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


C++ portCLEAR_INTERRUPT_MASK_FROM_ISR函数代码示例

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


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

示例1: EXTI0_IRQHandler

void EXTI0_IRQHandler(void) {
	if (EXTI_GetITStatus(EXTI_Line0 ) != RESET) {
		portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
		unsigned long ulDummy;
		ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
		{
			uint8_t buffer[6];
			LIS302DL_Read(buffer, LIS302DL_OUT_X_ADDR, 6);
			xQueueSendFromISR(queue, &(buffer[4]), &xHigherPriorityTaskWoken);
			EXTI_ClearITPendingBit(EXTI_Line0 );
		}
		portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy);
		portEND_SWITCHING_ISR(xHigherPriorityTaskWoken);
	}
}
开发者ID:nraynaud,项目名称:DiscoveryF4_RTOS,代码行数:15,代码来源:main.c

示例2: xPortSysTickHandler

void 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:Dzenik,项目名称:FreeRTOS_TEST,代码行数:15,代码来源:port.c

示例3: __attribute__

void __attribute__ ((interrupt)) __cs3_isr_interrupt_119( void )
{
unsigned long ulSavedInterruptMask;

	/* Clear the PIT0 interrupt. */
	MCF_PIT0_PCSR |= MCF_PIT_PCSR_PIF;

	/* Increment the RTOS tick. */
	ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR();
		if( xTaskIncrementTick() != pdFALSE )
		{
			taskYIELD();
		}
	portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask );
}
开发者ID:granthuu,项目名称:fsm_software,代码行数:15,代码来源:FreeRTOS_Tick_Setup.c

示例4: xPortSysTickHandler

void xPortSysTickHandler( void )
{
uint32_t ulDummy;

	ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
	{
		/* Increment the RTOS tick. */
		if( xTaskIncrementTick() != pdFALSE )
		{
			/* Pend a context switch. */
			portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
		}
	}
	portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy );
}
开发者ID:kbumsik,项目名称:FreeRTOS-Shell,代码行数:15,代码来源:port.c

示例5: xPortSysTickHandler

void xPortSysTickHandler( void )
{
uint32_t ulPreviousMask;

	ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR();
	{
		/* Increment the RTOS tick. */
		if( xTaskIncrementTick() != pdFALSE )
		{
			/* Pend a context switch. */
			*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
		}
	}
	portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask );
}
开发者ID:kevins963,项目名称:BalancingRobot,代码行数:15,代码来源:port.c

示例6: FIFO_PutFromISR

/**************************************************************************//**
 * @brief		Schreibt von ISR aus ein Byte in FIFO
 *
 * @param[in, out]	pFIFO								FIFO
 * @param[in]	b										Datum
 *
 * @return      true - Alles OK, false - kein Platz im FIFO
 */
bool	FIFO_PutFromISR(pT_ByteFIFO pFIFO, uint8_t b)
{
uint32_t Next = (((T_ByteFIFO*)pFIFO)->Head + 1) % ((T_ByteFIFO*)pFIFO)->Size;

	if (Next == ((T_ByteFIFO*)pFIFO)->Tail)							// Voll ?
		return false;									// Ende!

uint32_t SavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();

		((T_ByteFIFO*)pFIFO)->Buffer[((T_ByteFIFO*)pFIFO)->Head] = b;					// Byte rein
		((T_ByteFIFO*)pFIFO)->Head = Next;

		portCLEAR_INTERRUPT_MASK_FROM_ISR(SavedInterruptStatus);

	return true;
}
开发者ID:DL7AD,项目名称:pecan-lpc11xx,代码行数:24,代码来源:fifo.c

示例7: vParTestSetLEDFromISR

void vParTestSetLEDFromISR( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
    unsigned portBASE_TYPE uxInterruptFlags;

    uxInterruptFlags = portSET_INTERRUPT_MASK_FROM_ISR();
    {
        if( uxLED < partstMAX_LEDS ) {
            if( xValue == pdTRUE ) {
                FM3_GPIO->PDOR3 &= ~( 1UL << ( uxLED + partstLED_0_OFFSET ) );
            } else {
                FM3_GPIO->PDOR3 |= ( 1UL << ( uxLED + partstLED_0_OFFSET ) );
            }
        }
    }
    portCLEAR_INTERRUPT_MASK_FROM_ISR( uxInterruptFlags );
}
开发者ID:peterliu2,项目名称:FreeRTOS,代码行数:16,代码来源:ParTest.c

示例8: FIFO_GetFromISR

/**************************************************************************//**
 * @brief		Liest von ISR aus ein Byte aus FIFO
 *
 * @param[in, out]	pFIFO								FIFO
 * @param[out]	pb										Datum
 *
 * @return      true - Alles OK in pB steht Datum, false - FIFO ist leer
 */
bool	FIFO_GetFromISR(pT_ByteFIFO pFIFO, uint8_t *pb)
{
	if (((T_ByteFIFO*)pFIFO)->Head == ((T_ByteFIFO*)pFIFO)->Tail)						// Leer
		return false;									// Ende!

uint32_t Next = (((T_ByteFIFO*)pFIFO)->Tail + 1) % ((T_ByteFIFO*)pFIFO)->Size;

uint32_t SavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();

		*pb = ((T_ByteFIFO*)pFIFO)->Buffer[((T_ByteFIFO*)pFIFO)->Tail];					// Byte raus
		((T_ByteFIFO*)pFIFO)->Tail = Next;

		portCLEAR_INTERRUPT_MASK_FROM_ISR(SavedInterruptStatus);

	return true;
}
开发者ID:DL7AD,项目名称:pecan-lpc11xx,代码行数:24,代码来源:fifo.c

示例9: TIM6_IRQHandler

void TIM6_IRQHandler(void)//1ms
{
	static uint16_t count_1s = 0;

	unsigned portBASE_TYPE uxSavedInterruptStatus;
	uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
//	
//	count++;
//	if(count >= 10) 
//	{
//		count = 0;
//		uip_timer++;		//uip计时器增加1
//	}
//	if(TIM6->SR & 0X0001)	//溢出中断
#if ARM_MINI
	scan_led();
#endif	
	if(TIM_GetFlagStatus(TIM6, TIM_IT_Update) == SET)
	{
		uip_timer++;		//uip计时器增加1
	}
	
	
	miliseclast = miliseclast + SWTIMER_INTERVAL;  // 1ms

	if(count_1s < 1000 / SWTIMER_INTERVAL)
	{
		count_1s++;
	}
	else	
	{
		run_time++;
#if 0
	  timestart++;
#endif
		count_1s = 0;
	}
	SilenceTime = SilenceTime + SWTIMER_INTERVAL;
	if(SilenceTime > 10000)	
	{
		SilenceTime = 0;
	}	
//	TIM6->SR &= ~(1 << 0);	//清除中断标志位 
	TIM_ClearFlag(TIM6, TIM_IT_Update);		
	
	portCLEAR_INTERRUPT_MASK_FROM_ISR(uxSavedInterruptStatus);
}
开发者ID:temcocontrols,项目名称:CM5,代码行数:47,代码来源:timerx.c

示例10: xPortSysTickHandler

void xPortSysTickHandler( void )
{
    nrf_rtc_event_clear(portNRF_RTC_REG, NRF_RTC_EVENT_TICK);
#if configUSE_TICKLESS_IDLE == 1
    nrf_rtc_event_clear(portNRF_RTC_REG, NRF_RTC_EVENT_COMPARE_0);
#endif
    uint32_t isrstate = portSET_INTERRUPT_MASK_FROM_ISR();
    /* Increment the RTOS tick. */
    if ( xTaskIncrementTick() != pdFALSE )
    {
        /* A context switch is required.  Context switching is performed in
        the PendSV interrupt.  Pend the PendSV interrupt. */
        SCB->ICSR = SCB_ICSR_PENDSVSET_Msk;
        __SEV();
    }
    portCLEAR_INTERRUPT_MASK_FROM_ISR( isrstate );
}
开发者ID:lyncxy119,项目名称:Sentry,代码行数:17,代码来源:port_cmsis_systick.c

示例11: vPortTickISR

void interrupt VectorNumber_Vrtc vPortTickISR( void )
{
uint32_t ulSavedInterruptMask;

	/* Clear the interrupt. */
	RTCSC |= RTCSC_RTIF_MASK;

	/* Increment the RTOS tick. */
	ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR();
	{
		if( xTaskIncrementTick() != pdFALSE )
		{
			taskYIELD();
		}
	}
	portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask );
}
开发者ID:RGassmann,项目名称:FRDM,代码行数:17,代码来源:port.c

示例12: xPortSysTickHandler

void xPortSysTickHandler( void )
{
    /* The SysTick runs at the lowest interrupt priority, so when this interrupt
    executes all interrupts must be unmasked.  There is therefore no need to
    save and then restore the interrupt mask value as its value is already
    known. */
    ( void ) portSET_INTERRUPT_MASK_FROM_ISR();
    {
        /* Increment the RTOS tick. */
        if( xTaskIncrementTick() != pdFALSE ) {
            /* A context switch is required.  Context switching is performed in
            the PendSV interrupt.  Pend the PendSV interrupt. */
            portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
        }
    }
    portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 );
}
开发者ID:autosportlabs,项目名称:RaceCapture-Pro_firmware,代码行数:17,代码来源:port.c

示例13: vNetworkBufferReleaseFromISR

BaseType_t vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer )
{
    UBaseType_t uxSavedInterruptStatus;
    BaseType_t xHigherPriorityTaskWoken = pdFALSE;

    /* Ensure the buffer is returned to the list of free buffers before the
    counting semaphore is 'given' to say a buffer is available. */
    uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
    {
        vListInsertEnd( &xFreeBuffersList, &( pxNetworkBuffer->xBufferListItem ) );
    }
    portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );

    xSemaphoreGiveFromISR( xNetworkBufferSemaphore, &xHigherPriorityTaskWoken );
    iptraceNETWORK_BUFFER_RELEASED( pxNetworkBuffer );

    return xHigherPriorityTaskWoken;
}
开发者ID:peterliu2,项目名称:FreeRTOS,代码行数:18,代码来源:BufferAllocation_1.c

示例14: osPoolFree

/// Return an allocated memory block back to a specific memory pool
/// \param[in]     pool_id       memory pool ID obtain referenced with \ref osPoolCreate.
/// \param[in]     block         address of the allocated memory block that is returned to the memory pool.
/// \return status code that indicates the execution status of the function.
/// \note MUST REMAIN UNCHANGED: \b osPoolFree shall be consistent in every CMSIS-RTOS.
osStatus osPoolFree (osPoolId pool_id, void *block)
{
    int dummy;
    uint32_t index;

    if (pool_id == NULL) {
        return osErrorParameter;
    }

    if (block == NULL) {
        return osErrorParameter;
    }

    if (block < pool_id->pool) {
        return osErrorParameter;
    }

    index = (uint32_t)block - (uint32_t)(pool_id->pool);
    if (index % pool_id->item_sz) {
        return osErrorParameter;
    }
    index = index / pool_id->item_sz;
    if (index >= pool_id->pool_sz) {
        return osErrorParameter;
    }

    if (inHandlerMode()) {
        dummy = portSET_INTERRUPT_MASK_FROM_ISR();
    }
    else {
        vPortEnterCritical();
    }

    pool_id->markers[index] = 0;

    if (inHandlerMode()) {
        portCLEAR_INTERRUPT_MASK_FROM_ISR(dummy);
    }
    else {
        vPortExitCritical();
    }

    return osOK;
}
开发者ID:geliang201201,项目名称:RTL_Ameba,代码行数:49,代码来源:cmsis_os.c

示例15: xPortSysTickHandler

/**
 * @brief	Tick interrupt handler routine
 * @return	Nothing
 * @note	This function handles the tick interrupts that are generated by RITIMER.
 */
void xPortSysTickHandler(void)
{
	unsigned long ulDummy;

	/* TODO: check if WWDT interrupt and redirect */
	Chip_RIT_ClearInt(LPC_RITIMER);
	Chip_RIT_SetCOMPVAL(LPC_RITIMER, Chip_RIT_GetCounter(LPC_RITIMER) + reload_val);/* Reload value */

#if configUSE_PREEMPTION == 1
	/* If using preemption, also force a context switch. */
	*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
#endif

	ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
	{
		vTaskIncrementTick();
	}
	portCLEAR_INTERRUPT_MASK_FROM_ISR(ulDummy);
}
开发者ID:Andriiy,项目名称:Circuit-Boards,代码行数:24,代码来源:FreeRTOS_lpc43xx_m0_Tick.c


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