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


C++ IntDisable函数代码示例

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


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

示例1: Timer0BIntHandler

//*****************************************************************************
//
// The interrupt handler for the Timer0B interrupt.
//
//*****************************************************************************
void
Timer0BIntHandler(void)
{
    //
    // Clear the timer interrupt flag.
    //
    TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT);

    //
    // Update the periodic interrupt counter.
    //
    g_ulCounter++;

    //
    // Once NUMBER_OF_INTS interrupts have been received, turn off the
    // TIMER0B interrupt.
    //
    if(g_ulCounter == NUMBER_OF_INTS)
    {
        //
        // Disable the Timer0B interrupt.
        //
        IntDisable(INT_TIMER0B);

        //
        // Turn off Timer0B interrupt.
        //
        TimerIntDisable(TIMER0_BASE, TIMER_TIMB_TIMEOUT);

        //
        // Clear any pending interrupt flag.
        //
        TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT);
    }
}
开发者ID:taylor123454321,项目名称:c_control,代码行数:40,代码来源:periodic_16bit.c

示例2: PWMSetDutyCycle

//*****************************************************************************
//
//! Sets the duty cycle of the generated PWM waveforms.
//!
//! \param ulDutyCycleA is the duty cycle of the waveform for the U phase of
//! the motor, specified as a 16.16 fixed point value between 0.0 and 1.0.
//! \param ulDutyCycleB is the duty cycle of the waveform for the V phase of
//! the motor, specified as a 16.16 fixed point value between 0.0 and 1.0.
//! \param ulDutyCycleC is the duty cycle of the waveform for the W phase of
//! the motor, specified as a 16.16 fixed point value between 0.0 and 1.0.
//!
//! This function configures the duty cycle of the generated PWM waveforms.
//! The duty cycle update will not occur immediately; the change will be
//! registered for synchronous application to the output waveforms to avoid
//! discontinuities.
//!
//! \return None.
//
//*****************************************************************************
void
PWMSetDutyCycle(unsigned long ulDutyCycleA, unsigned long ulDutyCycleB,
                unsigned long ulDutyCycleC)
{
    //
    // Disable the PWM interrupt temporarily.
    //
    IntDisable(INT_PWM0_0);

    //
    // Save the duty cycles for the three phases.
    //
    g_ulPWMDutyCycleA = ulDutyCycleA;
    g_ulPWMDutyCycleB = ulDutyCycleB;
    g_ulPWMDutyCycleC = ulDutyCycleC;

    //
    // Set the flag indicating that the duty cycles need to be updated.
    //
    HWREGBITW(&g_ulPWMFlags, PWM_FLAG_NEW_DUTY_CYCLE) = 1;

    //
    // Re-enable the PWM interrupt.
    //
    IntEnable(INT_PWM0_0);
}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:45,代码来源:pwm_ctrl.c

示例3: I2CIntUnregister

//*****************************************************************************
//
//! Unregisters an interrupt handler for the I2C module.
//!
//! \param ulBase is the base address of the I2C Master module.
//!
//! This function will clear the handler to be called when an I2C interrupt
//! occurs.  This will also mask off the interrupt in the interrupt controller
//! so that the interrupt handler no longer is called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
I2CIntUnregister(unsigned long ulBase)
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT((ulBase == I2C0_MASTER_BASE) || (ulBase == I2C1_MASTER_BASE));

    //
    // Determine the interrupt number based on the I2C port.
    //
    ulInt = (ulBase == I2C0_MASTER_BASE) ? INT_I2C0 : INT_I2C1;

    //
    // Disable the interrupt.
    //
    IntDisable(ulInt);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(ulInt);
}
开发者ID:johnhowe,项目名称:lmmin,代码行数:41,代码来源:i2c.c

示例4: SoundStop

