@@ -1337,6 +1337,34 @@ typedef struct
1337
1337
@{
1338
1338
*/
1339
1339
1340
+ #ifdef CMSIS_NVIC_VIRTUAL
1341
+ #ifndef CMSIS_NVIC_VIRTUAL_HEADER_FILE
1342
+ #define CMSIS_NVIC_VIRTUAL_HEADER_FILE "cmsis_nvic_virtual.h"
1343
+ #endif
1344
+ #include CMSIS_NVIC_VIRTUAL_HEADER_FILE
1345
+ #else
1346
+ #define NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping
1347
+ #define NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping
1348
+ #define NVIC_EnableIRQ __NVIC_EnableIRQ
1349
+ #define NVIC_DisableIRQ __NVIC_DisableIRQ
1350
+ #define NVIC_GetPendingIRQ __NVIC_GetPendingIRQ
1351
+ #define NVIC_SetPendingIRQ __NVIC_SetPendingIRQ
1352
+ #define NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ
1353
+ #define NVIC_GetActive __NVIC_GetActive
1354
+ #define NVIC_SetPriority __NVIC_SetPriority
1355
+ #define NVIC_GetPriority __NVIC_GetPriority
1356
+ #endif /* CMSIS_NVIC_VIRTUAL */
1357
+
1358
+ #ifdef CMSIS_VECTAB_VIRTUAL
1359
+ #ifndef CMSIS_VECTAB_VIRTUAL_HEADER_FILE
1360
+ #define CMSIS_VECTAB_VIRTUAL_HEADER_FILE "cmsis_vectab_virtual.h"
1361
+ #endif
1362
+ #include CMSIS_VECTAB_VIRTUAL_HEADER_FILE
1363
+ #else
1364
+ #define NVIC_SetVector __NVIC_SetVector
1365
+ #define NVIC_GetVector __NVIC_GetVector
1366
+ #endif /* CMSIS_VECTAB_VIRTUAL */
1367
+
1340
1368
/** \brief Set Priority Grouping
1341
1369
1342
1370
The function sets the priority grouping field using the required unlock sequence.
@@ -1347,7 +1375,7 @@ typedef struct
1347
1375
1348
1376
\param [in] PriorityGroup Priority grouping field.
1349
1377
*/
1350
- __STATIC_INLINE void NVIC_SetPriorityGrouping (uint32_t PriorityGroup )
1378
+ __STATIC_INLINE void __NVIC_SetPriorityGrouping (uint32_t PriorityGroup )
1351
1379
{
1352
1380
uint32_t reg_value ;
1353
1381
uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t )0x07UL ); /* only values 0..7 are used */
@@ -1367,7 +1395,7 @@ __STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
1367
1395
1368
1396
\return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field).
1369
1397
*/
1370
- __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping (void )
1398
+ __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping (void )
1371
1399
{
1372
1400
return ((uint32_t )((SCB -> AIRCR & SCB_AIRCR_PRIGROUP_Msk ) >> SCB_AIRCR_PRIGROUP_Pos ));
1373
1401
}
@@ -1379,7 +1407,7 @@ __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void)
1379
1407
1380
1408
\param [in] IRQn External interrupt number. Value cannot be negative.
1381
1409
*/
1382
- __STATIC_INLINE void NVIC_EnableIRQ (IRQn_Type IRQn )
1410
+ __STATIC_INLINE void __NVIC_EnableIRQ (IRQn_Type IRQn )
1383
1411
{
1384
1412
NVIC -> ISER [(((uint32_t )(int32_t )IRQn ) >> 5UL )] = (uint32_t )(1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ));
1385
1413
}
@@ -1391,7 +1419,7 @@ __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn)
1391
1419
1392
1420
\param [in] IRQn External interrupt number. Value cannot be negative.
1393
1421
*/
1394
- __STATIC_INLINE void NVIC_DisableIRQ (IRQn_Type IRQn )
1422
+ __STATIC_INLINE void __NVIC_DisableIRQ (IRQn_Type IRQn )
1395
1423
{
1396
1424
NVIC -> ICER [(((uint32_t )(int32_t )IRQn ) >> 5UL )] = (uint32_t )(1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ));
1397
1425
}
@@ -1407,7 +1435,7 @@ __STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn)
1407
1435
\return 0 Interrupt status is not pending.
1408
1436
\return 1 Interrupt status is pending.
1409
1437
*/
1410
- __STATIC_INLINE uint32_t NVIC_GetPendingIRQ (IRQn_Type IRQn )
1438
+ __STATIC_INLINE uint32_t __NVIC_GetPendingIRQ (IRQn_Type IRQn )
1411
1439
{
1412
1440
return ((uint32_t )(((NVIC -> ISPR [(((uint32_t )(int32_t )IRQn ) >> 5UL )] & (1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ))) != 0UL ) ? 1UL : 0UL ));
1413
1441
}
@@ -1419,7 +1447,7 @@ __STATIC_INLINE uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
1419
1447
1420
1448
\param [in] IRQn Interrupt number. Value cannot be negative.
1421
1449
*/
1422
- __STATIC_INLINE void NVIC_SetPendingIRQ (IRQn_Type IRQn )
1450
+ __STATIC_INLINE void __NVIC_SetPendingIRQ (IRQn_Type IRQn )
1423
1451
{
1424
1452
NVIC -> ISPR [(((uint32_t )(int32_t )IRQn ) >> 5UL )] = (uint32_t )(1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ));
1425
1453
}
@@ -1431,7 +1459,7 @@ __STATIC_INLINE void NVIC_SetPendingIRQ(IRQn_Type IRQn)
1431
1459
1432
1460
\param [in] IRQn External interrupt number. Value cannot be negative.
1433
1461
*/
1434
- __STATIC_INLINE void NVIC_ClearPendingIRQ (IRQn_Type IRQn )
1462
+ __STATIC_INLINE void __NVIC_ClearPendingIRQ (IRQn_Type IRQn )
1435
1463
{
1436
1464
NVIC -> ICPR [(((uint32_t )(int32_t )IRQn ) >> 5UL )] = (uint32_t )(1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ));
1437
1465
}
@@ -1446,7 +1474,7 @@ __STATIC_INLINE void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
1446
1474
\return 0 Interrupt status is not active.
1447
1475
\return 1 Interrupt status is active.
1448
1476
*/
1449
- __STATIC_INLINE uint32_t NVIC_GetActive (IRQn_Type IRQn )
1477
+ __STATIC_INLINE uint32_t __NVIC_GetActive (IRQn_Type IRQn )
1450
1478
{
1451
1479
return ((uint32_t )(((NVIC -> IABR [(((uint32_t )(int32_t )IRQn ) >> 5UL )] & (1UL << (((uint32_t )(int32_t )IRQn ) & 0x1FUL ))) != 0UL ) ? 1UL : 0UL ));
1452
1480
}
@@ -1461,7 +1489,7 @@ __STATIC_INLINE uint32_t NVIC_GetActive(IRQn_Type IRQn)
1461
1489
\param [in] IRQn Interrupt number.
1462
1490
\param [in] priority Priority to set.
1463
1491
*/
1464
- __STATIC_INLINE void NVIC_SetPriority (IRQn_Type IRQn , uint32_t priority )
1492
+ __STATIC_INLINE void __NVIC_SetPriority (IRQn_Type IRQn , uint32_t priority )
1465
1493
{
1466
1494
if ((int32_t )IRQn < 0 ) {
1467
1495
SCB -> SHP [(((uint32_t )(int32_t )IRQn ) & 0xFUL )- 4UL ] = (uint8_t )((priority << (8 - __NVIC_PRIO_BITS )) & (uint32_t )0xFFUL );
@@ -1483,7 +1511,7 @@ __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
1483
1511
\return Interrupt Priority. Value is aligned automatically to the implemented
1484
1512
priority bits of the microcontroller.
1485
1513
*/
1486
- __STATIC_INLINE uint32_t NVIC_GetPriority (IRQn_Type IRQn )
1514
+ __STATIC_INLINE uint32_t __NVIC_GetPriority (IRQn_Type IRQn )
1487
1515
{
1488
1516
1489
1517
if ((int32_t )IRQn < 0 ) {
0 commit comments