NVIC_SetPriority is mapped to __NVIC_SetPriority
If you see below implementation the priority value is getting shifted.
NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
NVIC_SetPriority is mapped to __NVIC_SetPriority
If you see below implementation the priority value is getting shifted.
NVIC->IPR[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);