//*****************************************************************************
//
//! Stops playback of the current sound stream.
//!
//! This function immediately stops playback of the current sound stream.  As
//! a result, the output is changed directly to the mid-point, possibly
//! resulting in a pop or click.  It is then ramped down to no output,
//! eliminating the current draw through the amplifier and speaker.
//!
//! \return None.
//
//*****************************************************************************
void
SoundStop(void)
{
    //
    // See if playback is in progress.
    //
    if((g_sSoundState.ui32Flags != 0) &&
       (HWREGBITW(&g_sSoundState.ui32Flags, SOUND_FLAG_SHUTDOWN) == 0))
    {
        //
        // Temporarily disable the timer interrupt.
        //
        IntDisable(INT_TIMER5A);

        //
        // Clear the sound flags and set the shutdown flag (to try to avoid a
        // pop, though one may still occur based on the current position of the
        // output waveform).
        //
        g_sSoundState.ui32Flags = 0;
        HWREGBITW(&g_sSoundState.ui32Flags, SOUND_FLAG_SHUTDOWN) = 1;

        //
        // Set the shutdown step to the first.
        //
        g_sSoundState.i32Step = g_sSoundState.ui32Period / 2;

        //
        // Reenable the timer interrupt.
        //
        IntEnable(INT_TIMER5A);
    }
}
开发者ID:spamish,项目名称:ENB350,代码行数:45,代码来源:sound.c

示例5: SSIIntUnregister

//*****************************************************************************
//
//! Unregisters an interrupt handler for the synchronous serial interface.
//!
//! \param ui32Base specifies the SSI module base address.
//!
//! This function clears the handler to be called when an SSI interrupt
//! occurs.  This function also masks off the interrupt in the interrupt
//! controller so that the interrupt handler no longer is called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
SSIIntUnregister(uint32_t ui32Base)
{
    uint32_t ui32Int;

    //
    // Check the arguments.
    //
    ASSERT(_SSIBaseValid(ui32Base));

    //
    // Determine the interrupt number based on the SSI module.
    //
    ui32Int = _SSIIntNumberGet(ui32Base);

    ASSERT(ui32Int != 0);

    //
    // Disable the interrupt.
    //
    IntDisable(ui32Int);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(ui32Int);
}
开发者ID:CarletonSLAM,项目名称:tulipsandpopcorn,代码行数:43,代码来源:ssi.c

示例6: PortKIntHandler

//*****************************************************************************
//
//! This is the Pulse Per Second (PPS) interrupt handler.
//! The updateCounter is incremented on each Pulse per second call, if equal to
//! the update rate, the GPS data is parsed and logged.
//
//*****************************************************************************
void PortKIntHandler(void) {
    uint32_t intStatus = 0;

    //
    // Get the current interrupt status for Port K
    //
    intStatus = GPIOIntStatus(GPIO_PORTK_BASE,true);

    //
    // Clear the set interrupts for Port K
    //
    GPIOIntClear(GPIO_PORTK_BASE,intStatus);

    //
    // Execute code for PK2 interrupt
    //
    if((intStatus & GPIO_INT_PIN_2) == GPIO_INT_PIN_2){
        if (updateRate == updateCounter++) {
            GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0x02);
            gpsData();
            GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_1, 0x00);
            updateCounter = 0;

            //
            // Disable PPS interrupt after one read if in low power mode
            //
            if (lowPowerOn == 1) {
                IntDisable(INT_GPIOK);
                logComplete = 1;
            }
        }
    }
} // End function PortKIntHandler
开发者ID:idaohang,项目名称:launchpad-gps,代码行数:40,代码来源:main.c

示例7: QEIIntUnregister

//*****************************************************************************
//
//! Unregisters an interrupt handler for the quadrature encoder interrupt.
//!
//! \param ui32Base is the base address of the quadrature encoder module.
//!
//! This function unregisters the handler to be called when a quadrature
//! encoder interrupt occurs.  This function also masks off the interrupt in
//! the interrupt controller so that the interrupt handler no longer is called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
QEIIntUnregister(uint32_t ui32Base)
{
    uint32_t ui32Int;

    //
    // Check the arguments.
    //
    ASSERT((ui32Base == QEI0_BASE) || (ui32Base == QEI1_BASE));

    //
    // Determine the interrupt number based on the QEI module.
    //
    ui32Int = QEIIntNumberGet(ui32Base);

    ASSERT(ui32Int != 0);

    //
    // Disable the interrupt.
    //
    IntDisable(ui32Int);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(ui32Int);
}
开发者ID:AllanFan,项目名称:Energia,代码行数:43,代码来源:qei.c

