|
|
@ -102,6 +102,7 @@ int32_t M24M02_I2C_EEPROM::read32(uint16_t add, uint32_t* val) { |
|
|
|
|
|
|
|
void M24M02_I2C_EEPROM::scan_i2c() { |
|
|
|
memset(i2c_ping_state, 0, sizeof(i2c_ping_state)); |
|
|
|
ZLOGI(TAG, "scan i2c"); |
|
|
|
for (uint16_t i = 0; i < 255; i++) { |
|
|
|
HAL_StatusTypeDef status = HAL_I2C_IsDeviceReady(m_i2c_handle, i << 1, 1, 1); |
|
|
|
if (status == HAL_OK) { |
|
|
@ -111,6 +112,7 @@ void M24M02_I2C_EEPROM::scan_i2c() { |
|
|
|
i2c_ping_state[i] = false; |
|
|
|
} |
|
|
|
} |
|
|
|
ZLOGI(TAG, "scan i2c done"); |
|
|
|
} |
|
|
|
|
|
|
|
void M24M02_I2C_EEPROM::write_test_data_rom() { |
|
|
|