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


C++ portENABLE_INTERRUPTS函数代码示例

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


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

示例1: vPortExitCritical

void vPortExitCritical( void )
{
	uxCriticalNesting--;
	if( uxCriticalNesting == portNO_CRITICAL_NESTING )
	{
		portENABLE_INTERRUPTS();
	}
}
开发者ID:dessel,项目名称:stf12,代码行数:8,代码来源:port.c

示例2: Hardware_init

void Hardware_init( void ) {
	portDISABLE_INTERRUPTS();

	NP2_LEDInit();		//Initialise Blue LED
	NP2_LEDOff();		//Turn off Blue LED

	portENABLE_INTERRUPTS();
}
开发者ID:reyrey1989,项目名称:CSSE3010-2014,代码行数:8,代码来源:main.c

示例3: vPortSuppressTicksAndSleep

void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
{
    TickType_t wakeupTime;

    /* Make sure the SysTick reload value does not overflow the counter. */
    if( xExpectedIdleTime > portNRF_RTC_MAXTICKS - configEXPECTED_IDLE_TIME_BEFORE_SLEEP )
    {
        xExpectedIdleTime = portNRF_RTC_MAXTICKS - configEXPECTED_IDLE_TIME_BEFORE_SLEEP;
    }
    /* Block the scheduler now */
    portDISABLE_INTERRUPTS();

    /* Stop tick events */
    nrf_rtc_int_disable(portNRF_RTC_REG, NRF_RTC_INT_TICK_MASK);

    /* Configure CTC interrupt */
    wakeupTime = nrf_rtc_counter_get(portNRF_RTC_REG) + xExpectedIdleTime;
    wakeupTime &= portNRF_RTC_MAXTICKS;
    nrf_rtc_cc_set(portNRF_RTC_REG, 0, wakeupTime);
    nrf_rtc_event_clear(portNRF_RTC_REG, NRF_RTC_EVENT_COMPARE_0);
    nrf_rtc_int_enable(portNRF_RTC_REG, NRF_RTC_INT_COMPARE0_MASK);

    if( eTaskConfirmSleepModeStatus() == eAbortSleep )
    {
        portENABLE_INTERRUPTS();
    }
    else
    {
        TickType_t xModifiableIdleTime = xExpectedIdleTime;
        configPRE_SLEEP_PROCESSING( xModifiableIdleTime );
        if( xModifiableIdleTime > 0 )
        {
            __DSB();
            do{
                __WFE();
            } while(0 == (NVIC->ISPR[0]));
        }
        configPOST_SLEEP_PROCESSING( xExpectedIdleTime );
        portENABLE_INTERRUPTS();
    }
    // We can do operations below safely, because when we are inside vPortSuppressTicksAndSleep
    // scheduler is already suspended.
    nrf_rtc_int_disable(portNRF_RTC_REG, NRF_RTC_INT_COMPARE0_MASK);
    nrf_rtc_int_enable (portNRF_RTC_REG, NRF_RTC_INT_TICK_MASK);
}
开发者ID:DanielOld,项目名称:wlock,代码行数:45,代码来源:port_cmsis_systick.c

示例4: vApplicationIRQHandler

/*
 * The function called by the FreeRTOS IRQ handler, after it has managed
 * interrupt entry.  This function creates a local copy of pxISRFunction before
 * re-enabling interrupts and actually calling the handler pointed to by
 * pxISRFunction.
 */
void vApplicationIRQHandler( void )
{
ISRFunction_t pxISRToCall = pxISRFunction;

	portENABLE_INTERRUPTS();

	/* Call the installed ISR. */
	pxISRToCall();
}
开发者ID:Eclo,项目名称:FreeRTOS,代码行数:15,代码来源:FreeRTOS_tick_config.c

示例5: vPortExitCritical

void vPortExitCritical( void )
{
    configASSERT( uxCriticalNesting );
    uxCriticalNesting--;
    if( uxCriticalNesting == 0 )
    {
        portENABLE_INTERRUPTS();
    }
}
开发者ID:Joe-Merten,项目名称:Stm32-Tools-Evaluation,代码行数:9,代码来源:port.c

示例6: prvCheckDelayedList