示例8: CRYPTOAesEcbStatus

//*****************************************************************************
//
//! Check the result of an AES ECB operation
//
//*****************************************************************************
uint32_t
CRYPTOAesEcbStatus(void)
{
    uint32_t ui32Status;

    //
    // Get the current DMA status.
    //
    ui32Status = HWREG(CRYPTO_BASE + CRYPTO_O_DMASTAT);

    //
    // Check if DMA is still busy.
    //
    if(ui32Status & CRYPTO_DMA_BSY)
    {
        return (AES_DMA_BSY);
    }

    //
    // Check the status of the DMA operation - return error if not success.
    //
    if(ui32Status & CRYPTO_DMA_BUS_ERROR)
    {
        g_ui32CurrentAesOp = CRYPTO_AES_NONE;
        return (AES_DMA_BUS_ERROR);
    }

    //
    // Operation successfull - disable interrupt and return success.
    //
    g_ui32CurrentAesOp = CRYPTO_AES_NONE;
    IntDisable(INT_CRYPTO);
    return (AES_SUCCESS);
}
开发者ID:DemonTu,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:39,代码来源:crypto.c

示例9: NwpRegisterInterruptHandler

int NwpRegisterInterruptHandler(P_EVENT_HANDLER InterruptHdl , void* pValue)    //do not know what to do with pValue
{

    if(InterruptHdl == NULL)
    {
        //De-register Interprocessor communication interrupt between App and NWP
#ifdef SL_PLATFORM_MULTI_THREADED
        osi_InterruptDeRegister(INT_NWPIC);
#else
        IntDisable(INT_NWPIC);
        IntUnregister(INT_NWPIC);
        IntPendClear(INT_NWPIC);
#endif
        g_pHostIntHdl = NULL;
    }
    else
    {
        g_pHostIntHdl = InterruptHdl;
#if 0
        //Setting the 14th and 13th bit to '01' to make the HOST_IRQ edge triggered
        HWREG(0x4402E168) |= 0x2000;
#endif
#ifdef SL_PLATFORM_MULTI_THREADED
        IntPendClear(INT_NWPIC);
        osi_InterruptRegister(INT_NWPIC, (P_OSI_INTR_ENTRY)HostIntHanlder,INT_PRIORITY_LVL_1);
#else
        IntRegister(INT_NWPIC, HostIntHanlder);
        IntPrioritySet(INT_NWPIC, INT_PRIORITY_LVL_1);
        IntPendClear(INT_NWPIC);
        IntEnable(INT_NWPIC);
#endif
    }

    return 0;
}
开发者ID:c4esp,项目名称:Wifly_Light,代码行数:35,代码来源:cc_pal.c

示例10: QEIIntUnregister

//*****************************************************************************
//
//! Unregisters an interrupt handler for the quadrature encoder interrupt.
//!
//! \param ulBase is the base address of the quadrature encoder module.
//!
//! This function will clear the handler to be called when a quadrature encoder
//! interrupt occurs.  This will also mask off the interrupt in the interrupt
//! controller so that the interrupt handler no longer is called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
QEIIntUnregister(unsigned long ulBase)
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT((ulBase == QEI0_BASE) || (ulBase == QEI1_BASE));

    //
    // Determine the interrupt number based on the QEI module.
    //
    ulInt = (ulBase == QEI0_BASE) ? INT_QEI0 : INT_QEI1;

    //
    // Disable the interrupt.
    //
    IntDisable(ulInt);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(ulInt);
}
开发者ID:Arseni,项目名称:Studienarbeit,代码行数:41,代码来源:qei.c

示例11: SSIIntUnregister

