上传者: sinat_33669467
|
上传时间: 2022-09-18 21:38:51
|
文件大小: 2KB
|
文件类型: C
STM32模拟I2C时序的初始化程序
void I2C_INIT(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = I2C_SCL | I2C_SDA;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOB,&GPIO_InitStructure);
I2C_SCL_H; //À¸ßSCL
I2C_SDA_H; //À¸ßSDA
}