EZR32 Wonder Gecko Software Documentation
ezr32wg-doc-4.2.1
|
Safe nesting of interrupt disable/enable API. More...
Functions | |
__STATIC_INLINE uint32_t | INT_Disable (void) |
Disable interrupts. More... | |
__STATIC_INLINE uint32_t | INT_Enable (void) |
Enable interrupts. More... | |
Variables | |
uint32_t | INT_LockCnt = 0 |
This module contains functions to safely disable and enable interrupts at CPU level. INT_Disable() disables interrupts globally and increments a lock level counter (counting semaphore). INT_Enable() decrements the lock level counter and enable interrupts if the counter reaches zero.
These functions would normally be used to secure critical regions, and to make sure that a critical section that calls into another critical section does not unintentionally terminate the callee critical section.
These functions should also be used inside interrupt handlers:
* void SysTick_Handler(void) * { * INT_Disable(); * . * . * . * INT_Enable(); * } *
__STATIC_INLINE uint32_t INT_Disable | ( | void | ) |
Disable interrupts and increment lock level counter.
Definition at line 71 of file em_int.h.
References INT_LockCnt.
Referenced by CAPLESENSE_Init(), DMADRV_AllocateChannel(), DMADRV_DeInit(), DMADRV_FreeChannel(), DMADRV_Init(), DMADRV_TransferDone(), DMADRV_TransferRemainingCount(), GPIOINT_CallbackRegister(), RETARGET_ReadChar(), RTCDRV_AllocateTimer(), RTCDRV_FreeTimer(), RTCDRV_IsRunning(), RTCDRV_StartTimer(), RTCDRV_StopTimer(), RTCDRV_TimeRemaining(), SLEEP_Sleep(), SPIDRV_AbortTransfer(), SPIDRV_GetTransferStatus(), SPIDRV_Init(), SPIDRV_MTransferSingleItemB(), SPIDRV_SetBitrate(), SPIDRV_SetFramelength(), UARTDRV_Abort(), UARTDRV_Init(), UDELAY_Calibrate(), USBD_AbortAllTransfers(), USBD_AbortTransfer(), USBD_Connect(), USBD_Disconnect(), USBD_Init(), USBD_Read(), USBD_RemoteWakeup(), USBD_StallEp(), USBD_UnStallEp(), USBD_Write(), USBH_ControlMsg(), USBH_ControlMsgB(), USBH_Init(), USBH_PortReset(), USBH_PortResume(), USBH_PortSuspend(), USBH_Read(), USBH_ReadB(), USBH_Stop(), USBH_WaitForDeviceConnectionB(), USBH_Write(), USBH_WriteB(), USBTIMER_Start(), and USBTIMER_Stop().
__STATIC_INLINE uint32_t INT_Enable | ( | void | ) |
Decrement interrupt lock level counter and enable interrupts if counter reached zero.
Definition at line 94 of file em_int.h.
References INT_LockCnt.
Referenced by CAPLESENSE_Init(), DMADRV_AllocateChannel(), DMADRV_DeInit(), DMADRV_FreeChannel(), DMADRV_Init(), DMADRV_TransferDone(), DMADRV_TransferRemainingCount(), GPIOINT_CallbackRegister(), RETARGET_ReadChar(), RTCDRV_AllocateTimer(), RTCDRV_FreeTimer(), RTCDRV_IsRunning(), RTCDRV_StartTimer(), RTCDRV_StopTimer(), RTCDRV_TimeRemaining(), SLEEP_Sleep(), SPIDRV_AbortTransfer(), SPIDRV_GetTransferStatus(), SPIDRV_Init(), SPIDRV_MTransferSingleItemB(), SPIDRV_SetBitrate(), SPIDRV_SetFramelength(), UARTDRV_Abort(), UARTDRV_Init(), UDELAY_Calibrate(), USBD_AbortAllTransfers(), USBD_AbortTransfer(), USBD_Connect(), USBD_Disconnect(), USBD_Init(), USBD_Read(), USBD_RemoteWakeup(), USBD_StallEp(), USBD_UnStallEp(), USBD_Write(), USBH_ControlMsg(), USBH_ControlMsgB(), USBH_Init(), USBH_PortReset(), USBH_PortResume(), USBH_PortSuspend(), USBH_Read(), USBH_ReadB(), USBH_Stop(), USBH_WaitForDeviceConnectionB(), USBH_Write(), USBH_WriteB(), USBTIMER_Start(), and USBTIMER_Stop().
uint32_t INT_LockCnt = 0 |
Interrupt lock level counter. Set to zero initially as we normally enter main with interrupts enabled
Definition at line 70 of file em_int.c.
Referenced by INT_Disable(), and INT_Enable().