/* Set Interrupt Priority. 
Sets the priority of an interrupt.  */
void drv_nvic_set_prio(int32_t IRQn, uint32_t priority)
/* Set Interrupt Priority. 
Sets the priority of an interrupt.  */
void drv_nvic_set_prio(int32_t IRQn, uint32_t priority)
{
    NVIC->IPR[_IP_IDX(IRQn)]  = ((uint32_t)(NVIC->IPR[_IP_IDX(IRQn)]  & ~(0xFFUL << _BIT_SHIFT(IRQn))) |
                                 (((priority << (8U - s_nvic_prio_bits)) & (uint32_t)0xFFUL) << _BIT_SHIFT(IRQn)));
}