static void prvCheckDelayedList( void )
{
CRCB_t *pxCRCB;

	xPassedTicks = xTaskGetTickCount() - xLastTickCount;
	while( xPassedTicks )
	{
		xCoRoutineTickCount++;
		xPassedTicks--;

		/* If the tick count has overflowed we need to swap the ready lists. */
		if( xCoRoutineTickCount == 0 )
		{
			List_t * pxTemp;

			/* Tick count has overflowed so we need to swap the delay lists.  If there are
			any items in pxDelayedCoRoutineList here then there is an error! */
			pxTemp = pxDelayedCoRoutineList;
			pxDelayedCoRoutineList = pxOverflowDelayedCoRoutineList;
			pxOverflowDelayedCoRoutineList = pxTemp;
		}

		/* See if this tick has made a timeout expire. */
		while( listLIST_IS_EMPTY( pxDelayedCoRoutineList ) == pdFALSE )
		{
			pxCRCB = ( CRCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedCoRoutineList );

			if( xCoRoutineTickCount < listGET_LIST_ITEM_VALUE( &( pxCRCB->xGenericListItem ) ) )
			{
				/* Timeout not yet expired. */
				break;
			}

			portDISABLE_INTERRUPTS();
			{
				/* The event could have occurred just before this critical
				section.  If this is the case then the generic list item will
				have been moved to the pending ready list and the following
				line is still valid.  Also the pvContainer parameter will have
				been set to NULL so the following lines are also valid. */
				( void ) uxListRemove( &( pxCRCB->xGenericListItem ) );

				/* Is the co-routine waiting on an event also? */
				if( pxCRCB->xEventListItem.pvContainer )
				{
					( void ) uxListRemove( &( pxCRCB->xEventListItem ) );
				}
			}
			portENABLE_INTERRUPTS();

			prvAddCoRoutineToReadyQueue( pxCRCB );
		}
	}

	xLastTickCount = xCoRoutineTickCount;
}
开发者ID:AlexShiLucky,项目名称:freertos,代码行数:56,代码来源:croutine.c

示例7: SysTick_Handler

void SysTick_Handler( void )
{

    portDISABLE_INTERRUPTS();

    tpl_call_counter_tick();

    portENABLE_INTERRUPTS();

}
开发者ID:kostaman,项目名称:insacortexdev,代码行数:10,代码来源:tpl_os_generated_configuration.c

示例8: timer_is_ppm_valid

bool timer_is_ppm_valid(void)
{
  uint16_t sample_len;

  portDISABLE_INTERRUPTS();
  sample_len = g_ppm_state.sample_len;
  portENABLE_INTERRUPTS();

  return sample_len != 0;
}
开发者ID:bli19,项目名称:smaccmpilot-stm32f4,代码行数:10,代码来源:timer.c

示例9: vPortExitCritical

/*-----------------------------------------------------------*/
void vPortExitCritical(void) {
 /* Interrupts are disabled so we can access the nesting count directly.  If the
  * nesting is found to be 0 (no nesting) then we are leaving the critical
  * section and interrupts can be re-enabled.
  */
  uxCriticalNesting--;
  if (uxCriticalNesting == 0)  {
    portENABLE_INTERRUPTS();
  }
}
开发者ID:210221030,项目名称:mcuoneclipse,代码行数:11,代码来源:port.c

示例10: __asmSaveContextAndCallScheduler

void __asmSaveContextAndCallScheduler()
{
	//SysTickIntEnable();
	/* Set a PendSV to request a context switch. */
	*(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET;

	/* This function is also called in response to a Yield(), so we want
	the yield to occur immediately. */
	portENABLE_INTERRUPTS();
}
开发者ID:art1,项目名称:FloatSat-Project-G9,代码行数:10,代码来源:port.cpp

示例11: vPortExitCritical

void vPortExitCritical( void )
{
    if(ulCriticalNesting > portNO_CRITICAL_NESTING) {
        ulCriticalNesting--;
        if( ulCriticalNesting == portNO_CRITICAL_NESTING ) {
            /* Enable all interrupt/exception. */
            portENABLE_INTERRUPTS();
        }
    }
}
开发者ID:autosportlabs,项目名称:RaceCapture-Pro_firmware,代码行数:10,代码来源:port.c

示例12: vPortExitCritical

void vPortExitCritical( void )
{
	uxCriticalNesting--;
	if( uxCriticalNesting == 0 )
	{
		portENABLE_INTERRUPTS();
		__asm( " dsb" );
		__asm( " isb" );
	}
}
开发者ID:Balu1991,项目名称:Wifly_Light,代码行数:10,代码来源:port.c

示例13: vPortExitCritical

void vPortExitCritical( void )
{
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();

	uxCriticalNesting--;
	if( uxCriticalNesting == 0 )
	{
		portENABLE_INTERRUPTS();
	}
	portRESET_PRIVILEGE( xRunningPrivileged );
}
开发者ID:ADTL,项目名称:ARMWork,代码行数:11,代码来源:port.c

示例14: Hardware_init

/**
  * @brief  Hardware Initialisation.
  * @param  None
  * @retval None
  */
void Hardware_init( void ) {
	
	
	portDISABLE_INTERRUPTS();	//Disable interrupts

	BRD_LEDInit();				//Initialise Blue LED
	BRD_LEDOff();				//Turn off Blue LED

	portENABLE_INTERRUPTS();	//Enable interrupts
	s4295255_sysmon_init();  	//Initialise the system monitor
}
开发者ID:manibatra,项目名称:embedded_systems,代码行数:16,代码来源:main.c

示例15: vPortExitCritical1

void ICACHE_FLASH_ATTR
vPortExitCritical1( void )
{
	if(NMIIrqIsOn == 0)
	{		
		if( ClosedLv1Isr ==1 )
		{
			ClosedLv1Isr = 0;
			portENABLE_INTERRUPTS();
		}
	}
}
开发者ID:liqinliqin,项目名称:drcom-dialer-esp8266,代码行数:12,代码来源:port.c


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