3082| 2
|
UCOSII添加外中断进入hardfault |
5金钱
最佳答案解决了,进入中断的时候忘记增加进入临界段的两个宏了
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
OSIntEnter();
delay_ms(10); //消抖
if(PGin(6)==0) //按下
{
printf("按下了APPKEY\r\n");
}
else if(PGin(6) ==1)//释放
{
printf("释放了APPKEY\r\n");
}
OSIntExit();
}
这样就可以了
| ||
| ||
| ||
|手机版|OpenEdv-开源电子网
( 粤ICP备12000418号-1 )
GMT+8, 2025-3-1 06:09
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网