测试下插入代码效果

测试下插入代码效果,网上随意down的,用的插入代码,效果还行,立即预览;

void ANBT_I2C_Configuration(void)            
{
    GPIO_InitTypeDef GPIO_InitStructure; 
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE); 
    //
    AnBT_Uart1_Send_String("I2C初始化成功",13);
    //
  GPIO_InitStructure.GPIO_Pin = ANBT_I2C_SCL | ANBT_I2C_SDA;                    //圆点博士:配置使用的I2C口
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;   //圆点博士:设置I2C口最大允许输出速度
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;      //圆点博士:设置I2C为开漏输出
  GPIO_Init(ANBT_I2C_PORT, &GPIO_InitStructure); 
    //
  GPIO_InitStructure.GPIO_Pin = AnBT_MPU6050_INT;                    //圆点博士:配置使用的I2C口
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;   //圆点博士:设置I2C口最大允许输出速度
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;      //圆点博士:设置I2C为开漏输出
  GPIO_Init(AnBT_MPU6050_INT_PORT, &GPIO_InitStructure); 
    //
    ANBT_I2C_SCL_1; 
    ANBT_I2C_SDA_1;
    ANBT_I2C_DELAY;
}

试试用source code plug,看效果;

void ANBT_I2C_Configuration(void)			
{
	GPIO_InitTypeDef GPIO_InitStructure; 
	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE); 
	//
	AnBT_Uart1_Send_String("I2C初始化成功",13);
	//
  GPIO_InitStructure.GPIO_Pin = ANBT_I2C_SCL | ANBT_I2C_SDA;					//圆点博士:配置使用的I2C口
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;   //圆点博士:设置I2C口最大允许输出速度
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;	  //圆点博士:设置I2C为开漏输出
  GPIO_Init(ANBT_I2C_PORT, &GPIO_InitStructure); 
	//
  GPIO_InitStructure.GPIO_Pin = AnBT_MPU6050_INT;					//圆点博士:配置使用的I2C口
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;   //圆点博士:设置I2C口最大允许输出速度
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;	  //圆点博士:设置I2C为开漏输出
  GPIO_Init(AnBT_MPU6050_INT_PORT, &GPIO_InitStructure); 
	//
	ANBT_I2C_SCL_1; 
	ANBT_I2C_SDA_1;
	ANBT_I2C_DELAY;
}

天啊撸,日了狗,不能立即预览,发不上去看看效果吧;

今天先这个了,嘎嘎!

原文地址:https://www.cnblogs.com/haig/p/6061314.html