来源:https://www.cnblogs.com/debugdabiaoge/p/17965009
软件中断可以随时开启 使能软件中断 - PFIC_EnableIRQ(SWI_IRQn); //软件中断使能
软件中断函数 - __attribute__((interrupt("WCH-Interrupt-fast")))
- __attribute__((section(".highcode")))
- void SW_Handler(void)
- {
- //函数体
- }
启动软件中断 - PFIC_SetPendingIRQ(SWI_IRQn); //置软件中断标志
|