RTC works, 5V needed
This commit is contained in:
@@ -329,7 +329,7 @@ void start_i2c_scan(I2C_HandleTypeDef *I2Chnd, uint32_t delay_){
|
||||
|
||||
HAL_StatusTypeDef status;
|
||||
uint8_t no_devices = 0;
|
||||
DBG_print("\n\r [ I2C Scanner v0.1 ]");
|
||||
//DBG_print("\n\r [ I2C Scanner v0.1 ]");
|
||||
|
||||
for (uint8_t i = 0; i < 128; i++){
|
||||
|
||||
@@ -338,7 +338,7 @@ void start_i2c_scan(I2C_HandleTypeDef *I2Chnd, uint32_t delay_){
|
||||
if ( status != HAL_OK){
|
||||
//DBG_print(".\n\r");
|
||||
} else {
|
||||
DBG_print("\n\rDevice found! Address: 0x%X",i);
|
||||
//DBG_print("\n\rDevice found! Address: 0x%X",i);
|
||||
++no_devices;
|
||||
}
|
||||
|
||||
@@ -347,9 +347,9 @@ void start_i2c_scan(I2C_HandleTypeDef *I2Chnd, uint32_t delay_){
|
||||
}
|
||||
|
||||
if (!no_devices){
|
||||
DBG_print("\n\r No Devices found!");
|
||||
//DBG_print("\n\r No Devices found!");
|
||||
} else {
|
||||
DBG_print("\n\r Total Devices found: %d",no_devices);
|
||||
//DBG_print("\n\r Total Devices found: %d",no_devices);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user