I2C_CheckEvent(I2C1,I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED));如果不复用结果没问题代码 GPIO_InitTypeDef GPIO_InitStructure /* 使能与 I2C1 有关的时钟 */ RCC_APB2PeriphClockCmd (RCC_APB2Periph_AFIO | RCC_APB2Periph_GPIOB,ENABLE )
1,I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)){} /* Send address byte. Wait until data has been received */I2C_SendData(I2C1, 0x00 lanziji2019-07-16 14:52:52 用MCP3424从机与STM8L DISCOVERY主机通信 ){ while(!I2C_CheckEvent(I2Cx,I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)); } 否则if...
stm32 在用mpu6050时 iic 复用pb8 pb9卡在 while(!I2C_CheckEvent(I2C1,I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED));如果不复用结果没问题代码 GPIO_InitTypeDef GPIO_InitStructure; /* 使能与 I2C1 有关的时钟 */ RCC_APB2PeriphClockCmd (RCC_APB2Periph_AFIO | RCC_APB2Periph_GPIOB,ENABLE ); RCC...
while(!I2C_CheckEvent(I2C1,I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED));I2C_SendData(I2C1,Write...