how to receive/send i2c data to bq24193

Post Reply
dalzy
Posts: 1
Joined: Wed Jan 22, 2025 6:55 pm

how to receive/send i2c data to bq24193

Post by dalzy » Wed Jan 22, 2025 7:32 pm

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.


Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests