初级会员

- 积分
- 61
- 金钱
- 61
- 注册时间
- 2018-7-9
- 在线时间
- 15 小时
|
1金钱
总是报错..\HARDWARE\IIC\myiic.h(8): error: #65: expected a ";" 求大神解答。 非常感谢!
#ifndef __STM32F10x_TYPE_H
typedef enum { FALSE = 0, TRUE } bool; //总是报错..\HARDWARE\IIC\myiic.h(8): error: #65: expected a ";"
#else
typedef bool BOOL;
#endif
/模拟I2C端口输入,输出定义/
#define SCL_H GPIOC->BSRR = GPIO_Pin_6 //GPIO set 1
#define SCL_L GPIOC->BRR = GPIO_Pin_6 //GPIO set 0
#define SDA_H GPIOC->BSRR = GPIO_Pin_7
#define SDA_L GPIOC->BRR = GPIO_Pin_7
#define SCL_read GPIOC->IDR & GPIO_Pin_6
#define SDA_read GPIOC->IDR & GPIO_Pin_7
|
|