//*****************************************************************************
//
//! Unregisters an interrupt handler for the synchronous serial interface
//!
//! \param ui32Base specifies the SSI module base address.
//!
//! This function will clear the handler to be called when a SSI
//! interrupt occurs.  This will also mask off the interrupt in the interrupt
//! controller so that the interrupt handler no longer is called.
//!
//! \sa See IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None
//
//*****************************************************************************
void
SSIIntUnregister(uint32_t ui32Base)
{
    uint32_t ui32Int;

    //
    // Check the arguments.
    //
    ASSERT((ui32Base == SSI0_BASE) || (ui32Base == SSI1_BASE));

    //
    // Determine the interrupt number based on the SSI port.
    //
    ui32Int = (ui32Base == SSI0_BASE) ? INT_SSI0 : INT_SSI1;

    //
    // Disable the interrupt.
    //
    IntDisable(ui32Int);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(ui32Int);
}
开发者ID:CDACBANG,项目名称:Ubimote_HR,代码行数:41,代码来源:ssi.c

示例12: I2CIntUnregister

//*****************************************************************************
//
//! Unregisters an interrupt handler for the I2C module.
//!
//! \param ulBase is the base address of the I2C Master module.
//!
//! This function will clear the handler to be called when an I2C interrupt
//! occurs.  This will also mask off the interrupt in the interrupt controller
//! so that the interrupt handler no longer is called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
I2CIntUnregister(unsigned long ulBase)
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT(I2CMasterBaseValid(ulBase));

    //
    // Determine the interrupt number based on the I2C port.
    //
    ulInt = I2CIntNumberGet(ulBase);

    //
    // Disable the interrupt.
    //
    IntDisable(ulInt);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(ulInt);
}
开发者ID:shadowpho,项目名称:Chalk-Bot,代码行数:41,代码来源:i2c.c

示例13: UARTIntUnregister

//*****************************************************************************
//
//! Unregisters an interrupt handler for a UART interrupt.
//!
//! \param ulBase is the base address of the UART port.
//!
//! This function does the actual unregistering of the interrupt handler.  It
//! will clear the handler to be called when a UART interrupt occurs.  This
//! will also mask off the interrupt in the interrupt controller so that the
//! interrupt handler no longer is called.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
UARTIntUnregister(unsigned long ulBase)
{
    unsigned long ulInt;

    //
    // Check the arguments.
    //
    ASSERT(UARTBaseValid(ulBase));

    //
    // Determine the interrupt number based on the UART port.
    //
    ulInt = ((ulBase == UART0_BASE) ? INT_UART0 :
             ((ulBase == UART1_BASE) ? INT_UART1 : INT_UART2));

    //
    // Disable the interrupt.
    //
    IntDisable(ulInt);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(ulInt);
}
开发者ID:chimeh,项目名称:RTOS_LM3S_Keil,代码行数:43,代码来源:uart.c

示例14: halTimer32kIntConnect

/**************************************************************************//**
* @brief    Connect interrupt service routine to 32 kHz timer interrupt.
*
* @param    pFnHandle   Void function pointer to interrupt service routine
*
* @return   None
******************************************************************************/
void halTimer32kIntConnect(void (*pFnHandle)(void))
{
    tBoolean intDisabled = IntMasterDisable();
    SleepModeIntRegister(&halTimer32kIsr);  // Register function and
    IntDisable(INT_SMTIM);                  // disable SMTIM interrupts
    pFptr = pFnHandle;                      // Set custom ISR
    if(!intDisabled) IntMasterEnable();
}
开发者ID:CDACBANG,项目名称:Ubimote_HR,代码行数:15,代码来源:hal_timer_32k.c

示例15: SSIIntDisable

void Spi::disableInterrupts(void)
{
    // Disable the SPI interrupt
    SSIIntDisable(config_.base, (SSI_TXFF | SSI_RXFF | SSI_RXTO | SSI_RXOR));

    // Disable the SPI interrupt
    IntDisable(config_.interrupt);
}
开发者ID:OsamaWajiha,项目名称:firmware,代码行数:8,代码来源:Spi.cpp


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