@@ -1502,6 +1502,35 @@ typedef struct
1502
1502
@{
1503
1503
*/
1504
1504
1505
+ #ifdef CMSIS_NVIC_VIRTUAL
1506
+ #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE
1507
+ #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h"
1508
+ #endif
1509
+ #include CMSIS_NVIC_VIRTUAL_HEADER_FILE
1510
+ #else
1511
+ #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping
1512
+ #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping
1513
+ #define NVIC_EnableIRQ __NVIC_EnableIRQ
1514
+ #define NVIC_DisableIRQ __NVIC_DisableIRQ
1515
+ #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ
1516
+ #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ
1517
+ #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ
1518
+ #define NVIC_GetActive __NVIC_GetActive
1519
+ #define NVIC_SetPriority __NVIC_SetPriority
1520
+ #define NVIC_GetPriority __NVIC_GetPriority
1521
+ #endif /* CMSIS_NVIC_VIRTUAL */
1522
+
1523
+ #ifdef CMSIS_VECTAB_VIRTUAL
1524
+ #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE
1525
+ #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h"
1526
+ #endif
1527
+ #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE
1528
+ #else
1529
+ #define NVIC_SetVector __NVIC_SetVector
1530
+ #define NVIC_GetVector __NVIC_GetVector
1531
+ #endif /* CMSIS_VECTAB_VIRTUAL */
1532
+
1533
+
1505
1534
/** \brief Set Priority Grouping
1506
1535
1507
1536
The function sets the priority grouping field using the required unlock sequence.
@@ -1512,7 +1541,7 @@ typedef struct
1512
1541
1513
1542
\param [in] PriorityGroup Priority grouping field.
1514
1543
*/
1515
- __STATIC_INLINE void NVIC_SetPriorityGrouping (uint32_t PriorityGroup )
1544
+ __STATIC_INLINE void __NVIC_SetPriorityGrouping (uint32_t PriorityGroup )
1516
1545
{
1517
1546
uint32_t reg_value ;
1518
1547
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t )0x07UL ); /* only values 0..7 are used */
@@ -1532,7 +1561,7 @@ __STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
1532
1561
1533
1562
\return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
1534
1563
*/
1535
- __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping (void )
1564
+ __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping (void )
1536
1565
{
1537
1566
return ((uint32_t )((SCB -> AIRCR & SCB_AIRCR_PRIGROUP_Msk ) >> SCB_AIRCR_PRIGROUP_Pos ));
1538
1567
}
@@ -1544,7 +1573,7 @@ __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
1544
1573
1545
1574
\param [in] IRQn External interrupt number. Value cannot be negative.
1546
1575
*/
1547
- __STATIC_INLINE void NVIC_EnableIRQ (IRQn_Type IRQn )
1576
+ __STATIC_INLINE void __NVIC_EnableIRQ (IRQn_Type IRQn )
1548
1577
{
1549
1578
NVIC -> ISER [(((uint32_t )(int32_t )IRQn ) >> 5UL )] = (uint32_t )(1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ));
1550
1579
}
@@ -1556,7 +1585,7 @@ __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
1556
1585
1557
1586
\param [in] IRQn External interrupt number. Value cannot be negative.
1558
1587
*/
1559
- __STATIC_INLINE void NVIC_DisableIRQ (IRQn_Type IRQn )
1588
+ __STATIC_INLINE void __NVIC_DisableIRQ (IRQn_Type IRQn )
1560
1589
{
1561
1590
NVIC -> ICER [(((uint32_t )(int32_t )IRQn ) >> 5UL )] = (uint32_t )(1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ));
1562
1591
}
@@ -1572,7 +1601,7 @@ __STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
1572
1601
\return 0 Interrupt status is not pending.
1573
1602
\return 1 Interrupt status is pending.
1574
1603
*/
1575
- __STATIC_INLINE uint32_t NVIC_GetPendingIRQ (IRQn_Type IRQn )
1604
+ __STATIC_INLINE uint32_t __NVIC_GetPendingIRQ (IRQn_Type IRQn )
1576
1605
{
1577
1606
return ((uint32_t )(((NVIC -> ISPR [(((uint32_t )(int32_t )IRQn ) >> 5UL )] & (1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ))) != 0UL ) ? 1UL : 0UL ));
1578
1607
}
@@ -1584,7 +1613,7 @@ __STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
1584
1613
1585
1614
\param [in] IRQn Interrupt number. Value cannot be negative.
1586
1615
*/
1587
- __STATIC_INLINE void NVIC_SetPendingIRQ (IRQn_Type IRQn )
1616
+ __STATIC_INLINE void __NVIC_SetPendingIRQ (IRQn_Type IRQn )
1588
1617
{
1589
1618
NVIC -> ISPR [(((uint32_t )(int32_t )IRQn ) >> 5UL )] = (uint32_t )(1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ));
1590
1619
}
@@ -1596,7 +1625,7 @@ __STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
1596
1625
1597
1626
\param [in] IRQn External interrupt number. Value cannot be negative.
1598
1627
*/
1599
- __STATIC_INLINE void NVIC_ClearPendingIRQ (IRQn_Type IRQn )
1628
+ __STATIC_INLINE void __NVIC_ClearPendingIRQ (IRQn_Type IRQn )
1600
1629
{
1601
1630
NVIC -> ICPR [(((uint32_t )(int32_t )IRQn ) >> 5UL )] = (uint32_t )(1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ));
1602
1631
}
@@ -1611,7 +1640,7 @@ __STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
1611
1640
\return 0 Interrupt status is not active.
1612
1641
\return 1 Interrupt status is active.
1613
1642
*/
1614
- __STATIC_INLINE uint32_t NVIC_GetActive (IRQn_Type IRQn )
1643
+ __STATIC_INLINE uint32_t __NVIC_GetActive (IRQn_Type IRQn )
1615
1644
{
1616
1645
return ((uint32_t )(((NVIC -> IABR [(((uint32_t )(int32_t )IRQn ) >> 5UL )] & (1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ))) != 0UL ) ? 1UL : 0UL ));
1617
1646
}
@@ -1626,7 +1655,7 @@ __STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
1626
1655
\param [in] IRQn Interrupt number.
1627
1656
\param [in] priority Priority to set.
1628
1657
*/
1629
- __STATIC_INLINE void NVIC_SetPriority (IRQn_Type IRQn , uint32_t priority )
1658
+ __STATIC_INLINE void __NVIC_SetPriority (IRQn_Type IRQn , uint32_t priority )
1630
1659
{
1631
1660
if ((int32_t )IRQn < 0 ) {
1632
1661
SCB -> SHP [(((uint32_t )(int32_t )IRQn ) & 0xFUL )- 4UL ] = (uint8_t )((priority << (8 - __NVIC_PRIO_BITS )) & (uint32_t )0xFFUL );
@@ -1648,7 +1677,7 @@ __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
1648
1677
\return Interrupt Priority. Value is aligned automatically to the implemented
1649
1678
priority bits of the microcontroller.
1650
1679
*/
1651
- __STATIC_INLINE uint32_t NVIC_GetPriority (IRQn_Type IRQn )
1680
+ __STATIC_INLINE uint32_t __NVIC_GetPriority (IRQn_Type IRQn )
1652
1681
{
1653
1682
1654
1683
if ((int32_t )IRQn < 0 ) {
0 commit comments