I2C design help
I'm working on a custom board that is equipped with a battery gauge (BQ27441) connected to a PIC32MX274F256D via I2C. The chip has a pretty simple command set to get/set thresholds and battery parameters. I was looking on how to interact with it, using harmony: let's say I want to read the voltage, how would you design an API (SYNCHRONOUS) to do that? I may bring up a callback system, but I don't really like the idea since it is async. I saw the example shipped with the framework, but they seem pretty complex even to achieve simple tasks (ie a series of commands to enter in a specific mode). I tried to open the driver with DRV_IO_INTENT_BLOCKING, but there is no way to get the data sent without a call to DRV_I2C_Tasks().
Any source where I can find some tutorials or example?