简体   繁体   中英

function name cast to uint32_t

I cannot understand this part of code can someone explain me what is going on?

I got a 2 functions:

void timer_irq_handler(void) {
   ....
}

void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
   ....
}

then I got something like this:

NVIC_SetVector(TIM_MST_IRQ, (uint32_t)timer_irq_handler);

I don't understand to cast void function to (uint32_t)

函数名称是一个指针,将指针转换为uint32_t在C语言中很好。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM