We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uint8_t Button_State :4 ; /* 按键当前状态(按下还是弹起) / uint8_t Button_Last_State :4 ; / 上一次的按键状态,用于判断双击 / uint8_t Button_Trigger_Level :2 ; / 按键触发电平 / uint8_t Button_Last_Level :2 ; / 按键当前电平 */ 环境:IAR,stm8,实测,这几个的位域操作与stm8的io电平读取返回函数冲突, return ((BitStatus)(GPIOx->IDR & (uint8_t)GPIO_Pin)); 这个返回值为bool类型的值实际上是对应的uint8_t值,在高位引脚的时候导致Button_Last_Level ,Button_Trigger_Level ,无论如何不能等于io返回值,导致一直报错,望楼主把4个状态位改为bool类型,或去掉后边的位域操作符。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
uint8_t Button_State :4 ; /* 按键当前状态(按下还是弹起) /
uint8_t Button_Last_State :4 ; / 上一次的按键状态,用于判断双击 /
uint8_t Button_Trigger_Level :2 ; / 按键触发电平 /
uint8_t Button_Last_Level :2 ; / 按键当前电平 */
环境:IAR,stm8,实测,这几个的位域操作与stm8的io电平读取返回函数冲突,
return ((BitStatus)(GPIOx->IDR & (uint8_t)GPIO_Pin));
这个返回值为bool类型的值实际上是对应的uint8_t值,在高位引脚的时候导致Button_Last_Level ,Button_Trigger_Level ,无论如何不能等于io返回值,导致一直报错,望楼主把4个状态位改为bool类型,或去掉后边的位域操作符。
The text was updated successfully, but these errors were encountered: