• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ portENABLE_INTERRUPTS函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: main

int main( void )
{
	// configure the system
	SystemInit();
	configRedLed();

	servos_Init();
	mems_Init();

    // configure the general UART
    configSerial();

    // configure the mux select line
    muxControlInit();

    // configure the analog sensors
    analogSensorsInit();
    // create the LED task
    if(xTaskCreate(vLedTask, (signed portCHAR*) "LED",128,NULL, 1, &taskHandles[0]) != pdPASS)
    {
    	//TODO: the task was not created, do something
    }

    // create the serialPort task
    if(xTaskCreate(vSerialTask, (signed portCHAR*) "SERIAL",1024,NULL, 1, &taskHandles[1]) != pdPASS)
    {
    	//TODO: the task was not created, do something
    }

    // create the MUX task
    if(xTaskCreate(vMuxTask, (signed portCHAR*) "LED",128,NULL, 1, &taskHandles[2]) != pdPASS)
    {
    	//TODO: the task was not created, do something
    }
    // create the demo task
	if(xTaskCreate(vDemoTask, (signed portCHAR*) "DEMO",1024,NULL, 1, &taskHandles[2]) != pdPASS)
	{

	}
    taskHandles[4] = 0; //TODO: will need to change when we know how many tasks there will be

    // enable the interrupts
    portENABLE_INTERRUPTS();

    // start the scheduler
	vTaskStartScheduler();

    // will only get here if there was insufficient memory to create the idle
    // task.  The idle task is created within vTaskStartScheduler().
	for( ;; );

	return 0; // never gets here
}
开发者ID:huskyDrone,项目名称:huskyDrone,代码行数:53,代码来源:main.c


示例17: vPortExitCritical

void vPortExitCritical( void )
{
BaseType_t xRunningPrivileged = xPortRaisePrivilege();

	configASSERT( uxCriticalNesting );
	uxCriticalNesting--;
	if( uxCriticalNesting == 0 )
	{
		portENABLE_INTERRUPTS();
	}
	vPortResetPrivilege( xRunningPrivileged );
}
开发者ID:lpodkalicki,项目名称:blog,代码行数:12,代码来源:port.c


示例18: vPortExitCritical

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

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


示例19: Hardware_init

void Hardware_init() {

	portDISABLE_INTERRUPTS();	//Disable interrupts

	BRD_LEDInit();
	BRD_LEDOn();
        
        tracks_init();
        
        wheelencoders_init();

	portENABLE_INTERRUPTS();	//Disable interrupts
}
开发者ID:timmyhadwen,项目名称:UQRoboticsTank,代码行数:13,代码来源:main.c


示例20: getLightValue

bool getLightValue(unsigned short from, unsigned short inLen, void *inData, unsigned short *outLen, void *outData) {
    *outLen = 4;

    portDISABLE_INTERRUPTS();
    unsigned int lightTempL = lightCountL;
    unsigned int lightTempH = lightCountH;
    portENABLE_INTERRUPTS();

    unsigned long outVal = (((unsigned long) htons(lightTempL)) << 16) + htons(lightTempH);
    memcpy(outData, &outVal, 4);

    return true;
}
开发者ID:jhiesey,项目名称:SensorNet,代码行数:13,代码来源:lightSensor.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ portEND_SWITCHING_ISR函数代码示例发布时间:2022-05-30
下一篇:
C++ portDISABLE_INTERRUPTS函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap