本文整理汇总了C++中IntDisable函数的典型用法代码示例。如果您正苦于以下问题:C++ IntDisable函数的具体用法?C++ IntDisable怎么用?C++ IntDisable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IntDisable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OS_AddPeriodicThread
//******** OS_AddPeriodicThread ***************
// add a background periodic task
// typically this function receives the highest priority
// Inputs: pointer to a void/void background function
// period given in system time units
// priority 0 is highest, 5 is lowest
// Outputs: 1 if successful, 0 if this thread can not be added
// It is assumed that the user task will run to completion and return
// This task can not spin, block, loop, sleep, or kill
// This task can call OS_Signal OS_bSignal OS_AddThread
// You are free to select the time resolution for this function
// This task does not have a Thread ID
// In lab 2, this command will be called 0 or 1 times
// In lab 2, the priority field can be ignored
// In lab 3, this command will be called 0 1 or 2 times
// In lab 3, there will be up to four background threads, and this priority field
// determines the relative priority of these four threads
int OS_AddPeriodicThread(void(*task)(void),
unsigned long period, unsigned long priority){
if (periodic[0] == NULL){
// Set function pointer
periodic[0] = task;
// Startup timer
IntDisable(INT_TIMER1A);
TimerLoadSet(TIMER1_BASE, TIMER_A, period);
TimerEnable(TIMER1_BASE, TIMER_A);
IntEnable(INT_TIMER1A);
}else if (periodic[1] == NULL){
// Set function pointer
periodic[1] = task;
// Startup timer
IntDisable(INT_TIMER1B);
TimerLoadSet(TIMER1_BASE, TIMER_B, period);
TimerEnable(TIMER1_BASE, TIMER_B);
IntEnable(INT_TIMER1B);
}else if (periodic[2] == NULL){
// Set function pointer
periodic[2] = task;
// Startup timer
IntDisable(INT_TIMER2A);
TimerLoadSet(TIMER2_BASE, TIMER_A, period);
TimerEnable(TIMER2_BASE, TIMER_A);
IntEnable(INT_TIMER2A);
}else if (periodic[3] == NULL){
// Set function pointer
periodic[3] = task;
// Startup timer
IntDisable(INT_TIMER2B);
TimerLoadSet(TIMER2_BASE, TIMER_B, period);
TimerEnable(TIMER2_BASE, TIMER_B);
IntEnable(INT_TIMER2B);
}else{
// Apparenty all periodic threads are in use
return 0;
}
return 1; // For now
}
开发者ID:AustinBlackstone,项目名称:EE345M-S2012,代码行数:63,代码来源:os.c
示例17: SSIIntDisable
void Spi::disableInterrupts(void)
{
// Disable the SPI interrupt
SSIIntDisable(base_, (SSI_TXFF | SSI_RXFF | SSI_RXTO | SSI_RXOR));
// Disable the SPI interrupt
IntDisable(interrupt_);
}
开发者ID:JKLLBF,项目名称:firmware,代码行数:8,代码来源:Spi.cpp
示例18: UARTIntDisable
void Uart::disableInterrupts(void)
{
// Disable the UART RX, TX and RX timeout interrupts
UARTIntDisable(config_.base, UART_INT_RX | UART_INT_TX | UART_INT_RT);
// Disable the UART interrupt
IntDisable(config_.interrupt);
}
开发者ID:OsamaWajiha,项目名称:firmware,代码行数:8,代码来源:Uart.cpp
示例19: SdcDevDeInit
/*******************************************************************************
** Name: SdcDevDeInit
** Input:HDC dev
** Return: rk_err_t
** Owner:Aaron.sun
** Date: 2014.2.19
** Time: 15:59:49
*******************************************************************************/
_DRIVER_SDMMC_SDMMCDEVICE_INIT_
rk_err_t SdcDevDeInit(SDC_DEVICE_CLASS * pstSdcDev)
{
if (pstSdcDev->enSdMmcPort == SDC0)
{
IntDisable(INT_ID_EMMC);
IntPendingClear(INT_ID_EMMC);
IntUnregister(INT_ID_EMMC);
}
else if (pstSdcDev->enSdMmcPort == SDC1)
{
IntDisable(INT_ID_SDMMC);
IntPendingClear(INT_ID_SDMMC);
IntUnregister(INT_ID_SDMMC);
}
//ScuClockGateCtr(CLOCK_GATE_SDMMC,0);
return RK_SUCCESS;
}
开发者ID:wjw890912,项目名称:RK_NanoD_WIFI_demo,代码行数:26,代码来源:SdMmcDevice.c
示例20: EventHandler
/******************************************************************************
* *
* \brief Generic event handler for the composite device.\n *
* *
* \param pvCBData : Is the event callback pointer provided during *
* USBDCompositeInit *
* *
* \param ulEvent : Identifies the event we are being called back for. *
* *
* \param ulMsgValue : Is an event-specific value. *
* *
* \param pvMsgData : Is an event-specific pointer. *
* *
* \return The return value is event-specific. *
* *
******************************************************************************/
unsigned int
EventHandler(void *pvCBData, unsigned int ulEvent,
unsigned int ulMsgValue, void *pvMsgData)
{
unsigned char ulIntsOff;
/* Which event are we being asked to process? */
switch(ulEvent)
{
/* We are connected to a host and communication is now possible. */
case USB_EVENT_CONNECTED:
/* Flush our buffers. */
USBBufferFlush(&g_sTxBuffer);
USBBufferFlush(&g_sRxBuffer);
ulIntsOff = IntDisable();
g_pcStatus = "Host connected.";
g_ulFlags |= COMMAND_STATUS_UPDATE;
IntEnable(ulIntsOff);
break;
/* The host has disconnected. */
case USB_EVENT_DISCONNECTED:
ulIntsOff = IntDisable();
g_pcStatus = "Host disconnected.";
g_ulFlags |= COMMAND_STATUS_UPDATE;
IntEnable(ulIntsOff);
break;
default:
break;
}
return(0);
}
开发者ID:OS-Project,项目名称:Divers,代码行数:60,代码来源:usb_dev_chidcdc.c
注:本文中的IntDisable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论