VSF Documented
Functions
intc.h File Reference
#include "hal/vsf_hal_cfg.h"
#include "../../__device.h"
#include "utilities/vsf_utilities.h"
#include "./i_reg_inc.h"

Go to the source code of this file.

Functions

__STATIC_INLINE void intc_enable_irq (IRQn_Type IRQn)
 Enable Interrupt.
 
__STATIC_INLINE bool intc_is_irq_enabled (IRQn_Type IRQn)
 Get Interrupt Enable status.
 
__arm void intc_disable_irq (IRQn_Type IRQn)
 Disable Interrupt.
 
__STATIC_INLINE bool intc_is_irq_pending (IRQn_Type IRQn)
 Get Pending Interrupt.
 
__STATIC_INLINE void intc_pending_set (IRQn_Type IRQn)
 Set Pending Interrupt.
 
__STATIC_INLINE void intc_pending_clear (IRQn_Type IRQn)
 Clear Pending Interrupt.
 
__STATIC_INLINE uint32_t intc_get_active_irq (void)
 
__STATIC_INLINE void intc_priority_set (IRQn_Type IRQn, uint32_t priority)
 Set Interrupt Priority.
 
__STATIC_INLINE uint32_t intc_priority_get (IRQn_Type IRQn)
 Get Interrupt Priority.
 
void intc_init (void)
 

Function Documentation

◆ intc_enable_irq()

__STATIC_INLINE void intc_enable_irq ( IRQn_Type  IRQn)

Enable Interrupt.

Enables a device specific interrupt in the NVIC interrupt controller.

Parameters
[in]IRQnDevice specific interrupt number.
Note
IRQn must not be negative.

◆ intc_is_irq_enabled()

__STATIC_INLINE bool intc_is_irq_enabled ( IRQn_Type  IRQn)

Get Interrupt Enable status.

Returns a device specific interrupt enable status from the NVIC interrupt controller.

Parameters
[in]IRQnDevice specific interrupt number.
Returns
0 Interrupt is not enabled.
1 Interrupt is enabled.
Note
IRQn must not be negative.

◆ intc_disable_irq()

__arm void intc_disable_irq ( IRQn_Type  IRQn)
extern

Disable Interrupt.

Disables a device specific interrupt in the NVIC interrupt controller.

Parameters
[in]IRQnDevice specific interrupt number.
Note
IRQn must not be negative.

◆ intc_is_irq_pending()

__STATIC_INLINE bool intc_is_irq_pending ( IRQn_Type  IRQn)

Get Pending Interrupt.

Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt.

Parameters
[in]IRQnDevice specific interrupt number.
Returns
0 Interrupt status is not pending.
1 Interrupt status is pending.
Note
IRQn must not be negative.

◆ intc_pending_set()

__STATIC_INLINE void intc_pending_set ( IRQn_Type  IRQn)

Set Pending Interrupt.

Sets the pending bit of a device specific interrupt in the NVIC pending register.

Parameters
[in]IRQnDevice specific interrupt number.
Note
IRQn must not be negative.

◆ intc_pending_clear()

__STATIC_INLINE void intc_pending_clear ( IRQn_Type  IRQn)

Clear Pending Interrupt.

Clears the pending bit of a device specific interrupt in the NVIC pending register.

Parameters
[in]IRQnDevice specific interrupt number.
Note
IRQn must not be negative.

◆ intc_get_active_irq()

__STATIC_INLINE uint32_t intc_get_active_irq ( void  )

◆ intc_priority_set()

__STATIC_INLINE void intc_priority_set ( IRQn_Type  IRQn,
uint32_t  priority 
)

Set Interrupt Priority.

Sets the priority of a device specific interrupt or a processor exception. The interrupt number can be positive to specify a device specific interrupt, or negative to specify a processor exception.

Parameters
[in]IRQnInterrupt number.
[in]priorityPriority to set.
Note
The priority cannot be set for every processor exception.

◆ intc_priority_get()

__STATIC_INLINE uint32_t intc_priority_get ( IRQn_Type  IRQn)

Get Interrupt Priority.

Reads the priority of a device specific interrupt or a processor exception. The interrupt number can be positive to specify a device specific interrupt, or negative to specify a processor exception.

Parameters
[in]IRQnInterrupt number.
Returns
Interrupt Priority. Value is aligned automatically to the implemented priority bits of the microcontroller.

◆ intc_init()

void intc_init ( void  )
extern

set vector table

enable all interrupt source

disable all interrupt

clear all pending bit

Mask interrupts with lower or the same priority