..LibSTM32Sourcestm32f30x_hrtim.c(1139): error: #268: declaration may not appear after executable statement in block
FlagStatus bitstatus = RESET;
这个是怎么引起的?求高手帮忙解决。谢谢
case HRTIM_TIMERINDEX_TIMER_A:
case HRTIM_TIMERINDEX_TIMER_B:
case HRTIM_TIMERINDEX_TIMER_C:
case HRTIM_TIMERINDEX_TIMER_D:
case HRTIM_TIMERINDEX_TIMER_E:
{
if ((HRTIMx->HRTIM_TIMERx[TimerIdx].TIMxISR & HRTIM_FLAG) != RESET)
{
bitstatus = SET;
}
else
{
bitstatus = RESET;
}
}
break;
FlagStatus HRTIM_GetFlagStatus(HRTIM_TypeDef * HRTIMx, uint32_t TimerIdx, uint32_t HRTIM_FLAG)
{
assert_param(IS_HRTIM_TIMERINDEX(TimerIdx));
FlagStatus bitstatus = RESET;
switch(TimerIdx)
{
case HRTIM_TIMERINDEX_MASTER:
{
if ((HRTIMx->HRTIM_MASTER.MISR & HRTIM_FLAG) != RESET)
{
bitstatus = SET;
}
else
{
bitstatus = RESET;
}
}
break;
case HRTIM_TIMERINDEX_TIMER_A:
case HRTIM_TIMERINDEX_TIMER_B:
case HRTIM_TIMERINDEX_TIMER_C:
case HRTIM_TIMERINDEX_TIMER_D:
case HRTIM_TIMERINDEX_TIMER_E:
{
if ((HRTIMx->HRTIM_TIMERx[TimerIdx].TIMxISR & HRTIM_FLAG) != RESET)
{
bitstatus = SET;
}
else
{
bitstatus = RESET;
}
}
break;
default:
break;
}
return bitstatus;
}
一周热门 更多>