generated from hulk/gd32e23x_template_cmake_vscode
fix i2c reset bus function
This commit is contained in:
22
Src/main.c
22
Src/main.c
@@ -60,7 +60,7 @@ int main(void)
|
||||
led_init();
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
char hello_world[] = {"Hello World!"};
|
||||
char hello_world[] = {"Hello World!\r\n"};
|
||||
|
||||
for (uint8_t i = 0; i < sizeof(hello_world); i++)
|
||||
{
|
||||
@@ -69,29 +69,23 @@ int main(void)
|
||||
}
|
||||
|
||||
while (usart_flag_get(RS485_PHY, USART_FLAG_TC) == RESET) {}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
i2c_config();
|
||||
|
||||
i2c_scan();
|
||||
|
||||
// i2c_bus_reset();
|
||||
|
||||
// uint8_t sensor_data[2] = {0};
|
||||
|
||||
// i2c_read_16bits(0x2B, 0x7E, sensor_data);
|
||||
|
||||
// printf("Sensor Data: 0x%02X 0x%02X\r\n", sensor_data[0], sensor_data[1]);
|
||||
|
||||
// i2c_bus_reset();
|
||||
i2c_bus_reset();
|
||||
|
||||
i2c_scan();
|
||||
#endif
|
||||
|
||||
ldc1612_iic_get_sensor_infomation();
|
||||
|
||||
#ifdef DEBUG_VERBOSE
|
||||
i2c_scan();
|
||||
#endif
|
||||
|
||||
|
||||
while(1){
|
||||
command_process();
|
||||
|
Reference in New Issue
Block a user