SCD40 is communicationg but the check for NACK mush have been disabled. Why?

This commit is contained in:
David Žaitlík
2021-07-11 12:32:29 +02:00
parent 005c651eff
commit 665b839d27
42 changed files with 5745 additions and 2338 deletions

View File

@@ -69,11 +69,13 @@ int8_t scd4x_read_measurement(int * co2, int *temperature, int *relative_humidit
buffer[0] = READ_MEASUREMENT >> 8;
buffer[1] = READ_MEASUREMENT & 0x00ff;
result = i2c_transmit(SCD4X_I2C_ADDRESS<<1, buffer, 2);
if (result != I2C_OK) {
return SCD4X_ERROR;
}
LL_mDelay(10); // 10 ms should be enough
// TODO: Proc to vraci NACK? Vyresit.
/*if (result != I2C_OK) {
return SCD4X_ERROR;
}*/
LL_mDelay(1); // 10 ms should be enough
// read out
result = i2c_receive(SCD4X_I2C_ADDRESS<<1, buffer, 9);
if (result != I2C_OK)