Page 1 of 1

how to receive/send i2c data to bq24193

Posted: Wed Jan 22, 2025 7:32 pm
by dalzy

I am trying to write/read the registers of the switch charge controller. But I have no idea what I'm doing.

So far what I have written:
I2cSession incV;
int outData[1] = {0x21};

i2cInitialize();
i2cOpenSession(&incV, I2cDevice_Bq24193);
i2csessionReceiveAuto(&incV, outData, 1, I2cTransactionOption_Start);
i2csessionReceiveAuto(&incV, outData, 1, I2cTransactionOption_Stop);
printf("out", outData[0]);
i2csessionClose(&incV);
i2cExit();
printf("\n\x1b[Ktest");

The problem is this doesn't seem to give any output.