generated from hulk/gd32e23x_template
recevice function
This commit is contained in:
25
src/main.c
25
src/main.c
@@ -106,9 +106,9 @@ int main(void)
|
||||
|
||||
// uint16_t data[3] = {0};
|
||||
|
||||
// I2C _scan();
|
||||
// I2C_scan();
|
||||
|
||||
delay_ms(200);
|
||||
delay_ms(1000);
|
||||
|
||||
// while (i2c_flag_get(I2C0, I2C_FLAG_I2CBSY));
|
||||
// i2c_start_on_bus(I2C0);
|
||||
@@ -136,21 +136,26 @@ int main(void)
|
||||
//
|
||||
// i2c_ack_config(I2C0, I2C_ACK_ENABLE);
|
||||
|
||||
iicSendData();
|
||||
iicReceiveData();
|
||||
// iicSendData();
|
||||
// iicReceiveData();
|
||||
|
||||
// int result = 0;
|
||||
// result = LDC1612_IIC_read_16bits();
|
||||
// printf("result = %d\r\n", result);
|
||||
int result = 0;
|
||||
result = LDC1612_IIC_read_16bits();
|
||||
printf("result = %d\r\n", result);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
while(1){
|
||||
// printf("OK!!!\r\n");
|
||||
//
|
||||
// delay_ms(1000);
|
||||
|
||||
|
||||
delay_ms(1000);
|
||||
printf("OK!!!\r\n");
|
||||
// iicSendData();
|
||||
|
||||
// i2c_flag_clear(I2C0, I2C_FLAG_I2CBSY);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user