2021-02-10 08:26 PM
2021-02-18 05:13 AM
thanks angelo,
in solved due to this changes
I2C_16_BIT_REG_ADDRESS changed before it is I2C_8_BIT_REG_ADDRESS
i2c_result_t i2c_lld_write(I2CDriver *i2cd, uint8_t dev_addr, uint16_t reg_addr, uint8_t *data, uint8_t ndata_bytes) {
if (ndata_bytes == 0U) {
return I2C_NO_ERROR;
}
/* Check for valid address */
if ((dev_addr == 0U) || ((dev_addr & 1U) == 1U)) {
return I2C_ERROR_INVALID_ADDRESS;
}
if (data == NULL) {
return I2C_ERROR_INVALID_ARGUMENT;
}
return (i2cd->ops.write != NULL) ? i2cd->ops.write(i2cd->ops.priv, dev_addr, reg_addr, I2C_16_BIT_REG_ADDRESS, data, ndata_bytes) : I2C_ERROR_INVALID_ARGUMENT;
}
2021-02-12 04:41 AM
Good morning,
Could you please tell me if the original demo is or not working fine into your environment ?
Did you changed some configurations in term of I2C clock ?
If you are using the SPC582B-DISP
and the expansion board based on VL6180X
they are totally pin compatible and then you should run the demo as it is without problem. Please confirm to me.
Let me know,
Regards, Angelo
2021-02-18 05:13 AM
thanks angelo,
in solved due to this changes
I2C_16_BIT_REG_ADDRESS changed before it is I2C_8_BIT_REG_ADDRESS
i2c_result_t i2c_lld_write(I2CDriver *i2cd, uint8_t dev_addr, uint16_t reg_addr, uint8_t *data, uint8_t ndata_bytes) {
if (ndata_bytes == 0U) {
return I2C_NO_ERROR;
}
/* Check for valid address */
if ((dev_addr == 0U) || ((dev_addr & 1U) == 1U)) {
return I2C_ERROR_INVALID_ADDRESS;
}
if (data == NULL) {
return I2C_ERROR_INVALID_ARGUMENT;
}
return (i2cd->ops.write != NULL) ? i2cd->ops.write(i2cd->ops.priv, dev_addr, reg_addr, I2C_16_BIT_REG_ADDRESS, data, ndata_bytes) : I2C_ERROR_INVALID_ARGUMENT;
}