generated from hulk/gd32e23x_template
IIC scan
This commit is contained in:
13
src/main.c
13
src/main.c
@@ -52,15 +52,14 @@ int main(void)
|
||||
systick_config();
|
||||
RS485_config();
|
||||
led_config();
|
||||
I2C_config();
|
||||
|
||||
// delay_ms(5000);
|
||||
printf("\r\n");
|
||||
printf("XLSW-3DP-LDC1612! V0.0.1\r\n");
|
||||
printf("\r\n");
|
||||
|
||||
LDC1612_I2CConfig();
|
||||
// LDC1612_Init();
|
||||
// I2C_Scan();
|
||||
I2C_scan();
|
||||
LDC1612_read_sensor_infomation();
|
||||
|
||||
|
||||
@@ -68,14 +67,6 @@ int main(void)
|
||||
|
||||
|
||||
while(1){
|
||||
// LDC1612_read_reg(LDC1612_ADDR, 0x7f, data, 2);
|
||||
// printf("msb:%x %x\r\n",data[0],data[1]);
|
||||
// LDC1612_read_reg(LDC1612_ADDR, 0x01, data, 2);
|
||||
// printf("msb:%x %x\r\n",data[0],data[1]);
|
||||
// printf("hello world!\r\n");
|
||||
// LDC1612_Init();
|
||||
// LDC1612_read_reg(LDC1612_ADDR, 0x01, data, 2);
|
||||
delay_ms(1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user