我正在使用Keil版本5工具链对STM32F0系列进行编程,但我无法解决下面给出的错误。我确信我遗漏了一些东西,但很难找到它。
> ..\Core\Src\max2871.c(169): error: #18: expected a ")"
if (((test_data[2] & ((1 << 28) | (1 << 27) | (1 << 26))) >> 26) == 0b110)
字符串
先谢了。
以下是完整的功能块:
void plo_check_lock_status(void)
{
// Saves the status only if the muxout pin is set correctly.
if (((test_data[2] & ((1 << 28) | (1 << 27) | (1 << 26))) >> 26) == 0b110)
plo_buff_push(HAL_GPIO_ReadPin(PLO_MUXOUT_GPIO_Port, PLO_MUXOUT_Pin));
else
HAL_NVIC_DisableIRQ(EXTI0_1_IRQn);
}
型
1条答案
按热度按时间cygmwpex1#
你使用了if语句,但是你忘记使用{ and }了。当你使用if语句时,你有两种方法:
1.按单个状态使用if语句; If(...)...;
1.多状态使用if语句,使用{}. If(...){...} Else{...} Good Luck